Repository navigation
Legacy Bridge v5.0.10
Legacy Bridge v5.0.10
What changed
This is a PHP 8.4 compatibility release. No new features were added and no public API was changed. The entire diff is limited to method/constructor signatures.
Added explicit nullable types
PHP 8.4 deprecates implicit nullable parameter declarations such as:
public function __construct(LoggerInterface $logger = null)This release replaces every occurrence with the explicit form:
public function __construct(?LoggerInterface $logger = null)Files affected include:
bundle/Routing/FallbackRouter.phpbundle/Command/LegacyBundleInstallCommand.phpbundle/Cache/PersistenceCachePurger.phpbundle/LegacyMapper/Session.phpbundle/Exception/NotFoundHttpException.phpbundle/Controller/WebsiteToolbarController.phpbundle/DependencyInjection/Configuration/LegacyConfigResolver.phpmvc/Kernel.phpmvc/Kernel/CLIHandler.phpmvc/Kernel/Loader.phpmvc/EventListener/APIContentExceptionListener.phpmvc/View/Provider.php- and additional
mvc/SignalSlot/*,mvc/Templating/*,bundle/Tests/*, andbundle/DependencyInjection/*files.
Fixed optional-parameter-before-required
LegacyBundleInstallCommand::linkLegacyExtension() had an optional array $options parameter before a required OutputInterface $output parameter, which PHP 8.4 now treats as implicitly required. The signature and call site were re-ordered:
protected function linkLegacyExtension($extensionPath, OutputInterface $output, array $options = [])Collapsed accidental double nullables
During the bulk signature update, any parameters that were already declared as ?Type were briefly changed to ??Type. A second pass collapsed these back to the correct ?Type.
Why this matters for Composer users
- PHP 8.4 readiness: Install this release before migrating your host to PHP 8.4 to avoid
E_DEPRECATEDstorms. - Clean logs:
php bin/console cache:clear --env=prodno longer produces hundreds of "Implicitly marking parameter as nullable" messages. - Strict CI support: Pipelines that use
error_reporting = E_ALLorphpstan/psalmwith strict deprecation checks now pass. - No runtime changes: Behavior of every public method is unchanged; only parameter declarations were made explicit. This is a safe patch-level upgrade.
- No public API break: Existing code that passes
null, an object, or omits an optional argument continues to work exactly as before.
Upgrade
composer require se7enxweb/legacy-bridge:^5.0.10Or bump the constraint in composer.json:
"se7enxweb/legacy-bridge": "^5.0.10"Then run composer update se7enxweb/legacy-bridge.
Full diff
See the commit for the complete list of files and the exact signature changes.