Repository navigation
Require Flow 9 and PHP 8.3, upgrade to PHPUnit 12 - #40
Merged
Merged
Conversation
The package now requires Flow 9 and PHP 8.3 or later. It is tested with PHPUnit 12 on PHP 8.3, 8.4 and 8.5, and a CI workflow runs the tests with the lowest and highest dependencies. ramsey/uuid is raised to 4.7.6, because older releases trigger deprecations on current PHP. Previously, the package supported Flow 7.3 and PHP 8.1 and had no CI. The tests extended Flow's UnitTestCase, which is not autoloaded when the package is installed on its own, so they only ran inside a Flow distribution. They now use PHPUnit's TestCase, attributes and test stubs, and fail on deprecations. Dropping the old Flow and PHP versions is a breaking change and needs a new major release.
Dependency injection, configuration injection, the ORM mapping of the authorization entity, the scope of the encryption service and the static compilation of the service type detection are declared with PHP attributes. The resulting Doctrine mapping is unchanged. Previously, these were declared with doc comment annotations, which are the legacy way of adding metadata in Flow 9.
Authorization::getAccessToken() now returns null if the stored token was encrypted with a different key or was modified. Previously, the native Sodium extension returned false in that case. EncryptionService::decodeAndDecrypt() passed this value on despite its string return type, which caused a TypeError. The existing test for a changed encryption key expected null, but failed as soon as the tests ran with the native extension.
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 prepares the package for current Flow and PHP versions, matching the requirements of flownative/openidconnect-client. It now requires Flow 9 and PHP 8.3 or later and runs the tests with PHPUnit 12 on PHP 8.3, 8.4 and 8.5 in a new CI workflow. The tests no longer depend on Flow's
UnitTestCase, so they run without a Flow distribution.Dropping Flow 7.3/8 and PHP 8.1/8.2 is a breaking change, so this needs a new major release (5.0).
Also, the classes use PHP attributes instead of doc comment annotations (the Doctrine mapping of
Authorizationis unchanged), andgetAccessToken()returns null instead of failing with a TypeError when a token cannot be decrypted with the current key.