Skip to content

Add events for requests#1964

Merged
XWB merged 5 commits intoFriendsOfSymfony:masterfrom
pkly:master
Mar 15, 2025
Merged

Add events for requests#1964
XWB merged 5 commits intoFriendsOfSymfony:masterfrom
pkly:master

Conversation

@pkly
Copy link
Copy Markdown
Contributor

@pkly pkly commented Mar 13, 2025

Fixes #1963

Things to consider: at this time it's not possible to pass the full request object in the PreRequest event as that object is created and used by the client below. It could be done if the library would change it so that it's in a separate method so we could override it.

The settting of EventDispatcher could also just be done in the constructor at this point.

@XWB XWB self-requested a review March 13, 2025 15:33
@XWB
Copy link
Copy Markdown
Member

XWB commented Mar 13, 2025

Things to consider: at this time it's not possible to pass the full request object in the PreRequest event as that object is created and used by the client below. It could be done if the library would change it so that it's in a separate method so we could override it.

I think that's fine for now. Does the PreRequest provides all the information you need for now?

@pkly
Copy link
Copy Markdown
Contributor Author

pkly commented Mar 13, 2025

Yes, I already decorated the request method in our application and it works essentially the same, so this should be fine.

@XWB XWB merged commit 4c2a3bc into FriendsOfSymfony:master Mar 15, 2025
51 of 52 checks passed
@XWB
Copy link
Copy Markdown
Member

XWB commented Mar 15, 2025

Thanks for you hard work 👍

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.

[Feature] Would you consider a Request event?

2 participants