Open loqus opened 3 years ago
This should be fixed in an update here. Can you show us which classes/files are causing the messages?
This should be fixed in an update here. Can you show us which classes/files are causing the messages?
All of them: Class modules\custommodule\migrations Class modules\custommodule\records Class modules\custommodule\models Class modules\custommodule\variables Class modules\custommodule\assetbundles Class modules\custommodule\assetbundles Class modules\custommodule\assetbundles Class modules\custommodule\fields Class modules\custommodule\jobs Class modules\custommodule\twigextensions Class modules\custommodule\controllers Class modules\custommodule\controllers Class modules\custommodule\services Class modules\custommodule\widgets Class modules\custommodule\console Class modules\custommodule\CustomModule
Okay found the issue: in the composer.json you need these lines
"autoload": {
"psr-4": {
"modules\\custommodule\\": "modules/custommodule/src"
}
},
beware of the trailing \, i overlooked them and was searching for hours :)
That should already be documented in the module's README.md file: https://github.com/nystudio107/generator-craftplugin/blob/master/app/templates/module_api_version_3_0/_README.md#installation
Question
I generated a module a year ago and it works really well, but the last months after running composer update i get an error message like "does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0.".
Is that something you can fix in a future generator? Or maybe change the readme to incorporate changes for composer v2