Problem/Motivation

I just discovered the existence of \Drupal\serialization\EntityResolver\UuidReferenceInterface.

It's only implemented by \Drupal\hal\Normalizer\EntityReferenceItemNormalizer and only used by \Drupal\serialization\EntityResolver\UuidResolver

Proposed resolution

Remove the 'dead' code.

Remaining tasks

None.

User interface changes

None.

API changes

BC layer is provided.

Data model changes

None.

Issue fork drupal-2930243

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Wim Leers created an issue. See original summary.

wim leers’s picture

Title: Move \Drupal\serialization\EntityResolver\UuidReferenceInterface and \Drupal\serialization\EntityResolver\UuidResolver to HAL module » Move "entity resolver" functionality from Serialization to HAL module
Status: Active » Needs review
StatusFileSize
new11.35 KB

First, let's prove that absolutely nothing in the serialization module is using this.

BC layer still needs to be added.

Status: Needs review » Needs work

The last submitted patch, 2: 2930243-2.patch, failed testing. View results

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

MerryHamster’s picture

StatusFileSize
new11.28 KB
new369 bytes

I guess class RegisterEntityResolversCompilerPass have to be in HAL module too.

MerryHamster’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 5: 2930243-5.patch, failed testing. View results

wim leers’s picture

@MerryHamster: thank you, good catch! But \Drupal\serialization\SerializationServiceProvider was using that class, so that will now need to be moved to \Drupal\hal\HalServiceProvider as well!

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

andypost’s picture

Status: Needs work » Needs review
StatusFileSize
new11.45 KB

Reroll of #5

Status: Needs review » Needs work

The last submitted patch, 11: 2930243-5-reroll.patch, failed testing. View results

andypost’s picture

Status: Needs work » Needs review
StatusFileSize
new1.57 KB
new13.02 KB

Should fix a lot of errors

Status: Needs review » Needs work

The last submitted patch, 13: 2930243-13.patch, failed testing. View results

andypost’s picture

Status: Needs work » Needs review
StatusFileSize
new2.41 KB
new15.1 KB

Fix another bunch of tests and clean-up remaining mentions in comments

andypost’s picture

StatusFileSize
new15.3 KB
new2.05 KB

Missed that service provider using register (not alter) now much more tests are fixed

The last submitted patch, 15: 2930243-15.patch, failed testing. View results

andypost’s picture

As it down to just few failures, make sense to decide on upgrade path

andypost’s picture

Now it pass, at least deprecated interfaces should be left for BC

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

spokje’s picture

Project: Drupal core » Hypermedia Application Language (HAL)
Version: 9.4.x-dev » 1.0.x-dev
Component: hal.module » Code

The hal module has moved out of Drupal Core and into a Contrib Module.
Moving this issue to the Contrib Module queue.

wim leers’s picture

Hm … shouldn't we tackle this in core? There is now dead code in serialization.module which should've been moved to hal.module before the HAL module was removed? 🤔

larowlan’s picture

Project: Hypermedia Application Language (HAL) » Drupal core
Version: 1.0.x-dev » 10.0.x-dev
Component: Code » serialization.module
Priority: Normal » Major

Agree

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new144 bytes

The Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

Version: 10.0.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone made their first commit to this issue’s fork.

quietone’s picture

Status: Needs work » Needs review

@Wim Leers, thanks for catching this.

smustgrave’s picture

Status: Needs review » Needs work

Can issue summary and title be updated this is about removing dead code now?

quietone’s picture

Title: Move "entity resolver" functionality from Serialization to HAL module » Remove unused "entity resolver" functionality from Serialization
Issue summary: View changes
Status: Needs work » Needs review

Yes, I forgot to do that.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Thanks! Removal seems good

catch’s picture

Status: Reviewed & tested by the community » Needs work

Shouldn't the classes and services be deprecated in 11.x for removal in 12.x?

smustgrave’s picture

Do you think anyone could be using them? Seemed like dead code?

catch’s picture

It's still used in HAL, which is mentioned in the issue summary. https://git.drupalcode.org/project/hal/-/blob/1.x/src/Normalizer/EntityR...

There are 30,000 sites using the module.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.