2708 search results for Doctrine

56 lines | src/AppBundle/Test/ApiTestCase.php
// ... lines 1 - 4
use Doctrine\Common\DataFixtures\Purger\ORMPurger;
// ... lines 6 - 8
class ApiTestCase extends KernelTestCase
{
// ... lines 11 - 44
private function purgeDatabase()
{
$purger = new ORMPurger($this->getService('doctrine')->getManager());
$purger->purge();
}
// ... lines 50 - 55
}
See Code Block in Script
// ... lines 1 - 2
namespace AppBundle\DataFixtures\ORM;
// ... lines 4 - 5
use Doctrine\Common\DataFixtures\FixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
class LoadFixtures implements FixtureInterface
{
public function load(ObjectManager $manager)
{
// ... lines 13 - 19
}
}
See Code Block in Script
43 lines | config/packages/doctrine.yaml
// ... lines 1 - 18
when@test:
doctrine:
dbal:
# "TEST_TOKEN" is typically set by ParaTest
dbname_suffix: '_test%env(default::TEST_TOKEN)%'
when@prod:
doctrine:
orm:
auto_generate_proxy_classes: false
// ... lines 29 - 43
See Code Block in Script
... All status = 'auto-generated recipe'. Composer version 1.9.3 2020-02-04 12:58:49 Symfony Version 4.4 antishov/doctrine-extensions-bundle v1.4.2 Forked from stof/doctrine-extensions-bundle integration of the gedmo ...
... version 4.0. Try changing the type-hint for "Doctrine\ORM\EntityManager" in "AppBundle\Controller\Teams\TeamsController" to one of its parents: interface "Doctrine\ORM\EntityManagerInterface", or interface "Doctrine\Common\Persistence\ObjectManager". Now that's a beautiful error message!
... "$ composer require doctrine/doctrine-migrations-bundle" 2. Add "new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle()," line to the app/Kernel.php file to register the bundle. And then "./bin/console doctrine:migrations:diff" should work well. Cheers!
Hey |mention:84545| The Symfony 7 version of this tutorial is still in the planning stages but feel free to checkout our [Symfony 6 Doctrine course](https://symfonycasts.com/screencast/symfony-doctrine) in the ...
Hey @Chris-M! Hmm. What does the stacktrace look like on that error? Is it coming from Doctrine? I think I recognize that error from Doctrine... and so it almost looks like Doctrine thinks that there is an entity ...
weaverryan
weaverryan
Read Full Comment
Hey Jayant, Did you try to the solution from the error message? I.e. try to run that command with --with-all-dependencies option: $ composer require stof/doctrine-extensions-bundle --with-all-dependencies This should ...
Hello Victor, yes help so that I have an new error :-D Your requirements could not be resolved to an installable set of packages. Problem 1 - Root composer.json requires stof/doctrine-extensions-bundle ^1.6 ...
Jörg daniel F.
Jörg daniel F.
Read Full Comment
Off topic. I get the following error and I dont understand how to fix it. Last thing I remember I did was updating composer. Uncaught PHP Exception Doctrine\Common\Annotations\AnnotationException: "[Semantical Error ...
Hey @Aaron Kincer, Weird issue, however how did you get Doctrine installed here? This tutorial shouldn't have this dependency installed. As I see your issue caused by newer Doctrine version and probably php7.4 (BTW ...
Ah, thanks! Now I *know* we have a problem :) - and weird one! It looks like there's a old bug in Doctrine itself on HHVM and PHP 7: https://github.com/doctrine/dbal/pull/372. This was fixed in doctrine/dbal version ...
weaverryan
weaverryan
Read Full Comment
Hey Paul Rijke That's a good question. The thing here is that Doctrine comes with its own event-dispatching system, in other words Symfony events and Doctrine events are two different systems. Symfony has the "auto ...
MolloKhan
MolloKhan
Read Full Comment
... - yesterday - and will start working on the Doctrine (database) tutorial next. If you can't wait (I totally get it!) our Symfony 4 Doctrine tutorial will still be *very* relevant - not a lot of critical things have changed - https://symfonycasts.com/screencast/symfony4-doctrine Cheers!
weaverryan
weaverryan
Read Full Comment
Hey Rafael, Hm, interesting... Could you do "rm -rf vendor/" and then "composer install"? Does it helps? If not, probably try to upgrade the library with "composer update doctrine/dbal". If you still have this error ...
Validating how Values Change

... with validation... but with the help of a special class from Doctrine called the UnitOfWork. Alrighty, let's whip up a test to shine a light on this pesky bug. Inside tests/Functional/, open UserResourceTest. Copy the ...

8:30
Recipe Upgrades with recipes:update

... composer recipes:update We'll work on the rest from top to bottom. Next is doctrine/doctrine-bundle. This is a cool update. Once again, I'll clear the screen and run ...

6:13
Rendering Answer Data Saving Votes

... probably need a few tweaks: templates/question/show.html.twig. If you scroll down a bit - here it is - we loop over the answers variable. That will still work: the Doctrine collection is something that we can loop over. But ...

6:02
Collection Criteria for Custom Relation Queries

... controller and do a custom query for the answers there? Fortunately, no! These Doctrine Collection objects have a few tricks up their sleeves, including a special "criteria" system for just this situation. It allows us ...

6:33