Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Sign up
Appearance settings

[Messenger] Fix cloned TraceableStack not unstacking the stack independently#51675

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nicolas-grekas merged 1 commit intosymfony:5.4fromkrciga22:issue-51564-5.4
Sep 20, 2023

Conversation

@krciga22
Copy link
Contributor

QA
Branch?5.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#51564
LicenseMIT
Doc PRsymfony/symfony-docs#...

Fixed a bug with clonedTraceableStack not unstacking the stack independently from the original due to the __clone() method not yet being implemented. Clones ofStackMiddleware currently unstack the stack independently, but notTraceableStack.

publicfunctiontestClonedTraceableStackUnstacksIndependently()
{
// import TraceableStack
class_exists(TraceableMiddleware::class);

Choose a reason for hiding this comment

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

why is this needed?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

@nicolas-grekas, I added this test method to test if a clone can be unstacked independently. I noticed that the existing methodtestHandle() in the same file does testTraceableStack unstacking via the use ofTraceableMiddleware, but it doesn't test if a cloned version will unstack the stack independently, so I was thinking their could be a new test for that as well?

Choose a reason for hiding this comment

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

I meant the class_exists check, why is it needed?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Right, without it I get the following error:
Error: Class 'Symfony\Component\Messenger\Middleware\TraceableStack' not found

To fix the error, I tried to importTraceableStack at the top of the test file, but I can't get it to work because it's located withinTraceableMiddleware.php instead of within its own file.

nicolas-grekas reacted with thumbs up emoji
@nicolas-grekas
Copy link
Member

Thank you@krciga22.

@nicolas-grekasnicolas-grekas merged commitaa56d07 intosymfony:5.4Sep 20, 2023
This was referencedSep 30, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

@stofstofstof approved these changes

+1 more reviewer

@maxbeckersmaxbeckersmaxbeckers approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

5 participants

@krciga22@nicolas-grekas@stof@maxbeckers@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp