There is an official FIG standard (PSR-11) to get container entries, but no standard to register container services. This means that the best way depends on which container implementation you use. Also note that in Slim 4.x the Pimple Container is no longer included.
Many thanks for the comment.
You have dispelled my doubts about how to use the container prettier.
I saw many examples of mixed use.
Now I will safely use the right approaches.
p.s. tell me where i can read about innovations and prospects in Slim 4