Flag of Ukraine
SymfonyCasts stands united with the people of Ukraine

Form Type Class

Video not working?

It looks like your browser may not support the H264 codec. If you're using Linux, try a different browser or try installing the gstreamer0.10-ffmpeg gstreamer0.10-plugins-good packages.

Thanks! This saves us from needing to use Flash or encode videos in multiple formats. And that let's us get back to making more videos :). But as always, please feel free to message us.

Hey friends! And welcome to, what I think will be, a super fun tutorial: the one about cookies! Um, forms!

The first question you might ask is: forms? Do we even need forms anymore in this age of JavaScript frontends? Aren't forms so 2016? The answer is... it depends. I get to talk to a lot of developers and, honestly, it comes down to what you're building. Yea, some apps are using modern JavaScript frontends. But just as many are building form-rich interfaces. So, if that's you - hi! o/.

There is no more powerful form system on the planet than Symfony's Form component. Oh, and there are so many pieces to a form: rendering the form, handling the submit, validating data, normalizing data, and other things that you don't even think about, like CSRF protection. Here's the truth about Symfony's Form component: yes, it is crazy powerful. And when you learn to harness that power, you will be incredibly productive. At the same time, in some situations, the form system can be really hard & complex. It can make your job harder than if you didn't use it at all!

So here is our big goal: to learn how to do almost everything you can think of with a form and to identify those complex scenarios, and find the simplest path through them. After all, even if you use and love the form system, it doesn't mean that you have to use it in every single situation.

Project Setup

As always, to become the master of form tags, inputs & textareas, you should totally code along with me. Download the course code from this page. When you unzip it, you'll find a start/ directory inside with the same files that you see here. Open up the README.md file for instructions on how to get the site set up. The last step will be to find a terminal, move into the project, sip some coffee, and run:

php bin/console server:run

to start the built-in web server. Woo! Now, find your browser and head to http://localhost:8000. Welcome to our work-in-progress masterpiece: The Space Bar! Our intergalactic news site where aliens everywhere can quickly catch up on only the most important news... after a 500 year nap in cryosleep.

Thanks to our last tutorial, we can even log in! Use admin2@thespacebar.com, password engage. Then head over to /admin/article/new to see.... oh! A big TODO!

Yep! We can display articles but... we can't actually create or edit them yet. The code behind this lives in src/Controller/ArticleAdminController.php and, sure enough, past us got lazy and just left a TODO.

Creating a Form Class

Time to get to work! The first step to building a form is always to create a form class. Inside src, add a new Form/ directory... though, like normal, you can put this stuff wherever you want. Inside, a new PHP class called ArticleFormType. Form classes are usually called form "types", and the only rule is that they must extend a class called AbstractType. Oh! But of course! I can't find that class because... we haven't installed the form system yet! No problem!

Find your terminal, open a new tab, have another well-deserved sip of coffee, and run:

composer require form

Perfect! Back in our editor, once PhpStorm finishes indexing, we should be able to find the AbstractType class from the Form component.

Got it! Now, go to the Code -> generate menu, or Cmd+N on a Mac, and click override methods. There are several methods that you can override to control different parts of your form. But, by far, the most important is buildForm().

... lines 1 - 4
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
class ArticleFormType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
}
}

Inside this method, our job is pretty simple: use this $builder object to, um... build the form! Use $builder->add() to add two fields right now: title and content. These are the two most important fields inside the Article entity class.

... lines 1 - 9
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('title')
->add('content')
;
}
... lines 17 - 18

And... that's it! We'll do more work here later, but this is enough.

Creating the Form Object

Next, find your controller so we can render the form. Start by saying $form = and using a shortcut: $this->createForm(). Pass the class that you want to create: ArticleFormType::class. I'll delete the return response stuff and, instead, render a template with return $this->render('article_admin/new.html.twig'). To render the form, we need to pass that in. Let's call the variable articleForm and set it to - this is tricky - $form->createView(). Yep: don't pass the $form object directly to Twig: always call createView(). This transforms the Form object into another object that is super good at rendering forms and telling funny stories at parties.

... lines 1 - 12
class ArticleAdminController extends AbstractController
{
... lines 15 - 18
public function new(EntityManagerInterface $em)
{
$form = $this->createForm(ArticleFormType::class);
return $this->render('article_admin/new.html.twig', [
'articleForm' => $form->createView()
]);
}
... lines 27 - 35
}

