Problem/Motivation

getObjectAttribute() is deprecated and will be removed in PHPUnit 9.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mondrake created an issue. See original summary.

mondrake’s picture

Status: Active » Needs review
FileSize
3.17 KB

Heavy-lifting Reflection.

mondrake’s picture

Status: Needs review » Postponed
Issue tags: +PHPUnit 9

Hm. Apparently this method is internally called by PHPUnit itself, so it's better wait for the other issues to be solved first.

mondrake’s picture

Title: Replace usage of getObjectAttribute() that is deprecated » [PP-1] Replace usage of getObjectAttribute() that is deprecated
alexpott’s picture

Title: [PP-1] Replace usage of getObjectAttribute() that is deprecated » Replace usage of getObjectAttribute() that is deprecated
Status: Postponed » Needs work

The blocker is in.

mondrake’s picture

Assigned: Unassigned » mondrake

On it.

mondrake’s picture

Assigned: mondrake » Unassigned
Status: Needs work » Needs review
FileSize
8.27 KB
10.79 KB

Rerolled, and renaming PHPUnitWarnings8 to PhpUnitWarningsCompatibilityTrait according to #3127141-9: Use PHPUnit 9 for PHP 7.4+, while keeping support for PHPUnit 8.4 in PHP 7.3 to be prepared for the PHPUnit9 deprecation warnings silencers.

longwave’s picture

As the trait is now empty should we remove it from all classes and then add it back to only those that need it in the other issue?

Or even, remove the old trait entirely in this issue and start with a new trait in the other one?

mondrake’s picture

I think we should try to do the rename here... #3127674: Update dependencies for Drupal 9.0 needs to add another PHPUnit8 deprecation just freshly introduced by 8.5.3... it seems to me silly to remove here just to readd there with no time in between.

alexpott’s picture

Status: Needs review » Needs work

I think this issue should empty out the array and add the empty comment. I think the issue the adds back stuff for making PHPUnit 9 work or updates PHPUnit 8 should do the name change.

mondrake’s picture

Status: Needs work » Needs review
FileSize
2.89 KB

#10 makes sense.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Reflection is the only thing that makes sense for each of these changes.

alexpott’s picture

Version: 9.1.x-dev » 9.0.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed b739bebc39 to 9.1.x and 0eae85a6d9 to 9.0.x. Thanks!

  • alexpott committed b739beb on 9.1.x
    Issue #3126971 by mondrake, alexpott, longwave: Replace usage of...

  • alexpott committed 0eae85a on 9.0.x
    Issue #3126971 by mondrake, alexpott, longwave: Replace usage of...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.