wikibase / doctrine-term-store
Small library for persistence of Wikibase terms via Doctrine DBAL
Requires
- php: ^5.6.99|^7.0
- doctrine/dbal: ~2.5
- onoi/message-reporter: ~1.3
- wikibase/term-store: ~1.0
Requires (Dev)
- doctrine/dbal: ~2.5.13
- mediawiki/mediawiki-codesniffer: ~23.0
- ockcyp/covers-validator: ~1.1
- phpstan/phpstan: ~0.9.2
- phpunit/phpunit: ^6.5.14
- slevomat/coding-standard: ^3.0|~4.5
- squizlabs/php_codesniffer: ~3.3
This package is not auto-updated.
Last update: 2020-01-29 03:16:50 UTC
README
Doctrine DBAL implementation of Wikibase TermStore.
Usage
The public entry point of the package is DoctrineTermStore
, which is used to construct all services.
$termStore = new DoctrineTermStore( /* config */ );
Getting terms:
$fingerprint = $termStore->newPropertyTermStore()->getTerms( $propertyId );
Schema creation:
$termStore->install();
Installation
To use the Wikibase TermStore library in your project, simply add a dependency on wikibase/doctrine-term-store
to your project's composer.json
file. Here is a minimal example of a composer.json
file that just defines a dependency on wikibase/doctrine-term-store 1.x:
{ "require": { "wikibase/doctrine-term-store": "~1.0" } }
Development
Start by installing the project dependencies by executing
composer update
You can run the tests by executing
make test
You can run the style checks by executing
make cs
To run all CI checks, execute
make ci
You can also invoke PHPUnit directly to pass it arguments, as follows
vendor/bin/phpunit --filter SomeClassNameOrFilter