Update to PHP 8 and PHPUnit 10#122
Closed
gbirke wants to merge 5 commits intoairbrake:masterfrom
Closed
Conversation
The library was activating `remoteConfig` when it was set to `false`, giving the user no option to disable it.
Update to 8.0 to be able to run with PHP 8 and installed with composer on PHP 8, convert tests from old PHPUnit format to PHPUnit 8. Choosing PHPUnit 8 as an intermediate step that has enough changes, but also has some deprecations that will be removed in future PHP versions. The only change to the library is to add a property that formerly was implicit and to move the constant AIRBRAKE_NOTIFIER_VERSION from Notifier.php to a separate file that will be autoloaded. This removes the dependency on "accidentally" autoloading the constant when loading the Notifier class. In the future we might think about making it a class constant. Update php_codesniffer to a version that's compatible with PHP 8
Migrate the configuration file Make data providers static Replace renamed assertion
Update dependencies
Member
|
Hi there! Thanks for the PR! We will take a look. |
thompiler
reviewed
Nov 1, 2023
| define('ERR_IP_RATE_LIMITED', 'phpbrake: IP is rate limited'); | ||
| define('ERR_NOTIFICATIONS_DISABLED', 'phpbrake: error notifications are disabled'); | ||
|
|
||
| const AIRBRAKE_NOTIFIER_VERSION = '0.8.0'; |
Member
There was a problem hiding this comment.
Why was this constant removed?
When I run the unit tests, I see errors mentioning the removed constant. Example:
15) Warning
The data provider specified for Airbrake\Tests\NotifierTest::testPostsToURL is invalid.
Undefined constant "Airbrake\AIRBRAKE_NOTIFIER_VERSION"
Merged
Member
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.
This fixes #121 , #120