Closed mikemadison13 closed 2 years ago
Some specific issues I'm running into (and my PR will address):
phpunit is incompatible with PHP 8.1.x until we jump up into the 9.x range. this breaks phpunit tests in the project because of the deprecation and removal of assertArraySubset. See https://github.com/sebastianbergmann/phpunit/issues/3494. This method was spun out into a separate plugin (see https://github.com/rdohms/phpunit-arraysubset-asserts). Without adding / swapping this out, it fatal errs:
1) Drupal\Tests\Driver\Drupal7FieldHandlerTest::testFieldHandlers with data set #0 ('DefaultHandler', stdClass Object (...), 'node', array('field_text'), array(array(array('Text'))))
Error: Call to undefined method Drupal\Tests\Driver\Drupal7FieldHandlerTest::assertArraySubset()
I also want to call out that some fundamental shifts occurred in PHPUnit due to PHP 8.x and I'm not sure it will be possible to support anything below PHP 7.1 while running PHPUnit 9. Other projects I've worked on have had to branch around this to have a new version that is php 8.1.x compatible.
The mockery plugin is throwing a significant number of deprecation warnings. I'm unclear on exactly what mockery is doing on this project, but I notice it's pinned to a specific version. Updating doesn't seem to resolve the deprecation warnings, so I guess we should leave it?
jakub-onderka/php-parallel-lint is deprecated and composer/packagist suggested replacing with php-parallel-lint/php-parallel-lint. this appears to be a drop-in.
phpspec/phpspec seems to only be compatible with php 8.1.x in the dev-main branch. without updating this, it errs out during composer test with:
Fatal error: During inheritance of ArrayAccess: Uncaught PhpSpec\Exception\Example\ErrorException: 8192: Return type of PhpSpec\Wrapper\Subject::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/mike.madison/git/acquia/DrupalDriver/vendor/phpspec/phpspec/src/PhpSpec/Wrapper/Subject.php line 141 in /Users/mike.madison/git/acquia/DrupalDriver/vendor/phpspec/phpspec/src/PhpSpec/Runner/Maintainer/ErrorMaintainer.php:119
the travis build is only testing php 7.x and there are no 8.x or 8.1.x tests. i've added those.
I'm currently working on testing packages with PHP 8.1 and Drupal Core 10.x but this project is blocking the updates (even as drupalextension allows for PHP 8.1 in dev-master, it still requires this plugin which blocks 10x).