Problem/Motivation

Drupal\Tests\views\Unit\Plugin\field\FieldPluginBaseTest triggers PHP 8.5 deprecations

Steps to reproduce

Run Drupal\Tests\views\Unit\Plugin\field\FieldPluginBaseTest

Proposed resolution

Set up $this->view->row_index so deprecation is not triggered.

Remaining tasks

User interface changes

None

Introduced terminology

N/a

API changes

None

Data model changes

None

Release notes snippet

N/a

Issue fork drupal-3555882

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Downloaded https://addons.ddev.com/addons/ddev/ddev-php85

Ran ddev exec -s php85 ./vendor/bin/phpunit -c core/phpunit.xml.dist core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php

OK, but there were issues!
Tests: 62, Assertions: 169, Deprecations: 3.

Applied the MR and now only got 2

For record the 2 are

The __sleep() serialization magic method has been deprecated. Implement __serialize() instead (or in addition, if support for old PHP versions is necessary)
The __wakeup() serialization magic method has been deprecated. Implement __unserialize() instead (or in addition, if support for old PHP versions is necessary)

godotislate’s picture

I wonder if that ddev 8.5 version is a little old, because the __sleep and __wakeup deprecations were reverted per #3548971-5: Replace PHP soft-deprecated __sleep()/__wakeup() with __serialize()/__unserialize().

alexpott’s picture

#5 is correct - that's an old PHP 8.5 version.

  • catch committed 91deef33 on 11.x
    Issue #3555882 by alexpott, smustgrave: \Drupal\Tests\views\Unit\Plugin\...
catch’s picture

Version: 11.x-dev » 11.3.x-dev
Status: Reviewed & tested by the community » Fixed

@smustgrave it should theoretically be possible to check a branch run on PHP 8.5 against HEAD vs one from the MR here and compare the two, to avoid having to set up PHP 8.5 locally, this might have saved some time although I'm not sure how discernable the PHP 8.5 test failures are with the amount of deprecations messages we have.

Committed/pushed to 11.x and cherry-picked to 11.3.x, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • catch committed 56087a18 on 11.3.x
    Issue #3555882 by alexpott, smustgrave: \Drupal\Tests\views\Unit\Plugin\...

Status: Fixed » Closed (fixed)

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