Rendering the Form

To create the template, I'll cheat! Ha! Thanks to the Symfony plugin, I can put my cursor on the template name, hit alt+enter, click "Create Twig Template" and hit enter again to confirm the location. There's no real magic here: that just created the file for us at templates/article_admin/new.html.twig.

Oh, and you might remember from previous tutorials that, in addition to the normal base.html.twig, we also have a content_base.html.twig, which gives us a little bit of real markup and a content_body block that we can override. Let's use that: {% extends 'content_base.html.twig %} and then, override the block content_body, with {% endblock %}. Add an <h1>Launch a new Article</h1> with, of course, a rocket emoji! Zoom!

{% extends 'content_base.html.twig' %}
{% block content_body %}
<h1>Launch a new Article! ?</h1>
... lines 5 - 10
{% endblock %}

To render the form, we get to use a few special form rendering functions: {{ form_start() }} and pass that the articleForm variable. At the end {{ form_end(articleForm }}. And in the middle, {{ form_widget(articleForm) }}. Oh, and for the submit button, you can build this into your form class, but I prefer to add it manually: <button type="submit">, some classes: btn btn-primary, and then Create!

{% extends 'content_base.html.twig' %}
{% block content_body %}
<h1>Launch a new Article! ?</h1>
{{ form_start(articleForm) }}
{{ form_widget(articleForm) }}
<button type="submit" class="btn btn-primary">Create!</button>
{{ form_end(articleForm) }}
{% endblock %}

And... we're done! We create a form class, create a Form object from that in the controller, pass the form to Twig, then render it. We'll learn a lot more about these rendering functions. But, more or less, form_start() renders the opening form tag, form_end() renders the form closing tag... plus a little extra magic, and form_widget() renders all of the fields.

Try it! Find your browser and refresh! Woohoo! Just like that, we have a functional form. Sure, it's a bit ugly - but that will be super easy to fix. Before we get there, however, we need to talk about handling the form submit.

Leave a comment!

62
Login or Register to join the conversation
davidmintz Avatar
davidmintz Avatar davidmintz | posted 9 months ago

Not to be a whiner but I notice this is pretty dated. WIll there be an update, or are forms really too 2016? :-)

2 Reply

Hey davidmintz

Not sure about eta on new forms or even will be it released or no, however from my point of view nothing changed, everything mentioned here can be used in newer Symfony version, so the main ideas are still relevant

Cheers

1 Reply
Ad F. Avatar

how about adding comments ? with AJAX :D

2 Reply

Hey Ad F.!

That's an interesting idea! In theory, it's not really different than a normal form submit, but perhaps it's different enough that it's worth covering. Is there any part of this specifically that you're most interested in?

Cheers!

1 Reply
Ad F. Avatar

well, you have covered pretty much everything except comments, or how to add comments to an article as logged in user via ajax, or APi
when adding a comment, the author of post should be notified ... more complex stuff ...
or working with multiple forms.
subscribe to a topic & when someone post a new article on space bar, those subscribers will get a email notification...
there are plenty of stuff

3 Reply
Mouad E. Avatar

will be a great idea to add those features to the course

2 Reply
Mike P. Avatar

Yeah that would be great!

2 Reply
Alexander S. Avatar
Alexander S. Avatar Alexander S. | posted 6 months ago

Hello, I would like to go throw this course but in initial stage I have some issue with symfony 4 and php version which aren't compatible. Is the any solution for it?

Reply

Hey Alexander!

What problem exactly do you have? We would be happy to help you with it. Please, notice that this course isn't compatible with PHP 8, so if you want to follow this - there're a few options:
- Downgrade your PHP version to at least 7.4 (or you can install it additionally, like having both PHP 7.4 and 8.x versions. Or also there's an opportunity to use Docker as well)
- Or download the course code and try to upgrade it to the PHP version you're using locally. But it might require some extra work from you unfortunately. Though we have a course about upgrading that might help you with this: https://symfonycasts.com/sc...
- Or, you can download a fresh new Symfony version instead and try to apply all the changes we're showing in this course on it. It might be easier than the previous option, because you won't need to deal with upgrading at all. And of course, if you get stuck following this course on a newer Symfony version - let us know in the comments below the video and we will definitely help you to go further!

Cheers!

1 Reply
Alexander S. Avatar
Alexander S. Avatar Alexander S. | victor | posted 6 months ago

Hey Victor
I'll try to downgrade PHP version on additional laptop to 7.1
Thanks for fast reply)

