Appearance
GitlabCiSynchronizer
php
final class Zairakai\LaravelDevTools\Services\GitlabCiSynchronizerSynchronizes the GitLab CI pipeline ref with the installed package version.
Reads the consumer project's .gitlab-ci.yml, detects the ref: used in the laravel-dev-tools include block, and compares it against the currently installed package version.
Behavior by Composer event:
- post-install-cmd → warn if out of sync (never modify files)
- post-update-cmd → auto-fix the ref if out of sync
If .gitlab-ci.yml is absent, logs an info message and offers to create it from the bundled template via artisan dev-tools:publish --publish=gitlab-ci.
Source: src/Services/GitlabCiSynchronizer.php
Methods
__construct()
php
public function __construct(IOInterface $io, string $projectRoot, callable $versionResolver = null)synchronize()
php
public function synchronize(bool $autoFix): voidRun synchronization check.
| Parameter | Description |
|---|---|
$autoFix | True on post-update-cmd, false on post-install-cmd |