You are browsing the latest version of the documentation which is not released yet. See the current stable version instead.
Backend API Installation¶
Please follow these instructions with clean git working tree (you can verify with
git status). If the installation fails, you can easily revert all changes and start again.
If you installed the Shopsys Framework with docker please run all commands in the
php-fpm docker container
shopsys/backend-api package in the
composer.json or run
composer require shopsys/backend-api
Backend API installation is fully automated, so you have to run only (you have to be in the project root directory)
If it was successful, you'll see
Backend API installation was successful!
Update your composer because the
install.sh added a composer dependency
composer update trikoder/oauth2-bundle
Run database migrations
php phing db-migrations
Now you can continue with creating OAuth client
The automated installation is based on copying the code from
vendor/shopsys/backend-api/install directory and on applying patches.
Copying files can cause problems only if you already had a file with the same name in the same directory. In such case please rename your files and run the installation again.
Patching files can fail. It can happen if you changed something in your project and these changes are incompatible with the patch.
The installation script tries to apply patches for all involved files and applies as much as possible. In other words the installation script doesn't stop on the first patch error.
In case of error you'll see error messages like
Patch for app/AppKernel.php cannot be applied!.
In such case please take a look into install directory, and apply all patches manually.
- You have to only add code into files, so copy only lines that starts with plus
- eg. from
composer.json.patchcopy the line
"trikoder/oauth2-bundle": "^1.1",into your
- eg. from
- The directory structure in the installation directory matches the directory structure in your project