Remove deprecated code from the entity system

Created on 22 April 2024, about 1 month ago
Updated 9 May 2024, 24 days ago

Problem/Motivation

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

๐Ÿ“Œ Task
Status

Fixed

Version

11.0 ๐Ÿ”ฅ

Component
Entityย  โ†’

Last updated 1 day ago

  • Maintained by
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom @catch
  • ๐Ÿ‡จ๐Ÿ‡ญSwitzerland @Berdir
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany @hchonov
Created by

๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom catch

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

Merge Requests

Comments & Activities

  • Issue created by @catch
  • Merge request !7657remove deprecated code in the entity system. โ†’ (Closed) created by catch
  • Pipeline finished with Failed
    about 1 month ago
    Total: 960s
    #153765
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Binoli Lalani Gujarat

    Binoli Lalani โ†’ made their first commit to this issueโ€™s fork.

  • Pipeline finished with Failed
    about 1 month ago
    Total: 961s
    #153976
  • Pipeline finished with Success
    about 1 month ago
    Total: 992s
    #154022
  • Status changed to Needs work about 1 month ago
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom catch

    Still a couple of unit test failures.

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom longwave UK

    Also lots more:

    core/lib/Drupal/Core/Entity/EntityTypeRepository.php:      @trigger_error('Calling EntityTypeRepository::__construct() without the $entityTypeBundleInfo argument is deprecated in drupal:10.3.0 and is required in drupal:11.0.0. See https://www.drupal.org/node/3365164', E_USER_DEPRECATED);
    core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php:    @trigger_error(__METHOD__ . '() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use \Drupal\Core\Entity\RevisionableStorageInterface::loadRevision instead. See https://www.drupal.org/node/3294237', E_USER_DEPRECATED);
    core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php:    @trigger_error(__METHOD__ . '() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use \Drupal\Core\Entity\RevisionableStorageInterface::deleteRevision instead. See https://www.drupal.org/node/3294237', E_USER_DEPRECATED);
    core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php:            @trigger_error('Not providing a setDefaultTranslationEnforced() method when implementing \Drupal\Core\TypedData\TranslatableInterface is deprecated in drupal:10.2.0 and is required from drupal:11.0.0. See https://www.drupal.org/node/3376146', E_USER_DEPRECATED);
    core/lib/Drupal/Core/Entity/Controller/EntityController.php:      @trigger_error('Calling ' . __METHOD__ . '() without the $route_match argument is deprecated in drupal:10.1.0 and it will be required in drupal:11.0.0. See https://www.drupal.org/node/3337782', E_USER_DEPRECATED);
    
  • First commit to issue fork.
  • Pipeline finished with Failed
    about 1 month ago
    Total: 175s
    #154518
  • Pipeline finished with Failed
    about 1 month ago
    Total: 174s
    #154523
  • Status changed to Needs review about 1 month ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave

    Tried to address additional ones but could use some feedback about the KeyValueStorage

  • Pipeline finished with Success
    about 1 month ago
    #154532
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom catch

    The KeyValue changes look sensible - removing methods from the non-revisionable storage and adding them to the ones that are.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia onkararun

    @ binoli-lalani @longwave kindly please provide which tool you are using to check the deprecated code. so i can review this code. Because drupal-check is not working in drupal 11 setup

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom catch

    @Arun.k there is no special tooling, we are just grepping the relevant directories, like:

    grep -r @deprecated core/lib/Drupal/Core/Entity/
    

    Code that should be 'removed from drupal:11.0.0' is in scope for these issues. Code that says 'removed from drupal:12.0.0' should be left where it is for now.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia onkararun

    Thankyou @catch for the knowledge and @smustgrave I have Verified and tested Merge request !7657 3442713-remove-deprecated-code on Drupal Version 11.x-dev & PHP Version 8.3

    Testing Steps:-
    1). Install Drupal 11.x version.
    2). /projects/drupal/ git remote add drupal-3442713 https://git.drupalcode.org/issue/drupal-3442713.git
    3). git fetch drupal-3442713
    4). git checkout -b '3442713-remove-deprecated-code' --track drupal-3442713/'3442713-remove-deprecated-code'
    5). use vendor/bin/phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueContentEntityStorage.php
    6). use vendor/bin/phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml core/.phpstan-baseline.php to check deprecated code removed or not

    Testing result:
    Merge request !7657 3442713-remove-deprecated-code is fixed
    Moved the issue to RTBC ++

  • Status changed to RTBC about 1 month ago
  • Status changed to Needs work about 1 month ago
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom longwave UK

    Missed one earlier, I think core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php is in scope given it's the same revision methods we are deleting elsewhere in this issue.

  • Status changed to Needs review about 1 month ago
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom longwave UK

    Fixed #13, also re-added the comments back to EntityRepositoryInterface as that relates to code that is staying until Drupal 12.

  • Pipeline finished with Success
    about 1 month ago
    Total: 989s
    #156258
  • Status changed to RTBC about 1 month ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave

    Additional change seems good. Going to mark since this is blocking another deprecation ticket.

    • catch โ†’ committed 280a46c0 on 11.x
      Issue #3442713 by smustgrave, catch, Binoli Lalani, longwave: Remove...
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom catch

    Got this started but missed so many here I think I'm still OK to commit. Committed/pushed to 11.x, thanks!

  • Status changed to Fixed about 1 month ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024