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
139 stars 51 forks source link

Link to LaminasSkeletonModule is broken #41

Open ipsokonet opened 4 years ago

ipsokonet commented 4 years ago

The Quickstart page at https://docs.laminas.dev/laminas-mvc/quick-start/ provides links to the LaminasSkeletonModule as zip or tarball respectively. Both links do not work at present.

froschdesign commented 4 years ago

@weierophinney @michalbundyra @Xerkus The module skeleton was not ported to laminas, what is the alternative now?

3 sections in the quick start guide are based on the module skeleton:

michalbundyra commented 4 years ago

@froschdesign There is no alternative, I believe it should be ported to Laminas as it is used in many examples (as you pointed). Of course it should be also updated at this time to our best practises at this time, imo.

Xerkus commented 4 years ago

I don't think we need skeleton module. Ultimately, module is just a Module class that can then provide additional features, where config provider and onBootstrap listeners are the only used features in most cases.

Application module provided with mvc skeleton already have the baseline sample structure for the module:

├── config
│   └── module.config.php
├── src
│   ├── Controller
│   │   └── IndexController.php
│   └── Module.php
├── test
│   └── Controller
│       └── IndexControllerTest.php
└── view
    ├── application
    │   └── index
    │       └── index.phtml
    ├── error
    │   ├── 404.phtml
    │   └── index.phtml
    └── layout
        └── layout.phtml

When module is a standalone package then regular php package structure is needed which varies depending on the features used, like testing framework, code quality tools, CI and so on.

I believe best course of action is to update docs to remove references to skeleton module.

michalbundyra commented 4 years ago

Oh... I forgot - my idea before was to add a console command i.e. "laminas-cli create::module" (but first we need to finish up laminas-cli)

froschdesign commented 4 years ago

my idea before was to add a console command i.e. "laminas-cli create::module"

This will correspond with current (user) feedback. It helps all sides: when used by the user and when writing the documentation. 😃

bakeiro commented 4 years ago

BTW, what's the status with this task? I think the documentation still wrong and the laminas-cli it's not included in the getting started documentation... I guess it's not yet finished??

bakeiro commented 4 years ago

Also does laminas-cli replace the laminas/laminas-mvc-console component? since this one looks deprecated, but it's included in the composer create project process. Thanks in advance

Xerkus commented 4 years ago

Also does laminas-cli replace the laminas/laminas-mvc-console component?

Yes and no. Laminas-mvc-console is killed entirely as cli is significantly different from an http application and laminas-mvc primary goal is handling http requests. Console functionality in applications is replaced by something else like symfony/console

laminas-cli is a common way for the laminas based applications to register and expose cli functionality implemented with symfony/console. In my opinion, laminas-cli is more of a tooling setup. For the cli functionality that is an actual production functionality - like entrypoints for queue workers or for tasks performing business logic, I would personally go with a separate symfony console application instance.

froschdesign commented 4 years ago

A rewrite of the page is needed to remove all references to the skeleton module.

djnotes commented 2 years ago

For anyone interested in using LaminasSkeletonModule, I refactored the original ZendSkeletonModule to Laminas. You can find it here: https://github.com/djnotes/LaminasSkeletonModule I hope someone from Laminas forks it to be under Laminas organization, so that broken links in the docs get fixed.

froschdesign commented 2 years ago

@djnotes Thanks for your help on this and the reminder but we are on the way to add CLI support for creating a module. You can help too and share your ideas and wishes: https://github.com/laminas/laminas-cli/discussions/88