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

Improve callable phpdocs #29

Merged
merged 4 commits into from
Dec 12, 2023

Conversation

mvorisek
Copy link
Contributor

@mvorisek mvorisek commented Dec 2, 2023

No description provided.

@mvorisek mvorisek marked this pull request as draft December 2, 2023 15:18
@AllanJard
Copy link
Contributor

Thank you - are you happy for this to be pulled in under the MIT license?

Also, I'm not sure if you saw, but the phoDocumentor issue with spread operators has been fixed, so I'll get the docs updated for that soon. I'm fully focused on the work for DataTables 2 at the moment, but when that drops I'll circle back to the phpstan issues highlighted before.

@mvorisek
Copy link
Contributor Author

mvorisek commented Dec 2, 2023

Thank you - are you happy for this to be pulled in under the MIT license?

yes, for all controbutions to this repo

Also, I'm not sure if you saw, but the phoDocumentor issue with spread operators has been fixed, so I'll get the docs updated for that soon. I'm fully focused on the work for DataTables 2 at the moment, but when that drops I'll circle back to the phpstan issues highlighted before.

Great, feel free to ping me on this PR once the CI is green, I will then make it green too. I don't need to hurry with these changes.

@AllanJard
Copy link
Contributor

Thank you.

Note to self - before merge, I need to check the instanceof Closure. I've got a feeling I tried that originally and it caused some backwards compatibility issues. I can't recall exactly what, but I'll take a closer look before merging in.

@mvorisek

This comment was marked as resolved.

@mvorisek mvorisek marked this pull request as ready for review December 9, 2023 00:45
@@ -2047,7 +2048,7 @@ private function _ssp_limit($query, $http)
private function _get_where($query)
{
for ($i = 0; $i < count($this->_where); ++$i) {
if (is_callable($this->_where[$i])) {
if ($this->_where[$i] instanceof \Closure) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the reason is Query::where does support only \Closure, so no BC break, actually it is a bugfix, as callable looking array might be regular where

@mvorisek
Copy link
Contributor Author

@AllanJard can this PR be merged?

@AllanJard AllanJard merged commit bdb9477 into DataTables:master Dec 12, 2023
16 checks passed
@AllanJard
Copy link
Contributor

Yes, sorry - things very busy at the moment :). Thank you for this!

@mvorisek mvorisek deleted the improve_callable_phpdoc branch December 12, 2023 11:35
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.

2 participants