zendframework / zend-expressive

PSR-15 middleware in minutes!
BSD 3-Clause "New" or "Revised" License
711 stars 197 forks source link

handler:create produces template in wrong location #604

Closed JalfResi closed 6 years ago

JalfResi commented 6 years ago

Provide a narrative description of what you are trying to accomplish.

From a fresh skeleton project install, create a new module with a new handler. I issued the following commands:

composer create-project zendframework/zend-expressive-skeleton ze3-app
# (modular, zend-servicemanager, FastRoute, Twig and Whoops)

./vendor/bin/expressive module:create Staff
./vendor/bin/expressive handler:create Staff\\Action\\ListAll

Code to reproduce the issue

composer create-project zendframework/zend-expressive-skeleton ze3-app
# (modular, zend-servicemanager, FastRoute, Twig and Whoops)

./vendor/bin/expressive module:create Staff
./vendor/bin/expressive handler:create Staff\\Action\\ListAll

Expected results

The list-all.html.twig file should be created in the new Staff module templates directory.

Actual results

A new directory was created in the project route:

/Users/ben.davies/Documents/projects/ze3-app/src/Staff/src/templates/list-all.html.twig

Looking at the output of the handler:create command I can see the following:

- Created template staff::list-all in file /Users/ben.davies/Documents/projects/ze3-app//Users/ben.davies/Documents/projects/ze3-app/src/Staff/src/../templates/list-all.html.twig

On MacOS.

PHP 7.1.14 (cli) (built: Feb 6 2018 16:24:31) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans

geerteltink commented 6 years ago

This should be reported at zendframework/zend-expressive-tooling.

JalfResi commented 6 years ago

Thanks! Closing