Hi! I’m very thrilled that CakePHP 4.0 is coming soon. Thank you very much all contributors
I have worked with 2.x very long now, and I’d like to know if 3.8 is similar to 4.0? I could study and practice with 3.8 and then move to 4.0 when it is at the beta stage.
There are so many new things when moving from 2 to 4… bear with me One new thing is the composer; do you run composer updates only in devel environment and copy files from there to a server?
Also, I’m planning to put my apps in shared hosting, and I think I need to copy apps to user home directory (/home/mark/myapp/ and make a symlink from ~/public_html directory to myapp/webroot). Is this correct? In some instances, the app is in a subfolder, and then I should symlink only from there… (~/public_html/subfolder).
They are similar but they are also quite different from what I have seen.
But it shouldn’t be as big as the step from 2.x to 3.x (or atleast, so they told me)
It is not Mostly (but not only) removing of the deprecated methods in the 3.x branch.
Ok, so, you only run
composer update when you want to update your dependencies. For a large project this would probably be relatively infrequently and with careful consideration (Projects like [Dependabot]( https://dependabot.com](https://dependabot.com/) help with this.). Composer generates a file called
composer.lock, this file should be included in your source control since it “locks” exactly what versions of your dependencies your project is using (That way you can’t accidently use CakePHP 4.0.10 when you’ve only tested on 4.0.4).
On your server, you’d run
composer install as part of the deployment process. This will install the exact versions listed in the lock file.
Thanks, dakota, for the comment about when to run composer update. I just ran it to make sure I was “up-to-date,” and realized that I was either going to have to: 1) automate running it on an on-going basis, or 2) determine when to stop running it, thus settling on the code at that moment in time. I was looking for a “best practice,” and your comment seems to have given me just that.
In my case, I’m still adding plugins, so I feel like this process will happen then, and I’ll leave it go between that. As a DevOps Engineer, I do automagic backups so I can do a restore to a previously known good state with impunity. Since I’m still learning my way around CakePHP, this has already saved my bacon a few times…