Questions tagged [php-psr]

PHP Standard Recommendation

A PSR is a PHP Standard Recommendation issued by the PHP Framework Interoperability Group.

The approved PSRs are:

PSR-0: Autoloading (superseded by PSR-4)
PSR-1: Basic Coding Standard
PSR-2: Coding Style Guide
PSR-3: Logger Interface
PSR-4: Improved Autoloading
PSR-7: HTTP Message Interfaces

4 questions
1
vote
1 answer

fig/link-util not compatible with psr/link

I installed a fresh Symfony v5.3, ApiPlatform v2.6.6. When I enter to /api url I'm getting that error: Fatal error: Declaration of Fig\Link\Link::withHref(Stringable|string $href): Symfony\Component\ErrorHandler\DebugClassLoader must be compatible…
kodmanyagha
  • 932
  • 12
  • 20
1
vote
1 answer

PHP PSR1 echo side effects

I was working on a command line application and I have this class that handles the business logic. This class has some method that loops all data from a \Generator and echo out some values. I use \Generator because this command line application…
KevDev
  • 541
  • 2
  • 6
  • 20
0
votes
1 answer

symfony/http-foundation doesn't implement psr/http-message

why symfony http-foundation doesn't implement psr http-message ?? I want to use php frameworks interoperability. in my opinion router , dispatcher , ioc container, http message and ... should have a psr interfaces and all frameworks should obey the…
Majid Abdolhosseini
  • 2,191
  • 4
  • 31
  • 59
0
votes
1 answer

How to circumvent PSR-2?

When Laravel 5.1 is upon us, PSR-2 will be enforced. I'm a big fan of PHP-FIG, unfortunately for me I got really used to and comfortable with control structures in a new line. Consider this current piece of code, already adhering to…
user2094178
  • 9,204
  • 10
  • 41
  • 70