Skip to content

Modernize to PHP 8.2+ with attributes#7

Merged
koriym merged 15 commits into1.xfrom
php82-modernization
Jan 22, 2026
Merged

Modernize to PHP 8.2+ with attributes#7
koriym merged 15 commits into1.xfrom
php82-modernization

Conversation

@koriym
Copy link
Member

@koriym koriym commented Jan 21, 2026

Summary

  • PHP 8.2+ 必須に変更
  • Doctrine アノテーション → PHP 8 アトリビュートに変換
  • PHPUnit 10、Symfony Cache 7.0 に更新
  • V8Js 新コンストラクタシグネチャに対応
  • PHPStan / php-cs-fixer 設定を追加

Breaking Changes

  • PHP 8.2+ required (was 7.1+)
  • ApcSsrModule now requires $bundleSrcBasePath constructor parameter
  • Symfony Cache 7.0 API (PSR-6 adapter required for cache modules)

Test plan

  • composer test passes (7/7 tests)
  • phpstan analyse passes
  • phpcs passes

- Require PHP 8.2+, update dependencies (PHPUnit 10, Symfony Cache 7)
- Convert Doctrine annotations to PHP 8 attributes (#[Ssr], #[SsrCacheConfig])
- Use constructor property promotion with readonly
- Add return types and PHPDoc generics throughout
- Update V8Js binding for new constructor signature (3 params)
- Migrate Symfony Cache from Simple\* to Psr16Cache adapter
- Replace .php_cs/phpmd.xml with .php-cs-fixer.dist.php/phpstan.neon
- Update PHPUnit config and tests to PHPUnit 10 format
- Remove Doctrine AnnotationRegistry from bootstrap
Remove hardcoded test path and require bundleSrcBasePath in constructor,
matching SsrModule's interface.
@coderabbitai
Copy link

coderabbitai bot commented Jan 21, 2026

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

- Add ci.yml with PHPUnit, static analysis, coding standards, and V8Js Docker jobs
- Add #[Group('v8js')] attribute to tests requiring V8Js extension
- Update CLAUDE.md with V8Js optional info and test commands
@koriym
Copy link
Member Author

koriym commented Jan 21, 2026

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Jan 21, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

- Add src/tests directories to phpcs.xml for default scanning
- Remove #[Group('v8js')] from ApcCacheSsrModuleTest since it doesn't
  require V8Js and should run in normal PHPUnit job where APCu is available
- Restore #[Group('v8js')] on ApcCacheSsrModuleTest (requires V8Js binding)
- Add $PHPIZE_DEPS to Docker job for proper APCu compilation
- Add verification step to confirm APCu is loaded
@koriym koriym merged commit 4575717 into 1.x Jan 22, 2026
8 checks passed
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.

1 participant