laminas / laminas-mvc

Laminas's event-driven MVC layer, including MVC Applications, Controllers, and Plugins
https://docs.laminas.dev/laminas-mvc/
BSD 3-Clause "New" or "Revised" License
141 stars 51 forks source link

3.x Quick-Start module.config snippet needs improvement. #106

Open pbcGIS opened 2 years ago

pbcGIS commented 2 years ago

https://github.com/laminas/laminas-mvc/blob/3.3.x/docs/book/quick-start.md

This Quick Start installs the skeleton application and adds a new controller route to the "Application." module.

The tutorial includes a snippet that illustrates the addition of a route and controller to the module.config.php .

It would be most helpful to show the additional code in the context of the existing module.config.php

The module.config.php provided with the Skeleton template declares the Application namespace and includes several Laminas classes by name at the top. These declarations cause the explicit path references in the suggested snippet to throw inscrutable errors -- which are needlessly frustrating for the novice Laminas wannabe.

This would work much better if the entire module.config.php was included in the snippet -- perhaps with the new bits highlighted. Or at least make the snippet compatible with the pre-exitsting file with better remarks about how the pieces are inserted.

I attach a complete module.config.php that demonstrates the quick-start functions.

Thank you.

module.config.php.txt

Ocramius commented 2 years ago

Handled in #107, thanks @pbcGIS!

pbcGIS commented 2 years ago

Thank you very much! The world will be a happier place!

Ocramius commented 2 years ago

Oof, wrong referenced issue indeed. Thanks @froschdesign!

pbcGIS commented 2 years ago

Thank you guys,

I reformatted this as a pull request for 3.4.x.

I'm very new to github/Laminas so please don;t hesitate to criticize my style and technique.

--pbc

On Tue, Feb 22, 2022 at 5:24 AM Marco Pivetta @.***> wrote:

Oof, wrong referenced issue indeed. Thanks @froschdesign https://github.com/froschdesign!

— Reply to this email directly, view it on GitHub https://github.com/laminas/laminas-mvc/issues/106#issuecomment-1047644998, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIFNNU3PWLJZBXZTILMKITU4NP6NANCNFSM5O7KT6AQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were assigned.Message ID: @.***>

-- Paul B. Cote Geographic Information Services cultivating spatial intelligence [tm] http://www.pbcgis.com pbcGIS.com