I’m trying to add a module to the MVC skeleton application and am running into “controller not mapped” and “class not found” errors. I’ve read various posts and documentation to help me debug this. Some of them talk about ServiceManager configuration and some mention composer autoloading configuration. I don’t think I’ve come across any that mentions both.
Could someone please explain how these two thing relate to one another? Is composer autoloading just one of the wasy to make a ClassLoader available to ServiceManager or do they represent different approaches to implementing the apps?
Thanks for the suggestion. I’m mentioned the issue I’m having in the question just to provide some context. I posted the question specifically because I want to understand the relationship between ServiceManager and composer autoloading.
The laminas-servicemanager is a dependency injection container which creates the requested and configured objects. But the service manager does not load the related classes from their files.
This is where Composer comes into play. Besides the package dependency management the Composer contains an autoloading feature.
For our applications this means nothing more than some configuration and adding a one-liner:
In the past the framework contains an own loading features but that is all history because Composer already solves this problem, also for other packages.