2708 search results for Doctrine

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 ...
MolloKhan
MolloKhan
Read Full Comment
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
{
// TODO: Implement applyToCollection() method.
}
}
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. ...
Mike Milano
Mike Milano
Read Full Comment
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! ...
MolloKhan
MolloKhan
Read Full Comment
... Ohh, that's an incompatibility with PHP7.3 but if you upgrade only Doctrine it should work. `composer update doctrine/orm` Cheers! ...
MolloKhan
MolloKhan
Read Full Comment
Thanks Ryan. I suspected, it's doctrine malfunction. I will do like you say, maybe someday doctrine guys will correct this. ...
Tomasz N.
Tomasz N.
Read Full Comment
84 lines | features/bootstrap/FeatureContext.php
// ... 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 ...
weaverryan
weaverryan
Read Full Comment
... 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 ...
Jonah Mandli
Jonah Mandli
Read Full Comment
... "$em" of method "AppBundle\Security\LoginFormAuthenticator::__construct()" to one of its parents: interface "Doctrine\ORM\EntityManagerInterface", or interface "Doctrine\Common\Persistence\ObjectManager".` If I change ...
Hi, I searched a while through older versions of the doctrine-dbal-repo and tried downgrades of the doctrine-bundle, but I did not find the needed exact change in the vendor/doctrine/dbal/src/Types/Types.php, where ...
Raphael-W
Raphael-W
Read Full Comment
... not known`` ``` here's my .env file content: ``` ###> symfony/framework-bundle ### APP_ENV=dev APP_SECRET=8650ba188bbf625cfea2df9a79ae6d61 ###< symfony/framework-bundle ### ###> doctrine/doctrine-bundle ...
... Hi Victor "should support PHP 8.1" I don't know if this means what I think it means (I see 'doctrine' and I think 'that'll be important') but vendor/doctrine/dbal/composer.json has this in the start folder straight ...
... >getServiceLocator()->get('Doctrine\ORM\EntityManager'); $config = $em->getConfiguration(); And you just put those lines in the indexAction of your controller (or whichever action you want). So the $config line would ...