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] Add service_closure() to the PHP-DSL#42625

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.4fromHypeMC:add-service-closure-to-php-dsl-2
Aug 20, 2021
Merged

[DependencyInjection] Add service_closure() to the PHP-DSL#42625

nicolas-grekas merged 1 commit intosymfony:5.4fromHypeMC:add-service-closure-to-php-dsl-2
Aug 20, 2021

Conversation

@HypeMC
Copy link
Member

@HypeMCHypeMC commentedAug 18, 2021
edited
Loading

QA
Branch?5.4
Bug fix?no
New feature?yes
Deprecations?no
Tickets-
LicenseMIT
Doc PRsymfony/symfony-docs#15730 andsymfony/symfony-docs#15731

Adds aservice_closure() function to the PHP-DSL.

derrabus reacted with rocket emoji
->args([service_closure(service('foo'))]);

$s->set('service_closure_invalid', 'Bar')
->args([service_closure(service('invalid_service')->nullOnInvalid())]);

Choose a reason for hiding this comment

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

it'd be great to be able to do this instead:
service_closure('invalid_service')->nullOnInvalid()

maybe with a newClosureReferenceConfigurator?

derrabus reacted with thumbs up emoji
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

@nicolas-grekas Done. The fabbot failure is unrelated to my changes, I can apply it if you want.

@fabpot
Copy link
Member

@HypeMC Can you submit a PR on the docs? Or at least, give a full usage example in the PR description to help the doc team? Thank you.

@HypeMC
Copy link
MemberAuthor

@fabpot Sure, I'll submit a PR sometime tomorrow.

@HypeMC
Copy link
MemberAuthor

@fabpot PR(s) on the docs added:symfony/symfony-docs#15730 andsymfony/symfony-docs#15731

@nicolas-grekas
Copy link
Member

Thank you@HypeMC.

HypeMC reacted with thumbs up emoji

@nicolas-grekasnicolas-grekas merged commita42062d intosymfony:5.4Aug 20, 2021
@HypeMCHypeMC deleted the add-service-closure-to-php-dsl-2 branchAugust 20, 2021 11:52
This was referencedNov 5, 2021
OskarStark added a commit to symfony/symfony-docs that referenced this pull requestMar 9, 2023
…es (HypeMC)This PR was merged into the 5.4 branch.Discussion----------[DependencyInjection] Add section about Service ClosuresDocuments service closures added insymfony/symfony#21770 andsymfony/symfony#41176, and the `service_closure()` PHP-DSL function added insymfony/symfony#42625 .Commits-------f2b2fdb [DI] Add section about Service Closures
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@derrabusderrabusderrabus approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

5 participants

@HypeMC@fabpot@nicolas-grekas@derrabus@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp