Skip to content

Commit 2adb67b

Browse files
minor symfony#24960 SCA with Php Inspections (EA Extended) (kalessil)
This PR was squashed before being merged into the 3.4 branch (closes symfony#24960). Discussion ---------- SCA with Php Inspections (EA Extended) | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a - Greedy regex characters set fixed - Potential race-conditions fixed Commits ------- 4d39a2d SCA with Php Inspections (EA Extended)
2 parents 86b0598 + 4d39a2d commit 2adb67b

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Symfony/Component/HttpKernel/Kernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ public function setClassCache(array $classes)
423423
*/
424424
public function setAnnotatedClassCache(array $annotatedClasses)
425425
{
426-
file_put_contents(($this->warmupDir ?: $this->getCacheDir()).'/annotations.map', sprintf('<?php return %s;', var_export($annotatedClasses, true)));
426+
file_put_contents(($this->warmupDir ?: $this->getCacheDir()).'/annotations.map', sprintf('<?php return %s;', var_export($annotatedClasses, true)), LOCK_EX);
427427
}
428428

429429
/**

src/Symfony/Component/Workflow/Definition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ private function setInitialPlace($place)
8282

8383
private function addPlace($place)
8484
{
85-
if (!preg_match('{^[\w\d_-]+$}', $place)) {
85+
if (!preg_match('{^[\w_-]+$}', $place)) {
8686
throw new InvalidArgumentException(sprintf('The place "%s" contains invalid characters.', $place));
8787
}
8888

src/Symfony/Component/Workflow/DefinitionBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function setInitialPlace($place)
7777
*/
7878
public function addPlace($place)
7979
{
80-
if (!preg_match('{^[\w\d_-]+$}', $place)) {
80+
if (!preg_match('{^[\w_-]+$}', $place)) {
8181
throw new InvalidArgumentException(sprintf('The place "%s" contains invalid characters.', $place));
8282
}
8383

src/Symfony/Component/Workflow/Transition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Transition
3030
*/
3131
public function __construct($name, $froms, $tos)
3232
{
33-
if (!preg_match('{^[\w\d_-]+$}', $name)) {
33+
if (!preg_match('{^[\w_-]+$}', $name)) {
3434
throw new InvalidArgumentException(sprintf('The transition "%s" contains invalid characters.', $name));
3535
}
3636

0 commit comments

Comments
 (0)