Questions tagged [psr]

Denotes questions regarding PHP Standards Recommendations in Magento.

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

Generated Code in Magento uses PSR0

Does anyone know why Magento uses PSR4 but the generated/code directory uses PSR0? My company builds our modules like so: CompanyName_Module_SubModuleName (CompanyName\Module_SubModuleName) This is ...
1
vote
2answers
94 views

Composer Based Modules and PSR4 Autoloaders

Is it safe to assume that any composer based module package will have a PSR 4 autoloader section whose prefix is the full module name? i.e. "autoload": { "psr-4": { "Foo\\Bar\\": "src/" ...
5
votes
1answer
819 views

What is PSR in php ? Please explain with example [duplicate]

How PSR is useful in Magento 2 . I learned PSR-0 – Autoloader Standard PSR-1 – Basic Coding Standard PSR-2 – Coding Style Guide PSR-3 – Logger Interface PSR-4- Autoloader Standard but I want to ...
9
votes
1answer
631 views

Magento 2: what's the status of M2 regarding PSR compliance?

So according to the official documentation, I understand that Magento 2 is PSR-1 and PSR-2 compliant. I'm wondering if Magento 2 is (or will be) compliant with the others ones ? PSR-3: Logger ...