Conversation
test/HelperPluginManagerTest.php
Outdated
| 'test' => function () { return $this; }, | ||
| ]]); | ||
| $this->setExpectedException('Zend\ServiceManager\Exception\InvalidServiceException'); | ||
| $this->setExpectedException('Zend\View\Exception\InvalidHelperException'); |
There was a problem hiding this comment.
This will need to check for a different exception depending on whether it's run under v2 or v3. Easiest way is to call a getInvalidServiceException() method in the same way the CommonPluginManagerTrait does. Or, if it's not a whole load of retooling, use the trait in this test and ditch the compatibility test.
|
Good stuff! Don't forget to add this to https://github.com/zendframework/maintainers/wiki/ZF3-ServiceManager-component-refactors,-phase-2 |
|
I updated the code according to kynx's feedback. I tested it with ServiceManager v3 (by temporarily setting required version as |
|
@mtymek The approach I've been using for dependencies that are in the
This works in most situations, particularly when we start seeing circular dependencies (essentially, any zend-mvc dependency observed is likely a circular dependency at this point). In this particular component, we have forwards-compat changes for a good portion of the components listed in the I'm willing to do that work today when merging; zend-view is a dep for a number of other components (navigation and form in particular), so this would help unblock some of those. |
src/HelperPluginManager.php
Outdated
| Helper\Doctype::class => InvokableFactory::class, // overridden by a factory in ViewHelperManagerFactory | ||
| 'zendviewhelperdoctype' => InvokableFactory::class, | ||
| Helper\EscapeHtml::class => InvokableFactory::class, | ||
| 'zendviewhelperescapehtml' => InvokableFactory::class, |
There was a problem hiding this comment.
Separate the FQCN and normalized names, and group them by type. This will allow us to remove the normalized versions more easily at a later date. (I can do this on merge if needed.)
|
|
As per your suggestion, I marked some tests as "skipped". Unfortunately I still get some errors in How can I work around it? edit: pasted wrong error before... |
|
@mtymek ha! I've already pulled locally to review! In that particular case, the plugin requires zend-session, which does not have a forwards-compat version yet. As such, I'd override the Since I'm in the process of review anyways, I can do that for you if you'd like. |
|
OK, please do - I was about to finish for today :-) |
This PR prepares
zend-viewfor supporting ServiceManager v3.zend-mvcis v3-compatibleLast element is blocked by zendframework/zend-cache#68 - SMv3 cannot be installed at this moment because cache component is not V3-ready.
Edit:
zend-cachewas fixed, apparentlyzend-mvcis the blocker now.