Question regarding PSR-11 and PSR-15 integration in CakePHP 4.1


#1

I looked at the Roadmap and saw that CakePHP 4.1 will integrate PSR-11 containers and PSR-15 middleware. This makes me happy, because I think becoming more PSR compliant is the way to stay relevant/attract more users.

Now I wonder what the implementations might look like and where they are being discussed.

Questions regarding PSR-15:

  • Will there be a general “middleware pipeline” for all requests/responses running through the application?
  • Will there be a way to add middlewares to specific routes and will it replace your current “psr-7 middleware approach” in the router?

Question regarding PSR-11:

  • Are you planning to write your own container?
  • Or will you just implement the interfaces and let people register containers in the application bootstrapping?
  • Will you eventually swap out “$this->loadComponent()” for “$this->container->get()” or will they co-exist?

Regards

Steffen


#2

Questions regarding PSR-15:

We still haven’t discussed the implementation details.

Question regarding PSR-11:

We will most likely use an existing library instead of writing our own implementation. Usage like $this->loadComponent() will almost surely continue to exist.