Roave / BackwardCompatibilityCheck

:ab: Tool to compare two revisions of a class API to check for BC breaks
MIT License
568 stars 59 forks source link

PHP 8.3 build #751

Closed michael-rubel closed 7 months ago

michael-rubel commented 8 months ago

About

Updates constraints for PHP 8.3.

michael-rubel commented 8 months ago

Ah, there are more dependencies to update. Probably worth waiting till a stable release. 🙂

michael-rubel commented 7 months ago

Hi @Ocramius

Left the PR in better-reflection. Could you take a look?

Ocramius commented 7 months ago

@michael-rubel upstream is released BTW - https://github.com/Roave/BetterReflection/releases/tag/6.18.0

michael-rubel commented 7 months ago

@Ocramius the next one. 😁

https://github.com/Roave/Signature/pull/64

Ocramius commented 7 months ago

@michael-rubel also released 👍

Ocramius commented 7 months ago

Seems like the roave/better-reflection upstream dependency bump introduced some type alignment issues:

Error: src/SourceLocator/LocatedSourceWithStrippedSourcesDirectory.php:14:63: MissingImmutableAnnotation: Roave\BetterReflection\SourceLocator\Located\LocatedSource is marked @psalm-immutable, but Roave\BackwardCompatibility\SourceLocator\LocatedSourceWithStrippedSourcesDirectory is not marked @psalm-immutable (see https://psalm.dev/213)
Error: src/SourceLocator/LocatedSourceWithStrippedSourcesDirectory.php:22:5: MissingImmutableAnnotation: Roave\BetterReflection\SourceLocator\Located\LocatedSource::getSource is marked @psalm-immutable, but Roave\BackwardCompatibility\SourceLocator\LocatedSourceWithStrippedSourcesDirectory::getSource is not marked @psalm-immutable (see https://psalm.dev/213)
Error: src/SourceLocator/LocatedSourceWithStrippedSourcesDirectory.php:27:5: MissingImmutableAnnotation: Roave\BetterReflection\SourceLocator\Located\LocatedSource::getName is marked @psalm-immutable, but Roave\BackwardCompatibility\SourceLocator\LocatedSourceWithStrippedSourcesDirectory::getName is not marked @psalm-immutable (see https://psalm.dev/213)
Error: src/SourceLocator/LocatedSourceWithStrippedSourcesDirectory.php:32:5: MissingImmutableAnnotation: Roave\BetterReflection\SourceLocator\Located\LocatedSource::getFileName is marked @psalm-immutable, but Roave\BackwardCompatibility\SourceLocator\LocatedSourceWithStrippedSourcesDirectory::getFileName is not marked @psalm-immutable (see https://psalm.dev/213)
Error: src/SourceLocator/LocatedSourceWithStrippedSourcesDirectory.php:32:36: MoreSpecificReturnType: The declared return type 'non-empty-string|null' for Roave\BackwardCompatibility\SourceLocator\LocatedSourceWithStrippedSourcesDirectory::getFileName is more specific than the inferred return type 'null|string' (see https://psalm.dev/070)
Error: src/SourceLocator/LocatedSourceWithStrippedSourcesDirectory.php:40:16: LessSpecificReturnStatement: The type 'string' is more general than the declared return type 'non-empty-string|null' for Roave\BackwardCompatibility\SourceLocator\LocatedSourceWithStrippedSourcesDirectory::getFileName (see https://psalm.dev/129)
Error: src/SourceLocator/LocatedSourceWithStrippedSourcesDirectory.php:43:5: MissingImmutableAnnotation: Roave\BetterReflection\SourceLocator\Located\LocatedSource::isInternal is marked @psalm-immutable, but Roave\BackwardCompatibility\SourceLocator\LocatedSourceWithStrippedSourcesDirectory::isInternal is not marked @psalm-immutable (see https://psalm.dev/213)
Error: src/SourceLocator/LocatedSourceWithStrippedSourcesDirectory.php:48:5: MissingImmutableAnnotation: Roave\BetterReflection\SourceLocator\Located\LocatedSource::getExtensionName is marked @psalm-immutable, but Roave\BackwardCompatibility\SourceLocator\LocatedSourceWithStrippedSourcesDirectory::getExtensionName is not marked @psalm-immutable (see https://psalm.dev/213)
Error: src/SourceLocator/LocatedSourceWithStrippedSourcesDirectory.php:53:5: MissingImmutableAnnotation: Roave\BetterReflection\SourceLocator\Located\LocatedSource::isEvaled is marked @psalm-immutable, but Roave\BackwardCompatibility\SourceLocator\LocatedSourceWithStrippedSourcesDirectory::isEvaled is not marked @psalm-immutable (see https://psalm.dev/213)
Error: src/SourceLocator/LocatedSourceWithStrippedSourcesDirectory.php:58:5: MissingImmutableAnnotation: Roave\BetterReflection\SourceLocator\Located\LocatedSource::getAliasName is marked @psalm-immutable, but Roave\BackwardCompatibility\SourceLocator\LocatedSourceWithStrippedSourcesDirectory::getAliasName is not marked @psalm-immutable (see https://psalm.dev/213)

I think we should revert the composer.lock changes, and only update the composer.lock hash (via composer update nothing).

Any issues arising from dependency upgrades would then be fixed later on, IMO, in a separate patch, unless it's work you're willing to do here.

Ocramius commented 7 months ago
Verifying lock file contents can be installed on current platform.
- Required package "roave/better-reflection" is in the lock file as "6.5.0" but that does not satisfy your constraint "^6.18.0".

We need to revert also the dependency bumps in composer.json, for now :D

michael-rubel commented 7 months ago

@Ocramius Yeah, seems safe now. 😁

Ocramius commented 7 months ago

And released :-)