Deprecated function: Creation of dynamic property

Created on 22 February 2023, over 1 year ago
Updated 15 May 2023, about 1 year ago

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

๐Ÿ“Œ Task
Status

Fixed

Version

2.7

Component

Code

Created by

๐Ÿ‡ณ๐Ÿ‡ฑNetherlands Summit

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Summit
  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Adil_Siddiqui

    Patch created for above issue

  • Status changed to Postponed over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ฉIndonesia gausarts

    Thank you.

    Task for any upstream breaking changes.

    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 ๐Ÿ“Œ Deprecated function: Creation of dynamic property Fixed

  • ๐Ÿ‡ช๐Ÿ‡ธSpain tar_inet

    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.

  • ๐Ÿ‡ฎ๐Ÿ‡ฉIndonesia gausarts

    No problem at all, 100% :)

    It is only registering the property. Properties can be 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 diesn'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.

    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. Just change @var to says \BlazyFilterInterface.

    Thanks.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Anybody Porta Westfalica

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

  • Status changed to Fixed about 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ฉIndonesia gausarts
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024