From 8a31b70ada5429a388db4e93289845299211d3d5 Mon Sep 17 00:00:00 2001 From: Ollie Date: Tue, 20 Jan 2026 17:23:21 +0000 Subject: [PATCH 1/2] Improve README.md --- README.md | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index d8f06d8cb..fc7f6a83c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ > ℹ️ Issues for this repository are tracked on [Phabricator](https://phabricator.wikimedia.org/project/board/5563/) - ([Click here to open a new one](https://phabricator.wikimedia.org/maniphest/task/edit/form/1/?tags=wikibase_cloud,wbstack_api )) -> + # WBStack Platform API ## Configuration The platform API comes in a few different flavours that can be toggled using environment variables: @@ -9,14 +9,11 @@ The platform API comes in a few different flavours that can be toggled using env - `ROUTES_LOAD_SANDBOX` - web routes for the public facing sandbox usecase - `ROUTES_LOAD_BACKEND` - internal only API endpoints (non public) for all usecases -This single application could likely be split up at some point. -Everything is currently together to make use of the shared wiki management code -and query service management code. +This single application could likely be split up at some point. Everything is currently together to make use of the shared wiki management code and query service management code. ## Additional environment variables ### Contact page settings -- `WBSTACK_CONTACT_MAIL_SENDER` - The mail address of the sender address of the contact page mails. -If the address includes the placeholder ``, it gets replaced with a shorthand for the actual selected subject (`give-feedback`, `report-a-problem`, etc) +- `WBSTACK_CONTACT_MAIL_SENDER` - The mail address of the sender address of the contact page mails. If the address includes the placeholder ``, it gets replaced with a shorthand for the actual selected subject (`give-feedback`, `report-a-problem`, etc) - `WBSTACK_CONTACT_MAIL_RECIPIENT` - The receiver address of the contact page mails @@ -24,7 +21,7 @@ If the address includes the placeholder ``, it gets replaced with a sho ### Install dependencies -It is recommened to install the php dependencies via a composer docker container as that contains the required php extensions: +It is recommended to install the php dependencies via a composer docker container as that contains the required php extensions: ``` docker run --rm -it -v $PWD:/app -u $(id -u):$(id -g) composer install --ignore-platform-reqs ``` @@ -85,7 +82,7 @@ If you want to develop with the UI then simply point the UI docker compose setup ### Seeded data -Some data is added to the database via the laraval seeders. +Some data is added to the database via the Laravel seeders. You can log in with these details for example. @@ -99,7 +96,17 @@ And create a wiki. Currently most of the tests require the DB connection to exist. ```sh +# run the whole test suite docker compose exec api vendor/bin/phpunit + +# run a single file +docker compose exec api vendor/bin/phpunit tests/Jobs/DeleteWikiJobTest.php + +# run a single class +docker compose exec api vendor/bin/phpunit --filter DeleteWikiJobTest + +# run a single method +docker compose exec api vendor/bin/phpunit --filter DeleteWikiJobTest::testDeletesWiki ``` ### Linting From 27bb98b5161d60064b20a756b512b4417d5c5fd7 Mon Sep 17 00:00:00 2001 From: Ollie <43674967+outdooracorn@users.noreply.github.com> Date: Wed, 21 Jan 2026 11:41:15 +0000 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Dat WMDE --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fc7f6a83c..cc061e2da 100644 --- a/README.md +++ b/README.md @@ -51,13 +51,13 @@ docker compose down --volumes ### Migrations -Run everything in one go ... +Run everything in one go: ```sh docker compose exec api bash -c 'php artisan migrate:fresh && php artisan passport:install && php artisan db:seed && php artisan key:generate && php artisan storage:link' ``` -Or each command separately ... +Or each command separately: ```sh # Create the SQL tables needed