I got stuck on this error whilst trying to load my yaml data files in Symfony
php symfony doctrine:build --all --and-load
and
php symfony doctrine:data-load
Couldn’t find class PropertyType
PHP Fatal error: Call to a member function evictAll() on a non-object in /Users/mjhoman/Sites/property/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.php on line 1239
Fatal error: Call to a member function evictAll() on a non-object in /Users/mjhoman/Sites/property/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.php on line 1239
The solution was an incorrect table name at the top in one of my fixtures yaml data files. Silly mistake but took me a while to track down.
config/doctrine/schema.yml
Type:
actAs:
Timestampable: ~
Sluggable:
fields: [name]
columns:
name: { type: string(255), notnull: true, unique: true }
/data/fixtures/types.yml
SomeType:
type_1:
name: type_1
type_2:
name: type_2