Comments (3)
You imported the namespace as an ORM
prefix in your use statement but you haven't use ORM\OneToOne
or a use statement for the OneToOne
attribute. So your OneToOne
attribute is currently a App\Entity\OneToOne
, which is not known by Doctrine (and probably does not exist).
from doctrinemigrationsbundle.
@stof You are right, but then I would expect an error message that App\Entity\OneToOne
was not found.
But I just get
Generated new migration class to "/var/www/html/migrations/Version20230207113436.php"
To run just this migration for testing purposes, you can use migrations:execute --up 'DoctrineMigrations\\Version20230207113436'
To revert the migration you can use migrations:execute --down 'DoctrineMigrations\\Version20230207113436'
I suggest to let throw an error if a specified attribute class was not found.
from doctrinemigrationsbundle.
PHP allows attribute to use non-existent classes as long as you don't try to instantiate them.
And doctrine/orm won't try to instantiate attributes that are not its own.
However, static analysis tools like Psalm and phpstan (or your IDE) generally report non-existent classes used as attribute as being a mistake.
from doctrinemigrationsbundle.
Related Issues (20)
- The metadata storage is not up to date (because of platformOptions?) HOT 2
- Doctrine Migration Bundle runs its own checks for the Messenger component? HOT 3
- make:migration dont create AUTO_INCREMENT on some entity
- Wrong migration for columnDefinition for DATETIME
- generate idempotent sql migration script
- Generated columns added to migrations file every time - any way to tell the migration to ignore single fields? HOT 2
- Migrations regenerates DROP CONSTRAINT and ADD the same CONSTRAINT HOT 2
- Symfony deprecation HOT 2
- Add option --mapping on migrations:diff
- Wrong SQL generated for MySQL when using TEXT type with unique index
- `TableMetadataStorage->complete` generates invalid SQL for Oracle when applying a new migration HOT 1
- Doctrine migrations generates DROP CONSTRAINT twice
- option --em does nothing for me HOT 1
- Migrations run out of chronological order if you have multiple namespaces defined
- Support Symfony 7 HOT 1
- `mapping_types` config seems to be ignored on `diff` HOT 1
- Migration dependency injection in Symfony 7.0 HOT 7
- compatible with latest Doctrine ORM 3 and DBAL 4? HOT 1
- Error when running 'diff' and 'migrate' at the same thread HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doctrinemigrationsbundle.