This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a wrapper library for PHP Scoper that packages the PHAR file for distribution via Composer. The repository is automatically updated daily via GitHub Actions to track the latest PHP Scoper releases.
Key characteristic: This is a wrapper/distribution project with minimal custom code. The main asset is bin/php-scoper.phar, which is downloaded from the upstream humbug/php-scoper project.
- bin/php-scoper.phar: The PHP Scoper PHAR file downloaded from humbug/php-scoper releases
- composer.json: Declares the PHAR as a binary and tracks PHP version requirements from upstream
- .github/scripts/update-php-scoper.php: Automated update script that:
- Fetches the latest release from humbug/php-scoper via GitHub API
- Downloads the PHAR file to bin/
- Updates composer.json with the required PHP version from upstream
- Uses MD5 checksums to detect actual changes
- Sets environment variables for the GitHub Actions workflow
The repository uses a scheduled GitHub Action (.github/workflows/update-php-scoper.yml) that:
- Runs daily at 00:00 UTC (or manually via workflow_dispatch)
- Executes update-php-scoper.php to check for new releases
- Creates a pull request if a new version is detected
- Creates a git tag matching the upstream version after update
Version tracking: Git tags match upstream PHP Scoper versions (e.g., 0.18.11, 0.18.14)
To manually test the update process:
php .github/scripts/update-php-scoper.phpThis script compares the latest git tag with the latest upstream release.
The GitHub Actions workflow can be triggered:
- Automatically via daily cron schedule
- Manually via GitHub Actions UI (workflow_dispatch)
Versions are managed through git tags that correspond to upstream PHP Scoper releases. The update script automatically:
- Compares current version (latest git tag) with latest upstream release
- Only updates if upstream version is newer
- Updates both the PHAR and PHP version requirement in composer.json