swagger-api / swagger-api/swagger-codegen
[PHP] Composer Deprecation of autoloading non-psr4 compilant classes
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Autogenerated classes will no longer be supported in composer 2.0.
auto/generated/class does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/Cellar/composer/1.10.8/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Swagger-codegen version
3.0.20
Steps to reproduce
Generate a swagger client for PHP. Upload it as composer package and install it with composer.
Suggest a fix/enhancement
Make autogenerated classes PSR-4 compilant.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue by generating a PHP client with Swagger Codegen 3.0.20 and installing it as a Composer package. Inspect the generated auto/generated/class paths and the PHP generation templates to identify why the classes do not comply with PSR-4. Done means the generated classes autoload without the Composer deprecation or failure in Composer 2.0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100