1 Reply

Hey Alexander,

Great! Though I would suggest to upgrade to 7.4 instead - it should fit well, and not that ancient as 7.1 ;)

Cheers!

1 Reply
Bob Avatar

Downloaded project folder. Followed README, installed all accordingly: PHP72 version:
TypeError
array_key_exists(): Argument #2 ($array) must be of type array, Symfony\Component\Debug\Exception\FlattenException given

Reply
fadumcaceres Avatar
fadumcaceres Avatar fadumcaceres | posted 1 year ago | edited

Hi, there , I have a question, I have multiple connections to different entities manager, and I want to create a form without using the default EM, by the way in the form I want to create a Combo box with Entity that is in an other EM, but I have this error when I'm creating the view of the form "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'em_default.table_in_other_em' doesn't exist"

Reply

Hey Francisco,

Could you show the code how you add that Combo box to your form type? Well, EntityType has a specific field called "em": https://symfony.com/doc/cur... - you can specify what entity manager to use. Or, you can easily inject any entity manager to the form type and use it inside.

I hope this helps!

Cheers!

Reply
fadumcaceres Avatar
fadumcaceres Avatar fadumcaceres | victor | posted 1 year ago | edited

Hi, victor I have injected the entity manager to the form, but I still have problems with the create view.

This is my code:

doctrine.yml


doctrine:
dbal:
default_connection: default
connections:
default:
# configure these for your database server
url: '%env(resolve:DATABASE_URL1)%'
driver: 'pdo_mysql'
server_version: '5.7'
charset: utf8mb4
conn2:
# configure these for your database server
url: '%env(resolve:DATABASE_URL2)%'
driver: 'pdo_mysql'
server_version: '5.7'
charset: utf8mb4
conn3:
# configure these for your database server
url: '%env(resolve:DATABASE_URL3)%'
driver: 'pdo_mysql'
server_version: '5.7'
charset: utf8mb4
conn4:
# configure these for your database server
url: '%env(resolve:DATABASE_URL4)%'
driver: 'pdo_mysql'
server_version: '5.7'
charset: utf8mb4
conn5:
# configure these for your database server
url: '%env(resolve:DATABASE_URL5)%'
driver: 'pdo_mysql'
server_version: '5.7'
charset: utf8mb4

Controller:


public function new()
{
$obj = new Entity_of_conn5();
$form = $this->createForm(Entity_of_conn5::class, $obj);

return $this->render('template.html.twig',
['form' => $form->createView()]
);
}

Form:


public function __construct(ManagerRegistry $managerRegistry)
{
$this->em = $managerRegistry->getManager('conn5');
$this->class = $this->em->getRepository(Entity1_of_conn5::class);
}

public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('component1',EntityType::class,
array(
'class' => $this->class->getClassName(),
'label' => 'component1',
'required' => true,
'mapped' => false,
'placeholder' => 'Select',
'attr' => array( 'class' => 'form-control',
'placeholder' => 'component1',
),
)
)
->add('component2',ChoiceType::class,
array(
'choices' => ['OP1' => 'op1', 'OP2' => 'op2', 'OP3' => 'op3', 'OP4' => 'op4'],
'label' => 'component2',
'placeholder' => 'Select',
'required' => true,
'mapped' => false,
'attr' => array( 'class' => 'form-control selectpicker',
'placeholder' => 'component2',
),
)
)
->add('component3',ChoiceType::class,
array(
'choices' => ['OP1' => 'op1', 'OP2' => 'op2'],
'label' => 'component3',
'placeholder' => 'Select',
'required' => true,
'mapped' => false,
'attr' => array( 'class' => 'form-control selectpicker',
'placeholder' => 'component3',
),
)
)
->add('component4',ChoiceType::class,
array(
'choices' => ['OP1' => 'op1', 'OP2' => 'op2', 'OP3' => 'op3'],
'label' => 'component4',
'placeholder' => 'Select',
'required' => true,
'mapped' => false,
'attr' => array( 'class' => 'form-control selectpicker',
'placeholder' => 'component4',
),
)
)
->add('component5', TextType::class,
array(
'label' => 'component5',
'mapped' => false,
'attr' => array(
'class' => 'form-control',
'placeholder' => 'component5',
)
)
)
;
}

