Skip to content

Commit 4c925b0

Browse files
Merge branch '3.4' into 4.4
* 3.4: Enable "native_constant_invocation" CS rule Make AbstractPhpFileCacheWarmer public
2 parents 9369881 + 40d07bd commit 4c925b0

10 files changed

+18
-18
lines changed

Definition.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function __construct(array $places, array $transitions, $initialPlaces =
5252
*/
5353
public function getInitialPlace(): ?string
5454
{
55-
@trigger_error(sprintf('Calling %s::getInitialPlace() is deprecated since Symfony 4.3. Call getInitialPlaces() instead.', __CLASS__), E_USER_DEPRECATED);
55+
@trigger_error(sprintf('Calling %s::getInitialPlace() is deprecated since Symfony 4.3. Call getInitialPlaces() instead.', __CLASS__), \E_USER_DEPRECATED);
5656

5757
if (!$this->initialPlaces) {
5858
return null;

DefinitionBuilder.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function clear()
6969
*/
7070
public function setInitialPlace($place)
7171
{
72-
@trigger_error(sprintf('Calling %s::setInitialPlace() is deprecated since Symfony 4.3. Call setInitialPlaces() instead.', __CLASS__), E_USER_DEPRECATED);
72+
@trigger_error(sprintf('Calling %s::setInitialPlace() is deprecated since Symfony 4.3. Call setInitialPlaces() instead.', __CLASS__), \E_USER_DEPRECATED);
7373

7474
$this->initialPlaces = $place;
7575

@@ -159,7 +159,7 @@ public function setMetadataStore(MetadataStoreInterface $metadataStore)
159159
*/
160160
public function reset()
161161
{
162-
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use the "clear()" method instead.', __METHOD__), E_USER_DEPRECATED);
162+
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1, use the "clear()" method instead.', __METHOD__), \E_USER_DEPRECATED);
163163

164164
return $this->clear();
165165
}

Dumper/PlantUmlDumper.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -128,20 +128,20 @@ private function isWorkflowTransitionType(): bool
128128

129129
private function startPuml(array $options): string
130130
{
131-
$start = '@startuml'.PHP_EOL;
132-
$start .= 'allow_mixing'.PHP_EOL;
131+
$start = '@startuml'.\PHP_EOL;
132+
$start .= 'allow_mixing'.\PHP_EOL;
133133

134134
return $start;
135135
}
136136

137137
private function endPuml(array $options): string
138138
{
139-
return PHP_EOL.'@enduml';
139+
return \PHP_EOL.'@enduml';
140140
}
141141

142142
private function getLines(array $code): string
143143
{
144-
return implode(PHP_EOL, $code);
144+
return implode(\PHP_EOL, $code);
145145
}
146146

147147
private function initialize(array $options, Definition $definition): array
@@ -210,7 +210,7 @@ private function getState(string $place, Definition $definition, Marking $markin
210210
$description = $workflowMetadata->getMetadata('description', $place);
211211
if (null !== $description) {
212212
$output .= ' as '.$place.
213-
PHP_EOL.
213+
\PHP_EOL.
214214
$place.' : '.$description;
215215
}
216216

Event/Event.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ public function __construct($subject, Marking $marking, Transition $transition =
3737
$this->marking = $marking;
3838
$this->transition = $transition;
3939
if (null === $workflow) {
40-
@trigger_error(sprintf('Passing only three parameters to "%s" is deprecated since Symfony 4.1. Pass a %s instance as fourth parameter instead.', __METHOD__, WorkflowInterface::class), E_USER_DEPRECATED);
40+
@trigger_error(sprintf('Passing only three parameters to "%s" is deprecated since Symfony 4.1. Pass a %s instance as fourth parameter instead.', __METHOD__, WorkflowInterface::class), \E_USER_DEPRECATED);
4141
$this->workflowName = 'unnamed';
4242
} elseif (\is_string($workflow)) {
43-
@trigger_error(sprintf('Passing a string as the 4th parameter of "%s()" is deprecated since Symfony 4.1. Pass a %s instance instead.', __METHOD__, WorkflowInterface::class), E_USER_DEPRECATED);
43+
@trigger_error(sprintf('Passing a string as the 4th parameter of "%s()" is deprecated since Symfony 4.1. Pass a %s instance instead.', __METHOD__, WorkflowInterface::class), \E_USER_DEPRECATED);
4444
$this->workflowName = $workflow;
4545
} elseif ($workflow instanceof WorkflowInterface) {
4646
$this->workflow = $workflow;

EventListener/GuardListener.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class GuardListener
3838
public function __construct(array $configuration, ExpressionLanguage $expressionLanguage, TokenStorageInterface $tokenStorage, AuthorizationCheckerInterface $authorizationChecker, AuthenticationTrustResolverInterface $trustResolver, RoleHierarchyInterface $roleHierarchy = null, ValidatorInterface $validator = null)
3939
{
4040
if (null !== $roleHierarchy && !method_exists($roleHierarchy, 'getReachableRoleNames')) {
41-
@trigger_error(sprintf('Not implementing the "%s::getReachableRoleNames()" method in "%s" is deprecated since Symfony 4.3.', RoleHierarchyInterface::class, \get_class($roleHierarchy)), E_USER_DEPRECATED);
41+
@trigger_error(sprintf('Not implementing the "%s::getReachableRoleNames()" method in "%s" is deprecated since Symfony 4.3.', RoleHierarchyInterface::class, \get_class($roleHierarchy)), \E_USER_DEPRECATED);
4242
}
4343

4444
$this->configuration = $configuration;
@@ -90,7 +90,7 @@ private function getVariables(GuardEvent $event): array
9090
$roleNames = $token->getRoleNames();
9191
$roles = array_map(function (string $role) { return new Role($role, false); }, $roleNames);
9292
} else {
93-
@trigger_error(sprintf('Not implementing the "%s::getRoleNames()" method in "%s" is deprecated since Symfony 4.3.', TokenInterface::class, \get_class($token)), E_USER_DEPRECATED);
93+
@trigger_error(sprintf('Not implementing the "%s::getRoleNames()" method in "%s" is deprecated since Symfony 4.3.', TokenInterface::class, \get_class($token)), \E_USER_DEPRECATED);
9494

9595
$roles = $token->getRoles(false);
9696
$roleNames = array_map(function (Role $role) { return $role->getRole(); }, $roles);

MarkingStore/MultipleStateMarkingStore.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\Workflow\MarkingStore;
1313

14-
@trigger_error(sprintf('"%s" is deprecated since Symfony 4.3, use "%s" instead.', MultipleStateMarkingStore::class, MethodMarkingStore::class), E_USER_DEPRECATED);
14+
@trigger_error(sprintf('"%s" is deprecated since Symfony 4.3, use "%s" instead.', MultipleStateMarkingStore::class, MethodMarkingStore::class), \E_USER_DEPRECATED);
1515

1616
use Symfony\Component\PropertyAccess\PropertyAccess;
1717
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;

MarkingStore/SingleStateMarkingStore.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\Workflow\MarkingStore;
1313

14-
@trigger_error(sprintf('"%s" is deprecated since Symfony 4.3, use "%s" instead.', SingleStateMarkingStore::class, MethodMarkingStore::class), E_USER_DEPRECATED);
14+
@trigger_error(sprintf('"%s" is deprecated since Symfony 4.3, use "%s" instead.', SingleStateMarkingStore::class, MethodMarkingStore::class), \E_USER_DEPRECATED);
1515

1616
use Symfony\Component\PropertyAccess\PropertyAccess;
1717
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;

Registry.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Registry
3030
*/
3131
public function add(Workflow $workflow, $supportStrategy)
3232
{
33-
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1. Use addWorkflow() instead.', __METHOD__), E_USER_DEPRECATED);
33+
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.1. Use addWorkflow() instead.', __METHOD__), \E_USER_DEPRECATED);
3434
$this->workflows[] = [$workflow, $supportStrategy];
3535
}
3636

SupportStrategy/ClassInstanceSupportStrategy.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\Workflow\SupportStrategy;
1313

14-
@trigger_error(sprintf('"%s" is deprecated since Symfony 4.1. Use "%s" instead.', ClassInstanceSupportStrategy::class, InstanceOfSupportStrategy::class), E_USER_DEPRECATED);
14+
@trigger_error(sprintf('"%s" is deprecated since Symfony 4.1. Use "%s" instead.', ClassInstanceSupportStrategy::class, InstanceOfSupportStrategy::class), \E_USER_DEPRECATED);
1515

1616
use Symfony\Component\Workflow\Workflow;
1717

Tests/Dumper/PlantUmlDumperTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function testDumpWorkflowWithoutMarking($definition, $marking, $expectedF
2727
$dumper = new PlantUmlDumper(PlantUmlDumper::WORKFLOW_TRANSITION);
2828
$dump = $dumper->dump($definition, $marking, ['title' => $title]);
2929
// handle windows, and avoid to create more fixtures
30-
$dump = str_replace(PHP_EOL, "\n", $dump.PHP_EOL);
30+
$dump = str_replace(\PHP_EOL, "\n", $dump.\PHP_EOL);
3131
$file = $this->getFixturePath($expectedFileName, PlantUmlDumper::WORKFLOW_TRANSITION);
3232
$this->assertStringEqualsFile($file, $dump);
3333
}
@@ -50,7 +50,7 @@ public function testDumpStateMachineWithoutMarking($definition, $marking, $expec
5050
$dumper = new PlantUmlDumper(PlantUmlDumper::STATEMACHINE_TRANSITION);
5151
$dump = $dumper->dump($definition, $marking, ['title' => $title]);
5252
// handle windows, and avoid to create more fixtures
53-
$dump = str_replace(PHP_EOL, "\n", $dump.PHP_EOL);
53+
$dump = str_replace(\PHP_EOL, "\n", $dump.\PHP_EOL);
5454
$file = $this->getFixturePath($expectedFileName, PlantUmlDumper::STATEMACHINE_TRANSITION);
5555
$this->assertStringEqualsFile($file, $dump);
5656
}

0 commit comments

Comments
 (0)