Browse Source

Merge pull request #12289 from cakephp/config-deprecaction-error

Make config deprecation error message more helpful
Mark Story 7 years ago
parent
commit
2341c3cd7c
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/Core/Configure/Engine/PhpConfig.php

+ 4 - 1
src/Core/Configure/Engine/PhpConfig.php

@@ -93,7 +93,10 @@ class PhpConfig implements ConfigEngineInterface
         if (!isset($config)) {
             throw new Exception(sprintf('Config file "%s" did not return an array', $key . '.php'));
         }
-        deprecationWarning('PHP configuration files should not set `$config. Instead return an array.');
+        deprecationWarning(sprintf(
+            'PHP configuration files like "%s" should not set `$config`. Instead return an array.',
+            $key . '.php'
+        ));
 
         return $config;
     }