Merge branch '4.3' into 4.4

* 4.3:
  Fix small typo in Exception message
This commit is contained in:
Nicolas Grekas 2019-10-22 08:26:21 +02:00
commit f5cef028f8
4 changed files with 5 additions and 5 deletions

View File

@ -318,7 +318,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');
}

View File

@ -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' => [

View File

@ -57,7 +57,7 @@
"symfony/twig-bundle": "^4.4|^5.0",
"symfony/validator": "^4.4|^5.0",
"symfony/var-dumper": "^4.4|^5.0",
"symfony/workflow": "^4.3|^5.0",
"symfony/workflow": "^4.3.6|^5.0",
"symfony/yaml": "^3.4|^4.0|^5.0",
"symfony/property-info": "^3.4|^4.0|^5.0",
"symfony/web-link": "^4.4|^5.0",
@ -88,7 +88,7 @@
"symfony/twig-bundle": "<4.4",
"symfony/validator": "<4.4",
"symfony/var-dumper": "<4.4",
"symfony/workflow": "<4.3"
"symfony/workflow": "<4.3.6"
},
"suggest": {
"ext-apcu": "For best performance of the system caches",

View File

@ -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;