Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 18ce839

Browse filesBrowse files
committed
[HttpKernel][FileLocator] Fix deprecation message
1 parent 9589dee commit 18ce839
Copy full SHA for 18ce839

File tree

1 file changed

+4
-4
lines changed
Filter options

1 file changed

+4
-4
lines changed

‎src/Symfony/Component/HttpKernel/Config/FileLocator.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Config/FileLocator.php
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function locate($file, $currentPath = null, $first = true)
6565
|| (\strlen($file) > 3 && ctype_alpha($file[0]) && ':' === $file[1] && ('\\' === $file[2] || '/' === $file[2]))
6666
|| null !== parse_url($file, PHP_URL_SCHEME)
6767
)) {
68-
$triggerDeprecation = false;
68+
$deprecation = false;
6969

7070
// no need to trigger deprecations when the loaded file is given as absolute path
7171
foreach ($this->paths as $deprecatedPath) {
@@ -75,13 +75,13 @@ public function locate($file, $currentPath = null, $first = true)
7575
}
7676

7777
if (0 === strpos($location, $deprecatedPath) && (null === $currentPath || false === strpos($location, $currentPath))) {
78-
$triggerDeprecation = true;
78+
$deprecation = sprintf('Loading the file "%s" from the global resource directory "%s" is deprecated since Symfony 4.4 and will be removed in 5.0.', $file, $deprecatedPath);
7979
}
8080
}
8181
}
8282

83-
if ($triggerDeprecation) {
84-
@trigger_error(sprintf('Loading the file "%s" from the global resource directory "%s" is deprecated since Symfony 4.4 and will be removed in 5.0.', $file, $deprecatedPath), E_USER_DEPRECATED);
83+
if ($deprecation) {
84+
@trigger_error($deprecation, E_USER_DEPRECATED);
8585
}
8686
}
8787

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.