Skip to content

Require Flow 9 and PHP 8.3, upgrade to PHPUnit 12 - #40

Merged
robertlemke merged 3 commits into
mainfrom
task/modernize-for-flow-9
Sep 11, 2026
Merged

robertlemke merged 3 commits into
mainfrom
task/modernize-for-flow-9

Conversation

@robertlemke

Copy link
Copy Markdown
Member

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 Authorization is unchanged), and getAccessToken() returns null instead of failing with a TypeError when a token cannot be decrypted with the current key.

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.
@robertlemke
robertlemke merged commit dd0033e into main Sep 11, 2026
6 checks passed
@robertlemke
robertlemke deleted the task/modernize-for-flow-9 branch September 11, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant