-
Notifications
You must be signed in to change notification settings - Fork 23
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
RE: Added \ReturnTypeWillChange Attribute - (#120) #141
Conversation
- Added \ReturnTypeWillChange Attribute - Added \ReturnTypeWillChange polyfill - Fixed tests
Required jworman/polyfill-php81
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are more files with unnecessary whitespace changes, but I stopped listing them.
}, | ||
"config": { | ||
"sort-packages": true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't need it here. BTW, I wonder, why it is not true by default, at least starting from composer v2 🤡
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed in #146
@@ -5,6 +5,7 @@ | |||
"homepage": "http://framework.zend.com/", | |||
"license": "BSD-3-Clause", | |||
"require": { | |||
"zf1s/polyfill-php81": "^1.25", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but could you rearrange require
s in individual package so that they are sorted alphabetically, please?
And please make sure polyfill-php81
is required only when it is really needed for a package, i.e. when any of the following are used inside the package.
But after a short research, it might be that we don't need the polyfill at all? First two features are not used anywhere, if I'm not mistaken, and ReturnTypeWillChange
stub would be only needed for php 8.0, IF it would throw an error on it. But it does not throw an error, either for that or any attribute which is not implemented, e.g. #[Gibberish]
would not throw any error even if class Gibberish
is not implemented as an attribute.
Maybe it would be needed for code analysis, running on php 8.0. Even in that case, it would be probably enough, if added to the main composer.json only. But we do not have any code analyzers running here, and if one dev would like to run it locally, why would they run it on php 8.0?
Please check if those polyfills are really needed. thank you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressing in #146
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appears dependency update not needed, all composer changes can be dropped.
so all left to do is to carry those attribute adding right?
i will remove the root namespace qualifier in the process:
* | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary whitespace change
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary whitespace changes in this file
* @throws Zend_Navigation_Exception if $pages is not | ||
* @throws Zend_Navigation_Exception if $pages is not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more whitespace changes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace
* Test currently disabled because it freezes phpunit. | ||
* | ||
* @runInSeparateProcess | ||
*/ | ||
public function testSetOptions() | ||
public function _testSetOptions() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe skipped tests can be restored now? Phpunit has been adjusted.
@@ -297,10 +297,12 @@ public function testIsValidShouldNotRequireValueToBeNestedArray() | |||
} | |||
|
|||
/** | |||
* Test currently disabled because it freezes phpunit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe skipped tests can be restored now? Phpunit has been adjusted.
Why adding merge commits to pull request? can't you rebase to flatten commits (without the merge commit)? |
Thanks @glensc! There are 2 reasons:
I'm fine with both strategies. After getting comments from @falkenhawk I think rewritting history will be necessary cause some changes are part of @jack-worman's commits. So adding too many cleanup commits will causing an extra mess. |
@partikus I think rebasing is fine, the author date and author name are still visible with |
Looks like nobody of original authors is dealing with the review notes. I might attempt to extract changes from here to separate PR for easier review and greater merge chance. |
@@ -161,6 +161,7 @@ public function __set($name, $value) | |||
* @param string $name | |||
* @return bool | |||
*/ | |||
#[\ReturnTypeWillChange] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As ZF1 doesn't use namespaces, the root namespace qualifier can be dropped
hi @glensc thanks for stepping in. We talked privately with @partikus and he said that he could continue on this PR within two weeks but I can see you are motivated enough to finalize it sooner. 👍 |
replaced with #147 |
This PR updates #120 and switches to
zf1s/polyfill-php81
.All credits goes to @jack-worman 🥇