Skip to content
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

[MonologBridge] Fix Monolog/Logger final deprecation #49759

Open
wants to merge 2 commits into
base: 6.3
Choose a base branch
from

Conversation

joaojacome
Copy link

@joaojacome joaojacome commented Mar 21, 2023

Q A
Branch? 6.3
Bug fix? yes
New feature? no
Deprecations? yes
Tickets Fix #47096
License MIT

Updated MonologBridge\Logger so it doesn't extend Monolog\Logger

This shouldn't break any BC. An adapter for the public Monolog\Logger methods has been created as a trait. The trait has been created as "deprecated", so it can be removed later.

This change depends on a change in the upstream Monolog class. An MR has been opened for monolog to cover that. (Seldaek/monolog#1796)

This shouldn't break any BC. An adapter for the public Monolog\Logger methods has been created as a trait. The trait has been created as "deprecated", so it can be removed later.

This change depends on a change in the upstream Monolog class. An MR has been opened for monolog to cover that
@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has a contribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 6.3 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@carsonbot
Copy link

Hey!

Thanks for your PR. You are targeting branch "6.3" but it seems your PR description refers to branch "6.3 (maybe 6.2?)".
Could you update the PR description or change target branch? This helps core maintainers a lot.

Cheers!

Carsonbot

@carsonbot carsonbot changed the title draft: [MonologBridge] Fix Monolog/Logger final deprecation [MonologBridge] draft: Fix Monolog/Logger final deprecation Mar 21, 2023
@joaojacome joaojacome changed the title [MonologBridge] draft: Fix Monolog/Logger final deprecation [MonologBridge] Fix Monolog/Logger final deprecation Mar 22, 2023
@xabbuh
Copy link
Member

xabbuh commented Mar 25, 2023

This would still break cases where objects of this class are passed around but the called code expects an instance of Monolog's Logger class (which we now no longer would extend).

@joaojacome
Copy link
Author

joaojacome commented Mar 25, 2023 via email

@xabbuh
Copy link
Member

xabbuh commented Mar 25, 2023

There are still two paint points with that solution:

  • the deprecation about the Logger class from Monolog class would not go away
  • How can we communicate that the class will no longer extend Monolog's Logger class in 7.0 (i.e. trigger a proper deprecation) so that people can prepare their applications?

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.

MonologBridge shows deprecation error with Monolog 3.2
3 participants