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

[5.6] Fix cache for loggers #23118

Merged
merged 3 commits into from
Feb 11, 2018
Merged

[5.6] Fix cache for loggers #23118

merged 3 commits into from
Feb 11, 2018

Conversation

CyrilMazur
Copy link
Contributor

This fixes #23117

@laurencei
Copy link
Contributor

Could you add some tests to show it is getting the same instance? That will help prevent regressions later.

@CyrilMazur
Copy link
Contributor Author

@laurencei done

@CyrilMazur CyrilMazur changed the title Cache loggers [5.6] Cache loggers Feb 11, 2018
$logger1 = $manager->channel('single')->getLogger();
$logger2 = $manager->channel('single')->getLogger();

$this->assertEquals(spl_object_id($logger1), spl_object_id($logger2));
Copy link
Contributor

Choose a reason for hiding this comment

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

This could probably be an $this->assertSame($logger1, $logger2);

Copy link
Member

Choose a reason for hiding this comment

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

Just do assertSame on the objects.

$logger1 = $manager->channel('single')->getLogger();
$logger2 = $manager->channel('single')->getLogger();

$this->assertEquals(spl_object_id($logger1), spl_object_id($logger2));
Copy link
Member

Choose a reason for hiding this comment

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

Just do assertSame on the objects.

@GrahamCampbell GrahamCampbell changed the title [5.6] Cache loggers [5.7] Cache loggers Feb 11, 2018
@CyrilMazur
Copy link
Contributor Author

@GrahamCampbell done. I realise I opened this PR into the wrong branch. I intended this PR for 5.6 (it's a bug fix), should I open a new PR?

@CyrilMazur CyrilMazur changed the base branch from master to 5.6 February 11, 2018 12:21
@CyrilMazur CyrilMazur changed the title [5.7] Cache loggers [5.6] Fix cache for loggers Feb 11, 2018
@GrahamCampbell
Copy link
Member

Hard reset your branch to 5.6, then cherry-pick your commits and force push.

@CyrilMazur
Copy link
Contributor Author

Thanks. Done.

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.

5 participants