8000 bug #12716 [ClassLoader] define constant only if it wasn't defined be… · symfony/symfony@6945a2a · GitHub
[go: up one dir, main page]

Skip to content

Commit 6945a2a

Browse files
committed
bug #12716 [ClassLoader] define constant only if it wasn't defined before (xabbuh)
This PR was merged into the 2.3 branch. Discussion ---------- [ClassLoader] define constant only if it wasn't defined before | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- 388229b define constant only if it wasn't defined before
2 parents 2c4d0ca + 388229b commit 6945a2a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Symfony/Component/ClassLoader/ClassMapGenerator.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@
1111

1212
namespace Symfony\Component\ClassLoader;
1313

14-
if (PHP_VERSION_ID >= 50400) {
15-
define('SYMFONY_TRAIT', T_TRAIT);
16-
} else {
17-
define('SYMFONY_TRAIT', 0);
14+
if (!defined('SYMFONY_TRAIT')) {
15+
if (PHP_VERSION_ID >= 50400) {
16+
define('SYMFONY_TRAIT', T_TRAIT);
17+
} else {
18+
define('SYMFONY_TRAIT', 0);
19+
}
1820
}
1921

2022
/**

0 commit comments

Comments
 (0)
0