- π«π·France andypost
As \Drupal\views\ViewExecutable::_preQuery() assigning
position
property for every views' plugin I moved the definition toPluginBase
as the property was added to\Drupal\views\Plugin\views\argument\ArgumentPluginBase::$position
in π Fix 'Access to an undefined property' PHPStan L0 errors - public properties FixedPatch should fix a lot of tests
- π«π·France andypost
Checking remains, the
$render_tokens
which is used only by\Drupal\views\Plugin\views\field\FieldPluginBase
so renamed and looking for reviews2x: Creation of dynamic property Drupal\views\Plugin\views\style\DefaultStyle::$render_tokens is deprecated 2x in RevisionRelationshipsTest::testBlockContentRevisionRelationship from Drupal\Tests\block_content\Kernel\Views
- π«π·France andypost
And a bit more
2x: Creation of dynamic property Drupal\views\Plugin\views\argument\StringArgument::$validated_title is deprecated 1x in ArgumentValidatorTermNameTest::testArgumentValidatorTermName from Drupal\Tests\taxonomy\Kernel\Views 1x in ArgumentValidatorTermNameTest::testArgumentValidatorTermNameAccess from Drupal\Tests\taxonomy\Kernel\Views 1x: Creation of dynamic property Drupal\taxonomy\Plugin\views\argument\IndexTid::$validated_title is deprecated 1x in ArgumentValidatorTermTest::testArgumentValidatorTerm from Drupal\Tests\taxonomy\Kernel\Views
and
2x: Creation of dynamic property Drupal\user\Plugin\views\filter\Permissions::$tableAliases is deprecated 2x in HandlerFilterPermissionTest::testFilterPermission from Drupal\Tests\user\Kernel\Views 1) Drupal\Tests\views\Functional\Plugin\ContextualFiltersStringTest::testUserRoleContextualFilter Exception: Deprecated function: Creation of dynamic property Drupal\user\Plugin\views\argument\RolesRid::$tableAliases is deprecated Drupal\views\ManyToOneHelper->ensureMyTable()() (Line: 214) 1) Drupal\Tests\views\Functional\Plugin\ExposedFormCheckboxesTest::testExposedIsAllOfFilter Exception: Deprecated function: Creation of dynamic property Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid::$tableAliases is deprecated Drupal\views\ManyToOneHelper->ensureMyTable()() (Line: 214)
- π«π·France andypost
Attempt to fix, looks better to split every property into own issue
The last submitted patch, 9: 3299858-9.patch, failed testing. View results β
- Status changed to Needs work
almost 2 years ago 8:56am 24 February 2023 - π³π±Netherlands Lendude Amsterdam
@andypost asked me to chime in with an opinion, so here it is.
+++ b/core/modules/views/src/Plugin/views/PluginBase.php @@ -107,6 +106,16 @@ abstract class PluginBase extends ComponentPluginBase implements ContainerFactor + * The handler position. + * + * @see \Drupal\views\ViewExecutable::_preQuery() + * @see \Drupal\views\Plugin\views\argument\ArgumentPluginBase::getValue() + * @see \Drupal\views\Plugin\views\display\DisplayPluginBase::renderArea() + * @see template_preprocess_views_view_summary()
These @see everywhere are very helpful now, but will at some point get hopelessly outdated since we will never ever remember to update them when the code being referred to changes for whatever reason. So do we really want these? No idea how they were done in other issues like this one.
I'm fine with renaming the variables to camelcase, but this could be considered a BC break. This being Views, there is a high possibility that somebody somewhere is making use of these variables under their current name in a way we don't expect.
Will a change record suffice or should we do deprecation errors (which might be tricky)? We need an answer on that.Setting to needs work to get a documented decision on these questions.
- π«π·France andypost
There's some usage in contrib
- http://codcontrib.hank.vps-private.net/search?text=validated_title
- http://codcontrib.hank.vps-private.net/search?text=render_tokensso I reverted it and tuned docblocks, let's see if sniffers will allow it (I gonna explore
DeprecatedServicePropertyTrait
meantime)That's looks minimal patch
let's do rename via π [META] Rename Views properties to core standards Closed: duplicate
- Status changed to Needs review
almost 2 years ago 11:05pm 26 February 2023 - π«π·France andypost
Specific follow-ups are
-
validated_title
existing π In ArgumentPluginBase Rename Views properties to core standards Postponed
-render_tokens
filed π In StylePluginBase Rename Views properties to core standards Needs work - Status changed to RTBC
almost 2 years ago 7:21am 27 February 2023 - π³π±Netherlands Lendude Amsterdam
Nice and minimal and the follow ups look good to me.
- Status changed to Fixed
almost 2 years ago 2:54pm 27 February 2023 Automatically closed - issue fixed for 2 weeks with no activity.