Laminas: MVC Framework for PHP


I’m new in Laminas and learning from the book: Laminas: MVC Framework for PHP, using the code at:

As a reference to cut and paste, since the kindle web reader does not allow to do it.

In Section 4.1 Initial Configuration there’s an example on how to configure a default project.

After seting up the database, you have to configure two files: config/global.php and config/local.php.dist . The only place I can find something like that is at the /myapp/config/autoload/ directory at github and the local.php is missing.

Am I undestanding something wrong either with the book or github?

Thank you in avance

Hello and welcome to our forums! :smiley:

Please compare with the official skeleton application for laminas-mvc:

local.php is always missing you have to create it. There is an example local.php.dist in the skeleton so you can either rename it to local.php or just create a new local.php that returns an array.
hope that helps

Thank you for your answers, that clarified the issue.

Now, it seems to be that the file name in production mode is local.php.dist and after executing the command composer development-enable it should change to local.php.

I can see that happening with the file development.local.php.dist by means of a link to it with the name development.local.php that appears after the command, but local.php.dist is pretty much ignored.

Is development.local.php.dist somewhat a replacement for local.php.dist or there is something else I need to know about it?

Thank you in davance.

Please have a look at the related component: