Upgrade to PHPUnit 13 and php-jwt 7, fix PHP 8.1+ compatibility - #23
Open
comanche wants to merge 4 commits into
Open
Upgrade to PHPUnit 13 and php-jwt 7, fix PHP 8.1+ compatibility#23comanche wants to merge 4 commits into
comanche wants to merge 4 commits into
Conversation
Replace the unsupported /** @test */ docblock annotation with the #[Test] attribute so tests are discovered again, and update the phpunit config: drop the removed PHPUnit-7-era root attributes that fail schema validation, and add a first-party fail-on-issues policy (failOnNotice/failOnWarning/failOnDeprecation scoped to src/).
JsonSerializable::jsonSerialize() requires a declared return type; add ": mixed" to clear the PHP 8.1+ deprecation now enforced by failOnDeprecation.
Make the runtime floor self-documenting. It was already implied by firebase/php-jwt ^7.1 (php ^8.0) and the JsonSerializable ": mixed" return type; pin >=8.1 so installs on older PHP fail fast with a clear message instead of a runtime error.
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.
Upgrade dependencies to PHPUnit 13 and php-jwt 7, fix PHP 8.1+ compatibility
Bumps
firebase/php-jwtandphpunit/phpunitto current major versions and resolves the breakage that came with them. Verified against the live Box API on PHP 8.4.Changes
Dependencies
firebase/php-jwt^6.10→^7.1phpunit/phpunit^10.5→^13.2PHPUnit 13 migration
/** @test */docblock annotation with the#[Test]attribute. Under PHPUnit 13 the old annotation is silently ignored, so the suite was discovering zero tests and exiting without running anything.backupStaticAttributes,convertErrorsToExceptions,convertNoticesToExceptions,convertWarningsToExceptions) that now fail schema validation.failOnNotice/failOnWarning/failOnDeprecation, scoped tosrc/via a<source>block so vendor-internal issues don't fail the build.PHP 8.1+ deprecation fix
: mixedreturn type toBoxModel::jsonSerialize(). PHP 8.1 gaveJsonSerializablea tentative return type, so implementations without one emit a deprecation — now enforced byfailOnDeprecation.Explicit PHP floor
"php": ">=8.1"tocomposer.json. The floor was already implied byphp-jwt ^7.1and the: mixedreturn type; this makes installs on older PHP fail fast with a clear message.Compatibility
Minimum PHP is now 8.1 (was already effectively 8.0 via the php-jwt upgrade). No change to the public SDK API — auth, client, and manager logic are untouched.
Testing
Full suite passes against the live Box API:
OK (14 tests, 174 assertions), zero deprecations.