The component unified-namespace-generator generates the classes of the namespace OxidEsales\Eshop
which are called unified namespace classes </system_architecture/unified_namespace/index>
.This is done on the fly, e.g. when you install or update the OXID eShop.
The unified namespace generator implements a composer plugin and a standalone script. It generates the unified namespace classes on the fly, e.g. when you install or update the OXID eShop:
The generation of unified namespace classes is triggered by running
composer create-project
with the OXID eShop metapackagecomposer install
composer update
. If you want to be sure, to get no errors because of an old version of the unified-namespace-generator, first runcomposer update --no-plugins --no-scripts
and afterwardscomposer update
. If you directly execute firstcomposer update
, you may encounter errors. In this case, run againcomposer update
and the errors should go away.composer require
. If you want to be sure, to get no errors because of an old version of the unified-namespace-generator, first runcomposer require --no-update
and afterwardscomposer update
.reset-shop
- by manually executing
vendor/bin/oe-eshop-unified_namespace_generator
Given the example you run the following command:
composer create-project --no-dev oxid-esales/oxideshop-project my_oxid_eshop_project dev-b-6.0-ce
By triggering the generation with other commands the steps 1 and 2 can be different.
- Download and install all libraries to the folder vendor
- oxideshop-unified-namespace-generator is executed by the composer event POST_INSTALL
- Collect the files
Core/Autoload/UnifiedNamespaceClassMap.php
from each installed edition. Collect the file Core/Autoload/BackwardsCompatibilityClassMap.php from OXID eShop Community Edition - Generate the unified namespace classes and write them to the folder
vendor/oxid-esales/oxideshop-unified-namespace-generator/generated
. There should be one unified namespace class for every class in the OXID eShop edition.
If you get either errors
- by calling on of the commands of
this section <system_architecture_unified_namespace_generator_when_unified_namespace_generated>
or - you get a message that a unified namespace class could not be found like
Class OxidEsales\Eshop\Core\ConfigFile not found in bootstrap.php on line 18
Then, you should read the following steps in order to find the reason for the error:
- Have a look at the directory
vendor/oxid-esales/oxideshop-unified-namespace-generator/generated
- Are the unified namespace classes inside this directory, have the correct namespace and
extend the correct edition class <system_architecture-namespaces-inheritiance_chain>
? - Be sure, the directory has write permissions
- Execute the command
vendor/bin/oe-eshop-unified_namespace_generator
manually and look for errors - Be sure, the requirements as stated in
Mode Of Operation <oxid_eshop_core_unified_namespace_generator-mode_of_operation>
are fulfilled