- Issue created by @mondrake
- ๐ฎ๐ณIndia samit.310@gmail.com
samit.310@gmail.com โ made their first commit to this issueโs fork.
- Assigned to Binoli Lalani
- @binoli-lalani opened merge request.
- Status changed to Needs work
9 months ago 11:35am 15 April 2024 - First commit to issue fork.
- Status changed to Needs review
9 months ago 3:00pm 15 April 2024 - ๐ฌ๐งUnited Kingdom longwave UK
Maybe we can just ignore the fact that a PHP warning is emitted and continue the test as if nothing is wrong.
- ๐ณ๐ฟNew Zealand quietone
The deprecation message states that it will throw an error in Drupal 11 so I think we should do that. What about something like this? This would need a separate 10.3 MR.
- ๐ฌ๐งUnited Kingdom longwave UK
@quietone removing the deprecation and fixing the warning should be two different issues, I think?
- Status changed to Needs work
9 months ago 11:26am 27 April 2024 - ๐ฌ๐งUnited Kingdom longwave UK
I moved the deprecation removal to ๐ Remove deprecated code from MarkupInterfaceComparator Needs review
- Status changed to Needs review
9 months ago 11:28am 27 April 2024 - Status changed to RTBC
9 months ago 12:05pm 27 April 2024 - ๐ฎ๐ณIndia pravesh_poonia
"Updating PHPUnit 10 compatibility in MarkupInterfaceComparatorTest by replacing catch of PHPUnit\Framework\Error\Warning with appropriate replacements. Refactoring of runtime code is needed to eliminate trigger_error() calls as part of this process."
Considering the deprecation message indicating an error in Drupal 11, it's prudent to address this now. How about implementing the suggested change in a separate MR for version 10.3? This approach ensures compatibility with future Drupal versions while maintaining stability for the current release
- ๐ฌ๐งUnited Kingdom longwave UK
This change can be applied to both 11.x and 10.3.x.
- ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
Committed and pushed b00b1682a8 to 11.x and d8ceffabcf to 10.3.x and 961d2326dc to 10.2.x. Thanks!
Backported to 10.2.x to keep tests aligned.
-
alexpott โ
committed 961d2326 on 10.2.x
Issue #3440044 by longwave, quietone, Binoli Lalani, mondrake: Replace...
-
alexpott โ
committed 961d2326 on 10.2.x
-
alexpott โ
committed d8ceffab on 10.3.x
Issue #3440044 by longwave, quietone, Binoli Lalani, mondrake: Replace...
-
alexpott โ
committed d8ceffab on 10.3.x
- Status changed to Fixed
9 months ago 11:48am 28 April 2024 -
alexpott โ
committed b00b1682 on 11.x
Issue #3440044 by longwave, quietone, Binoli Lalani, mondrake: Replace...
-
alexpott โ
committed b00b1682 on 11.x
- Status changed to Needs work
9 months ago 10:32am 30 April 2024 - ๐ฎ๐นItaly mondrake ๐ฎ๐น
This is not good enough for PHPUnit 10, alas
PHPUnit 10.5.19 by Sebastian Bergmann and contributors. Runtime: PHP 8.3.6 Configuration: /builds/project/drupal/core/phpunit.xml.dist ...........................W.......... 38 / 38 (100%) Time: 00:40.928, Memory: 8.00 MB 1 test triggered 1 PHP warning: 1) /builds/project/drupal/core/tests/Drupal/TestTools/Comparator/MarkupInterfaceComparator.php:34 Array to string conversion Triggered by: * Drupal\KernelTests\Core\Test\Comparator\MarkupInterfaceComparatorTest::testAssertEquals#FormattableMarkup vs array /builds/project/drupal/core/tests/Drupal/KernelTests/Core/Test/Comparator/MarkupInterfaceComparatorTest.php:194 OK, but there were issues! Tests: 38, Assertions: 45, Warnings: 1.
A PHP 'array to string' conversion attempt triggers a PHP warning, that is converted to an exception in PHPUnit 9, and it is caught so the test passes. But in PHPUnit 10 the warning triggered goes straight to PHPUnit's core error handler, that dispatches a warning event. Since in PHPUnit 10 we set warnings to cause test failures, we get the above.
We probably need to intercept in runtime code the type mismatch and throw an exception there.
- Assigned to mondrake
- ๐ฎ๐นItaly mondrake ๐ฎ๐น
mondrake โ changed the visibility of the branch 3440044-replace-catch-of to hidden.
- ๐ฎ๐นItaly mondrake ๐ฎ๐น
mondrake โ changed the visibility of the branch 11.x to hidden.
- @mondrake opened merge request.
- Issue was unassigned.
- Status changed to Needs review
9 months ago 11:24am 30 April 2024 - Status changed to RTBC
9 months ago 2:02pm 30 April 2024 - Status changed to Fixed
9 months ago 2:23pm 30 April 2024 - ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
Committed the follow-up to 11.x and 10.3.x as 10.2.x is frozen... so leaving alone.
Committed and pushed 66645e45a9 to 11.x and 18e1178d9a to 10.3.x. Thanks!
-
alexpott โ
committed 18e1178d on 10.3.x
Issue #3440044 follow-up by mondrake: Replace catch of PHPUnit\Framework...
-
alexpott โ
committed 18e1178d on 10.3.x
-
alexpott โ
committed 66645e45 on 11.x
Issue #3440044 follow-up by mondrake: Replace catch of PHPUnit\Framework...
-
alexpott โ
committed 66645e45 on 11.x
-
alexpott โ
committed b00b1682 on 11.0.x
Issue #3440044 by longwave, quietone, Binoli Lalani, mondrake: Replace...
-
alexpott โ
committed b00b1682 on 11.0.x