Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7504731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:40:09+00:00 2026-05-29T21:40:09+00:00

I wonder where can I get more information about special syntax like @somevar or

  • 0

I wonder where can I get more information about special syntax like @somevar or %somevar% in symfony2’s yaml configuration?

For example, using @ defines a call to a service, that is how we pass dependencies to services. %somevar% on the other hand refers to the value of an already defined parameter with the name somevar.

So, if I do:

parameters:
    custom: "some value"
    another: %custom%

then another will be populated with the value of custom, which in my case is “some value”. My question is, where are these relations documented?

My particular need is to be able to reference an element of an array, something like %somevar[somekey]%, but that syntax doesn’t work.

Thanks in advance!

EDIT: I found this: Full merge key support.
Full support for references, aliases, and full merge key. Don't repeat yourself by referencing common configuration bits.

in the yaml docs, but no furthur documentation about it..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T21:40:11+00:00Added an answer on May 29, 2026 at 9:40 pm

    What you are searching for is not really about Yaml itself, but about the Yaml loader of the Dependency Injection container.

    If you search docs about it, here are the ones for the old component (v1): http://components.symfony-project.org/dependency-injection/trunk/book/05-Service-Description

    Symfony2 comes with a new component (based on the same principles). You can find the official docs here: http://symfony.com/doc/current/book/service_container.html#service-parameters

    Concerning your problem, you cannot access to keys of DI parameters, you have to flatten then manually.

    You could use a DI extension to fit your need, take example on some bundles like: https://github.com/symfony/AsseticBundle/blob/master/DependencyInjection/AsseticExtension.php#L54 (maybe not the best example).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to start coding for NVIDIA 3D Vision and wonder where can I
I wonder if I can test landscape view using simulator?
I wonder if someone give me a solution to this. How can I get
I need some more information than the traditional OK or Cancel states you get
I wonder if anyone can tell me why does QueryStatus() method get called so
I wonder if you can help me. I am using the below code and
I wonder how can I export a Visual Studio C++ project to Qt? I
I am going to develop ICQ client and I just wonder where can I
Out of curiosity, I wonder what can people do with parsers, how they are
Wonder if anyone can help me understand how to sum up the column of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.