Skip to content

chore: update composer.json to remove unused plugin.#94

Merged
terabytesoftw merged 4 commits into
mainfrom
refactor/add-return-type-declarations
Jun 21, 2026
Merged

chore: update composer.json to remove unused plugin.#94
terabytesoftw merged 4 commits into
mainfrom
refactor/add-return-type-declarations

Conversation

@terabytesoftw

Copy link
Copy Markdown
Member

Pull Request

  • Breaking change (fix or feature that would cause existing functionality to change)
  • Bugfix (non-breaking change that fixes an issue)
  • CI/build configuration
  • Documentation update
  • New feature (non-breaking change that adds functionality)
  • Refactoring (no functional changes)

…tion files and update `composer.json` to remove unused plugin.
@terabytesoftw terabytesoftw added the bug Something isn't working label Jun 21, 2026
@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@terabytesoftw, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 53 minutes and 29 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: e7f13067-93b0-438c-bebb-bd027dfe2120

📥 Commits

Reviewing files that changed from the base of the PR and between d86e3d7 and 83e5e58.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • rector.php
📝 Walkthrough

Walkthrough

Explicit ArrayObject return type annotations are added to two test configuration closures. rector.php is updated to disable docblock name imports via importNames. The yii2-extensions/scaffold entry is removed from composer.json's config.allow-plugins. CHANGELOG.md records all changes under version 0.4.2.

Changes

Test fixture closures, Rector config, and Composer plugin cleanup

Layer / File(s) Summary
Explicit return types on test fixture closures
tests/config/definitions-closure-not-return-type.php, tests/config/singletons-closure-not-return-type.php
Both closure-not-return-type static arrow functions are updated from static fn() to static fn(): ArrayObject, adding explicit return type annotations while keeping the same new ArrayObject() body.
Rector name-import config and Composer plugin removal
rector.php, composer.json
rector.php adds importNames(importNames: true, importDocBlockNames: false) to the Rector configuration closure. composer.json removes the yii2-extensions/scaffold entry from config.allow-plugins.
Changelog
CHANGELOG.md
Adds a bullet under 0.4.2 Under development documenting the closure return type additions and the unused plugin removal.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • yii2-extensions/phpstan#81: Modifies the same closure-not-return-type static closures in tests/config/definitions-closure-not-return-type.php and tests/config/singletons-closure-not-return-type.php, differing only in the specific syntax change applied.
  • yii2-extensions/phpstan#88: Directly overlaps with this PR's removal of yii2-extensions/scaffold from composer.json's config.allow-plugins, as that PR introduced the same scaffold plugin entry.

Poem

🐇 A return type declared, the closure is neat,
A plugin removed — less clutter, how sweet!
Rector now skips the docblock's old name,
The changelog records each step of this game.
Hop hop, little fixes, tidy and bright! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description is related to the changeset as it identifies the PR as a refactoring with no functional changes, which aligns with the structural improvements made to test configuration files and dependency management.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title focuses on removing the unused plugin from composer.json, which is one of two main objectives, but the primary change across the PR is adding return type declarations to closures in test configuration files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/add-return-type-declarations

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.

@codecov

codecov Bot commented Jun 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (3d3baae) to head (83e5e58).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##                main       #94   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity       108       108           
===========================================
  Files              2         2           
  Lines            230       230           
===========================================
  Hits             230       230           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@terabytesoftw terabytesoftw changed the title refactor: add return type declarations for closures in test configuration files and update composer.json to remove unused plugin. chore: update composer.json to remove unused plugin. Jun 21, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CHANGELOG.md`:
- Line 18: The changelog entry on line 18 contains a reference to updating
composer.json to remove an unused plugin, but this change is not actually
present in the current review. Remove the portion of the changelog entry that
mentions the composer.json modification and the yii2-extensions/scaffold plugin
removal. Keep only the accurate description about adding return type
declarations for closures in test configuration files. Ensure the changelog
reflects only the actual changes being made in this pull request.

In `@rector.php`:
- Around line 10-11: The `importNames()` method call in the rectorConfig is
using named parameters (importNames: true, importDocBlockNames: false), but this
method only accepts positional arguments. Replace the named parameters with
positional boolean arguments in the correct order for the `importNames()`
method, or alternatively use the modern `withImportNames()` method instead,
which is the recommended approach. Either solution will resolve the parameter
syntax issue.

In `@tests/config/definitions-closure-not-return-type.php`:
- Line 8: The fixture definition for 'closure-not-return-type' currently
includes a return type annotation `: ArrayObject`, but the test
testThrowRuntimeExceptionWhenDefinitionClosureMissingReturnType() expects a
closure without a return type to trigger a RuntimeException. Remove the `:
ArrayObject` return type annotation from the closure in the
'closure-not-return-type' definition, changing it from `static fn(): ArrayObject
=> new ArrayObject()` to `static fn() => new ArrayObject()`, so that the fixture
matches what the test validates.

In `@tests/config/singletons-closure-not-return-type.php`:
- Line 8: Remove the return type annotation (`: ArrayObject`) from the closure
assigned to the `'closure-not-return-type'` key in the fixture. The test
`testThrowRuntimeExceptionWhenSingletonClosureMissingReturnType()` expects
closures without return types to throw a RuntimeException, so the fixture
closure definition must not include the return type declaration to match the
test expectations.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2d3c5182-6e6d-44da-a2d9-3473827eb345

📥 Commits

Reviewing files that changed from the base of the PR and between 3d3baae and d86e3d7.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • composer.json
  • rector.php
  • tests/config/definitions-closure-not-return-type.php
  • tests/config/singletons-closure-not-return-type.php
💤 Files with no reviewable changes (1)
  • composer.json
📜 Review details
⏰ Context from checks skipped due to timeout. (19)
  • GitHub Check: quality / EditorConfig (ubuntu-latest)
  • GitHub Check: quality / Prettier (ubuntu-latest)
  • GitHub Check: phpunit-compatibility / PHP 8.3-ubuntu-latest
  • GitHub Check: phpunit-compatibility / PHP 8.1-windows-2022
  • GitHub Check: phpunit-compatibility / PHP 8.4-ubuntu-latest
  • GitHub Check: phpunit-compatibility / PHP 8.1-ubuntu-latest
  • GitHub Check: phpstan / PHP 8.5-ubuntu-latest
  • GitHub Check: phpunit-compatibility / PHP 8.2-windows-2022
  • GitHub Check: phpunit / PHP 8.4-windows-2022
  • GitHub Check: phpstan-console / PHP 8.5-ubuntu-latest
  • GitHub Check: phpunit-compatibility / PHP 8.4-windows-2022
  • GitHub Check: phpunit / PHP 8.5-windows-2022
  • GitHub Check: composer-require-checker / PHP 8.5-ubuntu-latest
  • GitHub Check: easy-coding-standard / PHP 8.5-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.5-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.3-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.3-windows-2022
  • GitHub Check: phpunit-compatibility / PHP 8.1-windows-2022
  • GitHub Check: phpunit / PHP 8.5-windows-2022
🔇 Additional comments (1)
CHANGELOG.md (1)

18-18: ⚡ Quick win

The changelog entry is inconsistent with the actual changes.

This entry describes adding return types as a "refactor" with no functional modifications, but the test fixtures closure-not-return-type are specifically designed to test ServiceMap's validation when closures lack return types. Adding return types to these fixtures breaks the tests that depend on their absence, making this a functional/breaking change rather than a pure refactor.

The entry should either:

  1. Acknowledge that this is a breaking change requiring test updates, or
  2. Be revised if the approach changes (e.g., creating new fixtures instead of modifying existing ones)

Comment thread CHANGELOG.md Outdated
Comment thread rector.php Outdated
Comment thread tests/config/definitions-closure-not-return-type.php Outdated
Comment thread tests/config/singletons-closure-not-return-type.php Outdated
@terabytesoftw

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 83e5e581aa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@terabytesoftw terabytesoftw merged commit 13e0bef into main Jun 21, 2026
35 checks passed
@terabytesoftw terabytesoftw deleted the refactor/add-return-type-declarations branch June 21, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant