Problem/Motivation

Drupal\Core\DependencyInjection\Container's class docs say:

> * Extends the Drupal container to set the service ID on the created object.

But the only method this has is __sleep() and it doesn't look like it's doing that.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#3 3417985-3.patch540 bytespooja saraah

Issue fork drupal-3417985

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

joachim created an issue. See original summary.

longwave’s picture

Title: class docs for Container are wrong » Class docs for Container are wrong
Related issues: +#2531564: Fix leaky and brittle container serialization solution

Yep that feature was removed in #2531564: Fix leaky and brittle container serialization solution but we forgot to update the class docblock.

pooja saraah’s picture

StatusFileSize
new540 bytes

This patch updates the class docblock to remove the outdated information about setting the service ID on the created object in the Container class.

longwave’s picture

Status: Active » Needs work
+++ b/core/lib/Drupal/Core/DependencyInjection/Container.php
@@ -5,7 +5,7 @@
+ * Extends the Drupal container.

Says what it does, but not why. Let's say something like

 * Extends the container to prevent serialization.

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

viren18febs’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

@ viren18febS this was tagged for novice FYI which is intended for new users. Based on your post history you can work on non novice issues please.

quietone’s picture

Title: Class docs for Container are wrong » Correct \Drupal\Core\DependencyInjection\Container doc

Better title.

  • quietone committed d67efd43 on 11.x
    Issue #3417985 by viren18febS, pooja saraah, joachim, longwave,...

  • quietone committed 8b9ff02e on 10.2.x
    Issue #3417985 by viren18febS, pooja saraah, joachim, longwave,...
quietone’s picture

Version: 11.x-dev » 10.2.x-dev
Status: Reviewed & tested by the community » Fixed

Committed d67efd4 and pushed to 11.x

Committed 8b9ff02 and pushed to 10.2.x.

Thanks!

Status: Fixed » Closed (fixed)

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