CakePHP2 file upload plugin - cakephp-2.0

I use paperclip plugin for Ruby on Rails app.
What is the defacto standard file upload plugin like paperclip for CakePHP2?
https://github.com/davidpersson/media supports only CakePHP1.3?

There is no default plugin defined, a suggestion would be to use the Uppy Plugin with ajax request, for more information go to:
[1]: https://uppy.io/docs/plugins/
I hope this helps.

David Persson's Media Plugin doesn't have a 2.0 compatible release, but somebody forked it to make it run on newer versions of Cake. This fork is actively developed (which also means things might still be broken) and with no official release incumbent it seems the best option to run the Media Plugin.
Apart from Persson's plugin there's MeioUpload which is also widely used and seems to be compatible with Cake 2.0.
There's Uploader (currently at version 3.3), which is compatible with Cake 2.0 (probably 2.1 as well).
Lastly, the plugin FileUpload by WebTechnick (known for his Facebook plugin for Cake) has a 2.0 branch which hasn't seen an official release, so proceed with caution.

Related

App rejected by Apple due to UIWebView being deprecated

I was working on a minor update to an app already accepted and available in the Apple App Store, and when I uploaded the new version, I got an e-mail that the binary was rejected because:
ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no
longer accepted. Instead, use WKWebView for improved security and
reliability. Learn more
(https://developer.apple.com/documentation/uikit/uiwebview).
How do I go about doing that? Is there a build hint or something?
Additional Information:
My app is using some CN1 extensions:
SENSORS,
BLUETOOTHLE,
JSON (required for BLUETOOTHLE)
As the BLUETOOTHLE extension uses a Cordova plugin, and Cordova was using UIWebView, I think that is the likely source.
According to Cordova's issue tracker, the Cordova plugin doesn't use UIWebView in its latest. It is possible that the build server has an old version cached. Try explicitly setting the version to 6.1 by adding the following build hint:
ios.pods=Cordova ~> 6.1
You'll already have this build hint, you just need to add the "~> 6.1" part.
Please post to indicate whether this fixed your issue, and I'll update the cn1lib to automatically add the version to the build hint.
Codename One doesn't use UIWebView at all. Make sure all your cn1libs are up to date and list them. Review your own native code and dependencies if you have any to make sure there's no usage there.

How to interpret suggestions when installing CakePHP via Composer?

When I try installing with command line:
composer self-update && composer create-project --prefer-dist cakephp/app my_app_name
I keep getting this message, which I didnt use to have, now which one is required, which one is not, do I have to download manually everytime?
cakephp/app suggests installing markstory/asset_compress (An asset compression plugin which provides file concatenation and a flexible filter system for preprocessing and minification.)
cakephp/app suggests installing dereuromark/cakephp-ide-helper (After baking your code, this keeps your annotations in sync with the code evolving from there on for maximum IDE and PHPStan compatibility.)
cakephp/app suggests installing phpunit/phpunit (Allows automated tests to be run without system-wide install.)
cakephp/cakephp suggests installing lib-ICU (The intl PHP library, to use Text::transliterate() or Text::slug())
symfony/console suggests installing symfony/event-dispatcher ()
symfony/console suggests installing symfony/lock ()
symfony/console suggests installing psr/log-implementation (For using the console logger)
m1/env suggests installing m1/vars (For loading of configs)
asm89/twig-cache-extension suggests installing psr/cache-implementation (To make use of PSR-6 cache implementation via PsrCacheAdapter.)
aptoma/twig-markdown suggests installing michelf/php-markdown (Original Markdown engine with MarkdownExtra.)
aptoma/twig-markdown suggests installing knplabs/github-api (Needed for using GitHub's Markdown engine provided through their API.)
ajgl/breakpoint-twig-extension suggests installing ext-xdebug (The Xdebug extension is required for the breakpoint to work)
ajgl/breakpoint-twig-extension suggests installing symfony/framework-bundle (The framework bundle to integrate the extension into Symfony)
ajgl/breakpoint-twig-extension suggests installing symfony/twig-bundle (The twig bundle to integrate the extension into Symfony)
psy/psysh suggests installing ext-pcntl (Enabling the PCNTL extension makes PsySH a lot happier :))
psy/psysh suggests installing ext-posix (If you have PCNTL, you'll want the POSIX extension as well.)
psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.)
psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit.)
These are only suggestions that may extend the functionality of already installed packages, but everything should work fine without them. For example monolog/monolog will suggest a couple of plugins that will allow logging into different backends. But monolog/monolog will work without them - you may not be able to log for example to Sentry, but monolog will still be usable without this feature.
So usually you can just ignore these suggestions. But you can take a few minutes to check what these suggested packages are actually doing - you can learn about new technologies and solutions that can make your app better and easier to maintain.
If you're really not interested in these suggestions, you can use --no-suggest switch to avoid displaying them on install/update/require:
composer install --no-suggest

