-
Notifications
You must be signed in to change notification settings - Fork 130
ZF3 #213
ZF3 #213
Changes from 16 commits
2089b51
07fc76c
69cc60c
dd79364
a41ee4c
183d6e8
f2dc619
bf4d652
e063b7d
9aaca7d
3125403
cb1b467
6f272e5
616ba68
50cf2f2
c47b1db
a2554cf
75f6fb7
498cb0d
891d3e8
6981ee0
8d0c9be
219eb58
ca71be4
0419000
f554d92
3232f51
fdaaf23
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,18 +22,18 @@ | |
} | ||
], | ||
"require": { | ||
"php": ">=5.3.3", | ||
"zendframework/zend-mvc": "2.*", | ||
"zendframework/zend-eventmanager": "2.*", | ||
"zendframework/zend-stdlib": "2.*", | ||
"zendframework/zend-servicemanager": "2.*", | ||
"zendframework/zend-modulemanager": "2.*", | ||
"zendframework/zend-version": "2.*", | ||
"zendframework/zend-debug": "2.*", | ||
"zendframework/zend-view": "2.*" | ||
"php": "^5.5 || ^7.0", | ||
"zendframework/zend-mvc": "^2.7 || ^3.0.1", | ||
"zendframework/zend-eventmanager": "^2.6.2 || ^3.0", | ||
"zendframework/zend-stdlib": "^2.7 || ^3.0", | ||
"zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", | ||
"zendframework/zend-modulemanager": "^2.7", | ||
"zendframework/zend-version": "^2.5", | ||
"zendframework/zend-debug": "^2.5 || ^3.0", | ||
"zendframework/zend-view": "^2.6" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "~4" | ||
"phpunit/phpunit": "~4 || ~5" | ||
}, | ||
"suggest": { | ||
"bjyoungblood/bjy-profiler": "Version: dev-master, allows the usage of the (Zend) Db collector.", | ||
|
@@ -45,8 +45,9 @@ | |
"aist/aist-git-tools": "Show you informations about current GIT repository" | ||
}, | ||
"autoload": { | ||
"psr-0": { | ||
"ZendDeveloperTools": "src/" | ||
"psr-4": { | ||
"ZendDeveloperTools\\": "src/", | ||
"ZendDeveloperToolsTest\\": "test/" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. autoloading tests should be in |
||
} | ||
}, | ||
"autoload-dev": { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<?php | ||
return array( | ||
'view_manager' => array( | ||
'template_path_stack' => array( | ||
return [ | ||
'view_manager' => [ | ||
'template_path_stack' => [ | ||
'zenddevelopertools' => __DIR__ . '/../view', | ||
), | ||
), | ||
); | ||
], | ||
], | ||
]; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,9 +11,8 @@ | |
|
||
use Zend\EventManager\Event; | ||
use Zend\EventManager\SharedEventManagerInterface; | ||
use Zend\EventManager\SharedListenerAggregateInterface; | ||
use Zend\ServiceManager\Exception\ServiceNotFoundException; | ||
use ZendDeveloperTools\Collector\CollectorInterface; | ||
use ZendDeveloperTools\Collector\EventCollectorInterface; | ||
use ZendDeveloperTools\Profiler; | ||
|
||
/** | ||
|
@@ -22,10 +21,10 @@ | |
* @author Mark Garrett <[email protected]> | ||
* @since 0.0.3 | ||
*/ | ||
class EventLoggingListenerAggregate implements SharedListenerAggregateInterface | ||
class EventLoggingListenerAggregate | ||
{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. possible BC break? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it tested with EventManager v2 and v3 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @svycka Essentially, that interface goes away with v3, so to make code forwards compatible, you cannot directly implement the interface. Since this particular class implements a method for attaching listeners to the shared manager, and that method is what is called inside the |
||
/** | ||
* @var \ZendDeveloperTools\Collector\EventCollectorInterface[] | ||
* @var EventCollectorInterface[] | ||
*/ | ||
protected $collectors; | ||
|
||
|
@@ -37,7 +36,7 @@ class EventLoggingListenerAggregate implements SharedListenerAggregateInterface | |
/** | ||
* Constructor. | ||
* | ||
* @param \ZendDeveloperTools\Collector\EventCollectorInterface[] $collectors | ||
* @param EventCollectorInterface[] $collectors | ||
* @param string[] $identifiers | ||
*/ | ||
public function __construct(array $collectors, array $identifiers) | ||
|
@@ -61,7 +60,9 @@ function ($identifier) { | |
*/ | ||
public function attachShared(SharedEventManagerInterface $events) | ||
{ | ||
$events->attach($this->identifiers, '*', array($this,'onCollectEvent'), Profiler::PRIORITY_EVENT_COLLECTOR); | ||
foreach ($this->identifiers as $id) { | ||
$events->attach($id, '*', [$this,'onCollectEvent'], Profiler::PRIORITY_EVENT_COLLECTOR); | ||
} | ||
} | ||
|
||
/** | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one empty line at the and of the file plz