public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
'data_class' => Entity_of_conn5::class,
'entity_manager' => $this->em
]);
}

ERROR: "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'em_default.Entity1_of_conn5' doesn't exist"
Reply

Hey Francisco,

Thanks for sharing more data with me! First of all, the line "$this->class = $this->em->getRepository(Entity1_of_conn5::class);" I'd recommend to rename to "$this->conn5Repository = $this->em->getRepository(Entity1_of_conn5::class);" or something like this as getRepository() method clearly returns the repository to you.

And once again, as I mentioned in my previous comment, you have to set that "em" option for your EntityType, I still don't see you did it. I.e. change to something like this:


builder
->add('component1',EntityType::class, [
'class' => $this->class->getClassName(),
'em' => $this->em,
// or I believe you can set just EM name here like: 'em' => 'conn5',
// Other options
])
// Other fields...

I hope it helps :)

Cheers!

Reply
fadumcaceres Avatar
fadumcaceres Avatar fadumcaceres | victor | posted 1 year ago | edited

Thank you for your help victor it works!

Reply

Hey Francisco,

Awesome! Thank you for confirming it works :)

Cheers!

Reply
Dmitriy Avatar
Dmitriy Avatar Dmitriy | posted 1 year ago

I'm building an application with MySql that have big entity, with about ~ 200 fields, and I'm looking for some best practices to handle this.

And I expect to have at least 5000 records in entity per year.

Which is the best way to improve performance in my case? Keep all fields in the same entity, or split in two or more with a relation OneToOne?

I know that it depends in how I will work with this data, so i'm asking in a general way situation.

Reply

Hey Dmitriy,

It's really hard to answer, I'd recommend you to grab Blackfire.io profile tool and check your current performance. If it works well for you and you're happy with times it shows - great, nothing should be complicated probably. But you're right, it depends on how you use those data. If you almost always need all those fields - it probably better to keep them in the same entity instead of making OneToOne relations, as you will avoid joins in this case.

But if you're just looking for a way of "group" fields together - you can think about moving them to traits, like different traits would contains some fields that are logically grouped. This way you will group them, so probably it would be easier for you to work with all those fields, but you still will have them on the same entity.

But about performance - it is really difficult to say at the first glance, and very easy to check with profiling tools as Blackfire.io that I would recommend you.

I hope this helps!

Cheers!

Reply
Joseph T. Avatar
Joseph T. Avatar Joseph T. | posted 1 year ago

What was the tip for the rocket image ?

Reply

Hey Joseph T.

If you work with PhpStorm, there are plugins that you can use to add emojis into your templates. Here you can see the full list of emojis https://www.w3schools.com/c...

Cheers!

Reply

Couse code does not work "flawlessly" with PHP 7.4+ a lot of dependencies have: PHP Deprecated: Array and string offset access syntax with curly braces is deprecated

Reply

And of course: "Composer Update" fixed the problem 🤦🏼‍♂️

Reply

Hey CISVHenriksen

Honestly we don't recommend to run composer update on course code, because it can bring unexpected result or code behaviour. But sometimes we do update internal dependencies when something became incompatible. It's a very complex process and that is why deprecations are not the reason for complex updates.

If you have something really not working in course code, please report us back with details.

Cheers!

Reply
Mārtiņš C. Avatar
Mārtiņš C. Avatar Mārtiņš C. | posted 2 years ago

Hi, I have an interesting problem with this. For another project it was not an issue but downloading this course files there is an issue with the form. When the form is rendered, there is a mistake that <div id="article_form"> renders as <divid="article_form">. Therefore, broking the whole HTML code. The code is just as downloaded from your course. Do you have an idea why is it so?

Reply

Hello Mārtiņš C.

Thanks for reporting this issue, it was just fixed, so you only need to re-download course code and continue crushing this course! If you are interested it was caused by twig library version.

Cheers!

Reply
Mārtiņš C. Avatar
Mārtiņš C. Avatar Mārtiņš C. | sadikoff | posted 2 years ago

Thanks!

