1000 search results

Serializing Messages as JSON

…the keys that you're allowed to have below each transport is called serializer. Set this to a special string: messenger.transport.symfony_serializer. When a message is sent to a transport - whether that's Doctrine, AMQP or something else - it uses a "serializer" to…

6:41
Investigating & Retrying Failed Messages

…AMQP or Redis - support all of the features we just saw if you use it as your failure transport. That may change in the future, but at this moment - Doctrine is the most robust transport to use for failures. Anyways, as cool as failing is…

5:41
Flysystem & S3

…it should... just kinda work! The easiest way to find out is to reload the fixtures: php bin/console doctrine:fixtures:load And yes, I do recommend using S3 when developing locally if that's what you're using on production. You could change the…

7:44
Themed Pagination Links

…cool! Ok team! Congratulations on finishing both Doctrine courses! Big team high five! Doctrine is one of the most important parts of Symfony and it will unlock you for almost anything else you do. So let us know what cool stuff you're building and…

7:07
ManyToMany Relation

…that Doctrine is going to handle the heavy lifting of inserting and removing records to and from this table for us. We'll see that in a minute. But before I forget, head back to your terminal and run this migration: symfony console doctrine:migrations…

4:53
Search, the Request Object & OR Query Logic

…we were already filtering WHERE status = approved. But because we put the OR statement inside of the andWhere(), Doctrine surrounded the entire fuzzy search part with parentheses. If we had used orWhere(), that wouldn't have happened... and our query logic would have been…

8:05
Custom Resource PUT Operation

…But what if the built-in filters aren't enough? What if we need to add some custom filtering logic? Let's do that next by first creating a custom filter for a Doctrine entity and later creating a custom filter for our DailyStats resource.

5:19
Custom Resource GET Item

…Next, let's talk about pagination. Because if we go back to /api/daily-stats.jsonld and refresh... there are a lot of items here. Since we're not using Doctrine, we no longer get pagination for free. If we need it, we have to…

5:50
Validating Who/When Can Publish

…new data has been deserialized into it. The failure is from our first test case: we currently allow this item to be published, even though the description is short. Next, let's prevent this. How? It's back to our "original data" trick from Doctrine.

8:22
Prime Time with Messenger: Queues, Workers & more Fun! (Ryan Weaver)

…Nyholm uses that all the time. So in his handlers, he just kind of writes doctrine code and there's something else that wraps that in a transaction and then commits the transaction afterwards. Um, and really the main thing, the most important thing for…

44:36
Head first into Symfony Cache, Redis & Redis Cluster (Andre Rømcke)

…itself. So you'll probably see new places being used for that. There are a lot of adopters right now. This is maybe not even complete, but there's APCu a PHP Array in memory chaining several using Doctrine, um, existing adopters from them. There…

37:44
Using API Platform to build ticketing system (Antonio Peric-Mazar)

…can, I can change it. What you can use, it's actually Doctrine User Provider which is included in Symfony 4 so it's simple and easy to integrate. Then you need to, only thing that you need to do is bin/console maker:user…

38:25
Filtering Related Collections

…method: public function getPublishedCheeseListings() that will also return a Collection. Inside, return $this->cheeseListings->filter(), which is a method on Doctrine's collection object. Pass this a callback function(){} with a single CheeseListing argument. All that function needs is return $cheeseListing->getIsPublished(). If you're…

10:50
Logging in Inside the Test

…ids. Try this: $em = self::$container - a parent class sets the container on this nice property - ->get() and the service id. Use doctrine then say ->getManager(). You can also use the type-hint you use for autowiring as the service id. In other words…

6:57
Removing Items from a Collection

…the $cheeseListings property, add orphanRemoval=true. This means, if any of the CheeseListings in this array suddenly... are not in this array, Doctrine will delete them. Just, realize that if you try to reassign a CheeseListing to another User, it will still delete that CheeseListing. So…

5:29
Creating the User Entity

…make:migration Move over... and double-check the SQL: CREATE TABLE user - looks good! Run it with: php bin/console doctrine:migration:migrate Perfect! We have a gorgeous new Doctrine entity... but as far as API Platform is concerned, we still only have one API…

5:07
@SerializedName & Constructor Args

…Symfony 4.3, you may already see a validation error! That's because of a new feature that can automatically convert your database rules - the fact that we've told Doctrine that title is required in the database - into validation rules. Fun fact, this feature…

7:15
Serialization Groups

…false. By the way, if you're using Symfony 4.3, instead of a Doctrine error, you may have gotten a validation error. That's due to a new feature where Doctrine database constraints can automatically be used to add validation. So, if you see…

9:34
API Platform Installation!

…fake" library that helps install several thing at once. Heck, you can see this at https://github.com/api-platform/api-pack: it's a single composer.json file that requires several libraries, like Doctrine, a CORS bundle that we'll talk about later, annotations…

6:42
Symfony Messenger: 6 months already and more to come

…Actually, who here is actually is using Doctrine? I was expecting more people. So half of the room actually admit they use Doctrine. So the idea is simple: you've got a database URL in Doctrine, so you can configure whether it's MySQL or…

34:02