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

Use the short Yaml syntax for service definition#7860

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
GuilhemN wants to merge3 commits intosymfony:masterfromGuilhemN:SHORTSYNTAX

Conversation

@GuilhemN
Copy link
Contributor

@GuilhemNGuilhemN commentedApr 30, 2017
edited
Loading

app.twig_extension:
class:AppBundle\Twig\AppExtension
AppBundle\Twig\AppExtension:
public:false
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I hesitated to use_defaults here to be able to remove this line and use the short syntax, wdyt?

Choose a reason for hiding this comment

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

I'd say, let's not add the "defaults" until we decide what to do with that new option.

GuilhemN reacted with thumbs up emoji
AppBundle\Twig\AppExtension:
tags:[twig.extension]
versionadded:: 3.3

Choose a reason for hiding this comment

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

To makeversionadded a RST directive, you must include the two.. at the beginning:.. versionadded::

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Indeed, thanks. I also fixed it a few lines above.

..versionadded::3.3
Support for the short syntax for service definition in the YAML format
was introduced in Symfony 3.3.
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be moved toservice_container, after#7807 is merged. I did not have that note there.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I agree I didn't realize I added it intags.rst... I remove it and paste it here to not lose it.

..tip::    In YAML format, you may define a service with a simple array of tags as long    as you don't need additional attributes. The following definitions are    equivalent.    ..code-block::yamlservices:# Compact syntaxAppBundle\Twig\AppExtension:[twig.extension]# Verbose syntaxAppBundle\Twig\AppExtension:tags:[twig.extension]    ..versionadded::3.3        Support for the short syntax for service definition in the YAML format        was introduced in Symfony 3.3.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Actually rethinking about it, does it make sense? We don't talk about tags inservice_container.

Copy link
Member

Choose a reason for hiding this comment

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

Don't we already have a place where we explain the difference?

Copy link
ContributorAuthor

@GuilhemNGuilhemNMay 5, 2017
edited
Loading

Choose a reason for hiding this comment

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

I don't think so, it was requested by#7441.

Copy link
Member

Choose a reason for hiding this comment

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

Hm, not sure if we really need this.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Won't this be confusing for people who try to use it in lower versions because of our exemples using this syntax ?

Copy link
Member

Choose a reason for hiding this comment

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

Do we talk about different things? Do you mean theversionadded directive? Otherwise I don't see the problem as the changes were only merged into themaster branch.

@GuilhemNGuilhemN changed the titleDocument the short Yaml syntax for service definitionUse the short Yaml syntax for service definitionMay 2, 2017
@xabbuh
Copy link
Member

Thank you@GuilhemN.

GuilhemN reacted with hooray emoji

@GuilhemNGuilhemN deleted the SHORTSYNTAX branchMay 4, 2017 20:21
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@weaverryanweaverryanweaverryan left review comments

@xabbuhxabbuhxabbuh left review comments

@javiereguiluzjaviereguiluzjaviereguiluz approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@GuilhemN@xabbuh@javiereguiluz@weaverryan@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp