-
-
Notifications
You must be signed in to change notification settings - Fork 29
[#2388] Switched to PHP 8.4. #2389
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,7 @@ parameters: | |
|
|
||
| level: 7 | ||
|
|
||
| phpVersion: 80330 | ||
| phpVersion: 80417 | ||
|
|
||
| paths: | ||
| - web/modules/custom | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -28,7 +28,7 @@ | |||||
| cacheDirectory=".phpunit.cache"> | ||||||
| <php> | ||||||
| <!-- Set error reporting to E_ALL. --> | ||||||
| <ini name="error_reporting" value="32767"/> | ||||||
| <ini name="error_reporting" value="30719"/> | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial 🧩 Analysis chain🌐 Web query:
💡 Result: Yes. In a PHPUnit 11 <php>
<ini name="error_reporting" value="-1"/>
</php>is the more future-proof way to represent “report everything”: PHP documents Hardcoding numeric values like Sources: [1] PHP manual ( Use Line 31 hardcodes ♻️ Proposed change- <ini name="error_reporting" value="30719"/>
+ <ini name="error_reporting" value="-1"/>📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| <!-- Do not limit the amount of memory tests take to run. --> | ||||||
| <ini name="memory_limit" value="-1"/> | ||||||
| <env name="SIMPLETEST_BASE_URL" value="http://nginx:8080"/> | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,9 +79,9 @@ | |
| '*/vendor/*', | ||
| '*/node_modules/*', | ||
| ]) | ||
| // PHP version upgrade sets - modernizes syntax to PHP 8.3. | ||
| // Includes all rules from PHP 5.3 through 8.3. | ||
| ->withPhpSets(php83: TRUE) | ||
| // PHP version upgrade sets - modernizes syntax to PHP 8.4. | ||
| // Includes all rules from PHP 5.3 through 8.4. | ||
| ->withPhpSets(php84: TRUE) | ||
|
Comment on lines
+82
to
+84
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: To enable the PHP 8.4 upgrade set in Rector, use the named-argument on <?php
use Rector\Config\RectorConfig;
return RectorConfig::configure()
->withPhpSets(php84: true);If you already declare your target PHP version in return RectorConfig::configure()
->withPhpSets();Rector will load the matching PHP sets automatically. [1] Notes:
Sources: [1] [2] [3] Use lowercase The 🤖 Prompt for AI Agents |
||
| // Code quality improvement sets. | ||
| ->withPreparedSets( | ||
| codeQuality: TRUE, | ||
|
|
||
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.
🧹 Nitpick | 🔵 Trivial
Good approach for PHP version-agnostic testing.
Dynamically retrieving
E_ALLfrom the container makes the test resilient across PHP versions where this constant differs (32767 in PHP 8.3 vs 30719 in PHP 8.4).💡 Minor: use the return value directly
processRunreturns aProcessobject, so you could simplify by using it directly instead of callingprocessGet():🤖 Prompt for AI Agents