Repository navigation
fix: PHP 8.4 nullable types, stderr error routing, and PHPUnit deprecations - #1407
Open
hiimalexjgarcia wants to merge 2 commits into
Open
hiimalexjgarcia wants to merge 2 commits into
hiimalexjgarcia wants to merge 2 commits into
Conversation
- Remove blank lines after class opening braces (PSR12.Classes.OpeningBraceSpace.Found) in: - src/PhpBrew/Distribution/DistributionUrlPolicy.php - tests/PhpBrew/Command/DownloadCommandTest.php - tests/PhpBrew/Command/PathCommandTest.php - tests/PhpBrew/Extension/ExtensionInstallerTest.php - tests/PhpBrew/Extension/KnownCommandTest.php - tests/PhpBrew/Patches/Apache2ModuleNamePatchTest.php - Wrap 8 lines exceeding 120 characters (Generic.Files.LineLength.TooLong) in src/PhpBrew/VariantBuilder.php (imap, pcre, and openssl variant builders).
…ations
- Explicitly mark nullable parameters (?Type $param = null) for PHP 8.4 compatibility in:
- src/PhpBrew/VariantBuilder.php (build)
- src/PhpBrew/Exception/SystemCommandException.php (__construct)
- src/PhpBrew/Tasks/BaseTask.php (__construct)
- src/PhpBrew/Tasks/PrepareDirectoryTask.php (run)
- src/PhpBrew/ReleaseList.php (getReadyInstance)
- src/PhpBrew/Extension/ExtensionInstaller.php (__construct)
- Route PHP errors and deprecation notices to stderr via ini_set('display_errors', 'stderr') in bin/phpbrew before autoloading so shell-evaluated output is not corrupted.
- Add PHP 8.4 to the test matrix in .github/workflows/tests.yaml.
- Replace deprecated PHPUnit @ExpectedException and assertInternalType in tests.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed up some PHP 8.4 deprecation notice regarding nullable parameters (apparently these issues will be fatal in PHP 9, so might as well address them).
The noticeable fix is sending errors and dep notices to stderr instead of stdout so they don't corrupt ~/.phpbrew/init and the like.
Full disclosure: I used AI to produce this PR (Gemini 4 in this case).