Skip to content

Add UPGRADE.md for 2.0.0#10

Merged
koriym merged 1 commit into2.xfrom
upgrade-guide-2.0
Apr 9, 2026
Merged

Add UPGRADE.md for 2.0.0#10
koriym merged 1 commit into2.xfrom
upgrade-guide-2.0

Conversation

@koriym
Copy link
Copy Markdown
Member

@koriym koriym commented Apr 9, 2026

Summary

Add UPGRADE.md documenting the breaking changes for the upcoming 2.0.0 release.

Breaking changes documented

  • PHP 7.3/7.4 support dropped (now requires PHP ^8.0)
  • Docblock @RequiresRoles no longer read — users must migrate to PHP 8 attribute #[RequiresRoles([...])]
  • ZendAclModule no longer binds Reader / AnnotationReader / AttributeReader / DualReader

Test plan

  • Docs-only change — no code tests required

Summary by Sourcery

Documentation:

  • Add UPGRADE.md detailing 2.0.0 breaking changes, including PHP 8.0 minimum requirement, migration from @RequiresRoles annotations to PHP 8 attributes, and removal of Doctrine reader bindings from ZendAclModule.

Summary by CodeRabbit

  • Documentation
    • Added upgrade guide for version 2.0.0
    • Dropped PHP 7.x support; now requires PHP 8.0 or higher
    • Doctrine docblock annotations no longer supported; migrate to native PHP 8 attributes
    • Removed transitive dependency; applications must install annotation libraries independently if needed

@koriym
Copy link
Copy Markdown
Member Author

koriym commented Apr 9, 2026

@coderabbitai review

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Apr 9, 2026

Reviewer's Guide

Adds a new UPGRADE.md document describing the breaking changes and migration steps for the upcoming 2.0.0 release, including PHP version requirements, migration from Doctrine annotations to PHP 8 attributes, and removal of certain DI bindings/dependencies.

Sequence diagram for ACL interceptor behavior with PHP 8 attributes

sequenceDiagram
    actor User
    participant ClientCode
    participant AdminController
    participant AclInterceptor

    User->>ClientCode: invoke createUser(id)
    ClientCode->>AdminController: call createUser(id)
    activate AclInterceptor
    AdminController->>AclInterceptor: intercepted method call

    alt Method has RequiresRoles attribute
        AclInterceptor->>AdminController: read RequiresRoles attribute
        AclInterceptor->>AclInterceptor: evaluate roles against ACL
        alt Access allowed
            AclInterceptor-->>AdminController: proceed with invocation
            AdminController-->>ClientCode: createUser completed
        else Access denied
            AclInterceptor-->>ClientCode: throw access denied error
        end
    else Method has no RequiresRoles attribute
        AclInterceptor-->>AdminController: proceed without ACL enforcement
        AdminController-->>ClientCode: createUser completed
    end

    ClientCode-->>User: return response
Loading

File-Level Changes

Change Details Files
Document PHP 8.0 minimum requirement and removal of PHP 7.3/7.4 support.
  • Add a breaking-change note explaining that PHP 7.3 and 7.4 are no longer supported.
  • Show a composer.json require section diff updating the php constraint from ^7.3
Document migration from Doctrine @RequiresRoles annotations to PHP 8 attributes.
  • Explain that doctrine/annotations support was removed and that only PHP 8 attributes are now read by the interceptor.
  • Provide before/after code examples converting @RequiresRoles docblock annotations to #[RequiresRoles([...])] attributes at method level.
  • Clarify that class-level annotations migrate similarly and that absence of #[RequiresRoles] now means no ACL enforcement.
UPGRADE.md
Document removal of koriym/attributes-related bindings from ZendAclModule.
  • Explain that ZendAclModule no longer binds Reader/AnnotationReader/AttributeReader/DualReader.
  • State that applications relying on these bindings must now install koriym/attributes or doctrine/annotations directly and configure their own bindings.
UPGRADE.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 9, 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.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 9, 2026

Warning

Rate limit exceeded

@koriym has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 22 minutes and 58 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 22 minutes and 58 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a5788579-788e-4b00-bae6-10d9273b5846

📥 Commits

Reviewing files that changed from the base of the PR and between 4f4fa5c and b9991eb.

📒 Files selected for processing (1)
  • UPGRADE.md
📝 Walkthrough

Walkthrough

Adds UPGRADE.md documenting version 2.0.0 migration: drops PHP 7 support (requiring ^8.0), removes Doctrine docblock annotations in favor of native PHP 8 attributes, and eliminates the koriym/attributes dependency requiring manual setup if needed.

Changes

Cohort / File(s) Summary
Upgrade Documentation
UPGRADE.md
New file documenting breaking changes for version 2.0.0, including PHP 7 support removal, migration from @RequiresRoles docblock annotations to native #[RequiresRoles(...)] attributes, and removal of transitive koriym/attributes dependency bindings from ZendAclModule.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Poem

🐰 Hopping to version two!
PHP 8 attributes shine so new,
No more docblocks, no version seven,
Native PHP syntax—oh, it's heaven!
Upgrade your code with joy—we flew!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly summarizes the main change: adding upgrade documentation for version 2.0.0, which is the primary purpose of this changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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 upgrade-guide-2.0

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.

Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • In the section about migrating from @RequiresRoles to attributes, consider clarifying how mixed usage is handled (e.g., if both docblock annotations and attributes are present during a partial migration) to avoid ambiguity for users upgrading incrementally.
  • In the note about ZendAclModule no longer binding the various readers, it would help to include a short example of how to bind koriym/attributes (or doctrine/annotations) in a typical configuration so users have a concrete reference when adapting their setup.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In the section about migrating from `@RequiresRoles` to attributes, consider clarifying how mixed usage is handled (e.g., if both docblock annotations and attributes are present during a partial migration) to avoid ambiguity for users upgrading incrementally.
- In the note about `ZendAclModule` no longer binding the various readers, it would help to include a short example of how to bind `koriym/attributes` (or `doctrine/annotations`) in a typical configuration so users have a concrete reference when adapting their setup.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@koriym koriym force-pushed the upgrade-guide-2.0 branch from 4f4fa5c to b9991eb Compare April 9, 2026 03:40
@koriym koriym merged commit 11552cd into 2.x Apr 9, 2026
13 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