addwiki/addwiki

Addwiki Monorepo

Installs: 24

Dependents: 1

Suggesters: 0

Security: 0

Stars: 5

Watchers: 6

Forks: 3

Open Issues: 20

Type:project

3.0.0 2021-10-23 08:54 UTC

README

Addwiki is a collection of PHP libraries, packages and applications created for interacting with MediaWiki, Wikibase, Wikimedia and more.

To dive in take a look at the docs site.

If you want to submit code patches to any of the repositories, then this is the place to look!

Packages

All packages exist in the /packages directory. Every package also exists in its own read only git repository, can be used separately and is installable via composer.

Most popular:

WIP CLI:

Other WIP:

Using the monorepo

monorepo-builder

This mono repo uses https://github.com/symplify/monorepo-builder

This provides convenience scripts for a few things...

Merge all composer.json files together with:

composer merge

Bump the cross package dependency with:

vendor/bin/monorepo-builder bump-interdependency "<version here>"

Validate your synchronization:

composer validate-monorepo

Keep your package aliases up to date (not yet working)

vendor/bin/monorepo-builder package-alias

Testing & CI

Github Actions exist to split out packages as well as run tests on them.

Commands exist in each of the packages to run individual tests.

You can also run all tests from the main monorepo.

Run lint on all packages:

composer lint

Run phpunit unit tests on a single package:

vendor/bin/phpunit packages/mediawiki-api-base/tests/unit

Integration tests are facilitated by docker-composer-ci.yml files which are currently kept in sync manually. The setup in the monorepo should work for all packages. Run it before running integration tests.

docker-compose -f docker-compose-ci.yml up -d --build

Wait for the wiki to be accessible, then run the tests:

composer phpunit-integration