Migrate to PHP 8.4 (Ouzo 4.0.0)#334
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- symfony/console ^5.4 -> ^7.2, symfony/event-dispatcher ^5.4 -> ^7.2 - psr/log ^1.1 -> ^3.0, filp/whoops ^2.15 -> ^2.18 - friendsofphp/proxy-manager-lts 1.0.16 -> ^1.0.19 - phpunit/phpunit ^10.2 -> ^11.5, php-coveralls ^2.5 -> ^2.9 - Remove abandoned doctrine/annotations (unused in src/) - Platform PHP 8.2.7 -> 8.4.0 Adapt code to new dependency APIs: - Add :int return type to Command::execute() (Symfony Console 7) - Add return types to MigrationCommand methods - Update Logger classes for PSR-3 v3 (string|Stringable) - Fix DbTransactionalTestCase tearDown for PHPUnit 11 - Remove Doctrine AnnotationReader from tests Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Convert all implicit nullable parameters to explicit nullable types (?Type or Type|null) across 20 files in src/ - Fix DynamicProxy code generation to produce explicit nullable types in generated proxy classes - Remove deprecated E_STRICT constant from ErrorHandler Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Return attributes array instead of json_encode() result. The previous implementation caused double-encoding when used with json_encode($model). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove redundant parentheses around new when chaining method calls - Replace JetBrains #[Deprecated] with native PHP 8.4 attribute in ViewHelper and FormHelper - Replace trigger_error(E_USER_DEPRECATED) with #[Deprecated] in Arrays::removeNestedValue() - Add #[Deprecated] to Strings::EMPTY_STRING Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace manual foreach loops in Arrays::find(), Arrays::any() and Arrays::all() with native PHP 8.4 functions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- README.md: require PHP 8.4, update version support table - Goodies/README.md: require PHP 8.4, update version support table - Inject/README.md: add PHP 8.4 requirement - CHANGELOG.md: add Release 4.0.0 section, close 3.0.0 - CLAUDE.md: update PHP version Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- PHP 8.2.7 -> 8.4 - PostgreSQL 10 -> 16 (10 is EOL) - actions/checkout@v2 -> @v4 - Fix --exclude-group to use separate flags (PHPUnit 11) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Travis CI has not been used since migration to GitHub Actions. Also removed Travis CI badge from README files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
50a6d8e to
f6c80fa
Compare
- BootstrapTest: restore error/exception handlers in tearDown after tests that call runApplication() - ArraysTest: replace obsolete trigger_error assertion with delegation test for deprecated removeNestedValue() - CLAUDE.md: add code style rule for use imports Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Document import ordering, type declarations, string/array syntax, docblock policy, class design rules, error handling patterns, and testing conventions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- TestCase::__construct() is final in PHPUnit 13, move initialization from constructors to setUp() in ControllerTestCase and BootstrapTest - Add <testsuites> to phpunit.xml (required in PHPUnit 13) - Replace deprecated <coverage> with <source> element - Platform PHP 8.4.0 -> 8.4.1 (PHPUnit 13 requirement) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
In global namespace blocks, built-in classes like Deprecated are already in scope — importing them triggers a PHP warning about non-compound use statements having no effect. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The <source> element triggers a warning when no coverage driver (xdebug/pcov) is loaded. Set failOnWarning=false to prevent this from causing a non-zero exit code. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Install pcov driver for PostgreSQL job (coverage runs once, not 3x) - Add --coverage-clover flag to PHPUnit when coverage is enabled - Skip coverage driver installation for MySQL/SQLite jobs (faster) - Remove redundant 'test' argument (phpunit.xml has testsuites) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove php-coveralls dependency (and transitive guzzle/psr-http) - Remove Coveralls badge from README - Generate coverage HTML report as downloadable GHA artifact (14 days) - Print coverage % summary in GitHub Actions job summary - Coverage runs only on PostgreSQL job (pcov driver) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Update Dockerfile-postgres and CI workflow from postgres:10/16 to postgres:18 - Fix start_environment.sh: replace hardcoded pg_isready path with generic command - Make DB_HOST configurable via env var in test config (needed for Docker networking) - Fix run_ci_tests.sh: add --link and DB_HOST for container connectivity - Remove --verbose flag removed in PHPUnit 13 - Remove <groups> exclusion from phpunit.xml (non-functional in PHPUnit 13) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Update minimum version constraint for symfony/console and symfony/event-dispatcher from ^7.2 to ^7.4.8. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The script was a legacy local runner predating GitHub Actions CI and is not referenced anywhere. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Restricts updates to patch versions only (>=7.4.8, <7.5.0). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Restrict all package updates to patch versions only. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
piotrooo
approved these changes
Apr 28, 2026
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.
Context/Problem
Ouzo 3.x targets PHP 8.2 with dependencies that have reached end-of-life (Symfony 5.4, PHPUnit 10, PSR-3 v1). This PR migrates the framework to PHP 8.4 and bumps the major version to 4.0.0.
Solution/What changed
doctrine/annotations— code already uses PHP 8 native attributesE_STRICTconstant removalModel::jsonSerialize()to comply withJsonSerializablecontract — returnsmixed(attributes array) instead of JSON stringDynamicProxycode generation to produce explicit nullable typesCommand::execute()returnsint,MigrationCommandmethod signatures updatedstring|Stringable $messagesignaturesnewwithout parentheses, native#[Deprecated]attribute (replacing JetBrains#[Deprecated]andtrigger_error)array_find,array_any,array_allinArraysutility classExamples
All 1764 tests pass on PHP 8.4.20 with zero errors/failures:
🤖 Generated with Claude Code