minor #29778 remove no longer needed PHP version checks (xabbuh)
This PR was merged into the 4.1 branch.
Discussion
----------
remove no longer needed PHP version checks
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
7a132fe156
remove no longer needed PHP version checks
This commit is contained in:
commit
34c8a8b7ae
@ -155,7 +155,7 @@ class ObjectsProvider
|
||||
|
||||
public static function getCallables()
|
||||
{
|
||||
$callables = array(
|
||||
return array(
|
||||
'callable_1' => 'array_key_exists',
|
||||
'callable_2' => array('Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\CallableClass', 'staticMethod'),
|
||||
'callable_3' => array(new CallableClass(), 'method'),
|
||||
@ -163,13 +163,8 @@ class ObjectsProvider
|
||||
'callable_5' => array('Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\ExtendedCallableClass', 'parent::staticMethod'),
|
||||
'callable_6' => function () { return 'Closure'; },
|
||||
'callable_7' => new CallableClass(),
|
||||
'callable_from_callable' => \Closure::fromCallable(new CallableClass()),
|
||||
);
|
||||
|
||||
if (\PHP_VERSION_ID >= 70100) {
|
||||
$callables['callable_from_callable'] = \Closure::fromCallable(new CallableClass());
|
||||
}
|
||||
|
||||
return $callables;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,21 +30,16 @@ class WrappedListenerTest extends TestCase
|
||||
|
||||
public function provideListenersToDescribe()
|
||||
{
|
||||
$listeners = array(
|
||||
return array(
|
||||
array(new FooListener(), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::__invoke'),
|
||||
array(array(new FooListener(), 'listen'), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listen'),
|
||||
array(array('Symfony\Component\EventDispatcher\Tests\Debug\FooListener', 'listenStatic'), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listenStatic'),
|
||||
array('var_dump', 'var_dump'),
|
||||
array(function () {}, 'closure'),
|
||||
array(\Closure::fromCallable(array(new FooListener(), 'listen')), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listen'),
|
||||
array(\Closure::fromCallable(array('Symfony\Component\EventDispatcher\Tests\Debug\FooListener', 'listenStatic')), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listenStatic'),
|
||||
array(\Closure::fromCallable(function () {}), 'closure'),
|
||||
);
|
||||
|
||||
if (\PHP_VERSION_ID >= 70100) {
|
||||
$listeners[] = array(\Closure::fromCallable(array(new FooListener(), 'listen')), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listen');
|
||||
$listeners[] = array(\Closure::fromCallable(array('Symfony\Component\EventDispatcher\Tests\Debug\FooListener', 'listenStatic')), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listenStatic');
|
||||
$listeners[] = array(\Closure::fromCallable(function () {}), 'closure');
|
||||
}
|
||||
|
||||
return $listeners;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user