Skip to content

[Mittel] Fix platform deprecations: nullable param, interface drift, DI Extension base (#32)#39

Open
maltehuebner wants to merge 1 commit into
mainfrom
fix/deprecations-nullable-extension-32
Open

[Mittel] Fix platform deprecations: nullable param, interface drift, DI Extension base (#32)#39
maltehuebner wants to merge 1 commit into
mainfrom
fix/deprecations-nullable-extension-32

Conversation

@maltehuebner

Copy link
Copy Markdown
Contributor

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 = null parameter so the contract matches the implementation and interface-typed callers can use the provider filter.
  • CalderaLuftApiExtension: extend Symfony\Component\DependencyInjection\Extension\Extension instead of the @internal Symfony\Component\HttpKernel\DependencyInjection\Extension (deprecated from Symfony 8.1). Pure import swap — the new base provides the same getAlias()/processConfiguration() API.

Deliberately not implemented

  • Migration to 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.
  • The analogous luft-model setter fix is tracked in that repo's own issue.

Verification

  • php -l on all changed files: clean.
  • Smoke test after composer install: CalderaLuftApiExtension is now an instance of the DI Extension, getAlias() still returns caldera_luftapi, and StationApiInterface::getStations()'s first parameter is nullable.

Closes #32

🤖 Generated with Claude Code

…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>
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.

[Mittel] Deprecations auf allen unterstützten Plattformen: implizit nullable Parameter (PHP 8.4) und @internal-Extension-Basisklasse (Symfony 8.1)

1 participant