- Prepare your system to work with Composer
- Install OXID eShop using Composer
Composer is the de facto standard dependency manager for PHP project. OXID uses it to define relations between:
- OXID eShop editions
- OXID eShop and modules
- OXID eShop and themes
- 3rd party dependencies
You can find details how to install Composer here.
Satis is an Open Source static Composer repository generator. It might be used to create cache for better performance while accessing project source code or to control access to private repositories.
OXID uses Satis to control access to private GitHub repositories, like OXID eShop PE and OXID eShop EE.
What’s included in the Release?
The main goal for this beta release is to give our partners the possibility to adapt their modules to the next major version of the OXID eShop core. Therefore, the beta release includes the OXID eShop CE/PE/EE core, the Flow and Azure Themes and the OXID Composer Plugin. Each of these is now a seperate component and the combination of them all is called the OXID eShop Compilation
Benefits of using Composer and Compilation
- Each component might be replaced with another component easily
- Each component might be updated separately
- The Composer plugin allows control installation and update procedures
- Modules and themes might be installed easily
- The compilation holds all dependencies information in one place
Install OXID eShop using Composer
The simplest way to install the OXID eShop is to run the Composer command to create a project. By default, Composer installs the OXID eShop Compilation including the development ressources (e. g. OXID Testing Library, IDE helper, Codesniffer). Thus, if you are planning to install the OXID eShop Compilation on production environments, make sure to add the --no-dev flag.
- For Community Edition run:
PHP1composer create-project --no-dev oxid-esales/oxideshop-project my_oxid_eshop_project dev-b-6.0-beta-ce
- For Professional Edition run:
PHP1composer create-project --no-dev oxid-esales/oxideshop-project my_oxid_eshop_project dev-b-6.0-beta-pe
- For Enterprise Edition run:
PHP1composer create-project --no-dev oxid-esales/oxideshop-project my_oxid_eshop_project dev-b-6.0-beta-ee
This will install all the Compilation components into a new directory named my_oxid_eshop_project.
During the installation of the Professional Edition or Enterprise Edition, Composer will ask you to provide login credentials for the Satis repositories. You should have received these credentials from our Support team already.
By default, these credentials are stored in COMPOSER_HOME/auth.json (e. g. ~/.config/composer/auth.json on Ubuntu). If you plan to install multiple editions in parallel on the same machine (e. g. Professional and Enterprise Edition), then you might get the following error during the installation of the second edition:
Invalid credentials for 'https://packages.oxid-esales.com/[edition_name]/unencoded/packages.json', aborting.
In this case, just place a auth.json file besides the composer.json file of each project. Check out the authentication section of the Composer documentation for details.
The document root of your web server should point to the
source/ subdirectory in your project directory.
- These directories and their subdirectories must be writeable all the time:
- ./source/out/pictures/ (including files, which are inside this directory)
During installation those must be writeable
After installation those must be read-only
and set the export dir to writeable
- Open web server URL and go though setup steps.
How to add 3rd party dependency
Additional dependencies can be added via same composer.json file. For example, if there is a need to add runtime library like monolog run:
composer require monolog/monolog
If there is a need to add a development dependency like the OXID eShop testing library:
composer require --dev oxid-esales/testing-library
The Metapackage of the V6 beta compilation specifies the exact dependencies with which the release was tested. Having the same versions of components in a project ensures that the OXID eShop always works as expected. However, sometimes one needs to change a dependency. To do that add an alias in the project composer file to the needed version as is shown in the following example:
"doctrine/cache":"v1.6.0 as v1.6.1"
This lowers doctrine cache package version to v1.6.0 even while metapackage require v1.6.1.