Composer
An adsum installation is a Composer project without PHP code of its own: the Composer configuration, the environment
settings and your overrides in config/.
Create an installation
-
Create a directory and a Composer project:
mkdir my-adsum && cd my-adsum composer init --no-interaction --name=company/adsumCopied! -
Allow the Composer plugins that write the entry points and the runtime script:
composer config allow-plugins.web-vision/adsum-composer-installers true composer config allow-plugins.symfony/runtime trueCopied! -
Require the core and the packages you need:
composer require symfony/runtime web-vision/adsum-composer-installers \ web-vision/adsum-core web-vision/adsum-attendanceCopied!web-: identity, organisation, employees, approvals, notificationsvision/ adsum- core web-: working-time models, rosters, holidays, the working-day calendarvision/ adsum- working- time web-: time tracking; requiresvision/ adsum- attendance adsum-working- time
-
Put the secrets into
.env.(see Configuration) and create the tables:local bin/console doctrine:migrations:migrate --no-interactionCopied!
What Composer writes
On every composer install and composer update, web- writes:
public/andindex. php bin/. Both are rewritten every time; do not edit them.console .envwith documented defaults,APP_andENV=prod APP_, only when there is none yet. It contains no secrets.DEBUG=0 public/, a link to the built frontend of every installed package.bundles/<name>/
Other locations are set with web- and console below extra. in composer. (defaults
public and bin/).
The web root
Point the web server to public/ and forward every request that does not match a file to index.. Behind a
reverse proxy, set TRUSTED_ (see Configuration).
Package activation
Every installed package of an adsum type is active: the core (adsum-), adsum packages
(adsum-), country packages (adsum-) and extensions of other vendors (adsum-). Its
routes, menu entries and migrations are available on the next start; run bin/
to create its tables. To deactivate a package, remove it with Composer.
An extension needs no bundle class. It declares "type": "adsum- in its composer. and uses this
layout:
config/: servicesservices. yaml config/: configuration of other bundlespackages/ config/: Symfony bundles it needsbundles. php src/<Module>/: entitiesDomain/ Model/ migrations/andtranslations/
Customisation
Overrides live in config/ of the project:
config/: configuration of Symfony and its bundlespackages/*. yaml config/: services and parametersservices. yaml config/androutes. yaml config/: routesroutes/ config/: additional third-party bundlesbundles. php
The configuration of the core loads first, then that of every package, then your config/. The defaults of the
core are in packages/.
Example: the time zone for instants until a company time zone is known (default Europe/):
# config/services.yaml
parameters:
app.default_time_zone: 'Europe/Vienna'
Further parameters:
app.: employee photos (defaultphoto_ directory var/)storage/ photos app.: other files such as company logos and login images (default: the photo directory)file_ storage_ directory
On servers, use directories that survive deployments. To keep the files elsewhere, for example in an S3-compatible
store, replace the service Web with your own implementation.