How to add deployment message parameter with CloudBees Deployer plugin

Is there a way to give a custom message to the deployment with the Cloudbees Deployer plugin? We are used to putting the git version to the deployment so that it's easier to see which version we have running at run#cloud.
We've tried doing the deployment with the bees maven plugin and there it's possible to get the message parameter set from a build parameter. It just would be nice to be able to use the plugin instead of having to mess with the maven plugin, which is easier to get wrong in the configuration phase.
This feature was not available prior to version 4.4 of the CloudBees Deployer plugin.
Version 4.4 adds the ability to configure the description in the "Advanced" button:
The default value for this field is ${JOB_NAME} #${BUILD_NUMBER} so as to retain the previous behaviour.
The field supports all the usual Jenkins Environment token macro expansion, so you probably want to set it to something like ${GIT_COMMIT} or maybe ${GIT_COMMIT} ${JOB_NAME} #${BUILD_NUMBER}. In any case the standard token macros should provide the flexibility you require.
Note: If you are using DEV#cloud, and the Jenkins has a pre-4.4 version of the plugin you will have to wait until after 2013-04-15T15:00Z and restart your Jenkins instance to pick up the newer version of the plugin.
Note: If you are using the CloudBees Deployer plugin via the CloudBees Free Enterprise Plugins route, you will have to force the update center metadata to update or wait until after 2013-04-16T12:30Z to see the update in the list of plugins.

CakePHP question: How can i upgrade a cakephp project from cakephp-1.3.10 to cakephp-1.3.11?

I have developed a project with cakephp-1.3.10 .
Now I want to upgrade it to cakephp-1.3.11.
What's the easiest process to upgrade from cakephp-1.3.10 to cakephp-1.3.11 ?
download the cake zip, unpack, delete the app folder, put your app folder in.
I'm sure you can't use composer! And there's a high cost in upgrading by a large jump between versions, meaning that you will end up with a lot of deprecated code.
I would go like:
complete backup
upload your app to a Github repository
tag your code
create a new branch
upload your new code
debug
merge branch
since you were just upgrading from 1.3.10 to 1.3.11 the simplest way would have been to download latest cakephp and then simply copy lib/ folder from the downloaded folder and replacing it with your existing cakephp/lib/ folder. I would prefer to download latest version from cakephp's official website https://cakephp.org/
Note- If you have to upgrade from 1.x to 3.x then you have to move from 1.x to 2.x and then 2.x to 3.x, direct migration from 1.x to 3.x is not possible

Developing Maven 3.0 Plugin

I have developed few Maven plugins for Maven 2, but I am wondering what are the main changes when I want to develop a plugin (or migrate the existing ones) for Maven 3.0.
The documentation on the Maven site in not up-to-date (what a surprise!) and all related pages still deal with Maven 2.0, like this one:
This guide is intended to assist users
in developing Java plugins for Maven
2.0.
As an example, in Maven 2 plugin, I defined a configuration parameter like this:
/**
* Some parameter.
*
* #parameter
* #required
*/
private String foo;
So now, using the new Maven Plugin API, I expect real Java annotations...
Question: Where can I find documentation / information about the development of Maven 3 plugins?
There is now a work-in-progress implementation of annotations for Maven plugins developments! Read the following links:
https://cwiki.apache.org/confluence/display/MAVEN/Java+5+Annotations+for+Plugins
http://olamy.blogspot.fr/2012/05/java5-annotations-support-for-maven.html
for the record you can have a look http://maven.apache.org/plugin-tools/maven-plugin-plugin/examples/using-annotations.html
Just saw this... maybe it's helpful.
http://www.sonatype.com/people/2010/11/whats-in-maven-3-0-for-plugin-authors/
I think the best source is http://www.sonatype.com/books/mvnref-book/reference/index.html
Maybe it is not up to date but it is the best choice in my oppinion.
For developing maven plugins see section 11.
I hope it was helpfull.
Don't know if this is still relevant but this plugin provides annotation support
Maven Anno Mojo
In meantime the official doc seems to be up to date:
http://maven.apache.org/guides/plugin/guide-java-plugin-development.html
(they use annotations everywhere)
This is the best I have been able to find regarding plugin development.
http://maven.apache.org/guides/plugin/guide-java-plugin-development.html
Often the best way to work with maven is to use the archetype and play around with that.

Resources