[Mittel] Fix platform deprecations: nullable param, interface drift, DI Extension base (#32)#39
Open
maltehuebner wants to merge 1 commit into
Open
[Mittel] Fix platform deprecations: nullable param, interface drift, DI Extension base (#32)#39maltehuebner wants to merge 1 commit into
maltehuebner wants to merge 1 commit into
Conversation
…ion base Three deprecations that affect the entire supported platform matrix (PHP >= 8.4, Symfony 7.4/8.x): - StationApi::getStations() declared `string $provider = null`, which PHP 8.4 deprecates (implicitly nullable) and PHP 9 rejects. Use the explicit `?string $provider = null`. - StationApiInterface::getStations() had no `$provider` parameter, so the contract had drifted from the implementation and callers coding against the interface could not use the provider filter. Add `?string $provider = null` to the interface. - CalderaLuftApiExtension extended Symfony\Component\HttpKernel\DependencyInjection\Extension, which is @internal and deprecated from Symfony 8.1. Switch to the recommended Symfony\Component\DependencyInjection\Extension\Extension (drop-in: same getAlias()/processConfiguration() API). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Removes three deprecations that affect 100% of the supported platform matrix (PHP ≥ 8.4, Symfony 7.4/8.x).
Changes
StationApi::getStations():string $provider = null→?string $provider = null(PHP 8.4 implicit-nullable deprecation; becomes a fatal in PHP 9).StationApiInterface::getStations(): add the missing?string $provider = nullparameter so the contract matches the implementation and interface-typed callers can use the provider filter.CalderaLuftApiExtension: extendSymfony\Component\DependencyInjection\Extension\Extensioninstead of the@internalSymfony\Component\HttpKernel\DependencyInjection\Extension(deprecated from Symfony 8.1). Pure import swap — the new base provides the samegetAlias()/processConfiguration()API.Deliberately not implemented
AbstractBundle(listed as optional): it changes the bundle's configuration/loading contract and warrants its own focused change; out of scope for a deprecation cleanup.luft-modelsetter fix is tracked in that repo's own issue.Verification
php -lon all changed files: clean.composer install:CalderaLuftApiExtensionis now an instance of the DIExtension,getAlias()still returnscaldera_luftapi, andStationApiInterface::getStations()'s first parameter is nullable.Closes #32
🤖 Generated with Claude Code