How to rollback cakePHP 3.2 to 3.0 - version

I did my project in cakePHP 3.0. By updating the composer my project converted into cakePHP 3.2. I want to rollback from 3.2 to 3.0. I tried rollback options too,that is also not working. How to rollback 3.2 to 3.0 ?

The rollback command supporty by composer is for the composer itself, ie it rolls back your composer installation to an earlier version, not anything that might have been installed via composer.
To change the version of the cakephp/cakephp dependency, simply require the new version with a version constraint that doesn't match 3.1 and above, so in your case, if you want to switch back to the 3.0.x branch, you could just run
$ composer require cakephp/cakephp:"~3.0.0"
The ~3.0.0 constraint will match >= 3.0.0 && < 3.1.0. See Composer Docs > Versions for more information on version constraints supported by composer.
However, You may encounter conflicts with other dependencies like cakephp/debug_kit or cakephp/bake, which need to be solved manually, for example by downgrading or even temporarily removing them, as they may have been upgraded too and require a newer cakephp/cakephp version themselves!

Related

How do I manually upgrade a software package from a Github page?

I want to upgrade React Native Debugger from version 0.10.0 to version 0.10.2, but clicking to upgrade when the program itself prompts me isn't working because (as they indicate on their page), there's a bug that prevents this upgrade. People have suggested "manually" upgrading or using brew cask reinstall react-native-debugger. The latter doesn't work, so I was wondering how you go about manually upgrading a package like this?
You can go to the release page https://github.com/jhen0409/react-native-debugger/releases/tag/v0.10.2 and download the appropriate .dmg file (for MacOS) from there. Afterwards you can just install it like any regular .dmg.

Chocolatey - Install major version of package and update to latest minor version

For my project, I need .NET Core 2.2. The Chocolatey package repository states that .NET Core 2.2.8 is the most recent version of .NET Core 2.2 available. I can install this package with choco install dotnetcore --version 2.2.8 -m. But when 2.2.9 will be released, I will still be on 2.2.8, because I specified that specific version. What command do I need to have .NET Core 2.2 updated to a new minor version when I issue choco upgrade all?
EDIT: I do not want to upgrade to .NET Core 3.x when I issue choco upgrade all, because I have some projects that depend on it. Instead, I explicitly want Chocolatey to upgrade to .NET Core 2.2.9 if it will be released
While I think this belongs better on Super User, based on what is implied by using side by side installations of a package, if you want a new version of that package, use choco install -m to install the newer version of that package. Based on your experience of choco upgrade all upgrading one of your side by side packages however, you may want to inquire on the Chocolatey issue tracker as to what the recommended method of upgrading your other packages would be here.

configuration composer.json Symfony3 and sonataAdmin

I want to start a project with Symfony3 and SonataAdmin
I was trying a lot of versions of symfony and sonataAdminBundle
But I always get errors when updating composer
What's the correct composer.json to start my project
thanks
According to packagist the current v3.3.1 of SonataAdminBundle should be compatible with Symfony ^3.0.
You can just run composer require sonata-project/admin-bundle and it will automatically look for the newest compatible version. If that fails you could try allowing development-versions as well.
composer require sonata-project/admin-bundle:dev-master
That should be your last resort though as it pulls in an unstable dependency. Feel free to add composer's error to your question and maybe I or someone else can give a more precise answer.

View Available Package (out-of-scope) Updates with Composer

Is there a way to see when a composer package has an available update that is higher than its composer.json requirement allows?
My composer.son file has require statements like this:
"require" : {
"components/bootstrap" : "~3.3.4",
"components/jquery" : "~1.11.2",
"erusev/parsedown" : "~1.5.2",
...
},
Imagine parsedown has just had a big jump in functionality, and moved to version 2.0.0. When I run a composer update, as expected, my app will not be updated to version 2.0.0 (if one existed). Is there a way I can see that 2.0.0 is available with a composer command?
I am worried I might miss some updates, because I have locked down my required versions so much, and hope there is some command or way to see all of the available updates for my composer packages.
Is there a way to see when a composer package has an available update that is higher than its composer.json requirement allows?
Yes, there is a way. It's basically the comparison of the defined version constraint in your composer.json with the version numbers of composer show for the specific package.
composer show --self
This shows you the output of composer.json of your project.
You get the defined version constraints.
Alternatively, just open composer.json.
composer show --installed
This shows you the resolved and installed versions.
composer show package/package
This shows you all available version numbers.
Sidenote: composer show erusev/parsedown says there is no v2.0.0 release, yet.
There isn't a table display for this, yet, but it's a nice feature request, because it eases project maintenance. But assembling the infos automatically is quite resource intensive, especially when there are a lot of packages.
+----------------------------------------------------------------------------------+
| package | defined constraint | current version | available versions |
------------------------------------------------------------------------------------
| erusev/parsedown | ~1.0 | 1.5.2 | dev-master, v1.5.2, ...|
+----------------------------------------------------------------------------------+
First I'd recommend relaxing your version requirements to only have tilde-two-numbers instead of three, and see how it goes. It will allow you to not only get patch updates, but also compatible feature updates.
Composer currently has no way to signal to you the presence of incompatible versions beyond the original package being flagged "abandoned". You have to monitor the release announcement of the packages you use manually, or you could try and see what happens if you add the next major version to the requirement: "erusev/parsedown" : "~1.5.2|~2.0"
This however looks strange if you haven't even tried to update to the latest 1.x version using "erusev/parsedown" :"^1.5.2". Note that the caret is a shortcut for ~1.5,>=1.5.2 for major versions >= 1 (major versions 0.x are handled more strictly).

upgrade cakephp from 2.3 to 2.5

I have a problem with some code and I found out that I have an older version of cakephp installed on the server I am using which is ver 2.3. I want to upgrade this version from 2.3 to cakephp ver 2.5 .I need to:
1) place new version in the lib/cake folder (overwrite?)
2) check migration guide for any function differences.
The advice given here was to simply refer to the migration guide but this guide says nothing about installing and mentions only upgrading from 2.4 which I don't even have?
I don't want a potential headache moving from 2.3 to 2.5.
http://book.cakephp.org/2.0/en/appendices/2-5-migration-guide.html

Resources