shaarli / Shaarli

The personal, minimalist, super-fast, database free, bookmarking service - community repo
https://shaarli.readthedocs.io/
Other
3.45k stars 296 forks source link

DX: Improve dependency injection container reference #2046

Open ArthurHoaro opened 11 months ago

ArthurHoaro commented 11 months ago

Follow-up of https://github.com/shaarli/Shaarli/pull/1972#pullrequestreview-1386513173

With the latest upgrade to Slim 4, we use a DI container that doesn't provide any type hinting. It makes working with the container pretty hard, and prone to error, because any type hint must be done explicitly during usage.

We should be able to figure out a solution which could let us have type hinting when using container's attributes.