1000 search results

Test Environment Database Setup

…page... it's not using the DATABASE_URL from my .env: it's using the dynamic value that's set by the symfony binary. This is something that we talked about in our Doctrine tutorial. However, that magic is clearly not happening in our test…

9:30
Hello Integration Tests!

…LockDownRepository(). But, hmm. LockDownRepository extends ServiceEntityRepository, which extends another class from Doctrine. If you look, to instantiate it, we need to pass a ManagerRegistry from Doctrine. And if you hold "command" or "control" and click into this... and go to the base class, it gets…

7:41
Generating the API Token & Fixtures

…Instead, since every user will already have some API tokens in the database, we can jump straight to learning how to read and validate those tokens. Reload the fixtures with: symfony console doctrine:fixtures:load And... beautiful! But since we're not going to build…

5:58
Mercure: Pushing Stream Updates Async

…some PHP and JavaScript code that's going to help us communicate with Mercure. But... we don't actually have a Mercure service running yet! That's like installing Doctrine... but without MySQL or Postgresql running! So next, let's get the Mercure service running…

4:43
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
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
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
When Testing Makes No Sense

…you TDD everything? Yes. I was really interested because I found TDD to be very wrong for Symfony, the Symfony part, like using the Forms, using the Doctrine and stuff like that. And I was wondering, okay, how do you do that? Oh, we don…

36:55
Leverage the power of Symfony components within ApiPlatform

…composer require api is in fact, um, launching a Flex recipe that will install API Platform, but also the doctrine-bundle, CORS support - Cross Origin Resource Management - and everything you need to basically have an API started. So these three steps, and I'm done…

27:45
Services

…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…

7:24
Listening to LemonSqueezy Javascript Events

…hit. So... did this work? At your terminal, check the database with: bin/console doctrine:query:sql "SELECT * FROM user" It didn't! It says that the lsCustomerId value is "undefined". Hmmm, sounds like we're using a bad path for the customer ID. If…

7:29
Relating Custom ApiResources

…objects... which results in it just serializing all the properties. This isn't a problem with entities because the serializer is smart: it reads the Doctrine relationship metadata to figure out that a property is a collection of some other #[ApiResource] object. Long story short…

5:13
All About services.yaml

…with $product = new Product(). So, these will not be services in the container. In the next tutorial, we'll create Doctrine entity classes, which are model classes for the database. These will live in the src/Entity/ directory... and since they're not meant…

10:27
Entity objects in Twig

…most recent requests we've made. Here's the one we just made to /questions/new. Click the little token string on the right to jump into the full profiler for that request! Go to the "Doctrine" tab and... bam! Cool! It even wraps the…

4:55
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
Migrating framework Config

…Great! Delete the validation line! What's really interesting is that enable_annotations is set to true because it detected that we have the Doctrine annotations package installed. This is the flow with Flex: install a package and you're done. Ok! It might not…

7:45
Idempotency, changed_when & Facts

…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…

6:48
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