Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[SecurityBundle] Remove autoconfiguration for ProcessorInterface #45422

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

Closed
wants to merge 1 commit into from

Conversation

derrabus
Copy link
Member

@derrabus derrabus commented Feb 14, 2022

Q A
Branch? 6.1
Bug fix? no
New feature? no
Deprecations? no
Tickets N/A
License MIT
Doc PR N/A

This PR removes autoconfiguration logic for a Symfony\Bridge\Monolog\Processor\ProcessorInterface that does not exist. As far as I can tell, this has always been unused code, so we might as well remove it.

@carsonbot carsonbot added this to the 6.1 milestone Feb 14, 2022
@carsonbot carsonbot changed the title Remove autoconfiguration for ProcessorInterface [SecurityBundle] Remove autoconfiguration for ProcessorInterface Feb 14, 2022
@derrabus derrabus force-pushed the remove/processor-interface branch from fb94f3a to 33553ee Compare February 14, 2022 17:09
@nicolas-grekas
Copy link
Member

nicolas-grekas commented Feb 14, 2022

I guess that's a wrong namespace, maybe related to history/renames?
See https://github.com/Seldaek/monolog/blob/main/src/Monolog/Processor/ProcessorInterface.php
Git blame will point at me for the removed lines, and I'm sure I added them for a reason (can't recall right now.)

@derrabus
Copy link
Member Author

I guess that's a wrong namespace, maybe related to history/renames?

The pass was added in #33663 and those lines haven't changed since then. I've browsed the source tree that very commit but the bridge did not have that interface at that time either.

I dug deeper and apparently, the interface did exist for a brief moment: Introduced in #27801, reverted in #28845.

I assume that the lines are an artifact of an earlier iteration of that PR. Since they effectively never did anything, the fix for me is to remove them.

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Feb 14, 2022

The purpose of those lines was to wire processors automatically with the untracked token storage, so that they could log things found in the session without triggering Cache-Control: private on the response.

We should fix this behavior of it's broken.

@derrabus
Copy link
Member Author

Should we build that logic in MonologBundle instead?

@nicolas-grekas
Copy link
Member

I was having a look, monolog bundle already registers the tag for autoconfiguration:
https://github.com/symfony/monolog-bundle/blob/fde12fc628162787a4e53877abadc30047fd868b/DependencyInjection/MonologExtension.php#L131-L134

What this does is the binding. And we could argue that the binding is for SecurityBundle.

To me, we should fix the namespace in the lowest affected branch.

nicolas-grekas added a commit that referenced this pull request Feb 18, 2022
…terface (nicolas-grekas)

This PR was merged into the 4.4 branch.

Discussion
----------

[SecurityBundle] fix autoconfiguring Monolog's ProcessorInterface

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #45422
| License       | MIT
| Doc PR        | -

Commits
-------

7712d80 [SecurityBundle] fix autoconfiguring Monolog's ProcessorInterface
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants