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

[DependencyInjection] Deprecate integer keys in "service_locator" config#48686

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

Conversation

@upyx
Copy link
Contributor

@upyxupyx commentedDec 16, 2022
edited
Loading

QA
Branch?6.3
Bug fix?no
New feature?no
Deprecations?yes
TicketsDeprecation befor#48653
LicenseMIT
Doc PRsymfony/symfony-docs#17576

It deprecates undefined/wrong behaviour ofhttps://symfony.com/doc/current/service_container/service_subscribers_locators.html#defining-a-service-locator

returnnewServiceLocatorArgument(AbstractConfigurator::processValue($values,true));
$values = AbstractConfigurator::processValue($values,true);

if (isset($values[0])) {
Copy link
Member

Choose a reason for hiding this comment

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

We can usearray_is_list to detect numerically indexed arrays. But for a more complete validation, all key needs to be strings.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I see, it's a bit confusing. It's possible to mix strings and sequential integers and non-sequential integers. The only sequential integers from zero (or undefined keys) are deprecated and will be replaced with IDs.

I will try to improve the messages. However, I could use help.

@upyxupyxforce-pushed theids-in-service-locator-deprecations branch fromafac82d to249b26dCompareDecember 20, 2022 17:57
@upyxupyx changed the title[DependencyInjection] Deprecate numeric keys in "service_locator" config[DependencyInjection] Deprecate integer keys in "service_locator" configDec 20, 2022
@nicolas-grekasnicolas-grekasforce-pushed theids-in-service-locator-deprecations branch from249b26d to57c2365CompareDecember 22, 2022 15:53
@nicolas-grekas
Copy link
Member

Thank you@upyx.

@nicolas-grekasnicolas-grekas merged commitff6913e intosymfony:6.3Dec 22, 2022
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull requestFeb 21, 2023
…pyx)This PR was squashed before being merged into the 5.4 branch.Discussion----------[DependencyInjection] Remove not implemented behaviorCurrently numeric keys are used, but it will be deprecated and changed in 7.0.Deprecation:symfony/symfony#48686New behavior:symfony/symfony#48653Commits-------a8770de [DependencyInjection] Remove not implemented behavior
@fabpotfabpot mentioned this pull requestMay 1, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@GromNaNGromNaNGromNaN left review comments

@chalasrchalasrchalasr approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

6.3

Development

Successfully merging this pull request may close these issues.

5 participants

@upyx@nicolas-grekas@GromNaN@chalasr@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp