- Issue created by @AaronBauman
- Status changed to Needs review
over 1 year ago 5:31pm 16 November 2023 - Status changed to Needs work
over 1 year ago 7:19pm 16 November 2023 - ๐บ๐ธUnited States smustgrave
Even though this is a test think it some minor test coverage would be good.
Also new function should be typehinted
Thanks!
- Status changed to Needs review
over 1 year ago 7:41pm 16 November 2023 - ๐บ๐ธUnited States AaronBauman Philadelphia
Cool, thanks for the feedback.
Added the typehint and copied the existing \Drupal\Tests\Core\UrlTest::testToString into a new test, \Drupal\Tests\Core\UrlTest::testMagicToString
- Status changed to Needs work
over 1 year ago 12:02am 17 November 2023 - ๐บ๐ธUnited States smustgrave
Short and sweet
Ran the test-only feature and got
There was 1 error: 1) Drupal\Tests\Core\UrlTest::testMagicToString Error: Object of class Drupal\Core\Url could not be converted to string /builds/issue/drupal-3402199/core/tests/Drupal/Tests/Core/UrlTest.php:403 /builds/issue/drupal-3402199/vendor/phpunit/phpunit/src/Framework/TestResult.php:728 /builds/issue/drupal-3402199/vendor/phpunit/phpunit/src/Framework/TestSuite.php:684 /builds/issue/drupal-3402199/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:651 /builds/issue/drupal-3402199/vendor/phpunit/phpunit/src/TextUI/Command.php:144 /builds/issue/drupal-3402199/vendor/phpunit/phpunit/src/TextUI/Command.php:97 ERRORS! Tests: 107, Assertions: 224, Errors: 1.
Typehint was added, think this should be good.
Only thing left would be a simple change record announcing the new function. Probably fine to self RTBC after that.
- Assigned to sourabhjain
- Status changed to Needs review
over 1 year ago 10:35am 17 November 2023 - Status changed to RTBC
over 1 year ago 1:25pm 17 November 2023 - ๐บ๐ธUnited States smustgrave
I should have tagged for novice for the CR but thatโs my fault.
- Issue was unassigned.
- ๐บ๐ธUnited States AaronBauman Philadelphia
Thanks for the quick turnaround!
- ๐บ๐ธUnited States xjm
Hmm, conflicted about this. Tagging for FM review.
- Status changed to Needs work
over 1 year ago 8:00pm 17 November 2023 - ๐บ๐ธUnited States AaronBauman Philadelphia
Update the test method signature in MR.
Not sure about the
@inheritdoc
suggestion though. I don't think there's anything to inherit from here?Also adding previous discussion about creating this method #2350507: \Drupal\Core\Url has no __toString() magic method โ .
- ๐ท๐บRussia Chi
Also this workaround needs to be removed.
https://git.drupalcode.org/project/drupal/-/blob/11.0.0-beta1/core/lib/D...