If you use your own code through your own actions, add-ons or PHP callbacks in an app, you can also integrate additional libraries with Composer.
Things to know
You do not have to manually integrate the Composer autoloader into the scripts. It is automatically integrated by edoc automate when the script, action, or callback is called.
Here's how
-
Open the app directory in WebDAV.
-
Select the appropriate directory, e.g. ./composer, ./addons/<name>/.
-
Edit or create the composer.json file. Example:
JSON{ "name": "addon/example", "type": "project", "require": { "developer/package": "^1.0" } } -
Open the corresponding app in edoc automate.
-
Open the Composer section in the app details to display all available Composer configurations for the app.
-
Click on Install to start the installation or update of the Composer packages.
Once the process is complete, you can use the installed libraries in the PHP scripts.
Show details about the status of Composer
When using Composer, various problems may occur when installing the specified packages.
You can view the details of the installation command at any time.
The following information is displayed:
-
Application exit code: Displays the code returned by the composer command. The code informs you where to look for the possible source of the error.
-
Default application output (stdout): Displays the output of the composer command. Usually, however, no information is displayed.
-
Default application messages (stderr): Displays all relevant output from the composer command. In this section you can usually see the exact status of the Composer repository.