|This project is currently not actively maintained by webfactory. We use it as an internal tool and keep the source code public according to its license, but it is currently not installable using Docker, and the instructions in this README probably won't work. If you want to make use of this project, please take into account that you might need to invest some time and effort in order to make it work. We'd be happy seeing your investment making its way back to this repo in form of a Pull Request!|
Baton is a Composer dependency analytics tool which helps you keep track of the Composer dependencies in your PHP projects.
Visit baton.test.webfactory.de to see Baton in action.
Installing / Getting started
Clone the project
git clone firstname.lastname@example.org:webfactory/baton.git cd baton
Start a local version via docker-compose:
You might need to enter your proper MySQL-credentials in
To get the project up and running you simply need to run these commands:
composer install npm install gulp compile bin/console doctrine:database:create bin/console doctrine:schema:create bin/console server:run --docroot=www
bin/console doctrine:fixtures:load to import some generated projects.
Baton has Unit-Tests! Execute
bin/phpunit to run them.
In order to import private repositories from GitHub you need to provide an OAuth token.
Set it as the value of the environment variable
GITHUB_OAUTH_TOKEN on your server and you're good to go.
The same goes for Kiln repositories. Store your Kiln OAuth token in the
KILN_OAUTH_TOKEN environment variable on your server.
Use the webhook route
/webhook to import/update repositories on push events (tested with GitHub and Kiln).
You can also import projects by repository URL through the Symfony Command
app:import-project or the form at
Search Package Usages
Use the search form to find projects that use a Composer package matching a specific version range.
The search form fetches the results from
_format can be
Show project with list of Composer dependencies and their locked versions.
Show Composer Package with list of using projects grouped by version.
Right now private repositories are only supported for projects hosted on GitHub or Kiln using OAuth tokens for authentication. A more general approach would be to use ssh URLs for importing repositories and pass an authorized ssh identity to the VCS.
We love feedback :-)
Pull requests welcome!
Baton was created by @xkons as graduation project for his apprenticeship in software development.
The total implementation time was limited to 32 hours by the Industrie Handelskammer Bonn, the main entity for apprenticeships in its area, which also grades the apprentices.
This is the final commit from the initial implementation in the given timeframe: a812a21
Credits, Copyright and License
This project was started at the webfactory GmbH, Bonn.
Copyright 2018 webfactory GmbH, Bonn. Code released under the MIT license.