An other Slim\Exception\ HttpNotFoundException error

In this case the real “issue” refers to PHP-DI as dependency. The error message is not related to the Slim router or basePath etc. as the title implies.

php-di/php-di 6.4.0 requires psr/container ^1.0

This is a known issue with PHP-DI 6.x, see here:

To solve this you can force composer to “downgrade” to psr/container v1 with:

composer require php-di/php-di --with-all-dependencies

This would still work with Slim since the interface is not that different.

PHP-DI 7.0 provides support for psr/container 2.0 interfaces.

See here: https://github.com/PHP-DI/PHP-DI/pull/726