Open sushicodeur opened 5 years ago
This is only my opinion but here is how I do.
composer sync-recipes --force
docker-compose down --rmi all --remove-orphans
(WARNING : Not use the -v
flag to keep your database locally) and docker-compose up -d
.I may have forgotten steps, I wrote this message from my memory
You can also use the update-deps.sh file 😉
This script is not provided in the default archive, but maybe should we add it. In this case we should run the composer command directly in a Docker container to be sure that the user don’t have to install PHP on the host.
There is no easy solution to something like this. Once you create a project based on this project (think of it as a template), it's your code now. Anything could change in this project (and in your project), so there's no generic way of providing updates.
The script shared by @dunglas is a small part of the solution to this issue. However, I partially agree with @teohhanhui; any code that you write within your project becomes your own and you will be responsible for fixing bugs caused by upgrading. This will cause more issues than it will fix so the script should not be included.
All that said, there does need to be a way to upgrade the vendor code of the platform, if not for features, definitely for security.
I believe the solution to this issue is not a script, but documentation.
By comparison, Laravel provides some fantastic documentation around upgrading, including letting you know what you may need to fix in your own code.
This should be fairly easily achieved with the API part of the platform since most deprecations will be symfony based. The difficult parts will be the frontend and the Docker parts. I believe that frontend should really be handled more by the developer rather than the API Platform team but this is just my opinion.
Hopefully, as a developer's project grows, they will begin splitting the codebase and infrastructure into their own entities and decoupling. This removes a lot of the problems listed above as the developer will be forced to take more ownership of the project.
To wrap this up: We should have better docs around upgrading the API service including depreciations and a link to Symfony upgrade docs for the correct version. Also, I would love to see documentation around upgrades in the Docker container, caching, DB, and other infrastructure changes.
Hello,
I installed Api Platform a few month ago, and it look like I'm two version behind the latest one.
I'd like to update to the latest version but didn't found docs on this.
issue api-platform/api-platform#465 states "you are on your own", which is maybe still the case :)
So updating to latest version consists of a bunch of
composer update
/yarn upgrade
commands ? Or is there a more recommended way of doing so ?What about
docker-compose.yml
files ? I don't understand well what quay.io does, is there a way to tell docker to take a given version or is it always up to date ?Thank you