Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit f290bb0

Browse files
committed
Remove configureHelpers functionality from ViewHelperManager factory
Now that zend-navigation injects its configuration itself (as of 2.7.1), the ViewHelperManager factory no longer needs its `configureHelpers()` routine.
1 parent 6a28ebe commit f290bb0

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

Diff for: src/Service/ViewHelperManagerFactory.php

-36
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ class ViewHelperManagerFactory extends AbstractPluginManagerFactory
2929
* @var array
3030
*/
3131
protected $defaultHelperMapClasses = [
32-
'Zend\Navigation\View\HelperConfig',
3332
];
3433

3534
/**
@@ -45,47 +44,12 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o
4544
$options['factories'] = isset($options['factories']) ? $options['factories'] : [];
4645
$plugins = parent::__invoke($container, $requestedName, $options);
4746

48-
// Configure default helpers from other components
49-
$plugins = $this->configureHelpers($plugins);
50-
5147
// Override plugin factories
5248
$plugins = $this->injectOverrideFactories($plugins, $container);
5349

5450
return $plugins;
5551
}
5652

57-
/**
58-
* Configure helpers from other components.
59-
*
60-
* Loops through the list of default helper configuration classes, and uses
61-
* each to configure the helper plugin manager.
62-
*
63-
* @param HelperPluginManager $plugins
64-
* @return HelperPluginManager
65-
*/
66-
private function configureHelpers(HelperPluginManager $plugins)
67-
{
68-
foreach ($this->defaultHelperMapClasses as $configClass) {
69-
if (! is_string($configClass) || ! class_exists($configClass)) {
70-
continue;
71-
}
72-
73-
$config = new $configClass();
74-
75-
if (! $config instanceof ConfigInterface) {
76-
throw new ServiceNotCreatedException(sprintf(
77-
'Invalid service manager configuration class provided; received "%s", expected class implementing %s',
78-
$configClass,
79-
ConfigInterface::class
80-
));
81-
}
82-
83-
$config->configureServiceManager($plugins);
84-
}
85-
86-
return $plugins;
87-
}
88-
8953
/**
9054
* Inject override factories into the plugin manager.
9155
*

0 commit comments

Comments
 (0)