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

Fix bug when using an private aliased factory service#17942

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

Closed

Conversation

@wouterj
Copy link
Member

QA
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#17910,#17915
LicenseMIT
Doc PR-

/cc@xabbuh

}

return$currentId ===$factoryService ?$newId :$currentId;
return$currentId ===$factoryService ?$newId :$factoryService;
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

$currentId is the current ID of the removed alias, while$factoryService is the original ID of the factory service.

If the factory service equals the ID of the removed alias, it should be updated to become the actual service ID. However, if the factory service does not equal the ID of the removed alias, the original value should be used.

With the old code, it was always replacing the original code, either with the actual definition ID or the ID of the removed alias (which was causing the troubles people were reporting).

Copy link
Contributor

Choose a reason for hiding this comment

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

good catch@wouterj 👏

@xabbuh
Copy link
Member

👍

Oh my God, what a silly mistake. Thanks Wouter for the fix!

Status: Reviewed

@linaori
Copy link
Contributor

Was the test failing before? If not, a test would be nice to prevent this bug from happening again

@wouterj
Copy link
MemberAuthor

@iltar I've added a test now (although this is a very specific test, so I'm not 100% sure if we should include it).

$this->assertSame('b_alias',$aDefinition->getFactoryService());
}

/**
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

it's not really legacy in 2.3, but this makes things easier to merge to 2.7/2.8

@fabpot
Copy link
Member

Thank you@wouterj.

fabpot added a commit that referenced this pull requestFeb 28, 2016
…terJ)This PR was squashed before being merged into the 2.3 branch (closes#17942).Discussion----------Fix bug when using an private aliased factory service| Q             | A| ------------- | ---| Bug fix?      | yes| New feature?  | noBC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#17910,#17915| License       | MIT| Doc PR        | -/cc@xabbuhCommits-------de406c0 Fix bug when using an private aliased factory service
@fabpotfabpot closed thisFeb 28, 2016
@wouterjwouterj deleted the fix_bug_private_factory_alias branchFebruary 28, 2016 15:19
This was referencedFeb 28, 2016
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@wouterj@xabbuh@linaori@fabpot@pborreli@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp