- Issue created by @kim.pepper
- Status changed to Postponed
about 1 year ago 11:16pm 10 October 2023 - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
- Status changed to Needs work
about 1 year ago 10:43pm 23 October 2023 - Status changed to Needs review
about 1 year ago 7:31am 24 October 2023 - Merge request !5104[#3393099] Move classes from TypedData to Validation namespace β (Closed) created by kim.pepper
- last update
about 1 year ago 30,434 pass - Status changed to RTBC
about 1 year ago 4:11pm 24 October 2023 - πΊπΈUnited States smustgrave
Marking as move seems fine.
Only concern is will this immediately break contrib modules? See some existing tests and validations had to be updated. But not sure how to backwards check a move.
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
We are subclassing the exact same code in a new namespace, so existing code should work fine, just trigger the deprecation warning. We could add a deprecation test, but we don't usually do that for constructors.
- last update
about 1 year ago 30,438 pass - last update
about 1 year ago 30,456 pass - last update
about 1 year ago 30,472 pass - last update
about 1 year ago 30,483 pass - last update
about 1 year ago 30,485 pass - last update
about 1 year ago 30,486 pass - Status changed to Needs work
about 1 year ago 1:30pm 7 November 2023 - π¬π§United Kingdom alexpott πͺπΊπ
Added some questions to the MR
- Status changed to Needs review
about 1 year ago 8:39pm 7 November 2023 - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Addressed feedback.
- Status changed to RTBC
about 1 year ago 6:45pm 8 November 2023 - πΊπΈUnited States smustgrave
appears all feedback has been addressed.
- last update
about 1 year ago 30,511 pass - Status changed to Needs work
about 1 year ago 9:59pm 8 November 2023 - π¬π§United Kingdom alexpott πͺπΊπ
I asked anothe question on the MR
- Status changed to Needs review
about 1 year ago 9:15pm 13 November 2023 - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
All threads resolved.
- Status changed to RTBC
about 1 year ago 11:41pm 14 November 2023 - πΊπΈUnited States smustgrave
Seems all threads have been resolved again :)
- last update
about 1 year ago 30,545 pass, 2 fail - Status changed to Needs work
12 months ago 2:33pm 16 November 2023 - πΊπΈUnited States xjm
We have an opportunity while doing this to add parameter and return typehints to everything that's missing them. (Normally, changes to moved code might be considered out of scope, but ensuring new API additions are typehinted properly is a higher priority and does not significantly impact the scope.) Once that's done, we can also mention it in the CR.
Thanks!
- Status changed to Needs review
12 months ago 9:44pm 16 November 2023 - πΊπΈUnited States xjm
Some helpful test failures, mostly for strings vs. stringables.
I belatedly realized there might be some limitations in method typehinting based on the interface, but at least the constructors and member properties should be fair game.
- Status changed to Needs work
12 months ago 11:27pm 16 November 2023 - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Not sure what is causing the AdminUI Javascript test fails. π
- Status changed to Needs review
12 months ago 2:44am 18 November 2023 - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
I missed the string type errors in the kernel tests earlier. Finally found them!
I've added a deprecation trigger for
\Drupal\Core\Validation\ConstraintViolationBuilder::atPath($path)
because there were a couple of places passingint
and the interface specifiesstring
. Added this to the change record.We are passing
string
,\Stringable
, andint
to\Drupal\Core\Validation\ConstraintViolationBuilder::setParameter(string $key, mixed $value)
. Not sure whether we should try and reduce that down to juststring
and\Stringable
? - Status changed to RTBC
12 months ago 2:56pm 18 November 2023 - last update
12 months ago 30,602 pass - last update
12 months ago 30,598 pass, 2 fail - last update
12 months ago 30,605 pass - last update
12 months ago 30,668 pass - last update
12 months ago 30,675 pass - last update
12 months ago 30,679 pass - last update
12 months ago 30,686 pass - last update
12 months ago 30,688 pass - last update
12 months ago 30,688 pass - last update
11 months ago 30,696 pass 9:02 7:51 Running- last update
11 months ago 30,702 pass - last update
11 months ago 30,712 pass - last update
11 months ago 30,764 pass - last update
11 months ago 30,766 pass - last update
11 months ago 25,887 pass, 1,841 fail - last update
11 months ago 25,910 pass, 1,814 fail - last update
11 months ago 25,959 pass, 1,809 fail - last update
11 months ago 25,946 pass, 1,790 fail - last update
11 months ago 25,898 pass, 1,836 fail - last update
11 months ago 25,889 pass, 1,830 fail - last update
11 months ago 25,927 pass, 1,821 fail - last update
11 months ago 25,935 pass, 1,826 fail - last update
11 months ago Running - last update
10 months ago 25,983 pass, 1,844 fail - last update
10 months ago 26,011 pass, 1,831 fail - Status changed to Needs work
9 months ago 11:35am 4 February 2024 - Status changed to Needs review
9 months ago 9:47pm 12 February 2024 - Status changed to RTBC
9 months ago 3:09pm 13 February 2024 - πΊπΈUnited States smustgrave
Reviewed the change and appears all feedback has been addressed.
Like we added typehints for everything too.
Deprecation appears correct, CR reads well.
LGTM
- Status changed to Needs work
9 months ago 4:24pm 27 February 2024 - Status changed to RTBC
9 months ago 10:35pm 27 February 2024 - π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Rebased on 11.x
- Status changed to Fixed
9 months ago 8:23am 29 February 2024 - π¬π§United Kingdom alexpott πͺπΊπ
Committed eacd1fa and pushed to 11.x. Thanks!
Committed 36f2784 and pushed to 10.3.x. Thanks!diff --git a/core/lib/Drupal/Core/Validation/ExecutionContext.php b/core/lib/Drupal/Core/Validation/ExecutionContext.php index ad732ea9f9..5fdf1e6e52 100644 --- a/core/lib/Drupal/Core/Validation/ExecutionContext.php +++ b/core/lib/Drupal/Core/Validation/ExecutionContext.php @@ -110,8 +110,12 @@ public function setConstraint(Constraint $constraint): void { /** * {@inheritdoc} + * + * phpcs:ignore Drupal.Commenting.FunctionComment.VoidReturn + * + * @return void */ - public function addViolation(string $message, array $params = []): void { + public function addViolation(string $message, array $params = []) { $this->violations->add(new ConstraintViolation($this->translator->trans($message, $params, $this->translationDomain), $message, $params, $this->root, $this->propertyPath, $this->value, NULL, NULL, $this->constraint)); }
Added the above code back to the 10.3.x backport so we didn't change return types.
-
alexpott β
committed 36f2784c on 10.3.x
Issue #3393099 by kim.pepper, smustgrave, xjm, alexpott, longwave: Move...
-
alexpott β
committed 36f2784c on 10.3.x
-
alexpott β
committed eacd1fa3 on 11.x
Issue #3393099 by kim.pepper, smustgrave, xjm, alexpott, longwave: Move...
-
alexpott β
committed eacd1fa3 on 11.x
Automatically closed - issue fixed for 2 weeks with no activity.