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

[5.7] Remove duplicate code #27026

Merged
merged 1 commit into from Jan 1, 2019
Merged

[5.7] Remove duplicate code #27026

merged 1 commit into from Jan 1, 2019

Conversation

staudenmeir
Copy link
Contributor

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
Copy link
Member

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

@staudenmeir
Copy link
Contributor Author

@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
@staudenmeir staudenmeir deleted the duplicate branch January 1, 2019 19:59
@dkulyk
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants