FriendsOfCake/cakephp-upload

RFC: Clarify which versions are for which Cake release in the readme

davidyell opened this issue · 5 comments

What?

With the recent release of the 5.0.0-beta the plugin now supports Cake 2, 3 and 4!

RFC

I'd be interested to know what people think a solid solution is here. Currently there are just lines in the readme which mention Cake 2 and Cake 3, which I find a little misleading.

Version table

If the older versions are becoming more stable, would a release table be beneficial? Although this would add some maintenance overhead updating the tags for each release.

CakePHP Upload Documentation
4.x 5.0.0-beta https://cakephp-upload.readthedocs.io/en/latest/
3.x 4.0.1 https://cakephp-upload.readthedocs.io/en/4.0.0/
2.x 1.3.1 https://github.com/FriendsOfCake/cakephp-upload/tree/1.3.1/docs

State version in readme

The older 2.x releases show a requirement line in the readme. So perhaps this is another approach? Which would just require adding a few lines to each versions readme file.

Composer

Presumably people will install the package using Composer, and as such that will determine the right version for users, without any need to change the readme. Although I've never enjoyed knowingly letting a user fail when we could have let them know up front.

In a fresh Cake 4 install (4.0.9) the plugin cannot be installed

I had to choose specifically the dev-4.x branch to correct install it

In a fresh Cake 4 install (4.0.9) the plugin cannot be installed

I had to choose specifically the dev-4.x branch to correct install it

I am having the same issue. When you say you used dev-4.x did you reinstall cake or is that a prefix you add to the cakephp-upload composer install? Thanks

You should get the correct version when installing the cakephp-upload

composer require josegonzalez/cakephp-upload:dev-4.x

Part of the problem with using something like dev-4.x is that today (19-Oct) I get an error: Could not find package josegonzalez/cakephp-upload in a version matching dev-4.x

Since I'm new to CakePHP, and don't understand the subtleties of using composer, I tried it without the dev-4.x, and got the messages:
-- "Your requirements could not be resolved to an installable set of packages."
-- "josegonzalez/cakephp-upload 4.0.0 requires cakephp/orm 3.*"
-- "josegonzalez/cakephp-upload 4.0.1 requires cakephp/orm ^3.5"
(The line in composer.lock states: "cakephp/orm": "^4.0.5")

The confusion is that the documentation talks about 3.x, and I'm running 4.x. I've already had issues with attempting to install something that was a 3.x and having to do a restore. This is my first project, and I'm far enough into it that getting plugins that work is holding me up.

So I'm sitting here at this moment not sure how to proceed. I'll keep looking, but the confusion this issue addresses is, at least for me at this moment, still here.

This is how composer works.
When using dev- you are downloading a branch with that name.

the name of the branch is cake-4.x so you should install with this command:
composer require josegonzalez/cakephp-upload:dev-cake-4.x

removing this part, composer will try to install the current release version.
This version require Cake3, thats why you are getting those errors.