Merge branch '3.4' into 4.0
* 3.4: [Form] Fix fixtures for forward compat [Lock] Fix SemaphoreStoreTest on OS X
This commit is contained in:
commit
cfde207ebb
@ -15,9 +15,9 @@ Symfony\Component\Form\Extension\Core\Type\ChoiceType (choice_translation_domain
|
||||
---------------- --------------------%s
|
||||
Allowed values - %s
|
||||
---------------- --------------------%s
|
||||
Normalizer Closure%s{ %s
|
||||
Normalizer Closure%s{%w
|
||||
parameters: 2 %s
|
||||
file: "%s%eExtension%eCore%eType%eChoiceType.php"
|
||||
file: "%s%eExtension%eCore%eType%eChoiceType.php"%w
|
||||
line: "%s to %s" %s
|
||||
} %s
|
||||
---------------- --------------------%s
|
||||
|
@ -8,14 +8,14 @@ Symfony\Component\Form\Tests\Console\Descriptor\FooType (empty_data)
|
||||
Default Value: null %s
|
||||
%s
|
||||
Closure(s): [ %s
|
||||
Closure%s{ %s
|
||||
Closure%s{%w
|
||||
parameters: 1 %s
|
||||
file: "%s%eExtension%eCore%eType%eFormType.php"
|
||||
file: "%s%eExtension%eCore%eType%eFormType.php"%w
|
||||
line: "%s to %s" %s
|
||||
}, %s
|
||||
Closure%s{ %s
|
||||
Closure%s{%w
|
||||
parameters: 2 %s
|
||||
file: "%s%eTests%eConsole%eDescriptor%eAbstractDescriptorTest.php"
|
||||
file: "%s%eTests%eConsole%eDescriptor%eAbstractDescriptorTest.php"%w
|
||||
line: "%s to %s" %s
|
||||
} %s
|
||||
] %s
|
||||
|
@ -16,9 +16,9 @@ Symfony\Component\Form\Tests\Console\Descriptor\FooType (foo)
|
||||
"baz" %s
|
||||
] %s
|
||||
---------------- --------------------%s
|
||||
Normalizer Closure%s{ %s
|
||||
Normalizer Closure%s{%w
|
||||
parameters: 2 %s
|
||||
file: "%s%eTests%eConsole%eDescriptor%eAbstractDescriptorTest.php"
|
||||
file: "%s%eTests%eConsole%eDescriptor%eAbstractDescriptorTest.php"%w
|
||||
line: "%s to %s" %s
|
||||
} %s
|
||||
---------------- --------------------%s
|
||||
|
@ -46,13 +46,22 @@ class SemaphoreStoreTest extends AbstractStoreTest
|
||||
|
||||
private function getOpenedSemaphores()
|
||||
{
|
||||
if ('Darwin' === PHP_OS) {
|
||||
$lines = explode(PHP_EOL, trim(`ipcs -s`));
|
||||
if (-1 === $start = array_search('Semaphores:', $lines)) {
|
||||
throw new \Exception('Failed to extract list of opened semaphores. Expected a Semaphore list, got '.implode(PHP_EOL, $lines));
|
||||
}
|
||||
|
||||
return \count(\array_slice($lines, ++$start));
|
||||
}
|
||||
|
||||
$lines = explode(PHP_EOL, trim(`LC_ALL=C ipcs -su`));
|
||||
if ('------ Semaphore Status --------' !== $lines[0]) {
|
||||
throw new \Exception('Failed to extract list of opend semaphores. Expect a Semaphore status, got '.implode(PHP_EOL, $lines));
|
||||
throw new \Exception('Failed to extract list of opened semaphores. Expected a Semaphore status, got '.implode(PHP_EOL, $lines));
|
||||
}
|
||||
list($key, $value) = explode(' = ', $lines[1]);
|
||||
if ('used arrays' !== $key) {
|
||||
throw new \Exception('Failed to extract list of opend semaphores. Expect a used arrays key, got '.implode(PHP_EOL, $lines));
|
||||
throw new \Exception('Failed to extract list of opened semaphores. Expected a "used arrays" key, got '.implode(PHP_EOL, $lines));
|
||||
}
|
||||
|
||||
return (int) $value;
|
||||
|
Reference in New Issue
Block a user