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

PHP 8.0: NewClasses: add yet more new classes #1246

Merged
merged 3 commits into from
Dec 4, 2020

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Dec 2, 2020

PHP 8.0: NewClasses: add new ReflectionUnionType class

Ref: https://wiki.php.net/rfc/union_types_v2#reflection

PHP 8.0 | OCI8: account for renamed classes

The OCI-Lob class is now called OCILob, and the OCI-Collection class is now
called OCICollection for name compliance enforced by PHP 8 arginfo
type annotation tooling.

This commit:

  • Adds the new classes to the NewClasses sniff.
  • Updated the alternatives for various deprecated/removed functions in the RemovedFunctions sniff.

Based on the commit, it looks like the old classnames are removed without deprecation. Making a note of this in the RemovedClasses sniff, but not enabling the check as the places where we are searching for the name, do not allow for the old name in the first place - would have been a parse error. Also see: https://bugs.php.net/bug.php?id=79625

Refs:

PHP 8.0: NewClasses: add new UnhandledMatchError class from the Match RFC

Ref: https://wiki.php.net/rfc/match_expression_v2

> The OCI-Lob class is now called OCILob, and the OCI-Collection class is now
> called OCICollection for name compliance enforced by PHP 8 arginfo
> type annotation tooling.

This commit:
* Adds the new classes to the `NewClasses` sniff.
* Updated the `alternative`s for various deprecated/removed functions in the `RemovedFunctions` sniff.

Based on the commit, it looks like the _old_ classnames are removed without deprecation. Making a note of this in the `RemovedClasses` sniff, but not enabling the check as the places where we are searching for the name, do not allow for the old name in the first place - would have been a parse error. Also see: https://bugs.php.net/bug.php?id=79625

Refs:
* https://github.com/php/php-src/blob/0a84fba0deb1c1b75770a436c4236dc56e6d0463/UPGRADING#L392-L394
* php/php-src@ff66e49
@jrfnl jrfnl added enhancement PR: quick merge PR only contains relatively simple changes PR: ready for review labels Dec 2, 2020
@jrfnl jrfnl added this to the 10.0.0 milestone Dec 2, 2020
@jrfnl jrfnl requested a review from wimg December 2, 2020 15:41
@wimg wimg merged commit cb0606c into develop Dec 4, 2020
@wimg wimg deleted the php-8.0/more-new-removed-classes branch December 4, 2020 17:50
@jrfnl jrfnl removed PR: quick merge PR only contains relatively simple changes PR: ready for review labels Apr 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants