psr 4 - psr4 changes after upgrade have class not found symfony 2,4 -> 2,8 -
i use "symfony/symfony": "~2.4", , configuration
"autoload": { "psr-0": { "": "src/", "mea":"vendor/", "mea":"vendor/mea/corebundle/", "place":"vendor/mea/" } },
i create new project "symfony/symfony": "2.8.x-dev",
first error
[invalidargumentexception] non-empty psr-4 prefix must end namespace separator.
so add
"autoload": { "psr-4": { "": "src/","mea\\":"vendor/", "mea\\":"vendor/mea/corebundle/", "symfonystandard\\": "app/symfonystandard/" } },
and have classnotfoundexception
when try access classes in folder
example :
$a = \mea\pattern\view::inst();
give
attempted load class "view" namespace "mea\pattern". did forget "use" statement "mea\pattern\view"? 500 internal server error - classnotfoundexception
how fix ?
the namespace configured "mae" (camel cased), in code use "mae" (lower cased). psr-4 case sensitive:
all class names must referenced in case-sensitive fashion.
Comments
Post a Comment