Reply

Hey Mārtiņš C.

Just to clarify do you use PHP 7.4?

Cheers!

Reply
Mantas Z. Avatar
Mantas Z. Avatar Mantas Z. | posted 2 years ago

I have a problem launching project. Opening web I get red Symfony error window: "PDOException >PDOException> DriverException", "An exception occurred in driver: could not find driver". In server terminal i see: many lines with PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/.../code-symfony-forms/start/vendor/michelf/php-markdown/Michelf/Markdown.php on line [955...1801] and MarkdownExtra.php line [215...1469] and red error: 127.0.0.1:59528 [500]: GET /

Reply

It seems you need to include PDO driver in php.ini.

Reply

That's exactly right - thanks for posting Dameer! This error means that your PHP install doesn't have the PDO extension. How you install this depends on your system - you can use apt-get in Ubuntu or brew on a Mac (if you're using Brew).

Let us know if that helps!

Cheers!

Reply

Hey Mantas Z.

Can you provide more details? Like php version? MySQL version? Also can you check if mysql extension is enabled in PHP.

Cheers!

Reply
Ariel rudolph E. Avatar
Ariel rudolph E. Avatar Ariel rudolph E. | posted 3 years ago

I have a problem when I download the new project in the beginning of the video. I have this error:
Argument 1 passed to Symfony\Component\Security\Core\Authentication\Token\AbstractToken::__unserialize() must be of the type array, string given, called in /Applications/MAMP/htdocs/EmarhAgence/vendor/symfony/security-guard/Token/PostAuthenticationGuardToken.php on line 87

Reply
Ariel rudolph E. Avatar

This what happens when I try to connect me via the login page.

Reply

Hey @Rudolph!

Sorry for the slow reply. Hmm. You downloaded the new project from this page, right? Did you update any dependencies? The error is definitely odd :). What's stranger is the error, specifically this part:

> Argument 1 passed to AbstractToken::__unserialize() must be of the type array

If you look at the signature of this method, it at least makes sense:


public function __unserialize(array $data): void

Well, I man, I can't explain the error - but you can see the array type hint on the first argument. BUT, that code is from Symfony 4.4. This project uses Symfony 4.1, and if you look at this method in 4.1 (or in the downloaded code), it does *not* yet have that array type-hint.

So, did you update any dependencies? Or is this an exact copy of the downloaded code? I couldn't (at least on my php version) reproduce this error by downloading the course code and testing the start directory :).

Cheers!

Reply
Michael L. Avatar
Michael L. Avatar Michael L. | posted 3 years ago

If you have an error similar to this :
The autoloader expected class "App\Forms\ArticleFormType" to be defined in file "/var/www/html/vendor/composer/../../src/Forms/ArticleFormType.php" .......

Check if you have correctly enter your namespace in ArticleFormType !

Reply

Yep! Don't forget to define its namespace :)
And also, just to be aware of, file name and class name must be the same

Cheers!

Reply

Hello,

Which tools do you use to insert your emoji?

The emoji I copy/paste in my editor does not appear on my web page (an empty rectangle appears) and if I use unicode code, the emoji is in black and white.

(I work under linux mint and with phpstorm)

Thanks

Reply

Open "web whatsapp", find roket smile, copy and past. 🚀

Reply

Hey Damir,

Thank you for this tip, really an easy way ;) Also, if you're on a Mac, you can press "Ctrl + Command + space" to get a popup with emoji - might be a good and short trick for Mac users.

Though, it might still be not helpful for Camille if he doesn't have a proper font in his system I think.

Cheers!

1 Reply
Dung L. Avatar
Dung L. Avatar Dung L. | victor | posted 3 years ago | edited

Hello victor how are you,

I am on Windows developing in Phpstorm, how can I get the rocket emoji the same way as in Mac?

Thank you and you have a wonderful day!

Reply
Dung L. Avatar
Dung L. Avatar Dung L. | Dung L. | posted 3 years ago | edited

I found the answer here https://www.cnet.com/how-to... but it is nothing like Mac OS, so please Dung L. ignore my question - it may be good for someone who uses emojis heavily on Windows but not when I rarely use it.

I will just use it the way @Damir Vakhitov suggested open web whatsapp copy and paste occasionally. Thanks!

Reply

Hey Dung,

