The Tsugi PHP library is developed only in the main tsugi monorepo.
The standalone tsugi-php repository is a read-only mirror used for
Packagist distribution.
All changes to the Tsugi PHP library must be committed and pushed to
tsugimasterbefore they are mirrored totsugi-php.
Changes flow one way:
tsugi (master, lib/) → tsugi-php (master) → Packagist
Direct commits or pull requests to tsugi-php are not accepted and may be
overwritten.
Clone and work in the canonical repository:
git clone https://github.com/tsugiproject/tsugi.git
cd tsugiMake all code changes only under the lib/ directory.
Before mirroring, changes must be committed and pushed to the canonical branch:
git status
git add lib/
git commit -m "Describe the change to the Tsugi PHP library"
git push origin masterOnly committed changes are eligible to be mirrored.
From the tsugi repository root, run the mirror script:
qa/mirror-tsugi-php.shThis script:
- Extracts the
lib/directory history - Reconstructs it as a standalone repository
- Force-updates
tsugi-phpmasterusing--force-with-lease
The result is an exact mirror of tsugi/lib.
After mirroring, you may verify that the change appears in the standalone repo:
git ls-remote https://github.com/tsugiproject/tsugi-php.gitor by browsing the repository on GitHub.
- The history in
tsugi-phpis a projection of the monorepo history and may differ from earlier standalone commits. - Any commits made directly to
tsugi-phpmay be replaced during the next mirror operation. - All development discussion, issues, and pull requests belong in the main
tsugirepository.
The Tsugi PHP library includes a comprehensive test suite with 70+ test files covering Core, Util, UI, Crypt, and other components.
When working in the main tsugi repository:
cd tsugi/lib
composer install # Install dependencies if needed
composer test # Run all testsOr run PHPUnit directly:
cd tsugi/lib
./vendor/bin/phpunit --configuration phpunit.xml.distWhen working in the standalone tsugi-php repository:
cd tsugi-php
composer install # Install dependencies if needed
composer test # Run all testsOr run PHPUnit directly:
cd tsugi-php
./vendor/bin/phpunit --configuration phpunit.xml.distTo run a specific test file or directory:
# From lib/ or tsugi-php root
./vendor/bin/phpunit tests/Core/LaunchTest.php
./vendor/bin/phpunit tests/Util/If you remember only one thing:
Commit and push to
tsugimasterfirst.
tsugi-phpis generated from that state.