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.5] Operator optional #22361

Merged
merged 1 commit into from
Dec 8, 2017
Merged

[5.5] Operator optional #22361

merged 1 commit into from
Dec 8, 2017

Conversation

emtudo
Copy link
Contributor

@emtudo emtudo commented Dec 8, 2017

Operator optional and fix type "time mysql"

DOC mysql: https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_time
TIME(expr)

Extracts the time part of the time or datetime expression expr and returns it as a string.

This function is unsafe for statement-based replication. A warning is logged if you use this function when binlog_format is set to STATEMENT.

Operator optional and fix type "time mysql"

DOC mysql: https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_time
TIME(expr)

Extracts the time part of the time or datetime expression expr and returns it as a string.

This function is unsafe for statement-based replication. A warning is logged if you use this function when binlog_format is set to STATEMENT.
@taylorotwell taylorotwell merged commit 727b8f9 into laravel:5.5 Dec 8, 2017
@GrahamCampbell GrahamCampbell changed the title Operator optional [5.5] Operator optional Dec 9, 2017
@sisve
Copy link
Contributor

sisve commented Dec 9, 2017

Why was this merged ...

  1. without tests,
  2. with a new method signature in the middle of the 5.5 release,
  3. without changing orWhereTime?

@sisve
Copy link
Contributor

sisve commented Dec 9, 2017

PHP Warning: Declaration of CustomBuilder::whereTime($column, $operator, $value, $boolean = 'and') should be compatible with Builder::whereTime($column, $operator, $value = NULL, $boolean = 'and')

@emtudo
Copy link
Contributor Author

emtudo commented Dec 9, 2017

How could you make the mistake? Because here for me it does not happen.

As for owWhereTime, it was forgetting to change "@param int $ value" as it is the only thing that needed to be changed.

Do you find it easier to reverse the situation instead of actually fixing the problems?

@sisve
Copy link
Contributor

sisve commented Dec 9, 2017

Do you find it easier to reverse the situation instead of actually fixing the problems?

Could you tell me which problems you were fixing? This PR only made the operator optional, if I read the code correct. There are no tests provided or anything that shows which problems existed previously.

The problem my revert fixes is the changes that causes warnings due to changed method signatures in the middle of a 5.5 release. If you really need these changes, redo them against the 5.6/master branch and provide tests.

@emtudo
Copy link
Contributor Author

emtudo commented Dec 9, 2017

@emtudo
Copy link
Contributor Author

emtudo commented Dec 9, 2017

TIME(expr)

Extracts the time part of the time or datetime expression expr and returns it as a string.

@sisve
Copy link
Contributor

sisve commented Dec 9, 2017

You've done three things in this PR.

  1. Made a backward incompatible change by making the operator optional.
  2. Changed a docblock comment to change a type hint.
  3. Forgot to change the other docblock comment.

Since the first point is a huge problem I argue that the entire PR should be reverted, and you're welcome to submit a new working PR that isn't breaking existing code, that is a working fix for the things you want to change.

@emtudo
Copy link
Contributor Author

emtudo commented Dec 9, 2017

I ask again, if it's breaking because you did not correct the problem instead of going back?

@sisve
Copy link
Contributor

sisve commented Dec 9, 2017

I do not understand your question. It is breaking because you changed a method signature in the middle of the 5.5 lifecycle. It would have been better if this were targetting 5.6 instead. I argue that since this is a breaking change, it should be reverted.

I am correcting the problem, by suggesting a revert of these changes, so the code goes back to the previous state. We can then try again to implement these things in a non-breaking way.

@emtudo
Copy link
Contributor Author

emtudo commented Dec 9, 2017

Ok! As you preferred!

Thanks!

taylorotwell pushed a commit that referenced this pull request Dec 9, 2017
@antonkomarev
Copy link
Contributor

antonkomarev commented Dec 9, 2017

@emtudo just point it to master branch.

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.

4 participants