Make 6.x branch compatible with PHP 8#3189
Conversation
Related issue: deployphp#3159
…n supporting multiple PHP versions, as there are multiple truths for the lock file then)
|
@rutgerrademaker Hi, not sure but I think |
|
@kiropowered #[\ReturnTypeWillChange] is technically just a comment, see also https://wiki.php.net/rfc/internal_method_return_types @antonmedv In my latest commit I added a new lock file created with PHP 7.4, I think this should do the trick for making it compatible with both 7 and 8 |
|
What about deps? Symfony deps also only php7 in v6 branch. |
|
@antonmedv not sure what you mean there |
|
Please, create a example project with php8 and using this branch as deps. I'd like to take a look how it's working with it. |
|
I would really like to see |
This is still a WIP, as we run into dependency problems caused by Deployer 6.x not having support for PHP ^8.0, see for example deployphp/deployer#3189. I think it would be wise to fork Deployer and make the 6.x branch compatible with PHP ^8.0. When Deployer 7 is released, we can start making use of that version for the PHP ^8.0 variant and fall back to Deployer 6.x for PHP 7.x. Changes that have been made: - Install box without Composer. With this change we didn't need the `build/` directory anymore, so it was deleted. - Just use one PHP image for both build and runtime - Install Node.js and NPM using nodesource rather than the Node.js Docker image - Removed dep sentry (in the future we need to implement our own APM) - Removed dep deployer/recipes, this packages is deprecated and we should make use of the recipes within the deployer/deployer package.
|
+1 |
|
Now we have v7 release. We can close this one) |
|
awesome |
|
@antonmedv still love to see this merged, as a migration to v7 is far from straight forward |
|
@antonmedv I also like to get this merged if possible :). Then we can have some more time before we migrate to deployer 7.x. |
Not that much) |
|
:( @antonmedv It's up to you of course, but i would appreciate it if you did merged it. |
|
What objections do you see @antonmedv? If you want, I can perform the tests that @rutgerrademaker has made available. So we can relieve you. For us (@JCID) it would also be also an added value. 🙏 Many of our client projects are on the latest version of Deployer I look forward to hearing your counter-arguments, thank you in advance for taking the time. |
|
Well, ok. Let’s try to give it a go. Third time!) |
|
Thanks! I'll also test tomorrow (first thing in the morning) the branch/merge request of @rutgerrademaker. 👌 |
composer remove --dev deployer/deployer
composer remove --dev jcid/deployer-recipe
echo "8.0" > .php-version
composer require php:~8.0.0
composer config repositories.rutger-deployer vcs [email protected]:rutgerrademaker/deployer.git
composer require --dev deployer/deployer:6.x-dev#a47c061 --prefer-sourceGitlab CI tells me: I also don't see any particularities in the submitted merge request from @rutgerradermaker. I say, ready for a new tag 👍 |
|
Just updated cho "8.1" > .php-version
composer require php:~8.1.0 |
|
Thanks! Does this mean we will also get a new release/tag ? or should we install it straight from the 6.x branch now? |
|
Will release v6 after I’m gonna get $100 in donations)) |
|
@antonmedv fair point! I pulled some strings over here, money should be on it's way :) |
|
@antonmedv I believe the donation should be their did you receive it? |
|
Nope. |
|
@antonmedv than i will look at our side if somebody already send it. |
|
@antonmedv we have mnow made the donation. |
|
Just received a email! Thanks 😊 will work on release tonight. |
|
Released. Please check it out. |
|
Very good job @rutgerrademaker 🚀 |
|
@antonmedv Currently, |
|
Yes, I need to check what is going own with CI pipeline. Probably manifest isn’t updated. Also, I’m thinking to completely remove self-update command from v6 and v7 as well. What is your use case with self-update command? |
To be on the latest version. Isn't that a pretty good reason - to stay current with the latest features, bugfixes etc? It's great that it works just like I don't understand why you'd remove this?! |
Looks like most of the people using Deployer via composer require. |
I really don't think this is the case. You may have some actual stats on this somehow .. but certainly the development outfit that I'm part of, we use deployer (v6) across dozens of projects, and always via the globally-installed .phar on our local computers. |
|
First of all thanks for merging this!
That said... We'd love to be able to do have For B composer would do for us, (we had some issues with deployer/dist though, so stopped using that) It seems https://phar.io/ is also getting some traction for distribution of versioned phars (deployer looks not available there though) Can only guess quite some people just wget their phar + self-update, (I do this for other phars also) Maybe open a new topic/discussion on the future of this? |
|
Deployer v7 actually is distributed via composer as phar. Source is also available. |
Successfully performed the Deployer upgrade to |
Hi @antonmedv .. did you get anywhere with looking at this, so that self-update works to move from v6.8 to v6.9? |
|
I'm having issues when installing 6.9 with PHP 8.0 (not 8.1). |
|
Deps issues. Well it’s all fixed in v7. Consider switching to v7 ;) |


Bug fix? No
New feature? PHP 8 compatibility for the 6.x branch #3159
BC breaks? Not sure how to test
Tests added? No
Docs added? No
I am not sure how to run the included tests, I am aware that there is a .travis.yml file and that php 8.0 and 8.1 could be added but I would not now how to actually run the included tests
This PR is only serving those who want to postpone the migration to deployer 7 until it has a stable release
Just wanted to see if it could be done.
N.B. I was able to build a new phar file, which did not throw any errors when using it for a deploy
N.B.2 I also want to move on to Deployer 7 now, but please consider merging this PR