1000 search results
Learn Symfony 4
Symfony 4 Fundamentals: Services, Config & Environments
…if you needed your SlackClient service, you would just add a __construct() method and autowire it! With our new knowledge, let's keep going and start mastering features, like the Doctrine ORM, form system, API stuff and a lot more. Alright guys, seeya next time…
Stellar Development with Symfony 4
…you learn to master services, you can do anything from anywhere in Symfony. There's a lot more to say about the topic of services, and so many other parts of Symfony: configuration, Doctrine & the database, forms, Security and APIs, to just name a few…
PHPUnit (Legacy): Testing with a Bite
…Actually, I don't need to refactor, but now is a great time to add the missing Doctrine annotations. Above the $securities property, add @ORM\OneToMany() with targetEntity="Security" and mappedBy="enclosure". enclosure is the name of the property on the other side of the…
Learn Symfony 3
FOSUserBundle FTW!
…php bin/console It's alive! Now, we can generate the migration for our User class: php bin/console doctrine:migrations:diff Yep, that looks about right. Run it: php bin/console doctrine:migrations:migrate Perfect! At this point, the only thing this bundle has…
Doctrine Collections: ManyToMany, Forms & other Complex Relations
…is still there, just the way it always was. If you try to run this migration...it will blow up, with this rude error: Incorrect table definition; there can be only one auto column... It turns out, Doctrine has a bug! Gasp! The horror! Yep…
Developer Tools
Stripe Level 2: Subscriptions, Discounts, Webhooks, oh my!
…and $stripeSubscription->id: Booya! And, time to save this to the database! Since we're using Doctrine in Symfony, we need the EntityManager object to do this. I'll use dependency injection: add an EntityManager argument to the __construct() method, and set it on a…
Ansible for Automation!
…and paste that below: So what language happens when there are no migrations to execute? Go to your virtual machine and run the migrations to find out: ./bin/console doctrine:migrations:migrate --no-interaction Yes! It says: No migrations to execute That's the key…
Journey to the Center of Symfony: HttpKernel Request-Response
…After that, the controller is called and the stuff under that is our work. We can see some Doctrine calls we’re making and the time it takes to render the template. After the controller, the kernel.response event is dispatched, it has a few…
Learn Symfony 2
Starting in Symfony2: Course 3 (2.4+)
…to unlocking really powerful features. A very important tag is kernel.event_listener, which allows you to register “hooks” inside Symfony at various stages of the request lifecycle. That topic is for another screencast, but we’ll cover a very similar subject next: Doctrine events.
We had a great question from a user recently where the answer involved a little-known Doctrine feature called HIDDEN. You won't need it often, but it deserves its 5 in the spotlight! HIDDEN allows you to select a field so that you can…
By weaverryan and Leannapelham
Learn Symfony
Go Pro with Doctrine Queries
Filters: Automatically Modify Queries
Learn Symfony 6
Doctrine, Symfony 6 & the Database
Installing Doctrine
Learn Symfony 5
Netgen Layouts: Building Pages with Symfony
Hello Layouts+ Setup!
API Platform 2 Part 3: Custom Resources
App & Test Setup
Charming Development in Symfony 5
The Lovely bin/console Tool
Doctrine, Symfony & the Database
Upgrading & What's New in Symfony 5!
DoctrineBundle Updates & Recipe Upgrade
Whoops, an error! Please, try again later.