-
-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PHP 8 support #446
Add PHP 8 support #446
Conversation
061a4b5
to
dbb8a3d
Compare
@theofidry @villfa It seems composer --working-dir=fixtures/set020-infection install 146/146 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%Installing dependencies from lock file (including require-dev) Verifying lock file contents can be installed on current platform. Package operations: 29 installs, 0 updates, 0 removals - Downloading infection/extension-installer (0.1.1) - Downloading thecodingmachine/safe (v1.3.3) - Downloading symfony/process (v5.2.0) - Downloading symfony/finder (v5.2.0) - Downloading symfony/filesystem (v5.2.0) - Downloading sanmai/pipeline (v5.1.0) - Downloading ondram/ci-detector (3.5.1) - Downloading infection/include-interceptor (0.2.4) - Downloading infection/abstract-testframework-adapter (0.3.1) - Downloading infection/infection (0.18.2) 0/10 [>---------------------------] 0% 1/10 [==>-------------------------] 10% 2/10 [=====>----------------------] 20% 3/10 [========>-------------------] 30% 4/10 [===========>----------------] 40% 6/10 [================>-----------] 60% 7/10 [===================>--------] 70% 8/10 [======================>-----] 80% 9/10 [=========================>--] 90% 10/10 [============================] 100% - Installing composer/package-versions-deprecated (1.11.99.1): Extracting archive - Installing infection/extension-installer (0.1.1): Extracting archive - Installing symfony/polyfill-ctype (v1.20.0): Extracting archive - Installing webmozart/assert (1.9.1): Extracting archive - Installing webmozart/path-util (2.3.0): Extracting archive - Installing thecodingmachine/safe (v1.3.3): Extracting archive - Installing symfony/polyfill-php80 (v1.20.0): Extracting archive - Installing symfony/process (v5.2.0): Extracting archive - Installing symfony/finder (v5.2.0): Extracting archive - Installing symfony/filesystem (v5.2.0): Extracting archive - Installing symfony/polyfill-mbstring (v1.20.0): Extracting archive - Installing symfony/polyfill-intl-normalizer (v1.20.0): Extracting archive - Installing symfony/polyfill-intl-grapheme (v1.20.0): Extracting archive - Installing symfony/string (v5.2.0): Extracting archive - Installing psr/container (1.0.0): Extracting archive - Installing symfony/service-contracts (v2.2.0): Extracting archive 1213/1270 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░] 95% |
Hm given how easy to is to upgrade to Composer 1 I wonder if it doesn't make sense to drop it completely... |
Look here:
This is not the right path. Instead it should be (notice
I don't know more for now. EDIT: EDIT2: |
Thanks. Infection is running again but I'm not sure if it is correct. |
I just parallelized the e2e tests in GitHub Actions 👀 (because composer v1 is not compatible with PHP 8.0) |
FYI, it will be compatible from the next release: composer/composer#9523 |
d586e7b
to
a4f3d76
Compare
Co-authored-by: Fabien Villepinte <fabien.villepinte@gmail.com>
@villfa Can you have a look at e2e_027 again? Still failing. Thanks in advance |
Yes, I will, but I can't tell you when exactly. Probably this weekend. |
The remaining error is not directly related to PHP 8. Here some scoped code (generated with PHP 7.3): if (!\function_exists('_PhpScoperd4c93190f897\\str_before')) {
/**
* Get the portion of a string before a given value.
*
* @param string $subject
* @param string $search
* @return string
*/
function str_before($subject, $search)
{
return \_PhpScoperd4c93190f897\Illuminate\Support\Str::before($subject, $search);
}
}
if (!\function_exists('str_contains')) {
/**
* Determine if a given string contains a given substring.
*
* @param string $haystack
* @param string|array $needles
* @return bool
*/
function str_contains($haystack, $needles)
{
return \_PhpScoperd4c93190f897\Illuminate\Support\Str::contains($haystack, $needles);
}
} We see that A possible solution would be to take into account the I'm not sure we want to fix this issue with this PR. |
Well, this is more or less related to #440 |
Regarding the Symfony & Laravel test suite: if those are the blockers in the CI I would ignore them. There is definitely issues with those two but they are more related to polyfill support and whether or not a symbol is considered as internal depending of the target PHP versions, which are two sets of problems to be addressed on their own |
Ready for review 🚀 I also reworked the build workflow. It parallelized the e2e tests and is hopefully more readable. |
A big thank you to @villfa. It was an honor to work with you on this! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Really impressed by the workflow it's really nice!
What is the issue about the pending build? Is it due to them being required by the branch in settings but no longer available?
Yes, the required builds are removed due to the rework and the settings needs to be updated. |
👌 |
Hi, thank you for adding PHP 8! It one of last blockers for Symplify packages, as we use scoper to release scoped PHP 8 packages. Thanks |
@theofidry Can we have also a new release for php-scoper with PHP 8 support? Is there anything I can do to help you? |
https://github.com/humbug/php-scoper/releases/tag/0.14.0 released, sorry forgot about it :) |
Thank you @theofidry 🚀 |
Thank you both! |
Waiting for: