Skip to content

Remove unused nikic/php-parser dependency#37

Merged
koriym merged 1 commit into
ray-di:1.xfrom
keitamotegi:remove-unused-nikic-php-parser
Jul 6, 2026
Merged

Remove unused nikic/php-parser dependency#37
koriym merged 1 commit into
ray-di:1.xfrom
keitamotegi:remove-unused-nikic-php-parser

Conversation

@keitamotegi

@keitamotegi keitamotegi commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • nikic/php-parser is required in composer.json (^v4.13) but the PhpParser namespace is never referenced anywhere in src/, src-deprecated/, or the project's entire git history (verified with git log -S "PhpParser" across all commits).
  • Since Psalm 6 requires nikic/php-parser: ^5, this unused constraint is currently the only real blocker preventing vimeo/psalm:^6 from being installed via a normal composer require --dev in the main dependency tree (it currently requires a vendor-bin isolation workaround).
  • Removing it from require has no effect on functionality: it may still be pulled in transitively as a dev dependency of phpunit/php-code-coverage, but it is no longer pinned to ^v4.13 by this package.

Test plan

  • composer update — resolves cleanly, no conflicts
  • composer test (phpunit) — 32 tests, 60 assertions, all pass
  • composer sa (phpstan + psalm) — no errors
  • composer cs (phpcs) — passes

Summary by CodeRabbit

  • Chores
    • Removed an unused dependency from the project.
    • Updated the changelog to reflect the removal.

The PhpParser namespace has never been referenced anywhere in src/,
src-deprecated/, or the project's git history. The dependency appears
to be a leftover from earlier development that no longer applies.
Tests, phpstan, and psalm all pass without it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3a24918d-6ebe-40e9-b37c-aabcef654ae1

📥 Commits

Reviewing files that changed from the base of the PR and between 42b3909 and bdcef89.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • composer.json
💤 Files with no reviewable changes (1)
  • composer.json

📝 Walkthrough

Walkthrough

This change removes the unused nikic/php-parser dependency from composer.json and adds a corresponding entry to CHANGELOG.md under the Unreleased/Removed section, noting the dependency was unused in src/.

Changes

Dependency Removal

Layer / File(s) Summary
Remove unused dependency
composer.json, CHANGELOG.md
Removes the nikic/php-parser require entry and documents its removal in the changelog.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Related Issues: None specified

Related PRs: None specified

Suggested labels: dependencies, documentation

Suggested reviewers: None specified

🐰 A parser hopped away, unused and quiet,
No trace in the code, no need to deny it,
The changelog whispers its tale as it goes,
One less line in composer, and lighter it flows.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: removing the unused nikic/php-parser dependency.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@koriym
koriym merged commit 0ad11ba into ray-di:1.x Jul 6, 2026
32 of 35 checks passed
@koriym

koriym commented Jul 6, 2026

Copy link
Copy Markdown
Member

@keitamotegi Arigato!

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.

2 participants