Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mezzio:handler:create \ CreateTemplate::getTemplateSuffixFromConfig() must be of the type array, object given #21

Open
PHPTCloud opened this issue Jan 8, 2022 · 1 comment
Labels
Awaiting Author Updates Bug Something isn't working

Comments

@PHPTCloud
Copy link

Bug Report

Q A
Version(s) 3.x

PHP 7.4

I tried create handler through cli command below. Its work okay, but I've got error of signature (see below). How to get rid of this problem or its a bug?

Command:

$ php ./bin/laminas mezzio:handler:create App\\Handler\\SignInPageHandler

Console output:

Creating request handler App\Handler\SignInPageHandler...
Success!
- Created class App\Handler\SignInPageHandler, in file /<project_path>/src/App/Handler/SignInPageHandler.php
PHP Fatal error:  Uncaught TypeError: Argument 2 passed to Mezzio\Tooling\CreateHandler\CreateTemplate::getTemplateSuffixFromConfig() 
must be of the type array, object given, called in /<project_path>/vendor/mezzio/mezzio-tooling/src/CreateHandler/CreateTemplate.php on line 93 and 
defined in /<project_path>/vendor/mezzio/mezzio-tooling/src/CreateHandler/CreateTemplate.php:174

Stack trace:
#0 /<project_path>/vendor/mezzio/mezzio-tooling/src/CreateHandler/CreateTemplate.php(93): Mezzio\Tooling\CreateHandler\CreateTemplate->getTemplateSuffixFromConfig()
#1 /<project_path>/vendor/mezzio/mezzio-tooling/src/CreateHandler/CreateHandlerCommand.php(259): Mezzio\Tooling\CreateHandler\CreateTemplate->generateTemplate()
#2 /<project_path>/vendor/mezzio/mezzio-tooling/src/CreateHandler/CreateHandlerCommand.php(229): Mezzio\Tooling\CreateHandler\CreateHandlerCommand->generateTemplate()
#3 /<project_path>/vendor/mezzio/mezzio-tooling/src/CreateHandler/CreateTemplate.php on line 174
@PHPTCloud PHPTCloud added the Bug Something isn't working label Jan 8, 2022
@weierophinney
Copy link
Contributor

There is no v 3.x of mezzio-tooling; the latest version is 2.4.0. Use composer show mezzio/mezzio-tooling to determine the version you have installed locally.

I've tried the above with the 2.4.0 version, and get no errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Author Updates Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants