- Assigned to spokje
- Status changed to Needs work
almost 2 years ago 7:29pm 21 January 2023 - @spokje opened merge request.
- 🇮🇹Italy mondrake 🇮🇹
The @covers in the [driver]DriverLegacyTest classes
/** * @covers Drupal\Core\Database\Driver\pgsql\Install\Tasks */
should just be removed IMHO - they trigger deprecations at the class autoloading time that phpunit-bridge cannot capture, and in any case those are just stub classes, there's no purpose in
@cover
ing them. Doing that you can leave the stubbed classes alone. - 🇮🇹Italy mondrake 🇮🇹
I can already see people complaining if we remove the docblock. Maybe change to
/** * Tests deprecation of Drupal\Core\Database\Driver\pgsql\Install\Tasks */
- 🇳🇱Netherlands spokje
Thanks @mondrake, I was trying to find out what triggered the (newly found) deprecations.
Might have eventually ended up with the@covers
triggering them, but you were way ahead of me :)Did however arrived at not-deleting-the-docblock-completely around the same time as you.
- 🇮🇹Italy mondrake 🇮🇹
For the database specific schema test issues, I think it should suffice adding the abstract class Drupal\Core\Database\Schema to the @covers of the abstract class DriverSpecificSchemaTestBase, like
/** * Tests various schema changes' effect on the table's primary key. * * @param array $initial_primary_key * The initial primary key of the test table. * @param array $renamed_primary_key * The primary key of the test table after renaming the test field. * * @dataProvider providerTestSchemaCreateTablePrimaryKey * * @covers \Drupal\Core\Database\Schema::addField * @covers \Drupal\Core\Database\Schema::changeField * @covers \Drupal\Core\Database\Schema::dropField * @covers \Drupal\Core\Database\Schema::findPrimaryKeyColumns */
and only in case of the test method being overridden at the specific database concrete test class, then specify a @covers for the driver's schema class.
No idea about why the listener test itself throw a deprecation, tho...
- Issue was unassigned.
- Status changed to Needs review
almost 2 years ago 8:18pm 22 January 2023 - Status changed to RTBC
almost 2 years ago 8:35pm 22 January 2023 - Status changed to Needs work
almost 2 years ago 4:48am 23 January 2023 - 🇺🇸United States xjm
This mostly looks good to me and (unlike 📌 Add phpstan/phpstan-phpunit as a dev dependency Fixed ) is mostly only fixing fails that can be evaluated within the context of the diff.
I reviewed the MR and left a few questions, a nitpick, and a request for at least an inline comment if not tests for the bugfix.
Tagging "Needs followup" for the place where the test method names are a lie.
- 🇮🇹Italy mondrake 🇮🇹
Filed 🐛 Remove DrupalStandardsListenerTrait - it's broken, does not prevent errors, blocks better tooling Fixed for an alternative approach.
- Status changed to Closed: won't fix
over 1 year ago 3:04pm 28 March 2023 - 🇬🇧United Kingdom alexpott 🇪🇺🌍
Over in 🐛 Remove DrupalStandardsListenerTrait - it's broken, does not prevent errors, blocks better tooling Fixed we decided to not fix this but remove it. So now onto 📌 Add phpstan/phpstan-phpunit as a dev dependency Fixed as the better fix.