Skip to content

GitlabCiSynchronizer ​

php
final class Zairakai\LaravelDevTools\Services\GitlabCiSynchronizer

Synchronizes 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): void

Run synchronization check.

ParameterDescription
$autoFixTrue on post-update-cmd, false on post-install-cmd

Documentation of 4.3.0 , built from 0bcdf31 on 4.3.0 by pipeline #2936310886 on 2026-10-11.