Slim - Work on Slim 5 has begun

Daniel Opitz
Daniel Opitz
26 Jul 2024

Hello my Slim Framework fans :-)

I’ve got some great news to share, work on Slim 5 has officially started.

After years of collecting feedback from the community we know where the project needs optimization.

Most questions I answered were about routing issues (404 not found), which most of them were related the web-server setup and not Slim itself. We will integrate a base-path middleware to make life easier in this regard.

Then second most of the questions were related to Composer autoloading issues, which is also not related to Slim, but due the fact that Linux and Windows handle folder and filenames differently.

The third most of the questions were related to missing or incomplete documentation, which is definitely a part we try to fix.

Another issue of the community is the LIFO (last in first out) order of the middleware stack. This order is so confusing and error-prone that we may change the new default middleware order to FIFO (first in first out).

From a maintainer perspective I think that its time to simplify the internal structure, because over the years it has become much more complicated to understand and maintain the code base. On reason for the internal complexity, might be the aim of providing as much as flexibility as possible. On the other hand we have to find a better balance between flexibility and complexity.

The main goal is to make the DI container a first-class citizen in Slim 5. This means, that the DI container will be used to create and configure all dependencies. As a result, you get more control, and the internal structure can be simplified as well.

You can find the Slim 5 roadmap here:

https://github.com/slimphp/Slim/wiki/Slim-5-Road-Map