When installing I got this error:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: The service                           [error]
"default_content.manager" has a dependency on a non-existent service "plugin.manager.rest". in
..../vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php:58

Looks like it was because there was no dependency to the rest module defined in the info.yml file. If I add a dependency to the rest module installation works fine.

Comments

Yaron Tal created an issue. See original summary.

Yaron Tal’s picture

Issue summary: View changes
andypost’s picture

Status: Active » Postponed (maintainer needs more info)

Module depends on hal that depends on rest so all dependencies are fine

I found no way to enable default content without enabling hal, rest & serialization

kalpaitch’s picture

Status: Postponed (maintainer needs more info) » Active

I agree Andy, however it is weird that this issue is appearing. For a further reference the same is happening with the test that failed on #2698425: Do not reimport existing entities - https://www.drupal.org/pift-ci-job/586793

kalpaitch’s picture

Also, am I missing something. I thought it was as you said Andy too... because I can only see Rest and HAL depend on Serialization but not on each other.
http://cgit.drupalcode.org/drupal/tree/core/modules/hal/hal.info.yml?h=8...
http://cgit.drupalcode.org/drupal/tree/core/modules/rest/rest.info.yml?h...

kalpaitch’s picture

Status: Active » Needs review
StatusFileSize
new240 bytes

Apologies for the comment flourishes, could to get this one in and pass other tests.

Status: Needs review » Needs work

The last submitted patch, 6: dependency_on_rest-2848425-6.patch, failed testing.

andypost’s picture

btw 8.3.x core changed dependencies #2758897: Move rest module's "link manager" services to serialization module
and now looks no need to depend on rest

larowlan’s picture

What @andypost said

andypost’s picture

I checked tests, and looks now we need to remove rest module from tests
tests/src/Functional/DefaultContentTest.php:24
and usage of rest.link_manager in \Drupal\Tests\default_content\Kernel\DefaultContentManagerIntegrationTest

right now I have no idea how to make it right (backward compatible)

andypost’s picture

andypost’s picture

Status: Needs work » Needs review
StatusFileSize
new260 bytes

I think better to define dependencies this way

Status: Needs review » Needs work

The last submitted patch, 12: dependency_on_rest-2848425-12.patch, failed testing.

andypost’s picture

Looks we need to split versions for core 8.2 and later to get rig of rest dependency in tests

berdir’s picture

Status: Needs work » Reviewed & tested by the community

#6 looks correct to me and is compatible with 8.2 - 8.4, we can remove the deprecated code later when 8.3 is stable (or any time between then and 9.x)

The test dependencies in DefaultContentTest are indeed not really necessary, it would make sese to only depend on default_content to make sure that we have our own dependencies right. But that's not a new issue and doesn't need to be fixed as part of this.

  • andypost committed 18f2408 on 8.x-1.x
    Issue #2848425 by andypost, kalpaitch: Dependency to rest module
    
andypost’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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