-
Notifications
You must be signed in to change notification settings - Fork 17
IBX-9663: Added request property to ContentEditEvent #1767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 4.6
Are you sure you want to change the base?
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds a Request property to the ContentEditEvent class, allowing event subscribers to access HTTP request context when handling content edit events.
Key Changes:
- Added
Requestas a required constructor parameter and property toContentEditEvent - Updated
ContentController::editAction()to pass the request instance when dispatching the event
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/contracts/Event/ContentEditEvent.php | Added Request property, constructor parameter, and getter method |
| src/bundle/Controller/ContentController.php | Updated event instantiation to include request parameter and modified closure signature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| public function __construct( | ||
| Content $content, | ||
| VersionInfo $versionInfo, | ||
| string $languageCode | ||
| string $languageCode, | ||
| Request $request | ||
| ) { |
Copilot
AI
Nov 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a required parameter to an existing event constructor is a breaking change that will break all existing event instantiations. Consider making the Request parameter optional with a default value of null to maintain backward compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The event object in question is not supposed to be instantiated outside of our code, so it is 👌



Description:
For QA:
Documentation: