Problem/Motivation

I see these depreceated messages using Slick

Deprecated function: Creation of dynamic property Drupal\slick\Plugin\Filter\SlickFilter::$admin is deprecated in Drupal\slick\Plugin\Filter\SlickFilter::create() (line 43 of modules/contrib/slick/src/Plugin/Filter/SlickFilter.php).
Deprecated function: Creation of dynamic property Drupal\slick\Plugin\Filter\SlickFilter::$manager is deprecated in Drupal\slick\Plugin\Filter\SlickFilter::create() (line 44 of modules/contrib/slick/src/Plugin/Filter/SlickFilter.php).

Steps to reproduce

Install version: composer require 'drupal/slick:^2.7'

Proposed resolution

Update depreciated function

Thanks for updating, greetings Martijn

CommentFileSizeAuthor
#2 3343829-2.patch724 bytesadil_siddiqui

Comments

Summit created an issue. See original summary.

adil_siddiqui’s picture

Status: Active » Needs review
StatusFileSize
new724 bytes

Patch created for above issue

gausarts’s picture

Category: Bug report » Task
Status: Needs review » Postponed
Related issues: +#3338709: Deprecated function: Creation of dynamic property

Thank you.

Task for any upstream breaking changes.

FYI, regarding the failed test, Drupal 10 requires PHP8+. Do no select PHP7 as useless tests.

We'll need to fix it once for the entire ecosystem. Please move your patch to Blazy as mentioned here:
https://www.drupal.org/project/splide/issues/3338709#comment-14904569

pfructuoso’s picture

Patch #2 works for me.

@gausarts
BlazyFilterBaseuses $blazyAdmin as property and its type is \Drupal\blazy\Form\BlazyAdminInterface (https://git.drupalcode.org/project/blazy/-/blob/8.x-2.x/src/Plugin/Filte...) meanwhile SlickFilter uses $admin with type \Drupal\slick\Form\SlickAdminInterface.

Seen these differences I don´t think it´s an easy change to be made in Blazy without breaking something else.

Due it´s a all ecosystem change, where should I create an issue to fix this? After checking the code for a while, I think that doing it in Blazy could involve huge changes that should be discused.

gausarts’s picture

No problem at all, 100% :)

It is only registering the property. Properties can be inherited/ overriden just as classes or even services.

$blazyAdmin is already reserved by Blazy. We left it as is.
$admin is always open, generic, for any sub-modules. Blazy doesn't care nor use it. It just provides it quickly to DRY for many of its sub-modules since updating each sub-modules for the exact same change may take more time and energy. This will be provided by your patch above, only should be in Blazy.

The same patterns can be seen anywhere else:
$blazyManager for Blazy, $manager for its sub-modules, etc.

Let me know if anything else?

Please move your patch to Blazy as mentioned in the above link, #3. Just change @var to says \BlazyAdminInterface.

Thanks.

anybody’s picture

Same issue here filling up the logs. Did anyone already create that issue / patch at Blazy?

gausarts’s picture

Status: Postponed » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.