Skip to content

Comments

fix: PHP 8.1 compatibility and bug fixes#361

Open
Chemaclass wants to merge 6 commits intomainfrom
fix/php81-compatibility
Open

fix: PHP 8.1 compatibility and bug fixes#361
Chemaclass wants to merge 6 commits intomainfrom
fix/php81-compatibility

Conversation

@Chemaclass
Copy link
Member

TL;DR

Fixes PHP 8.1 compatibility issues, resolves bugs in test directory filtering and service bindings, and improves static analysis configuration for better type safety.

Summary

Bug Fixes:

  • Fix PHP 8.1 readonly class syntax compatibility issues
  • Fix accidental test directory filtering in AllAppModulesFinder
  • Fix lazy service container bindings (use addFactory instead of addBinding)
  • Fix service registration in test fixtures
  • Fix container service closures to include proper return types

Improvements:

  • Update PHPStan and Psalm configuration for stricter analysis
  • Enhance type safety in AbstractFacade, AbstractFactory, AbstractProvider
  • Improve Bootstrap configuration handling and validation
  • Better error handling in DependencyProviderResolver
  • Add factory method support in DocBlockResolver

Changes

PHP 8.1 Compatibility:

  • Convert readonly classes to PHP 8.1-compatible syntax
  • Ensure all readonly properties use proper syntax
  • Fix type declarations for PHP 8.1 compliance

Test Fixes:

  • Restore test fixture methods accidentally removed by linter
  • Update MakeModuleCommandTest to match current command description
  • Add lazy services integration test
  • Fix service binding methods in tests

Static Analysis:

  • Update PHPStan configuration
  • Update Psalm configuration
  • Improve type hints throughout the codebase
  • Better generic type support

Impact

  • Full PHP 8.1+ compatibility
  • Improved code quality and type safety
  • Better static analysis coverage
  • More reliable test suite
  • Cleaner separation of test and source code

Fix PHP 8.1 compatibility issues and various bugs found during
development and testing.

Bug fixes:
- Fix PHP 8.1 readonly class syntax compatibility
- Fix test directory filtering in AllAppModulesFinder
- Fix lazy service bindings to use addFactory correctly
- Fix container service registration in tests
- Improve type safety across framework components

Improvements:
- Update PHPStan and Psalm static analysis configs
- Enhance AbstractFacade, AbstractFactory, AbstractProvider
- Improve Bootstrap configuration handling
- Better DependencyProviderResolver error handling
- Enhanced DocBlockResolver with factory method support

This ensures compatibility with PHP 8.1+ and improves
overall code quality and type safety.
@Chemaclass Chemaclass self-assigned this Feb 16, 2026
- Remove references to 8 nonexistent command classes from ConsoleProvider
- Remove #[Deprecated] attribute referencing nonexistent class
- Regenerate phpstan and psalm baselines
- Fix cache test assertions for test-order independence
@Chemaclass Chemaclass force-pushed the fix/php81-compatibility branch from 38355b1 to acfdfdc Compare February 16, 2026 13:33
@Chemaclass Chemaclass closed this Feb 16, 2026
@Chemaclass Chemaclass reopened this Feb 16, 2026
@Chemaclass Chemaclass force-pushed the fix/php81-compatibility branch from ab57ec6 to 9d61b70 Compare February 16, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant