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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doctrine2] Bugfix: calling haveInRepository with preconstructed entity requires providing constructor parameters #5680

Conversation

@burned42
Copy link
Contributor

commented Sep 11, 2019

As pointed out here my PR seems to have broken haveInRepository in that it doesn't work with preconstructed entities anymore if their constructor has non-optional parameters and you don't provide those properties when calling haveInRepository. 馃う鈥嶁檪

As I already offered a pretty simple solution in a commend as a suggestion here and said PR was rejected as too complex, I'm now offering my suggested (hopefully simple enough) solution along with a test as a PR :)

@DavertMik

This comment has been minimized.

Copy link
Member

commented Sep 11, 2019

Semaphoreci fails for a non related reason, it's fine

@alexkunin please review

@burned42 burned42 force-pushed the burned42:bugfix_doctrine_haveInRepository_preconstructed_entity branch from 20cd97f to 5da0df2 Sep 11, 2019
@burned42

This comment has been minimized.

Copy link
Contributor Author

commented Sep 11, 2019

@DavertMik I guess that failing CI might be because I based that branch on 3.0 instead of 3.1, fixed that now. (Semaphoreci seems to be fixed now 馃槃)

Copy link
Contributor

left a comment

Looks good to me, minimal change which is on point, and also covered with a test.

@burned42

This comment has been minimized.

Copy link
Contributor Author

commented Sep 11, 2019

After I rebased the branch on 3.1 all CI tests have passed now :)

@DavertMik

This comment has been minimized.

Copy link
Member

commented Sep 11, 2019

Thanks!

@DavertMik DavertMik merged commit 96d4d3e into Codeception:3.1 Sep 11, 2019
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
semaphoreci The build passed on Semaphore.
Details
@Basster

This comment has been minimized.

Copy link
Contributor

commented Sep 11, 2019

Thanks @burned42!

@burned42 burned42 deleted the burned42:bugfix_doctrine_haveInRepository_preconstructed_entity branch Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can鈥檛 perform that action at this time.