…extends `Doctrine\Bundle\FixturesBundle\Fixture` which implements `DependentFixtureInterface`...
When we remove extended class - `addReference` method is no longer available.
When we remove implementation of `OrderedFixtureInterface`, well it won't be ordered.
So it's clearly bug in course code.
Probably you should extend `Doctrine\Common…
Hi Diego
the doctrine connection had the access to database and in symfony profiler there are two queries that were executed
#▼ Time Info
2 1.00 ms
SELECT t0.id AS id_1, t0.author_name AS author_name_2, t0.content AS content…
Does stof_doctrine_extensions Bundle need Doctrine extension Bundle ?
When running bin/console doctrine:migrations:migrate on mariadb-server-10.1 (and probably MySQL 5.6) you'll get an error:
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
This is related to…
Hello again,
installing doctrine-fixture-bundle v2.4 with the cmd:
`
composer require --dev doctrine/doctrine-fixtures-bundle 2.4
`
worked for me. But I am still interested in how I can get the more recent version of orm-fixtures-bundle
bin/console doctrine:fixtures:load
PHP Fatal error: Class App\DataFixtures\UserFixture contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (App\DataFixtures\BaseFixture::loadData) in /../../src/DataFixtures/UserFixture.php on line 22
Fatal error: Class App\DataFixtures\UserFixture…
|
|
// ... lines 1 - 4
|
|
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; |
|
|
// ... lines 6 - 7
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class UserRegistrationFormModel |
|
|
// ... lines 15 - 33
|
See Code Block in Script
Being a sf + doctrine user for years I could not believe I would learn anything new - I just went for the badge, but you proved me wrong. I still learned a thing or two.
Great job guys!
|
|
// ... lines 1 - 7
|
|
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; |
|
|
// ... lines 9 - 12
|
|
|
|
|
// ... line 14
|
|
|
|
|
|
|
|
|
|
|
|
class User implements UserInterface |
|
|
// ... lines 21 - 255
|
See Code Block in Script
When running doctrine:fixtures:load, check on what file it stopped.
For my it was App\DataFixtures\CommentFixture.
To fix it just added dependent fixture:
Add getDependencies to App\DataFixtures\CommentFixture (also add implements DependentFixtureInterface).
So basicly:
class CommentFixture extends BaseFixture implements DependentFixtureInterface
{
...
public function…
Broken link: https://doctrine-dbal.readthedocs.io/en/latest/reference/data-retrieval-and-manipulation.html
I have used doctrine for years now and I keep learning new things that make it so much better. Thanks.
May I ask, when will the next course come out? Should I review the Symfony 3 Forms: Build, Render & Conquer! for the latest info on…
When I run the doctrine:migration:migrate command it comes back with an error: 'User table or view already exists'
…su
Doctrine by default doesn't have a replace function, but you can create your own DQL functions, actually this guy already done it: http://stackoverflow.com/a/21652988
You can read more information about creating your own DQL functions here: http://docs.doctrine-project…
Hi Ryan,
How does Doctrine know to query for the Programmer using the `nickname` value? Does it check that the nickname property is part of the Programmer class and then does findOneBy(array('nickname' => $nickname)), or does it need an existing method (findOneByNickname($nickname…
After
( bin/console doctrine:migrations:migrate )
I got exception about *foreign key* !
Setting the doctrine_cache type to array to "stop logging" is pretty ugly. Why would there not be an "enabled" flag?
…workarround.
```
console doctrine:migrations:status```
this gave me the next in line migration version. which was 20160207092254
checked in phpstorm which was the next in line, which was 20160412160008
opened Version20160412160008.php got the version number(without Version) and performed:
```
console doctrine:migrations:execute 20160412160008…
Hey Peter,
Doctrine model, i.e. Genus entity in our case, or any other entity - can't query the database, it's an architectural pattern of Doctrine. To query the database - you need to use entity repository, so you can some default methods in default…
Hey Cesar,
With Doctrine you get both ORM and DBAL. We explain ORM in this course, it's higher level and more fun. However, ORM is based on the more lower level like DBAL. Actually, you can think of Doctrine DBAL as about PDO, it…
x
1000+