PSR4 Composer Autoloading namespaces

前端 未结 1 939
一生所求
一生所求 2021-01-26 06:20

I\'ve been having a little play around with some Composer autoloading and i\'m getting some issues so the directory structure is

index.php
app/
            


        
相关标签:
1条回答
  • 2021-01-26 06:39

    PSR-4 is case sensitive. The structure has to be app/Helpers/Router.php or better App with capital A.

    All class names MUST be referenced in a case-sensitive fashion.

    The subdirectory name MUST match the case of the sub-namespace names.

    The terminating class name corresponds to a file name ending in .php. The file name MUST match the case of the terminating class name.

    http://www.php-fig.org/psr/psr-4/

    0 讨论(0)
提交回复
热议问题