FriendsOfCake / fixturize

CakePHP: Improve performance of your fixture based tests on MySQL.
MIT License
24 stars 14 forks source link

[3.x] feature: TableKey takes into account the class name #28

Closed krugerman007 closed 2 months ago

krugerman007 commented 2 months ago

We have the problem that you cannot load 2 fixtures for one table one after the other. For example:

The last fixture is not applied because the hash was not changed. And the plugin only checks the hash of the table by connection and table name. The plugin does not take into account the class name of fixtures.

ravage84 commented 2 months ago

I can confirm that behavior.

@krugerman007 and found this while debugging some strange behavior of our large test suite.

ravage84 commented 2 months ago

@krugerman007 a heads up from my side: The source/target branch you chose is meant for future version of the plugin which are compatible with PHP 8.1 & CakePHP 5.x

https://github.com/FriendsOfCake/fixturize/blob/896b79d76a616f70b0a5bf41b918511c7a81603f/composer.json#L47-L48

If you want to fix this for our CakePHP 3.x application, please provide an additional pull request based on/targeting the 1.xbranch, which I re-created based on the last 1.x release (1.0.3).

krugerman007 commented 2 months ago

Thank you @ravage84! The PR for 1.x is there: https://github.com/FriendsOfCake/fixturize/pull/29

ravage84 commented 2 months ago

Please, sync any additional changes to the other PR https://github.com/FriendsOfCake/fixturize/pull/29 to here, once accepted.

ravage84 commented 2 months ago

@krugerman007 please sync changes from #30 into this.