Comments (4)
Starting a new PHP process for each migration would have a huge performance impact for the execution of migrations, which seems a no-go.
I suggest you to fix that in your project: register a listener for the onMigrationsVersionExecuted
or onMigrationsVersionExecuting
event (not sure which one of them is best for your case) that would clear your cache between migrations.
from migrations.
@bs-thomas static variables are not request-based. They are process-based.
from migrations.
This is how static variables work. Using a static variable as a cache was a bad call on you side, sorry. For the reasons given by @stof, this bug report is not actionable for us.
from migrations.
Thanks for your quick response. I appreciate it.
I can understand it is a performance impact for doctrine. And I did think about it, and also agree so. So I will try to find an alternative for this.
@derrabus While I appreciate your advice, actually I don't quite understand why it was a bad idea. From my understanding, the use of static variable caching is actually quite a common use-case scenario for request-based caching, especially when PHP was made to be "request independent". Also for my use-case, it was not "object-dependent", so all instances of that same class are going to have the same table columns, so "static" seems to be the way to go. Or did I misunderstand something here?
** I understand this is off-topic already, just a friendly social discussion, just hoping to learn from you a little more :-)
from migrations.
Related Issues (20)
- Add support to the new id entity generation preferences in Doctrine ORM 3.0 HOT 1
- Column 'TABLE_NAME' in where clause is ambiguous HOT 1
- Abort migration if engine returned warning/error and etc.
- Automatic creation of schema's HOT 2
- Allow load run `doctrine::migrations::migrate` on a single namespace
- $plannedSql shared between commands execution.
- doctrine:schema:validate returns DROP TABLE doctrine_migration_versions; HOT 47
- DBAL 4.0 and ArrayParameterType
- Migrations Always Starting a Transaction HOT 4
- `CREATE SCHEMA public` is added to all down migrations in Postgres HOT 3
- Migrations return an error message when running doctrine:migrations:migrate [Oracle database] HOT 3
- Migrations not being generated, but schema recognized HOT 4
- Error when running doctrine:migrations: 'diff' and 'migrate' at the same thread HOT 3
- Migrations are piling up bogus savepoints on MySQL/MariaDB with PDO_MySQL HOT 11
- Migration implicitly ALTERs unrelated tables HOT 1
- Please throw a warning/exception if `addSql` is used in post methods. HOT 2
- Diff command generating unnecessary migration HOT 1
- Custom doctrine types keep getting their definition generated in migrations HOT 2
- Migration doesnt work after update to 3.8.0 ( Throws an exception if addSql is used in post methods) HOT 6
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 migrations.