https://guc.toolforge.org/

Clone this repo:

Branches

  1. 29e6e4b Localisation updates from https://translatewiki.net. by Translation updater bot · 3 days ago master
  2. 4a3fb13 Localisation updates from https://translatewiki.net. by Translation updater bot · 7 days ago
  3. d811d2a Localisation updates from https://translatewiki.net. by Translation updater bot · 10 days ago
  4. a8decb3 index.php: Add link to Special:GlobalContributions for IP-address queries by Timo Tijhof · 1 year, 6 months ago
  5. 63455e4 build: Drop php8.2 by Timo Tijhof · 12 days ago

Global user contributions

Getting started

Requires Composer.

composer install
composer serve

Then open http://localhost:4000.

Local development

You can use the following patch to stub the database and render some of the response UI locally.

# src/App.php
    protected function openDB($host, $dbname = null) {
        // @phan-suppress-next-line PhanTypeMismatchReturn
        return new class() {
            public function prepare(string $query) {
                return new class() {
                    public function bindParam() {
                    }
                    public function execute() {
                    }
                    public function fetchAll() {
                        return [];
                    }
                };
            }
        };
    }

Toolforge management

See Help:Toolforge/Kubernetes#PHP on Wikitech.

Installation

$ ssh tools-login.wmflabs.org

you@tools-bastion$ become my-tool-here

mytool@tools-bastion:~$ git clone … git-guc
mytool@tools-bastion:~$ ln -s git-guc public_html
mytool@tools-bastion:~$ webservice --backend=kubernetes php8.4 restart
mytool@tools-bastion:~$ webservice shell

tools.guc@interactive:~$ cd git-guc
tools.guc@interactive:git-guc$ chmod 775 cache/
tools.guc@interactive:git-guc$ composer install --no-dev

Deploy changes

$ ssh tools-login.wmflabs.org

you@tools-bastion$ become guc

guc@tools-bastion:~$ webservice shell

tools.guc@interactive:~$ cd git-guc
tools.guc@interactive:git-guc$ git pull
tools.guc@interactive:git-guc$ composer update --no-dev

History