Open jbelien opened 4 years ago
@jbelien Thanks for reporting the issue. I believe zend-i18n should be added then to skeleton, so user has smooth experience when using default installation.
Can you explain what's wrong with 'Zend\I18n'
(with single slash)? It was not working for you properly when it was injected like that? What was the error? Why you had to change it to double?
I've just tried install the skeleton and I see in config/module.config.php
:
return [
'Zend\Db',
'Zend\Filter',
'Zend\Hydrator',
'Zend\InputFilter',
'Zend\Paginator',
'Zend\Router',
'Zend\Validator',
'ZF\Apigility',
'ZF\Apigility\Documentation',
'ZF\ApiProblem',
'ZF\Configuration',
'ZF\OAuth2',
'ZF\MvcAuth',
'ZF\Hal',
'ZF\ContentNegotiation',
'ZF\ContentValidation',
'ZF\Rest',
'ZF\Rpc',
'ZF\Versioning',
'Application',
];
so all modules are with single \
and it doesn't cause any issues.
Also see: https://3v4l.org/vmEge
Can you explain what's wrong with 'Zend\I18n' (with single slash)?
It indeed works with on single slash Zend\I18n
, sorry !
I mentioned it because all the others have a double slash in my config/modules.config.php
and Zend\I18n
was the single one with one single slash (with auto injection via composer
).
So not really an issue indeed (and probably related to my environment - WSL -) and a simple composer require zendframework/zend-i18n
is enough to fix this issue!
This repository has been closed and moved to laminas-api-tools/api-tools-skeleton; a new issue has been opened at https://github.com/laminas-api-tools/api-tools-skeleton/issues/1.
Hello,
I just installed a fresh install of Apigility with
curl -sS https://apigility.org/install | php
(according to documentation).I started playing with it (it's my first time using Apigility) but I couldn't add an
alpha
validator on my field. Looking at the console I realized I had the following error:To fix the issue, I added the
zendframework/zend-i18n
package withcomposer require zendframework/zend-i18n
and added'Zend\\I18n'
inmodules.config.php
(it was done by composer but there was a\
missing).I hope it helps :)