Closed jrfnl closed 4 years ago
Note: PHPCompatibility 10.0.0 will be released in the near future and contains quite some code checks related to PHP8.
Some preliminary scan results to be aware of:
FILE: src\Limenius\ReactRenderer\Renderer\AbstractReactRenderer.php
------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------
33 | WARNING | Declaring a required parameter after an optional one is deprecated since
| | PHP 8.0. Parameter $registeredStores is optional, while parameter $trace
| | is required.
91 | WARNING | Declaring a required parameter after an optional one is deprecated since
| | PHP 8.0. Parameter $registeredStores is optional, while parameter $trace
| | is required.
------------------------------------------------------------------------------------------
FILE: src\Limenius\ReactRenderer\Renderer\ExternalServerReactRenderer.php
------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------
31 | WARNING | Declaring a required parameter after an optional one is deprecated since
| | PHP 8.0. Parameter $failLoud is optional, while parameter
| | $contextProvider is required.
56 | WARNING | Declaring a required parameter after an optional one is deprecated since
| | PHP 8.0. Parameter $registeredStores is optional, while parameter $trace
| | is required.
------------------------------------------------------------------------------------------
FILE: src\Limenius\ReactRenderer\Renderer\PhpExecJsReactRenderer.php
------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------
53 | WARNING | Declaring a required parameter after an optional one is deprecated since
| | PHP 8.0. Parameter $failLoud is optional, while parameter
| | $contextProvider is required.
94 | WARNING | Declaring a required parameter after an optional one is deprecated since
| | PHP 8.0. Parameter $registeredStores is optional, while parameter $trace
| | is required.
------------------------------------------------------------------------------------------
Ah thanks! Long overdue, merged. Taking care of the optional parameters problem in a separate PR.
You're welcome.
Composer:
wimg/php-compatibility
has been abandoned for over a year. Usephpcompatibility/php-compatibility
instead.installed_paths
automatically. This also allows for referencing the rulesets by name instead of via the path in the ruleset, which is generally more stable.require
d, which based on commit https://github.com/Limenius/ReactRenderer/commit/5446eee99b36c88a7e4199f838667f7ff8520f70 is now PHP 7.2.PHPCS ruleset:
phpcs.xml.dist
which will allow PHPCS to automatically pick up on it. No need to pass the--standard=...
command-line argument anymore. Includes removing the argument from the Travis script.composer.json
file, this code should be compatible with PHP 5.5 and above. Based on the above mentioned commit, however, the minimum supported PHP version is PHP 7.2. PHPCompatibility was checking against PHP 5.5 up to PHP 7.0. The newtestVersion
actually checks against PHP 7.2 up to the latest version (7.4 at this moment).Refs:
Additional suggestions:
3.10.0
3.11.0
Ref: https://github.com/djoos/Symfony-coding-standard/blob/master/UPGRADE-3.0.md Note: the ruleset name has been changed in version 3 fromSymfony2
toSymfony
.3.5.3
3.5.6
I'd suggest removing it as it is not your dependency, but a dependency of the PHPCompatibility and the Symfony coding standards, so let those dependencies manage the version rather than doing that yourself. Ref: https://github.com/squizlabs/php_codesniffer/releases