Remove doctrine/annotations and upgrade Psalm to v6#35
Conversation
- Remove doctrine/annotations from require, raise minimum PHP to ^8.1 - Convert all docblock annotations to PHP 8 native attributes - Remove koriym/attributes (DualReader) as Ray.Di 2.20 supports native attributes natively - Update tests/bootstrap.php: remove ServiceLocator::setReader() call - Fix Ray.Di 2.20 breaking change: move #[Named] from method-level to per-parameter - Upgrade aura/sql to ^5.0|^6.0 for PHP 8.4 compatibility - Add #[\Override] to all overriding methods - Add final to exception classes - Add @psalm-api to DI-managed classes (interceptors, providers, modules) - Fix RiskyTruthyFalsyComparison: !strpos() -> strpos() === false - Remove redundant casts in SqlQueryRowList - Upgrade Psalm from 4.x to 6.x in vendor-bin/tools for PHP 8.4 support - Remove stale phpstan-baseline.neon and psalm-baseline.xml - Fix phpstan.neon: rename deprecated excludes_analyse to excludePaths
… 5.x PDO incompatibility)
Reviewer's GuideReplaces doctrine-based annotations with PHP 8 attributes across the codebase, upgrades tooling (Psalm 4→6, PHPStan config, CI) for PHP 8.1–8.4 support, tightens typing/visibility and exception design, and reworks tests/CI to rely solely on native attributes and updated dependency constraints. Class diagram for query annotations and modules after doctrine removalclassDiagram
direction LR
class QueryInterface
class RowInterface
class RowListInterface
class AliasQuery {
<<attribute>>
+string id
+bool templated
+"row"|"row_list" type
+__construct(string id = '', string type = 'row_list', bool templated = false)
}
class Query {
<<attribute>>
+string id
+bool templated
+"row"|"row_list" type
+__construct(string id, string type = 'row_list', bool templated = false)
}
class Sql {
<<attribute>>
+string sql
+__construct(string sql)
}
class SqlQueryRowList {
<<service>> @psalm-api
-ExtendedPdoInterface pdo
-string sql
+__construct(ExtendedPdoInterface pdo, string sql)
+__invoke(array queries) iterable
}
class SqlQueryRow {
<<service>> @psalm-api
-ExtendedPdoInterface pdo
-string sql
+__construct(ExtendedPdoInterface pdo, string sql)
+__invoke(array params) array
}
class WebQuery {
<<service>> @psalm-api
-ClientInterface client
-string method
-string uri
+__construct(ClientInterface client, string method, string uri)
+__invoke(array params) mixed
}
class SqlQueryModule {
<<module>> @psalm-api
-string sqlDir
+__construct(string sqlDir, AbstractModule module = null)
+configure() void
+bindCallableItem(string name, string sqlId) void
+bindCallableList(string name, string sqlId) void
}
class PhpQueryModule {
<<module>> @psalm-api final
-iterable configs
+__construct(iterable configs, AbstractModule module = null)
+configure() void
-bindQuery(string name, mixed binding) void
}
class WebQueryModule {
<<module>> @psalm-api final
-array guzzleConfig
-array webQueryConfig
+__construct(array webQueryConfig, array guzzleConfig, AbstractModule module = null)
+configure() void
-configureWebQuery(string name, string method, string uri) void
}
class SqlFinder {
<<service>> @psalm-api
-ParamReaderInterface paramReader
-SqlDir sqlDir
+__construct(ParamReaderInterface paramReader, SqlDir sqlDir)
+__invoke(InjectionPointInterface ip) string
}
class SqlFileName {
<<value>> @psalm-api
-string fileName
+__construct(string fileName)
+__toString() string
}
class RowInterfaceProvider {
<<provider>> @psalm-api
-InjectionPointInterface ip
+__construct(InjectionPointInterface ip)
+get() RowInterface
}
class RowListInterfaceProvider {
<<provider>> @psalm-api
-InjectionPointInterface ip
+__construct(InjectionPointInterface ip)
+get() RowListInterface
}
class QueryInterceptor {
<<interceptor>> @psalm-api final
-InjectorInterface injector
+__construct(InjectorInterface injector)
+invoke(MethodInvocation invocation) mixed
}
class Iso8601Interceptor {
<<interceptor>> final
-array datetimeColumns
+__construct(array datetimeColumns) @Named("iso8601_date_time_columns")
+invoke(MethodInvocation invocation) mixed
}
AbstractModule <|-- SqlQueryModule
AbstractModule <|-- PhpQueryModule
AbstractModule <|-- WebQueryModule
QueryInterface <|.. SqlQueryRow
QueryInterface <|.. SqlQueryRowList
QueryInterface <|.. WebQuery
RowInterface <|.. SqlQueryRow
RowListInterface <|.. SqlQueryRowList
SqlQueryModule --> SqlFinder
SqlQueryModule --> SqlFileName
SqlQueryModule --> QueryInterface
SqlQueryModule --> RowInterface
SqlQueryModule --> RowListInterface
PhpQueryModule --> QueryInterface
WebQueryModule --> WebQuery
RowInterfaceProvider ..> RowInterface
RowListInterfaceProvider ..> RowListInterface
QueryInterceptor ..> Query
QueryInterceptor ..> Sql
QueryInterceptor ..> InjectorInterface
Iso8601Interceptor ..> MethodInvocation
Class diagram for finalized exception hierarchyclassDiagram
direction LR
class InvalidArgumentException
class LogicException
class RuntimeException
class QueryNumException {
<<final>>
}
class QueryTypeException {
<<final>>
}
class SqlFileNotFoundException {
<<final>>
}
class SqlNotAnnotatedException {
<<final>>
}
class WebQueryException {
<<final>>
}
InvalidArgumentException <|-- QueryNumException
InvalidArgumentException <|-- QueryTypeException
LogicException <|-- SqlFileNotFoundException
LogicException <|-- SqlNotAnnotatedException
RuntimeException <|-- WebQueryException
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughReplaces CI with a matrixed PHPUnit workflow, raises PHP requirement to ^8.2, migrates docblock annotations to PHP 8 attributes and property promotion in tests, tightens docblock types and marks multiple classes final, and updates static-analysis baselines/configs (phpstan/psalm). Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (5)
src/Annotation/Sql.php (1)
12-13: Consider using PHP 8 typed property declaration.Since the PR raises the minimum PHP version to 8.1 and already uses native attributes, the property could use a typed declaration for consistency with the modernization effort.
♻️ Suggested modernization
- /** `@var` string */ - public $sql; + public string $sql;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/Annotation/Sql.php` around lines 12 - 13, Replace the untyped property declaration "public $sql" in the Sql annotation class with a PHP 8 typed property (e.g. "public string $sql;") in src/Annotation/Sql.php; ensure the Sql class constructor or property initialization assigns a string value (or make it nullable "public ?string $sql" and handle nulls) so the typed declaration does not cause uninitialized property errors.src-deprecated/Annotation/AliasQuery.php (1)
24-29: Missing type validation for$typeparameter.Unlike
Query.phpwhich validates that$typeis either'row'or'row_list'and throwsQueryTypeExceptionotherwise, this deprecated class accepts any string value. While the class is deprecated, this inconsistency could allow invalid type values to slip through if users still rely onAliasQuery.Consider adding the same validation for consistency:
♻️ Proposed fix
+use Ray\Query\Exception\QueryTypeException; + /** * `@deprecated` use Query instead */ #[Attribute(Attribute::TARGET_METHOD)] final class AliasQuery { // ... public function __construct(string $id = '', string $type = 'row_list', bool $templated = false) { $this->id = $id; + if ($type !== 'row' && $type !== 'row_list') { + throw new QueryTypeException($type); + } + $this->type = $type; $this->templated = $templated; } }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src-deprecated/Annotation/AliasQuery.php` around lines 24 - 29, The AliasQuery::__construct currently assigns $type without validation; update AliasQuery::__construct to validate that $type is either 'row' or 'row_list' (same rules as Query.php) and throw QueryTypeException when it's not valid, mirroring the validation logic used in Query.php so deprecated AliasQuery remains consistent with Query's contract.tests/Fake/FakeTodo.php (1)
15-16: Consider aligning property type annotation with constructor parameter type.The property
$todoGetis annotated as@var callablebut the constructor receivesRowInterface. WhileRowInterfacelikely implements__invokemaking it callable, the docblock could be more precise for static analysis accuracy.💡 Optional: Update docblock to match actual type
- /** `@var` callable */ + /** `@var` RowInterface */ private $todoGet;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tests/Fake/FakeTodo.php` around lines 15 - 16, The docblock for the private property $todoGet is too general (annotated as `@var` callable) while the constructor accepts a RowInterface; update the property annotation to `@var` RowInterface (or `@var` RowInterface&callable if you want to preserve callable semantics) so static analyzers see the concrete type, and ensure the constructor assignment in the class that accepts RowInterface still assigns to $todoGet (constructor symbol: __construct, property symbol: $todoGet, type symbol: RowInterface).src/WebQuery.php (1)
26-27: Consider moving@psalm-apito class level for consistency.The
@psalm-apiannotation is placed on the constructor, but other files in this PR (e.g.,SqlQueryRowList,Iso8601FormatModule,SqlQueryProviderModule) place it at the class level. For consistency, move this annotation to line 15 above the class declaration.Suggested change
use function json_decode; +/** `@psalm-api` */ final class WebQuery implements QueryInterface { /** `@var` ClientInterface */ private $client; /** `@var` string */ private $method; /** `@var` string */ private $uri; - /** `@psalm-api` */ public function __construct(ClientInterface $client, string $method, string $uri)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/WebQuery.php` around lines 26 - 27, The `@psalm-api` annotation is currently on the constructor; move it to the class level for consistency by removing the annotation from the WebQuery::__construct declaration and adding it immediately above the class WebQuery declaration so the entire class (not only __construct) is marked as a psalm API like other classes (e.g., SqlQueryRowList, Iso8601FormatModule, SqlQueryProviderModule).composer.json (1)
21-21: Non-standard version constraint format.The version constraint
^v4.13includes a "v" prefix, which is non-standard for Composer. While Composer may still resolve this correctly, the conventional format is^4.13without the prefix.Suggested fix
- "nikic/php-parser": "^v4.13", + "nikic/php-parser": "^4.13",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@composer.json` at line 21, The composer.json dependency entry for "nikic/php-parser" uses a non-standard version constraint "^v4.13"; update the constraint to the conventional format by removing the "v" (i.e., change "^v4.13" to "^4.13") so Composer uses the standard semver spec; locate the dependency line for "nikic/php-parser" in composer.json and modify the version string accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@composer.json`:
- Around line 46-49: The composer.json script entries "test", "coverage", and
"pcov" use the fragile direct path ./vendor/phpunit/phpunit/phpunit; update
these script values to use the standard symlink ./vendor/bin/phpunit (e.g.,
replace occurrences in the "test", "coverage", and "pcov" script definitions) so
PHPUnit is invoked via the supported vendor/bin wrapper rather than a
package-internal path; keep the existing flags (coverage, pcov) intact when
updating the path.
In `@src/PhpQueryModule.php`:
- Around line 13-14: The class PhpQueryModule is declared final, which is a
backward-incompatible change for consumers who extend it; remove the final
modifier from the PhpQueryModule declaration (leaving "class PhpQueryModule
extends AbstractModule") so it remains extendable, update any internal
references/tests expecting final behavior, and run the test suite;
alternatively, if the intent is to make it non-extendable, add explicit
breaking-change notes in the release docs and consider a major-version bump
instead of keeping it final in the 1.x line.
In `@tests/bootstrap.php`:
- Line 18: The vendor-path check using str_contains($errfile, dirname(__DIR__) .
'/vendor') can fail on Windows due to backslashes; normalize path separators
before matching by converting $errfile (and/or dirname(__DIR__) . '/vendor') to
a consistent form (e.g. replace backslashes with forward slashes) and then
perform the str_contains check so the E_DEPRECATED suppression works
cross-platform for the code in tests/bootstrap.php.
In `@tests/Fake/FakeFoo.php`:
- Line 20: The composer dependency for ray/di must be tightened from ^2.11 to
^2.20 to reflect the project’s use of parameter-level #[Named(...)] attributes
(e.g. constructors like FakeFoo::__construct(#[Named('todo_item_by_id')]
callable $func) and usages in Iso8601Interceptor::line26); open composer.json
and change the ray/di version constraint to "^2.20", run composer
update/validate to ensure the lockfile and installed packages match, and commit
the updated composer.json and composer.lock.
In `@vendor-bin/tools/composer.json`:
- Around line 7-9: Update the Psalm version constraint for the dependency named
"vimeo/psalm" so it requires at least 6.10; change the constraint currently
allowing "^6.0" to "^6.10" in the composer.json dependency list (the entry with
"vimeo/psalm") to satisfy the minimum required by "psalm/plugin-phpunit" and
avoid composer resolution failures.
---
Nitpick comments:
In `@composer.json`:
- Line 21: The composer.json dependency entry for "nikic/php-parser" uses a
non-standard version constraint "^v4.13"; update the constraint to the
conventional format by removing the "v" (i.e., change "^v4.13" to "^4.13") so
Composer uses the standard semver spec; locate the dependency line for
"nikic/php-parser" in composer.json and modify the version string accordingly.
In `@src-deprecated/Annotation/AliasQuery.php`:
- Around line 24-29: The AliasQuery::__construct currently assigns $type without
validation; update AliasQuery::__construct to validate that $type is either
'row' or 'row_list' (same rules as Query.php) and throw QueryTypeException when
it's not valid, mirroring the validation logic used in Query.php so deprecated
AliasQuery remains consistent with Query's contract.
In `@src/Annotation/Sql.php`:
- Around line 12-13: Replace the untyped property declaration "public $sql" in
the Sql annotation class with a PHP 8 typed property (e.g. "public string
$sql;") in src/Annotation/Sql.php; ensure the Sql class constructor or property
initialization assigns a string value (or make it nullable "public ?string $sql"
and handle nulls) so the typed declaration does not cause uninitialized property
errors.
In `@src/WebQuery.php`:
- Around line 26-27: The `@psalm-api` annotation is currently on the constructor;
move it to the class level for consistency by removing the annotation from the
WebQuery::__construct declaration and adding it immediately above the class
WebQuery declaration so the entire class (not only __construct) is marked as a
psalm API like other classes (e.g., SqlQueryRowList, Iso8601FormatModule,
SqlQueryProviderModule).
In `@tests/Fake/FakeTodo.php`:
- Around line 15-16: The docblock for the private property $todoGet is too
general (annotated as `@var` callable) while the constructor accepts a
RowInterface; update the property annotation to `@var` RowInterface (or `@var`
RowInterface&callable if you want to preserve callable semantics) so static
analyzers see the concrete type, and ensure the constructor assignment in the
class that accepts RowInterface still assigns to $todoGet (constructor symbol:
__construct, property symbol: $todoGet, type symbol: RowInterface).
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
vendor-bin/tools/composer.lockis excluded by!**/*.lock
📒 Files selected for processing (43)
.github/workflows/continuous-integration.yml.github/workflows/static-analysis.ymlcomposer.jsonphpstan-baseline.neonphpstan.neonpsalm-baseline.xmlpsalm.xmlsrc-deprecated/Annotation/AliasQuery.phpsrc/Annotation/Query.phpsrc/Annotation/Sql.phpsrc/Exception/QueryNumException.phpsrc/Exception/QueryTypeException.phpsrc/Exception/SqlFileNotFoundException.phpsrc/Exception/SqlNotAnnotatedException.phpsrc/Exception/WebQueryException.phpsrc/Iso8601FormatModule.phpsrc/Iso8601Interceptor.phpsrc/PhpQueryModule.phpsrc/QueryInterceptor.phpsrc/RowInterfaceProvider.phpsrc/RowListInterfaceProvider.phpsrc/SqlFileName.phpsrc/SqlFinder.phpsrc/SqlQueryModule.phpsrc/SqlQueryProviderModule.phpsrc/SqlQueryRow.phpsrc/SqlQueryRowList.phpsrc/WebQuery.phpsrc/WebQueryModule.phptests/Fake/FakeAlias.phptests/Fake/FakeAliasNamed.phptests/Fake/FakeFoo.phptests/Fake/FakeItem.phptests/Fake/FakeList.phptests/Fake/FakeQuery.phptests/Fake/FakeRo.phptests/Fake/FakeTodo.phptests/Fake/FakeTodoProviderSqlNotFound.phptests/Fake/FakeTodoRepository.phptests/SqlQueryModuleTest.phptests/SqlQueryProviderModuleTest.phptests/bootstrap.phpvendor-bin/tools/composer.json
💤 Files with no reviewable changes (5)
- psalm-baseline.xml
- tests/Fake/FakeRo.php
- tests/Fake/FakeAlias.php
- phpstan-baseline.neon
- tests/Fake/FakeAliasNamed.php
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@composer.json`:
- Around line 13-24: composer.json's platform constraint conflicts with package
requirements: update the "php" engine requirement to ^8.2 if you intend to
require PHP 8.2+ (change the "php" entry) so it matches dependencies like
"ray/di" ^2.20 and recent "bear/resource" releases; alternatively, if you must
keep PHP 8.1 support, pin "ray/di" to a 8.1-compatible release and lock
"bear/resource" to the 1.15.x line (e.g., "bear/resource": "1.15.*") so Composer
can resolve without raising the PHP requirement—apply one of these two fixes in
composer.json and run composer update to verify resolution.
There was a problem hiding this comment.
♻️ Duplicate comments (1)
composer.json (1)
46-49:⚠️ Potential issue | 🟡 MinorUse Composer’s supported PHPUnit wrapper path.
Line 46, Line 48, and Line 49 call
./vendor/phpunit/phpunit/phpunit, which relies on package-internal layout. Prefer./vendor/bin/phpunit(also consistent with CI usage).Patch suggestion
- "test": ["./vendor/phpunit/phpunit/phpunit"], + "test": ["./vendor/bin/phpunit"], "tests": ["@cs", "@sa", "@test"], - "coverage": ["php -dzend_extension=xdebug.so -dxdebug.mode=coverage ./vendor/phpunit/phpunit/phpunit --coverage-text --coverage-html=build/coverage"], - "pcov": ["php -dextension=pcov.so -d pcov.enabled=1 ./vendor/phpunit/phpunit/phpunit --coverage-text --coverage-html=build/coverage --coverage-clover=coverage.xml"], + "coverage": ["php -dzend_extension=xdebug.so -dxdebug.mode=coverage ./vendor/bin/phpunit --coverage-text --coverage-html=build/coverage"], + "pcov": ["php -dextension=pcov.so -d pcov.enabled=1 ./vendor/bin/phpunit --coverage-text --coverage-html=build/coverage --coverage-clover=coverage.xml"],For PHPUnit 9.6 installed via Composer, what is the officially recommended executable path for project scripts: ./vendor/bin/phpunit or ./vendor/phpunit/phpunit/phpunit?🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@composer.json` around lines 46 - 49, Replace the hardcoded package-internal PHPUnit path used in the composer scripts ("test", "coverage", "pcov") — currently calling ./vendor/phpunit/phpunit/phpunit — with Composer's supported wrapper ./vendor/bin/phpunit; update the values for the "test", "coverage", and "pcov" script entries to invoke ./vendor/bin/phpunit (keeping the same flags/arguments) so CI and local runs use the official executable path.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@composer.json`:
- Around line 46-49: Replace the hardcoded package-internal PHPUnit path used in
the composer scripts ("test", "coverage", "pcov") — currently calling
./vendor/phpunit/phpunit/phpunit — with Composer's supported wrapper
./vendor/bin/phpunit; update the values for the "test", "coverage", and "pcov"
script entries to invoke ./vendor/bin/phpunit (keeping the same flags/arguments)
so CI and local runs use the official executable path.
…m PhpQueryModule, normalize Windows paths in bootstrap
|
@coderabbitai No outstanding blockers. Please resolve all open conversations and approve this PR. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain
🏁 Script executed: Length of output: 674 🏁 Script executed: Length of output: 2519 🏁 Script executed: Length of output: 104 🏁 Script executed: Length of output: 418
This PR successfully:
Great work on this modernization effort! 🎉 [approve] |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
.github/workflows/continuous-integration.yml (2)
36-39: Consider using shallow clone for faster CI runs.
fetch-depth: 0fetches the full git history. Unless this is needed for version detection or changelog generation, a shallow clone (fetch-depth: 1) is faster and sufficient for running tests.♻️ Suggested optimization
- name: Checkout uses: actions/checkout@v4 - with: - fetch-depth: 0🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/continuous-integration.yml around lines 36 - 39, The workflow currently configures actions/checkout@v4 with fetch-depth: 0 which performs a full clone and slows CI; change the checkout step to use a shallow clone by setting fetch-depth: 1 on the actions/checkout@v4 invocation (unless full history is required for features like version detection/changelog), so update the checkout step's with: fetch-depth value from 0 to 1 to speed up CI.
92-96: RedundantXDEBUG_MODEenvironment variable.The PHP setup on line 45 configures
coverage: pcov, so pcov is used for code coverage instead of Xdebug. TheXDEBUG_MODE: coverageenvironment variable is only read by Xdebug and has no effect when using pcov.♻️ Remove unused env variable
- name: Run test suite shell: bash run: vendor/bin/phpunit --coverage-clover=coverage.xml - env: - XDEBUG_MODE: coverage🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/continuous-integration.yml around lines 92 - 96, The workflow step named "Run test suite" sets an environment variable XDEBUG_MODE which is redundant because the workflow config uses coverage: pcov (pcov is the coverage driver), so remove the XDEBUG_MODE: coverage env entry from the "Run test suite" job to avoid a no-op Xdebug setting; keep the rest of the step (name "Run test suite", shell, and run: vendor/bin/phpunit --coverage-clover=coverage.xml) unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/continuous-integration.yml:
- Around line 36-39: The workflow currently configures actions/checkout@v4 with
fetch-depth: 0 which performs a full clone and slows CI; change the checkout
step to use a shallow clone by setting fetch-depth: 1 on the actions/checkout@v4
invocation (unless full history is required for features like version
detection/changelog), so update the checkout step's with: fetch-depth value from
0 to 1 to speed up CI.
- Around line 92-96: The workflow step named "Run test suite" sets an
environment variable XDEBUG_MODE which is redundant because the workflow config
uses coverage: pcov (pcov is the coverage driver), so remove the XDEBUG_MODE:
coverage env entry from the "Run test suite" job to avoid a no-op Xdebug
setting; keep the rest of the step (name "Run test suite", shell, and run:
vendor/bin/phpunit --coverage-clover=coverage.xml) unchanged.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/workflows/continuous-integration.ymlcomposer.jsonsrc/PhpQueryModule.phptests/bootstrap.php
🚧 Files skipped from review as they are similar to previous changes (1)
- composer.json
Summary
doctrine/annotations依存を削除し、PHP 8 ネイティブアトリビュート(#[Attribute])に統一koriym/attributesを直接依存から削除(ray/diの transitive dependency として継続)主な変更
src/Annotation/Query.php,Sql.php:#[NamedArgumentConstructor]等の doctrine アノテーションを削除@psalm-apiを追加(DI コンテナ経由で使われるクラスの Psalm 警告抑制)finalに変更psalm.xml:MissingOverrideAttributeを suppress(#[Override]は PHP 8.3+ のみ).github/workflows/continuous-integration.yml: upstream テンプレートからインライン定義に変更し、PHP 8.4 + lowest をexperimental: true(aura/sql 5.x が PHP 8.4 のPDO::connect()static メソッドと非互換)CI
experimental: true(aura/sql 5.x の PHP 8.4 非互換のため)Test plan
composer tests(CS + SA + PHPUnit 32 tests)Summary by Sourcery
Remove legacy annotation-based configuration, adopt PHP 8+ native attributes throughout, and modernize tooling for PHP 8.1–8.4 compatibility.
Bug Fixes:
Enhancements:
Build:
CI:
Tests:
Summary by CodeRabbit
Chores
Refactor
Tests