There's a situation where a Doctrine event on PrePersist might not work with GraphQL? The data persister isn't triggered by my fixtures for my tests so, here's another difference I guess.
|
|
// ... lines 1 - 47
|
|
App\DataProvider\UserDataProvider: |
|
bind: |
|
$collectionDataProvider: '@api_platform.doctrine.orm.default.collection_data_provider' |
See Code Block in Script
Hello,
I can't install stof/doctrine-extensions-bundle.
I get the following error message:
Using version ^1.4 for stof/doctrine-extensions-bundle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony…
Hello there,
I try to install doctrine and I got the following error:
Executing script cache:clear [KO]
[KO]
Script cache:clear returned with error code 1
!!
!! In EnvVarProcessor.php line 76:
!!
!! Environment variable not found: "DATABASE_URL".
!!
!!
!!
Script @auto-scripts was called via post…
Hi,
Thanks for the speedy response.
doctrine/annotations was (and is) installed.
With the fourth argument present in the call to the JSON serializer...
`
return $this->json($user, 200, [], [
'groups' => ['main'],
]);
`
...it returned an empty object.
Did a quick Google to see if anything…
…Diego,
If i put back doctrine.orm.naming_strategy.underscore in my doctrine.yaml file, i then get a deprecation message : User Deprecated: Creating Doctrine\ORM\Mapping\UnderscoreNamingStrategy without making it number aware is deprecated and will be removed in Doctrine ORM 3.0.
The…
i already run the composer require doctrine/doctrine-migrations-bundle "^3.0". But when trying again the php bin/console make:migration still come up with the [ERROR] Missing package: to use the make:migration command
About mocking model-objects (in my case Doctrine entities): The service which I'm testing makes use of the auto-generated ID of the provided entity. However, the Doctrine entity does not have a setId()-method, so setting an ID just for testing is not…
what's the difference between
use Doctrine\Persistence\ObjectManager; and use Doctrine\Common\Persistence\ObjectManager;
actually what I did was install the Doctrine Test Bundle and it also refreshes the db after every test. Found here https://symfony.com/doc/current/testing/database.html#resetting-the-database-automatically-before-each-test
I keep getting this error
```[Doctrine\DBAL\Exception\ConnectionException]
An exception occured in driver: SQLSTATE[HY00
0] [2002] No connection could be made because
the target machine actively refused it.
[Doctrine\DBAL\Driver\PDOException]
SQLSTATE[HY000] [2002] No connection could be
made because the target…
Hey @Sym
If you have Doctrine installed on your project it should just work out of the box. Double check that you are using Doctrine on your project and if that's the case and the problem persists, please, let us know :)
Cheers!
Working on Windows 10 after reloading the doctrine fixtures in the data base when I refresh the home page the php server dies with the following error:
Compile Error: ContainerNB37shz\srcDevDebugProjectContainer::load(): Failed opening required 'C:\Projects\the_spacebar\var\cache\dev\ContainerNB37shz\getConsole_ErrorListenerService…
Hey Gianluca,
I think your "doctrine_cache" configuration should be like:
```
doctrine_cache:
aliases:
memcached_cache: service_connection_memcached_provider
providers:
service_connection_memcached_provider:
memcached:
connection_id: "memcached.doctrine"
```
And then you should be able to use the short "memcached_cache" alias to get…
Hey Ahmed,
Could you clarify what exactly "Doctrine extension Bundle"?
Yes, StofDoctrineExtensionsBundle requires "gedmo/doctrine-extensions" package as the bundle is just a wrapper for that library that has integration with Symfony if you mean this.
Cheers!
For Symfony 4.2 with Doctrine Fixtures 3.1:
behat.yml.dist:
```
default:
suites:
default:
contexts:
- FeatureContext:
kernel: '@kernel'
fixturesLoader: '@doctrine.fixtures.loader'
- Behat\MinkExtension\Context\MinkContext
```
features/bootstrap/FeatureContext.php
```
public function __construct(KernelInterface $kernel, SymfonyFixturesLoader $fixturesLoader)
{
$this->container = $kernel->getContainer();
$this->fixturesLoader…
Gey Gustavo,
I'm not sure Doctrine has such annotation :) How will Doctrine know to whom assign it? It's only possible to set genus to NULL on deleting. I *think* you can add a listener to listen to preRemove event and implement a custom…
…4.1 and found the doctrine:migrations:generate and diff commands just created migrations with VOID inside (ie there was no SQL), so then running migrate would create/update the migration version table but not create the users table. However running doctrine:schema:update --force…
…the Doctrine\Common\ClassLoader somewhere in your project? Probably not, I think it's just used somewhere internally. If so - you don't need to do any actions, you just need to wait for updates and upgrade your dependencies. But if you use doctrine/common…
When i call php ./bin/console doctrine:fixtures:load
I get an error
Call to a member function text() on null
x
1000+