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
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
Comment #3
alexpottComment #4
smustgrave commentedDownloaded 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)
Comment #5
godotislateI wonder if that ddev 8.5 version is a little old, because the
__sleepand__wakeupdeprecations were reverted per #3548971-5: Replace PHP soft-deprecated __sleep()/__wakeup() with __serialize()/__unserialize().Comment #6
alexpott#5 is correct - that's an old PHP 8.5 version.
Comment #8
catch@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!