Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

Full support for PHP 8.0 #2111

Merged
merged 2 commits into from
Nov 25, 2020
Merged

Full support for PHP 8.0 #2111

merged 2 commits into from
Nov 25, 2020

Conversation

zingimmick
Copy link
Contributor

@zingimmick zingimmick commented Sep 2, 2020

@zingimmick zingimmick closed this Sep 2, 2020
@TomasVotruba
Copy link
Member

Hi, thanks for contribution.
We need this so it's very welcomed.

Why the close?

@zingimmick
Copy link
Contributor Author

Hi, thanks for contribution.
We need this so it's very welcomed.

Why the close?

There are still some failed test cases that need to be confirmed, Such as:
nette/robot-loadercompatibility with PHP 8.0

@zingimmick zingimmick reopened this Sep 2, 2020
@zingimmick zingimmick changed the title Php 8 builds Support for PHP 8 Sep 2, 2020
@zingimmick zingimmick changed the title Support for PHP 8 Support for PHP 8.0 Sep 2, 2020
@TomasVotruba
Copy link
Member

Could you add PHP 8.0 to the test build matrix so we can see those cases?

https://github.com/symplify/symplify/blob/16630acb0f584265eeb5f8c15c8440d48fd2e12d/.github/workflows/unit_tests.yaml#L14

It would be easier to address them then

@zingimmick
Copy link
Contributor Author

@zingimmick
Copy link
Contributor Author

zingimmick commented Sep 3, 2020

Hi, thanks for contribution.
We need this so it's very welcomed.

Why the close?

only this failed test case cannot find any commits/issues/PRs, but i think it was caused by squizlabs/php_codesniffer, This PR can be merged if you don't have to wait for those fixes.

Test case
2) Symplify\EasyCodingStandard\Tests\Set\Psr12\Psr12Test::test with data set #1 (Symplify\SmartFileSystem\SmartFileInfo Object (...))
packages/easy-coding-standard/tests/Set/Psr12/Fixture/fixture.php.inc
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
 declare(strict_types=1);\n
 namespace Vendor\Package;\n
 \n
+use \Vendor\Package\{ClassA as A, ClassB, ClassC as C};\n
 use Vendor\Package\SomeNamespace\ClassD as D;\n
-use Vendor\Package\{ClassA as A, ClassB, ClassC as C};\n
 use function Vendor\Package\{functionA, functionB, functionC};\n
-use const Vendor\Package\{ConstantA, ConstantB, ConstantC};\n
+use const \Vendor\Package\{ConstantA, ConstantB, ConstantC};\n
 \n
 class Foo extends Bar implements FooInterface\n
 {\n

/var/www/html/packages/easy-coding-standard-tester/src/Testing/AbstractCheckerTestCase.php:235
/var/www/html/packages/easy-coding-standard-tester/src/Testing/AbstractCheckerTestCase.php:178
/var/www/html/packages/easy-coding-standard-tester/src/Testing/AbstractCheckerTestCase.php:68
/var/www/html/packages/easy-coding-standard/tests/Set/Psr12/Psr12Test.php:19

@zingimmick zingimmick changed the title Support for PHP 8.0 [WIP] Support for PHP 8.0 Sep 11, 2020
@dotdevio
Copy link
Contributor

PHP8 have some reflection deprecations, check this article:

https://php.watch/versions/8.0/deprecated-reflectionparameter-methods

Fow now rector fails to run at least because of:

Deprecated:  Method ReflectionParameter::isArray() is deprecated in /tmp/test/vendor/symplify/autowire-array-parameter/src/DependencyInjection/CompilerPass/AutowireArrayParameterCompilerPass.php on line 148`

@zingimmick
Copy link
Contributor Author

PHP8 have some reflection deprecations, check this article:

https://php.watch/versions/8.0/deprecated-reflectionparameter-methods

Fow now rector fails to run at least because of:

Deprecated:  Method ReflectionParameter::isArray() is deprecated in /tmp/test/vendor/symplify/autowire-array-parameter/src/DependencyInjection/CompilerPass/AutowireArrayParameterCompilerPass.php on line 148`

I just created a new PR #2402 , this issue will be resolved.

@zingimmick zingimmick changed the title [WIP] Support for PHP 8.0 [WIP] Full support for PHP 8.0 Oct 23, 2020
@TomasVotruba
Copy link
Member

I've just re-run CI to see how this PR is doing.

Few packages changes have been merged to master, so they might need some care.

I'll make sure this will get attention and quick responses, so we can merge it 👍

@TomasVotruba
Copy link
Member

I've just "rebased" branch on current master, so the target code is up to date.

@TomasVotruba
Copy link
Member

TomasVotruba commented Nov 25, 2020

Wow, CI is green ✔️ 🎉 Great job!

@TomasVotruba
Copy link
Member

I'll merge it as it is, so we have PHP 8.0 checks for new code too and test it on master CI pipeline.

Next PRs with further tuning are welcomed 👍

@TomasVotruba TomasVotruba merged commit c12448f into deprecated-packages:master Nov 25, 2020
@TomasVotruba TomasVotruba changed the title [WIP] Full support for PHP 8.0 Full support for PHP 8.0 Nov 25, 2020
@deprecated-packages deprecated-packages locked as resolved and limited conversation to collaborators Nov 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants