All Zend Framework feed plugins are configured with shareByDefault off if using the Zend Service manager. In order to work properly in the Symfony service container, they should be registered in *.services.yml as prototype scope, which is the equivalent setting.

This causes problems like #2348339: Aggregator parses only the first element of an atom feed.

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Bug because some services are registered incorrectly and won't work as expected.
Issue priority Normal because only the aggregator is affected in practice as far as we know.
Prioritized changes The main goal of this issue is fixing a service registration bug.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ParisLiakos’s picture

Status: Active » Needs review
FileSize
5.39 KB

@twistor should take credit for this as well

Status: Needs review » Needs work

The last submitted patch, 1: drupal-prototype_scope_zend_feed-2151103-1.patch, failed testing.

ParisLiakos’s picture

Status: Needs work » Needs review
FileSize
5.38 KB

reroll

ParisLiakos’s picture

jhedstrom’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll
kerby70’s picture

Reroll attached.

kerby70’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 7: zend_feed_plugins_are-2151103-7.patch, failed testing.

kerby70’s picture

Reroll.

kerby70’s picture

Status: Needs work » Needs review
kerby70’s picture

cilefen’s picture

Issue summary: View changes
cilefen’s picture

Issue summary: View changes

+1 for this issue.

cilefen’s picture

  1. +++ b/core/core.services.yml
    @@ -1041,49 +1041,74 @@ services:
    +# All plugins should be set as prototype scope
    +# See Zend\Feed\Reader\ExtensionPluginManager::shareByDefault
    

    I am not sure we need this comment. But I could be wrong.

  2. +++ b/core/core.services.yml
    @@ -1041,49 +1041,74 @@ services:
    +# All plugins should be set as prototype scope
    +# See Zend\Feed\Writer\ExtensionPluginManager::shareByDefault
    

    This is the same as #1.

Could the next patch uploader please provide a tests-only patch?

twistor’s picture

The last submitted patch, 17: zend_feed_plugins_are-2151103-17-should-fail.patch, failed testing.

cilefen’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

The test proves the service registration problem is real. I am satisfied.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed ae32aaa and pushed to 8.0.x. Thanks!

Thanks for adding the beta evaluation to the issue summary.

  • alexpott committed ae32aaa on 8.0.x
    Issue #2151103 by twistor, kerby70, ParisLiakos, cilefen: Zend feed...
Fabianx’s picture

Oh,

scopes are deprecated in 2.8:

- https://github.com/symfony/symfony/blob/2.8/UPGRADE-2.8.md#dependencyinj...

but shared: false does not become available until 2.8.

So we'll need to support a forward compatibility fix for #2497243: Replace Symfony container with a Drupal one, stored in cache in the mean time.

Status: Fixed » Closed (fixed)

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