Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[DependencyInjection] Add test for issue #49591 #51123

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

Open
wants to merge 1 commit into
base: 6.3
Choose a base branch
Loading
from

Conversation

HypeMC
Copy link
Contributor

@HypeMC HypeMC commented Jul 27, 2023

Q A
Branch? 6.3
Bug fix? yes
New feature? no
Deprecations? no
Tickets Reproduces #49591
License MIT
Doc PR -

A simple test case to illustrate the problem.

@carsonbot
Copy link

Hey!

Oh no, it looks like you have made this PR towards a branch that is not maintained anymore. :/
Could you update the PR base branch to target one of these branches instead? 5.4, 6.3, 6.4, 7.0.

Cheers!

Carsonbot

$dumper = new PhpDumper($containerBuilder);
$dump = $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Issues49591']);

self::assertStringEqualsFile(__DIR__.'/Fixtures/php/services_issues49591.php', $dump);
Copy link
Member

@derrabus derrabus Jul 27, 2023

Choose a reason for hiding this comment

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

This is the assertion that fails currently. But as far as I understood the issue, the actual issue is reproduced by the following assertion. Do we need this fixture anyway? Doesn't comparing the dump to the fixture only make the test brittle?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it's really not needed, I only added it so that the dumped container can be seen as it might help to understand the issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've removed the assertion & updated the dump for version 6.3 (I originally generated it with 6.2).

@HypeMC HypeMC force-pushed the issues-49591-test branch from eae6341 to 907ed45 Compare July 27, 2023 09:49
@vtsykun
Copy link
Contributor

vtsykun commented Jul 27, 2023

It looks like a cyclic dependency. Perhaps the right solution would be throw a ServiceCircularReferenceException.

  1. session depends from connection->connect()
  2. connect require subscriber
  3. subscriber require session

@fabpot fabpot modified the milestones: 6.2, 6.3 Jul 30, 2023
@nicolas-grekas nicolas-grekas modified the milestones: 6.3, 6.4 Feb 1, 2024
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.

6 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.