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

[5.7] Remove duplicate code #27026

Merged
merged 1 commit into from Jan 1, 2019

Conversation

Projects
None yet
4 participants
@staudenmeir
Copy link
Contributor

staudenmeir commented Jan 1, 2019

We don't need HasOneOrMany::update(), Builder::update() already adds the UPDATED_AT timestamp.

The tests expect the update() method in the HasOneOrMany class, so we have to remove them.

@GrahamCampbell

This comment has been minimized.

Copy link
Member

GrahamCampbell commented Jan 1, 2019

We should probably keep the tests though. Duplicate testing is not necessarily a bad thing.

@staudenmeir

This comment has been minimized.

Copy link
Contributor

staudenmeir commented Jan 1, 2019

@GrahamCampbell I don't really see the benefit. We would have to adjust them and then they would just test Builder::update() (which we already have tests for).

@taylorotwell taylorotwell merged commit 4bc50ad into laravel:5.7 Jan 1, 2019

2 checks passed

continuous-integration/styleci/pr The analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@staudenmeir staudenmeir deleted the staudenmeir:duplicate branch Jan 1, 2019

@dkulyk

This comment has been minimized.

Copy link
Contributor

dkulyk commented Jan 12, 2019

@staudenmeir You also can delete updateTimestamps from Model::performUpdate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment