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

Fixed the plugin with the new Service Manager version #21

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Translator/LoaderPluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class LoaderPluginManager extends AbstractPluginManager
* @return void
* @throws Exception\RuntimeException if invalid
*/
public function validatePlugin($plugin)
public function validate($plugin)
{
if ($plugin instanceof Loader\FileLoaderInterface || $plugin instanceof Loader\RemoteLoaderInterface) {
// we're okay
Expand Down
4 changes: 2 additions & 2 deletions test/Translator/TranslatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public function testTranslate()
$loader->textDomain = new TextDomain(['foo' => 'bar']);
$pm = $this->translator->getPluginManager();
$this->translator->setPluginManager(
$pm->withConfig([
$pm->configure([
'services' => [
'test' => $loader
]
Expand Down Expand Up @@ -198,7 +198,7 @@ public function testTranslationsAreStoredInCache()

$loader = new TestLoader();
$loader->textDomain = new TextDomain(['foo' => 'bar']);
$plugins = $this->translator->getPluginManager()->withConfig(['services' => ['test' => $loader]]);
$plugins = $this->translator->getPluginManager()->configure(['services' => ['test' => $loader]]);
$this->translator->setPluginManager($plugins);
$this->translator->addTranslationFile('test', null);

Expand Down