Skip to content

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

jrfnl added 3 commits December 2, 2020 16:09
> 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 Type: 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.

3 participants