doctrine / data-fixtures

Doctrine2 ORM Data Fixtures Extensions
http://www.doctrine-project.org
MIT License
2.78k stars 224 forks source link

Feature request: ORMPurger cache statements #410

Closed dmitryuk closed 1 year ago

dmitryuk commented 2 years ago

I use ORMPurger on every test in setUp method:

  1. Call $this->getFixtureExecutor()->execute($this->getFixtureLoader()->getFixtures());.
  2. ORMExecutor internally calls $this->purger->purge(); independently of fixtures passed
  3. ORMPurger::purge do a lot of manipulations (use metadata, getSchemaAssetsFilter, getFilterSchemaAssetsExpression, etc), and finally run sql statements.

I think it is possible to prevent extra manipulations in ORMPurger and cache, reuse sql statements. What do you think? What type of cache we can use (static variable, for example)?

dmitryuk commented 2 years ago

Benchmark results on 704 tests.

dmitryuk commented 1 year ago

Completed, thanks