Merge branch '3.4' into 4.3
* 3.4: Fix small typo in Exception message
This commit is contained in:
commit
afbbea3d1b
@ -316,7 +316,7 @@ abstract class FrameworkExtensionTest extends TestCase
|
||||
public function testWorkflowAreValidated()
|
||||
{
|
||||
$this->expectException('Symfony\Component\Workflow\Exception\InvalidDefinitionException');
|
||||
$this->expectExceptionMessage('A transition from a place/state must have an unique name. Multiple transitions named "go" from place/state "first" where found on StateMachine "my_workflow".');
|
||||
$this->expectExceptionMessage('A transition from a place/state must have an unique name. Multiple transitions named "go" from place/state "first" were found on StateMachine "my_workflow".');
|
||||
$this->createContainerFromFile('workflow_not_valid');
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ class PhpFrameworkExtensionTest extends FrameworkExtensionTest
|
||||
public function testWorkflowValidationStateMachine()
|
||||
{
|
||||
$this->expectException('Symfony\Component\Workflow\Exception\InvalidDefinitionException');
|
||||
$this->expectExceptionMessage('A transition from a place/state must have an unique name. Multiple transitions named "a_to_b" from place/state "a" where found on StateMachine "article".');
|
||||
$this->expectExceptionMessage('A transition from a place/state must have an unique name. Multiple transitions named "a_to_b" from place/state "a" were found on StateMachine "article".');
|
||||
$this->createContainerFromClosure(function ($container) {
|
||||
$container->loadFromExtension('framework', [
|
||||
'workflows' => [
|
||||
|
@ -54,7 +54,7 @@
|
||||
"symfony/twig-bundle": "~2.8|~3.2|~4.0",
|
||||
"symfony/validator": "^4.1",
|
||||
"symfony/var-dumper": "^4.3",
|
||||
"symfony/workflow": "^4.3",
|
||||
"symfony/workflow": "^4.3.6",
|
||||
"symfony/yaml": "~3.4|~4.0",
|
||||
"symfony/property-info": "~3.4|~4.0",
|
||||
"symfony/lock": "~3.4|~4.0",
|
||||
@ -80,7 +80,7 @@
|
||||
"symfony/translation": "<4.3",
|
||||
"symfony/twig-bridge": "<4.1.1",
|
||||
"symfony/validator": "<4.1",
|
||||
"symfony/workflow": "<4.3"
|
||||
"symfony/workflow": "<4.3.6"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-apcu": "For best performance of the system caches",
|
||||
|
@ -37,7 +37,7 @@ class StateMachineValidator implements DefinitionValidatorInterface
|
||||
// Enforcing uniqueness of the names of transitions starting at each node
|
||||
$from = reset($froms);
|
||||
if (isset($transitionFromNames[$from][$transition->getName()])) {
|
||||
throw new InvalidDefinitionException(sprintf('A transition from a place/state must have an unique name. Multiple transitions named "%s" from place/state "%s" where found on StateMachine "%s".', $transition->getName(), $from, $name));
|
||||
throw new InvalidDefinitionException(sprintf('A transition from a place/state must have an unique name. Multiple transitions named "%s" from place/state "%s" were found on StateMachine "%s".', $transition->getName(), $from, $name));
|
||||
}
|
||||
|
||||
$transitionFromNames[$from][$transition->getName()] = true;
|
||||
|
Reference in New Issue
Block a user