DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:composer

Composer

Core Dependencies

We use Composer to include certain 3rd party libraries with DokuWiki. However, we're using it a bit differently from what you may know from other projects:

All Composer installed library files and the autogenerated autoload configuration are checked into Git.1) This ensures that a Git checkout (or TGZ download from GitHub) is immediately usable without running Composer.

We only check in what we need. Everything we don't need is added to our .gitignore to avoid accidental check-ins. This way we avoid shipping potentially harmful example code and unnecessary tests and documentation.

We try to avoid large dependencies. We don't want to ship a huge tree of potential buggy/security-relevant dependencies with DokuWiki. So each library should be evaluated carefully before adding it.

Useful code developed for DokuWiki should be moved to external Composer packages where sensible. This is still in progress.

Development Dependencies

Dependencies and tools needed for development are installed via composer in the _test directory. We no longer check in those - instead developers need to install the dependencies themselves:

cd _test
composer install

We provide three shortcut scripts:

  • composer run test for running phpunit tests
  • composer run check for doing codestyle linting
  • composer run autofix to do automatic code style fixing and rector updates
devel/composer.txt · Last modified: 2024-04-27 14:58 by 2a02:8109:2c40:c25:70f5:f:6ad5:dd19

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki