- πΊπΈUnited States smustgrave
Reviewing #37 it appears to be adding the typehint already
(array $values) {
- Status changed to RTBC
about 1 year ago 12:10pm 15 December 2023 - π¬π§United Kingdom scott_euser
Agreed, typehint is there, and what I can see in contrib modules like https://git.drupalcode.org/project/ckeditor5_embedded_content/-/blob/1.0... they are also passing arrays. Testing this patch and the contrib module also continues to work fine + PhpStorm stops complaining about the value as an array not matching the string hint. I believe this can be RTBC.
- last update
about 1 year ago 29,722 pass - Status changed to Needs work
about 1 year ago 4:02pm 15 December 2023 - π¬π§United Kingdom alexpott πͺπΊπ
-
+++ b/core/modules/editor/src/Ajax/EditorDialogSave.php @@ -15,17 +15,20 @@ class EditorDialogSave implements CommandInterface { protected $values;
Let's add a parameter typehint while we're at it.
-
+++ b/core/modules/editor/src/Ajax/EditorDialogSave.php @@ -15,17 +15,20 @@ class EditorDialogSave implements CommandInterface { - public function __construct($values) { + public function __construct(array $values) { + if (!is_array($values)) { + @trigger_error('Calling \Drupal\editor\Ajax\EditorDialogSave::__construct with a non-array $values parameter is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0.', E_USER_DEPRECATED); + }
If we have the typehint then the deprecation is pointless because it will never occur.
I think in this instance adding the typehint is okay given the earlier comment.
-
- Merge request !5873Change string to array typehint for EditorDialogSave - #3098201 β (Open) created by scott_euser
- Status changed to Needs review
12 months ago 11:34am 19 December 2023 - π¬π§United Kingdom scott_euser
Updated as per feedback in #45. Hiding patches in favour of merge request.
- Status changed to RTBC
12 months ago 2:52pm 19 December 2023 - πΊπΈUnited States smustgrave
Feedback appears to have been addressed.
Updated the issue summary slightly to use standard template.
- Status changed to Fixed
11 months ago 2:50pm 11 January 2024 -
longwave β
committed d2d6d0c1 on 11.x
Issue #3098201 by Ratan Priya, guilhermevp, scott_euser, smustgrave,...
-
longwave β
committed d2d6d0c1 on 11.x
Automatically closed - issue fixed for 2 weeks with no activity.