Open jfrank-nih opened 1 year ago
@blairlearn to investigate if this is still an issue.
This may still be an issue.
To view deprecation notices:
phpunit.xml
and set SYMFONY_DEPRECATIONS_HELPER
(line 43) to max[total]=0
.blt tests:phpunit:run --no-interaction
. NOTE: paratest swallows the deprecation noticesThe current deprecation notices are mostly in Drupal\Tests\Listeners\DrupalListener
(so, part of Drupal), however there is one in the app_module
module's unit tests.
The remaining item, Method "IteratorAggregate::getIterator()" might add "\Traversable" as a native return type
is reported in the AppPathManagerUpdatePathDataTest::testGoodEntityNoAlias
test, but the deprecation may actually be in the called code.
Remaining self deprecation notices (5)
2x: Method "Behat\Mink\Element\ElementInterface::getText()" might add "string" as a native return type declaration in the future. Do the same in implementation "Drupal\Tests\DocumentElement" now to avoid errors or add an explicit @return annotation to suppress this message.
2x in DrupalListener::endTest from Drupal\Tests\Listeners
2x: Method "Behat\Mink\Element\ElementInterface::waitFor()" might add "mixed" as a native return type declaration in the future. Do the same in implementation "Drupal\Tests\DocumentElement" now to avoid errors or add an explicit @return annotation to suppress this message.
2x in DrupalListener::endTest from Drupal\Tests\Listeners
1x: Method "IteratorAggregate::getIterator()" might add "\Traversable" as a native return type declaration in the future. Do the same in implementation "Drupal\Core\Entity\ContentEntityBase" now to avoid errors or add an explicit @return annotation to suppress this message.
1x in AppPathManagerUpdatePathDataTest::testGoodEntityNoAlias from Drupal\Tests\app_module\Unit
Remaining direct deprecation notices (3)
1x: The "PHPUnit\TextUI\DefaultResultPrinter" class is considered internal This class is not covered by the backward compatibility promise for PHPUnit. It may change without further notice. You should not use it from "Drupal\Tests\Listeners\HtmlOutputPrinter".
1x in DrupalListener::endTest from Drupal\Tests\Listeners
1x: The "Drupal\Tests\Listeners\DrupalListener" class implements "PHPUnit\Framework\TestListener" that is deprecated.
1x in DrupalListener::endTest from Drupal\Tests\Listeners
1x: The "Drupal\Tests\Listeners\DrupalListener" class uses "PHPUnit\Framework\TestListenerDefaultImplementation" that is deprecated The `TestListener` interface is deprecated.
1x in DrupalListener::endTest from Drupal\Tests\Listeners
Other deprecation notices (3)
1x: The "PHPUnit\Framework\TestCase::addWarning()" method is considered internal This method is not covered by the backward compatibility promise for PHPUnit. It may change without further notice. You should not extend it from "Drupal\Tests\BrowserTestBase".
1x in DrupalListener::endTest from Drupal\Tests\Listeners
1x: The "PHPUnit\Framework\TestCase::addWarning()" method is considered internal This method is not covered by the backward compatibility promise for PHPUnit. It may change without further notice. You should not extend it from "Drupal\KernelTests\KernelTestBase".
1x in DrupalListener::endTest from Drupal\Tests\Listeners
1x: The "PHPUnit\Framework\TestCase::addWarning()" method is considered internal This method is not covered by the backward compatibility promise for PHPUnit. It may change without further notice. You should not extend it from "Drupal\Tests\UnitTestCase".
1x in DrupalListener::endTest from Drupal\Tests\Listeners
[Acquia\Blt\Robo\Tasks\PhpUnitTask] Exit code 1 Time 16:02
Parent Issue: #3532
The PHP 8.1 upgrade surfaced some deprecated functionality within PHP that we are using. A fair amount of these should go away with Drupal 10 and the upgrade to various packages.
Note: because of some problematic dependencies, the core Drupal tests will always throw deprecation errors. In Drupal 9 they've avoided that by ignoring specific deprecation messages, knowing that in Drupal 10 they will go away. Tests can be run with deprecation listeners turned on in
phpunit.xml
:Even with that turned on there are plenty of deprecations that make it through. For these we will either need to:
With the deprecation listeners turned on, here's what I see:
The following items were originally found, but they have since been deleted.