Remove old version check
This commit is contained in:
parent
f41bdf19c1
commit
d817f98004
@ -43,7 +43,7 @@ trait LockableTrait
|
||||
throw new LogicException('A lock is already in place.');
|
||||
}
|
||||
|
||||
if (SemaphoreStore::isSupported($blocking)) {
|
||||
if (SemaphoreStore::isSupported()) {
|
||||
$store = new SemaphoreStore();
|
||||
} else {
|
||||
$store = new FlockStore(sys_get_temp_dir());
|
||||
|
@ -41,7 +41,7 @@ class LockableTraitTest extends TestCase
|
||||
{
|
||||
$command = new \FooLockCommand();
|
||||
|
||||
if (SemaphoreStore::isSupported(false)) {
|
||||
if (SemaphoreStore::isSupported()) {
|
||||
$store = new SemaphoreStore();
|
||||
} else {
|
||||
$store = new FlockStore(sys_get_temp_dir());
|
||||
|
@ -13,7 +13,6 @@ namespace Symfony\Component\Lock\Store;
|
||||
|
||||
use Symfony\Component\Lock\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\Lock\Exception\LockConflictedException;
|
||||
use Symfony\Component\Lock\Exception\NotSupportedException;
|
||||
use Symfony\Component\Lock\Key;
|
||||
use Symfony\Component\Lock\StoreInterface;
|
||||
|
||||
@ -27,21 +26,11 @@ class SemaphoreStore implements StoreInterface
|
||||
/**
|
||||
* Returns whether or not the store is supported.
|
||||
*
|
||||
* @param bool|null $blocking When not null, checked again the blocking mode.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function isSupported($blocking = null)
|
||||
public static function isSupported()
|
||||
{
|
||||
if (!extension_loaded('sysvsem')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($blocking === false && \PHP_VERSION_ID < 50601) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return extension_loaded('sysvsem');
|
||||
}
|
||||
|
||||
public function __construct()
|
||||
|
Reference in New Issue
Block a user