Skip to content

Declare the service name of oidc:discover as explicitly nullable - #73

Merged
robertlemke merged 1 commit into
mainfrom
bugfix/explicit-nullable-service-name
Sep 11, 2026
Merged

robertlemke merged 1 commit into
mainfrom
bugfix/explicit-nullable-service-name

Conversation

@robertlemke

Copy link
Copy Markdown
Member

The optional $serviceName parameter of OidcCommandController::discoverCommand() is now declared as ?string.

With PHP 8.4, string $serviceName = null triggers "Implicitly marking parameter $serviceName as nullable is deprecated". Flow reflects all command controllers, for example when rendering ./flow help, so the notice showed up in every installation running PHP 8.4 or later and was reported by error trackers. This was the only implicitly nullable parameter in the package; linting all classes with PHP 8.4 reports no further deprecations.

?string is supported by all PHP versions the package allows, so the change is backwards compatible.

The optional service name of the discover command is now declared as
?string. Loading the command controller no longer triggers a
deprecation notice on PHP 8.4 and later.

Previously, the parameter was declared as "string $serviceName = null".
PHP 8.4 deprecates marking a parameter as nullable only through a null
default. The notice appeared whenever Flow reflected the command, for
example when rendering "./flow help", and error trackers like Sentry
reported it as an issue.
@robertlemke
robertlemke merged commit 7164e46 into main Sep 11, 2026
8 checks passed
@robertlemke
robertlemke deleted the bugfix/explicit-nullable-service-name branch September 11, 2026 06:09
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