Skip to content

Commit 75ddcbb

Browse files
committed
bug #57275 Fix autoload configs to avoid warnings when building optimized autoloaders (Seldaek)
This PR was merged into the 5.4 branch. Discussion ---------- Fix autoload configs to avoid warnings when building optimized autoloaders | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead --> | License | MIT The next composer release next week (you can try `composer dump -o` with snapshots right now) warns a bit more about classes which do not match the psr-4 rules they are found in.. Symfony has quite a few false positives there because the rules are using `""` as path for all individual components so all files of the component are scanned by default. I already made sure Composer excludes the vendor dir by default now, and this fixes the rest of the errors I noticed. Commits ------- 8882804 Fix autoload configs to avoid warnings when building optimized autoloaders
2 parents 4c85dcc + 8882804 commit 75ddcbb

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@
176176
"Symfony\\Bridge\\ProxyManager\\": "src/Symfony/Bridge/ProxyManager/",
177177
"Symfony\\Bridge\\Twig\\": "src/Symfony/Bridge/Twig/",
178178
"Symfony\\Bundle\\": "src/Symfony/Bundle/",
179-
"Symfony\\Component\\": "src/Symfony/Component/"
179+
"Symfony\\Component\\": "src/Symfony/Component/",
180+
"Symfony\\Runtime\\Symfony\\Component\\": "src/Symfony/Component/Runtime/Internal/"
180181
},
181182
"files": [
182183
"src/Symfony/Component/String/Resources/functions.php"
@@ -185,7 +186,8 @@
185186
"src/Symfony/Component/Intl/Resources/stubs"
186187
],
187188
"exclude-from-classmap": [
188-
"**/Tests/"
189+
"**/Tests/",
190+
"**/bin/"
189191
]
190192
},
191193
"autoload-dev": {

src/Symfony/Bridge/PhpUnit/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
"files": [ "bootstrap.php" ],
3535
"psr-4": { "Symfony\\Bridge\\PhpUnit\\": "" },
3636
"exclude-from-classmap": [
37-
"/Tests/"
37+
"/Tests/",
38+
"/bin/"
3839
]
3940
},
4041
"bin": [

src/Symfony/Component/Validator/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@
7272
"autoload": {
7373
"psr-4": { "Symfony\\Component\\Validator\\": "" },
7474
"exclude-from-classmap": [
75-
"/Tests/"
75+
"/Tests/",
76+
"/Resources/bin/"
7677
]
7778
},
7879
"minimum-stability": "dev"

0 commit comments

Comments
 (0)