- What is nullthoughts/laravel-data-sync used for?
- It is a Laravel utility for keeping records in sync between environments through source control, so data can be versioned and replayed instead of copied around manually. It provides a configurable pipeline for importing, mapping, and updating Eloquent records. The goal is to let your application mirror a known data set reliably and repeatably. It ships as a conventional Composer package with a service provider and Laravel package discovery.
- How do I install laravel-data-sync in a Laravel application?
- Install it with Composer using composer require nullthoughts/laravel-data-sync. Because the package registers through Laravel package discovery, you should not need to add the service provider to your config/app.php manually. Check the repository README for any publishable configuration or migration steps before running your first sync. After installing, run your test suite to confirm nothing in your existing data pipeline is affected.
- Which PHP and Laravel versions does laravel-data-sync v3 require?
- Version 3.0 drops PHP 7 backwards compatibility, so it requires PHP 8.0 or newer, and it is positioned as the release needed to run on Laravel 9. The test bench was raised to Orchestra Testbench v7, which is the Laravel 9 test harness. The release note does not spell out the exact PHP floor or ceiling, so verify the ^8.0 versus ^8.1 constraints in composer.json directly. You should also confirm whether the illuminate/support and illuminate/contracts constraints are ranges or pinned majors.
- Does laravel-data-sync v3 support Laravel 10 or Laravel 11?
- That is not established by the release note, which only states v3 is required to run on Laravel 9. If the package pins illuminate/* to ^9.0 and Orchestra Testbench to ^7, v3 becomes a hard ceiling on a Laravel 10 or 11 roadmap. Supporting later majors would require a further release built against Testbench 8 or 9. Read composer.json before assuming forward compatibility.
- Is v3.0 a breaking change for existing users?
- Yes, in the semver sense: v3 is a major version that removes PHP 7 support, making it a platform shift rather than a feature release. The release note does not mention API or behavioural changes, and platform-only majors are usually signature-compatible, but that must be confirmed rather than inferred. Treat the upgrade as an environment migration with a version bump. Run your full test suite against v3 before merging.
- How do I migrate from laravel-data-sync v2 to v3?
- The migration is mostly an environment migration rather than a code migration: raise PHP to 8.0 or higher, upgrade the host application to Laravel 9, bump the package to v3, then run your suite. Expect non-trivial CI and local environment changes such as runner images, Docker base images, and Composer platform configuration. Application code changes should be minimal if v3 really is platform-only. Any application that cannot move in time should keep an explicit temporary v2 pin with a defined expiry date.
- Can I install v3 on PHP 7.4 or Laravel 8?
- No. Composer will refuse dependency resolution on legacy platforms because v3 no longer declares PHP 7 support. Forcing an install with --ignore-platform-reqs will typically produce runtime fatals rather than a working setup. Applications on PHP 7.x or Laravel 8 or below must stay on v2 until the framework upgrade completes.
- Is laravel-data-sync v2 still maintained after v3 ships?
- That is not stated anywhere in the release information, so it is an open question you should resolve with the maintainer before relying on it. Specifically, confirm whether v2 will still receive security and bug fixes, and for how long. If you need a temporary v2 pin for legacy applications, record an explicit expiry date and a plan for the platform upgrade. Pin the exact version in composer.json rather than using a loose constraint.
- How do I configure which records and fields get synced?
- The package offers a configurable pipeline for importing, mapping, and updating Eloquent records, so you define your data sources and map them onto model attributes. Configuration and sync definitions are typically published and then versioned alongside your code, which is what makes source-control-driven syncing possible. Consult the repository README for the exact configuration keys and file locations for your version. Keep your sync definitions in version control so environment changes are reviewable and repeatable.
- How do I test laravel-data-sync in CI?
- Orchestra Testbench lives in require-dev, so it does not constrain downstream consumers of the package. For your own application, write feature tests that run a sync against a test database and assert the resulting model state. Check the package's published CI matrix to see which combinations of PHP 8.0, 8.1, and 8.2 against Laravel 9 are actually exercised, and mirror that in your pipeline. If you plan to move to Laravel 10 or 11, verify there is a release that supports those majors before updating your matrix.