You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
phpunit --filter '/IssueFixTest::testControllerNamespaceIssueForModulesInUrlPrefixes$/'
PHPUnit 8.5.38 by Sebastian Bergmann and contributors.
E 1 / 1 (100%)
Time: 79 ms, Memory: 12.00 MB
There was 1 error:
1) tests\unit\IssueFixTest::testControllerNamespaceIssueForModulesInUrlPrefixes
Laminas\Code\Generator\Exception\InvalidArgumentException: A method by name actionList already exists in this class.
/app/vendor/laminas/laminas-code/src/Generator/ClassGenerator.php:866
/app/vendor/laminas/laminas-code/src/Generator/ClassGenerator.php:852
/app/src/lib/generators/ControllersGenerator.php:136
/app/src/lib/generators/ControllersGenerator.php:83
/app/src/generator/ApiGenerator.php:477
/app/tests/DbTestCase.php:62
/app/tests/unit/IssueFixTest.php:368
phpvfscomposer:///app/vendor/phpunit/phpunit/phpunit:97
ERRORS!
Tests: 1, Assertions: 1, Errors: 1.
If params is not required then we get validation error:
```
Array
(
[openApiPath] => Array
(
[0] => Failed to validate OpenAPI spec:<ul>
<li>[/paths/~1pets~1{id}/get/parameters/1] Parameter 'required' must be true for 'in': 'path'.</li>
</ul>
)
)
```
and code generation fails.
Controller namespace for modules in
urlPrefixes
does not work properly.If controllers have same name/id in different modules, we get error.
Expected: It should not throw error and should generate the code successfully.
Given the failing test 73aa9b3
we get error:
Related to #14
The text was updated successfully, but these errors were encountered: