Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Make StandaloneExtensionManagers configurable#55

Closed
Synchro wants to merge22 commits intozendframework:developfromSynchro:master
Closed
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
22 commits
Select commitHold shift + click to select a range
316e9b7
Merge branch 'hotfix/43'
weierophinneyNov 1, 2017
5387abb
Make $extensions property protected
SynchroNov 10, 2017
b9f3004
Switch to making StandaloneExtensionManager configurable
SynchroNov 14, 2017
1351b73
Not final
SynchroNov 14, 2017
e09a172
Add tests for Writer StandaloneExtensionMananger
SynchroNov 14, 2017
7155b5a
No return value from remove, simplify
SynchroNov 14, 2017
c431c49
Implement same changes for Writer
SynchroNov 14, 2017
7a91f4f
Use class pseudoconstants rather than strings for class names
SynchroNov 14, 2017
849b55d
Fix namespaced names
SynchroNov 14, 2017
8c3860f
Fix data provider
SynchroNov 14, 2017
223e867
Fix test provider namespaces
SynchroNov 14, 2017
4e68bee
Writer, not Reader
SynchroNov 14, 2017
f807526
Fix data provider
SynchroNov 14, 2017
f71a00c
Improve docs a little
SynchroNov 14, 2017
d4a8efe
Add checks when adding extensions
SynchroNov 14, 2017
a9a5af4
Use mock extension
SynchroNov 14, 2017
ce6fd8b
Code style
SynchroNov 14, 2017
3e379f8
Fix wrong exceptions
SynchroNov 14, 2017
789b4b2
Fix wrong exception
SynchroNov 14, 2017
4096b6e
More tests
SynchroNov 14, 2017
1c80524
More tests
SynchroNov 14, 2017
32982ff
Break out tests
SynchroNov 15, 2017
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
PrevPrevious commit
NextNext commit
Fix wrong exceptions
Add exceptions to tests
  • Loading branch information
@Synchro
Synchro committedNov 14, 2017
commit3e379f836e8720f235c419f7a83c68aca01e2e89
4 changes: 2 additions & 2 deletionssrc/Reader/StandaloneExtensionManager.php
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,7 +9,7 @@

namespace Zend\Feed\Reader;

use Zend\ServiceManager\Exception\InvalidServiceException;
use Zend\Feed\Reader\Exception\InvalidArgumentException;

class StandaloneExtensionManager implements ExtensionManagerInterface
{
Expand DownExpand Up@@ -68,7 +68,7 @@ public function add($name, $class)
return;
}

throw newInvalidServiceException(sprintf(
throw newInvalidArgumentException(sprintf(
'Plugin of type %s is invalid; must implement %2$s\Extension\AbstractFeed '
. 'or %2$s\Extension\AbstractEntry',
$class,
Expand Down
4 changes: 2 additions & 2 deletionssrc/Writer/StandaloneExtensionManager.php
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,7 +9,7 @@

namespace Zend\Feed\Writer;

use Zend\ServiceManager\Exception\InvalidServiceException;
use Zend\Feed\Writer\Exception\InvalidArgumentException;

class StandaloneExtensionManager implements ExtensionManagerInterface
{
Expand DownExpand Up@@ -68,7 +68,7 @@ public function add($name, $class)
return;
}

throw newInvalidServiceException(sprintf(
throw newInvalidArgumentException(sprintf(
'Plugin of type %s is invalid; must implement %s\Extension\RendererInterface '
. 'or the classname must end in "Feed" or "Entry"',
$class,
Expand Down
2 changes: 2 additions & 0 deletionstest/Reader/StandaloneExtensionManagerTest.php
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -93,5 +93,7 @@ public function testPluginAddRemove()
$this->assertTrue($this->extensions->has('Test/Entry'));
$this->extensions->remove('Test/Entry');
$this->assertFalse($this->extensions->has('Test/Entry'));
$this->expectException(\Zend\Feed\Reader\Exception\InvalidArgumentException::class);
$this->extensions->add('Test/Entry', 'blah');
}
}
2 changes: 2 additions & 0 deletionstest/Writer/StandaloneExtensionManagerTest.php
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -100,5 +100,7 @@ public function testPluginAddRemove()
$this->assertTrue($this->extensions->has('Test/Feed'));
$this->extensions->remove('Test/Feed');
$this->assertFalse($this->extensions->has('Test/Feed'));
$this->expectException(\Zend\Feed\Reader\Exception\InvalidArgumentException::class);
$this->extensions->add('Test/Feed', 'blah');
}
}

[8]ページ先頭

©2009-2025 Movatter.jp