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 9243927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:54:49+00:00 2026-06-18T08:54:49+00:00

I have a FosUserBundle service I need to convert to yml format. How can

  • 0

I have a FosUserBundle service I need to convert to yml format. How can I do this is there a dumper convertor or anything?

How this would look in yml?

    <service id="fos_user.mailer.twig_swift" class="FOS\UserBundle\Mailer\TwigSwiftMailer" public="false">
        <argument type="service" id="mailer" />
        <argument type="service" id="router" />
        <argument type="service" id="twig" />
        <argument type="collection">
            <argument key="template" type="collection">
                <argument key="confirmation">%fos_user.registration.confirmation.template%</argument>
                <argument key="resetting">%fos_user.resetting.email.template%</argument>
            </argument>
            <argument key="from_email" type="collection">
                <argument key="confirmation">%fos_user.registration.confirmation.from_email%</argument>
                <argument key="resetting">%fos_user.resetting.email.from_email%</argument>
            </argument>
        </argument>
    </service>

I was trying to use Yml dumper but this is just giving me serialised object:

    $cs = new ContainerBuilder();

    $loader1 = new Loader\XmlFileLoader($cs, new FileLocator(__DIR__ . '/../../../../vendor/friendsofsymfony/user-bundle/FOS/UserBundle/Resources/config'));
    $loader1->load('mailer.xml');

    $dumper = new \Symfony\Component\Yaml\Dumper();

    file_put_contents(__DIR__ . '/test2.yml', $dumper->dump($cs));

Any tips would be much appreciated. Thanks in advance.

  • 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-06-18T08:54:50+00:00Added an answer on June 18, 2026 at 8:54 am

    You can try do it in such way:

    services:
        fos_user.mailer.twig_swift:
            class: FOS\UserBundle\Mailer\TwigSwiftMailer
            arguments:
                - @mailer
                - @router
                - @templating
                - { template: { confirmation: %fos_user.registration.confirmation.template%, resetting: %fos_user.resetting.email.template% }, from_email: { confirmation: %fos_user.registration.confirmation.from_email%, resetting: %fos_user.resetting.email.from_email% } }
    

    You use wrong dumper as well you should use Symfony\Component\DependencyInjection\Dumper\YamlDumper

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

Sidebar

Related Questions

I need to change template of confirmation email in FOSUserBundle. I have this settings,
have a problem. At first look at this HTML <div id=map style=background-image: url(map.png); width:
Have a look at this code: #include <iostream> using namespace std; int main() {
I have a question about the FOSUserBundle for Symfony 2.0.x. In there documentation you
have written this little class, which generates a UUID every time an object of
I have a symfony 2.1 project using FOSUserBundle. The bundle is installed correctly. All
Have been trying to figure this problem out for a while now and was
I'm trying to extend the FOSUserBundle so that I can handle two (or even
I'm trying to embed the login form of FOSUserBundle in a template with this:
I am trying to serialize entities for mobile digest. I have this Entity class:

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.