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

RE: Added \ReturnTypeWillChange Attribute - (#120) #141

Closed
wants to merge 6 commits into from

Conversation

partikus
Copy link
Contributor

@partikus partikus commented Oct 14, 2022

This PR updates #120 and switches to zf1s/polyfill-php81.

All credits goes to @jack-worman 🥇

Copy link
Member

@falkenhawk falkenhawk left a 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.

Comment on lines +214 to +216
},
"config": {
"sort-packages": true
Copy link
Member

@falkenhawk falkenhawk Oct 14, 2022

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 🤡

Copy link
Contributor

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

Choose a reason for hiding this comment

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

but could you rearrange requires 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

Copy link
Contributor

Choose a reason for hiding this comment

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

Addressing in #146

Copy link
Contributor

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:

*
*
Copy link
Member

Choose a reason for hiding this comment

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

unnecessary whitespace change

Comment on lines -99 to 100

/**
Copy link
Member

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

Choose a reason for hiding this comment

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

more whitespace changes


Copy link
Member

Choose a reason for hiding this comment

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

whitespace

Comment on lines +75 to +79
* Test currently disabled because it freezes phpunit.
*
* @runInSeparateProcess
*/
public function testSetOptions()
public function _testSetOptions()
Copy link
Member

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

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.

@glensc
Copy link
Contributor

glensc commented Oct 17, 2022

Why adding merge commits to pull request? can't you rebase to flatten commits (without the merge commit)?

@partikus
Copy link
Contributor Author

Thanks @glensc! There are 2 reasons:

  • did not want to rewrite @jack-worman's commits (well-known issue)
  • there will be more changes soon

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.

@glensc
Copy link
Contributor

glensc commented Oct 17, 2022

@partikus I think rebasing is fine, the author date and author name are still visible with git show, also github somewhat shows them out as well. also I've used Co-authored-by: git trailer when I actually modified original commits to indicate multiple authors. it's in github docs as well:

@glensc
Copy link
Contributor

glensc commented Nov 18, 2022

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]
Copy link
Contributor

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

@glensc glensc mentioned this pull request Nov 18, 2022
3 tasks
@falkenhawk
Copy link
Member

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.

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. 👍

@falkenhawk
Copy link
Member

replaced with #147

@falkenhawk falkenhawk closed this Nov 23, 2022
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