Thank you for letting us know you've got the answer yourself! Yeah, that feature is something unique for Mac I suppose. As a workaround, I can suggest to try to copy/paste emoji from apps that support them internally and that you use every day. For example, I believe you can copy the emoji from Slack application and paste them in PhpStorm. Slack have native support for emoji IIRC, so I suppose it should work this way.

I hope this helps!

Cheers!

Reply
Dung L. Avatar
Dung L. Avatar Dung L. | victor | posted 3 years ago | edited

Great, I did not know I could get it from Slack, I use Slack everyday :). Will definitely try it!
Thanks victor

Reply

Hey Dung,

Great! Would be happy to get your feedback if it works for you or no. I didn't try this on Windows, so just curious about it :)

Cheers!

Reply
Dung L. Avatar
Dung L. Avatar Dung L. | victor | posted 3 years ago | edited

Hello victor the slack https://slack.com/intl/en-c... uses its own library https://www.webfx.com/tools... and Does Not work
@Damir Vakhitov's solution is correct, tested and it works!

Reply

Hey Dung,

Yeah, I just gave you an idea about how to workaround it. OK, so Slack is no go with this, but WhatsApp helps, good to know! Thank you for your feedback, and I'm glad it works with WhatsApp at least :)

Cheers!

Reply

He ojtouch

Not tools, but Font, it should be installed on your system, Try to find osx emoji font for linux

Cheers!

Reply
Zoran B. Avatar
Zoran B. Avatar Zoran B. | posted 3 years ago

When running bin/console doctrine:migrations:migrate on mariadb-server-10.1 (and probably MySQL 5.6) you'll get an error:

SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

This is related to the length (255) of the `slug` column in table `tag`, in combination with UNIQUE. To avoid having the issue change the field to VARCHAR(190) in Version20180501142420.php.

See also https://symfony.com/doc/3.4...

Reply
Cat in space

"Houston: no signs of life"
Start the conversation!

What PHP libraries does this tutorial use?

// composer.json
{
    "require": {
        "php": "^7.1.3",
        "ext-iconv": "*",
        "composer/package-versions-deprecated": "^1.11", // 1.11.99
        "knplabs/knp-markdown-bundle": "^1.7", // 1.7.0
        "knplabs/knp-paginator-bundle": "^2.7", // v2.8.0
        "knplabs/knp-time-bundle": "^1.8", // 1.8.0
        "nexylan/slack-bundle": "^2.0,<2.2.0", // v2.0.0
        "php-http/guzzle6-adapter": "^1.1", // v1.1.1
        "sensio/framework-extra-bundle": "^5.1", // v5.2.1
        "stof/doctrine-extensions-bundle": "^1.3", // v1.3.0
        "symfony/asset": "^4.0", // v4.1.6
        "symfony/console": "^4.0", // v4.1.6
        "symfony/flex": "^1.0", // v1.17.6
        "symfony/form": "^4.0", // v4.1.6
        "symfony/framework-bundle": "^4.0", // v4.1.6
        "symfony/orm-pack": "^1.0", // v1.0.6
        "symfony/security-bundle": "^4.0", // v4.1.6
        "symfony/serializer-pack": "^1.0", // v1.0.1
        "symfony/twig-bundle": "^4.0", // v4.1.6
        "symfony/validator": "^4.0", // v4.1.6
        "symfony/web-server-bundle": "^4.0", // v4.1.6
        "symfony/yaml": "^4.0", // v4.1.6
        "twig/extensions": "^1.5" // v1.5.2
    },
    "require-dev": {
        "doctrine/doctrine-fixtures-bundle": "^3.0", // 3.0.2
        "easycorp/easy-log-handler": "^1.0.2", // v1.0.7
        "fzaninotto/faker": "^1.7", // v1.8.0
        "symfony/debug-bundle": "^3.3|^4.0", // v4.1.6
        "symfony/dotenv": "^4.0", // v4.1.6
        "symfony/maker-bundle": "^1.0", // v1.8.0
        "symfony/monolog-bundle": "^3.0", // v3.3.0
        "symfony/phpunit-bridge": "^3.3|^4.0", // v4.1.6
        "symfony/profiler-pack": "^1.0", // v1.0.3
        "symfony/var-dumper": "^3.3|^4.0" // v4.1.6
    }
}