-
Notifications
You must be signed in to change notification settings - Fork 89
AbstractPluginManager::__construct now expects a Interop\Container\ContainerInterface instance representing the parent container #190
Comments
Any pointers on this? As far as I can see it's still undocumented and I have no idea how I can create / get hold of a container to give it. |
Any chance of some attention to this? BC breaks are fine, but undocumented BC breaks are a bit unsporting! |
This is covered in the changelog for 2.6.0: https://github.com/zendframework/zend-feed/releases/tag/release-2.6.0 |
Thanks, that helps a bit - but how should I pass in my extension - $extensions = new StandaloneExtensionManager;
$extensions->setInvokableClass('Media\Entry', MyApp\RSS\Media\Entry::class);
Reader::setExtensionManager(new ExtensionManager($extensions));
Reader::registerExtension('Media'); results in:
The junglebooks example code in the docs still describes the old way that doesn't work. |
https://docs.zendframework.com/zend-servicemanager/migration/#invokables |
After lots of going in circles, I've got this working. The whole servicemanager thing seemed like overkill for something that should be very simple (I'm not managing a service, I'm parsing RSS), so I'm thankful I didn't need to go there. I saw the docs comment about copy/pasting the namespace MyApp\RSS;
use Zend\Feed\Reader\Extension;
use Zend\Feed\Reader\ExtensionManagerInterface;
class StandaloneExtensionManager implements ExtensionManagerInterface
{
private $extensions = [
'Atom\Entry' => 'Zend\Feed\Reader\Extension\Atom\Entry',
'Atom\Feed' => 'Zend\Feed\Reader\Extension\Atom\Feed',
...
'Media\Entry' => Media\Entry::class //My extension
];
... then I instantiate the manager and register the extension: Reader::setExtensionManager(new MyApp\RSS\StandaloneExtensionManager);
Reader::registerExtension('Media'); and I'm happy to say that works. It would be great if the docs could be updated with an example like this rather than the broken one that's there now. Can you point me at the right repo for that? |
|
My current code using Zend_Feed has started throwing this error. I see mentions of having to do this in #100, but the docs give no idea what I'm supposed to do, and none of the examples do it. This is my code:
I don't understand what's required here because I don't have a container to give to
ExtensionPluginManager
- the extension is attached statically toReader
. Can I make it be quiet by doing something like:BTW thanks for fixing Zend_Feed #30, which involves the same code.
The text was updated successfully, but these errors were encountered: