Great overview Ryan. One thing I don't understand. You don't configure the eventsubscriber in the services.yml and it works out-of-the-box. But when I want to subscribe to a doctrine event I have to put it explicitely ...
Hey Mamour W.
At the moment we don't have a Doctrine tutorial based on Symfony5 but we do have a couple you might be interested. These are based on Symfony4 but majority of the content is still relevant
https://symfonycasts.com/screencast/symfony-doctrine
https://symfonycasts.com/screencast/doctrine-relations
Cheers! ...
Ah, thank you! It'll be covered in the new Doctrine tutorial (near the end) which will start coming out this week: http://knpuniversity.com/screencast/symfony-doctrine. Here's a preview on the script (https://github.com ...
Hey Romain L.!
Thanks for the report! It looks like there is a bug in PHP 7.4 and doctrine/orm - it requires doctrine/orm version 2.7.1 or higher to fix it. We're going to work to upgrade affected tutorials, but you can (for now) work around the issue by running:
```
composer up doctrine/orm --with-dependencies
```
Cheers! ...
Hey Parham A.
I think it's not possible because EasyAdminBundle relies on Doctrine and it does not support DynamoDb, you can see all the platforms that Doctrine supports here: https://www.doctrine-project.org/projects ...
Hey Michael
You can't use any service inside an entity, you may find a hack to do it but the recommendation is to treat your entities as a data model only. However, you can set up a Doctrine listener to automatically ...
Hi, thanks for the hard work.
for now i found those
antishov/doctrine-extensions-bundle
gedmo/doctrine-extensions
knplabs/doctrine-behaviors
which one is recommended to use? because i see that all is the same, why we need 3 libraries do the same thing? after stof bundle i migrated to gedmo. ...
... `composer.lock` and I always get `doctrine/annotations v1.8.0` but I always get `doctrine/doctrine-bundle v1.11.2` too which is wrong I guess.
Hey Kim,
Thanks for sharing your solution! I think you can continue using MySQL 5.5 but you need to specify your version in the doctrine configuration, see this "server_version" key: https://github.com/symfony/recipes ...
|
// ... lines 1 - 2
|
|
namespace App\ApiPlatform; |
|
|
|
use ApiPlatform\Doctrine\Orm\Extension\QueryCollectionExtensionInterface; |
|
use ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface; |
|
use ApiPlatform\Metadata\Operation; |
|
use Doctrine\ORM\QueryBuilder; |
|
|
|
class DragonTreasureIsPublishedExtension implements QueryCollectionExtensionInterface |
|
{ |
|
public function applyToCollection(QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, Operation $operation = null, array $context = []): void |
|
{ |
|
|
|
} |
|
} |
See Code Block in Script
My mistake, I had used `Doctrine\Common\Persistence\Event\LifecycleEventArgs` instead of `Doctrine\ORM\Event\LifecycleEventArgs`. Sorry for the noise. ...
Hey Mr_T
Try to install exact version of fixtures bundle `composer require --dev doctrine/doctrine-fixtures-bundle:2.4.1`
Cheers! ...
Hello,
In some way, can we say that DataProvider/DataPersiter are to APIPlatform as Doctrine Entity Listener are to Doctrine? ...
Hey Valgritim
Try updating Doctrine dependencies first. Run
```
composer upgrade "doctrine/*" --with-dependencies```
Let me know if it worked. Cheers! ...
... Ohh, that's an incompatibility with PHP7.3 but if you upgrade only Doctrine it should work. `composer update doctrine/orm`
Cheers! ...
Thanks Ryan. I suspected, it's doctrine malfunction. I will do like you say, maybe someday doctrine guys will correct this. ...
|
// ... lines 1 - 31
|
|
public function clearData() |
|
{ |
|
$em = $this->getContainer()->get('doctrine')->getManager(); |
|
// ... lines 35 - 36
|
|
} |
|
// ... lines 38 - 41
|
|
public function thereIsAnAdminUserWithPassword($username, $password) |
|
{ |
|
// ... lines 44 - 48
|
|
$em = $this->getContainer()->get('doctrine')->getManager(); |
|
// ... lines 50 - 51
|
|
} |
|
// ... lines 53 - 84
|
See Code Block in Script
Hey Joseph,
Ah, OK. If we're talking about Symfony, then probably we want to do it with Doctrine. We're working on this course: https://knpuniversity.com/screencast/symfony4-doctrine - it will be next in the Symfony 4 ...
Hey Thomas!
Good find on your solution! You're getting "bit" by a bit of a bad error message. In this chapter (https://knpuniversity.com/screencast/symfony-doctrine/custom-queries#creating-your-own-repository), we talk ...
... I'm having some trouble using the new Symfony 3.3 autowiring feature with my entity repositories. Currently, I am trying to pass in instances of Doctrine\ORM\EntityManagerInterface, Doctrine\ORM\Mapping\ClassMetadata ...
2725
Doctrine
Filter Results