Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update drupal/core-utility to allow core 10.x #247

Closed
mikemadison13 opened this issue May 3, 2022 · 1 comment
Closed

Update drupal/core-utility to allow core 10.x #247

mikemadison13 opened this issue May 3, 2022 · 1 comment

Comments

@mikemadison13
Copy link

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).

@mikemadison13
Copy link
Author

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 sebastianbergmann/phpunit#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.

mikemadison13 pushed a commit to mikemadison13/DrupalDriver that referenced this issue May 3, 2022
jhedstrom added a commit that referenced this issue May 6, 2022
Fixes #247 to support PHP 8.1.x and Drupal 10.x.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant