Hi, I've installed Laminas API Tool with a fresh installation of Laminas-MVC and installed the API tool via composer command. Open the admin tool from the browser and tried to create an API and it gave me an error. At first, I didn't understand what is the problem. Google it and found a problem reported before by someone in which he had mentioned something about directory structure. This is the link.
Current behavior
The directory structure presented in the link is different which is getting produced now. The directory structure which is getting produced on my machine is something like below.
-module
--StatusLib
----config
------module.config.php
----src
------StatusLib
--------Module.php
--------V1
----------Rpc
----------Rest
----view
--Module.php
To view the service in the admin UI, if I manually give the reference in composer.json the service appears and use dump command it appears. But after that, if you go to create an APC service it again doesn't work and it gives error "Can't assign to property selected_version".
"autoload": {
"psr-4": {
"Application\": "module/Application/src/",
"StatusLib\": "module/StatusLib/"
}
},
Bug Report
Summary
Hi, I've installed Laminas API Tool with a fresh installation of Laminas-MVC and installed the API tool via composer command. Open the admin tool from the browser and tried to create an API and it gave me an error. At first, I didn't understand what is the problem. Google it and found a problem reported before by someone in which he had mentioned something about directory structure. This is the link.
Current behavior
The directory structure presented in the link is different which is getting produced now. The directory structure which is getting produced on my machine is something like below. -module --StatusLib ----config ------module.config.php ----src ------StatusLib --------Module.php --------V1 ----------Rpc ----------Rest ----view
--Module.php
To view the service in the admin UI, if I manually give the reference in composer.json the service appears and use dump command it appears. But after that, if you go to create an APC service it again doesn't work and it gives error "Can't assign to property selected_version". "autoload": { "psr-4": { "Application\": "module/Application/src/", "StatusLib\": "module/StatusLib/" } },
How to reproduce
composer require should look like below "php": "^7.3", "laminas/laminas-component-installer": "^1.0 || ^2.1", "laminas/laminas-development-mode": "^3.2", "laminas/laminas-mvc": "^3.1.1", "laminas/laminas-cache": "^2.9.0", "laminas/laminas-db": "^2.10.0", "laminas/laminas-mvc-form": "^1.0", "laminas/laminas-json": "^3.1.2", "laminas/laminas-log": "^2.11", "laminas/laminas-mvc-i18n": "^1.1.1", "laminas/laminas-mvc-plugins": "^1.0.1", "laminas/laminas-psr7bridge": "^1.2.0", "laminas/laminas-session": "^2.9.1", "laminas/laminas-di": "^3.1.1", "laminas-api-tools/api-tools": "~1.4", "rwoverdijk/assetmanager": "^3.0", "psr/http-factory": "^1.0"
/path/to/laminas-mvc/config/module.config.php
config/development.config.php
Expected behavior
I should be able to create API services. Also, if possible please add doctrine configuration in the readme.MD file. Thanks!