Module development since v6.2

Starting with version 6.2 OXID does not automatically scan modules in source/modules folder.
This means, that you can’t simply upload and activate a module anymore.

From now on module metadata is stored in a yaml text file, where it will always be retrieved from, instead of the metadata.php file. This means in particular, that OXID does not notice your changes in the metadata.php file after you installed and activated the module.
Therefore, if you are actively developing a module and you need to update module’s metadata (e.g. new template blocks) you have to run this command:
vendor/bin/oe-console oe:module:install-configuration source/modules/vendor/module
like described here:
You don’t really need the other composer repository stuff unless your module has composer dependencies that need to be installed or updated.
But if your custom module repository is in the modules folder, you should always tell composer not to overwrite the module files on update, otherwise your files will be deleted.
If you use custom namespaces but do not want to install your module via composer, you have to add your namespaces to the autoload psr-4 array in root composer.json file

"autoload": {
    "psr-4": {
        "MyVendor\\MyModule\\": "./source/modules/my_vendor/my_module/"

and refresh composer’s classmap with this command:
composer dump-autoload

I think “bc layer” means the ability to use the old classnames like “oxarticle”, and to use metadata version 1.x. This has not been dropped. You still do not need namespaces in a module. The only thing that has really changed is that you need to transfer the metadata to the yaml file, which is done either by composer update or by the oe-console-command.

1 Like

thanks, i changed the text a bit