Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

krugerman007
Copy link
Contributor

@krugerman007 krugerman007 commented Aug 8, 2024

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

  • we load a fixture with 2 rows (Students\UsersFixture),
  • the table with 2 rows has not been changed,
  • we load a fixture for the same table but with 5 rows (Teachers\UsersFixture).

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.

@krugerman007 krugerman007 force-pushed the feature/several-fictures-for-one-table branch from 1a92a65 to 59381b4 Compare August 8, 2024 13:44
@krugerman007 krugerman007 force-pushed the feature/several-fictures-for-one-table branch from 59381b4 to 274ee85 Compare August 8, 2024 13:45
@ravage84
Copy link
Collaborator

ravage84 commented Aug 8, 2024

I can confirm that behavior.

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

@ravage84 ravage84 added this to the 3.0.0 milestone Aug 8, 2024
@ravage84
Copy link
Collaborator

ravage84 commented Aug 8, 2024

@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

fixturize/composer.json

Lines 47 to 48 in 896b79d

"php": ">=8.1",
"cakephp/cakephp": "^5.0.0"

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
Copy link
Contributor Author

krugerman007 commented Aug 9, 2024

Thank you @ravage84! The PR for 1.x is there: #29

@ravage84 ravage84 changed the title feature: TableKey takes into account the class name [3.x] feature: TableKey takes into account the class name Aug 9, 2024
@ravage84 ravage84 self-assigned this Aug 9, 2024
@ravage84
Copy link
Collaborator

ravage84 commented Aug 9, 2024

Please, sync any additional changes to the other PR #29 to here, once accepted.

@ravage84
Copy link
Collaborator

ravage84 commented Aug 9, 2024

@krugerman007 please sync changes from #30 into this.

@krugerman007 krugerman007 force-pushed the feature/several-fictures-for-one-table branch from 1956065 to 6e6e1b2 Compare August 9, 2024 13:26
@krugerman007 krugerman007 force-pushed the feature/several-fictures-for-one-table branch from 6e6e1b2 to 6a88a43 Compare August 9, 2024 13:27
Copy link
Collaborator

@ravage84 ravage84 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 🚀

@ravage84 ravage84 merged commit e0e598a into FriendsOfCake:master Aug 9, 2024
1 check passed
@ravage84 ravage84 modified the milestones: 3.0.0, 3.0.1 Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants