Skip to main content

Questions tagged [psr]

Denotes questions regarding PHP Standards Recommendations in Magento.

Filter by
Sorted by
Tagged with
0 votes
1 answer
65 views

Convert Class Name from CamelCase to kebab-or-dash-case

I'm trying to find the logic in Magento (if it exists/is usable) that converts class name from Upper Camel Case -to-> Kebab Case (or spinal case, dash case, lisp case, caterpillar case, hyphen case)...
medmek's user avatar
  • 764
1 vote
0 answers
409 views

Why Magento 2 uses both PSR-4 and PSR-0? What is the advantage of one over the other?

Below is the composer.json file in Magento 2, and it has used both PSR-4 and PSR-0. What is the advantages of using both in one project. "autoload": { "psr-4": { ...
Duke's user avatar
  • 453
1 vote
2 answers
363 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/" ...
Alana Storm's user avatar
  • 44.4k
5 votes
1 answer
2k 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 ...
Jaykumar R's user avatar
9 votes
1 answer
934 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 ...
Raphael at Digital Pianism's user avatar