- How do I install bigperson/laravel-exchange1c in a Laravel app?
- Install it with Composer using composer require bigperson/laravel-exchange1c, then publish the package configuration so config/exchange1c.php is available in your application. Configure the exchange route prefix, storage disk, middleware, and model bindings before pointing 1C at your endpoint. The package requires ext-zip and ext-dom/SimpleXML plus a writable storage path for the exchanged files.
- Which Laravel and PHP versions does bigperson/laravel-exchange1c support?
- Check the package's declared Composer constraints for the exact Laravel and PHP versions it lists. The last release was December 2023, so Laravel 11, Laravel 12, and PHP 8.3+ compatibility should be verified in a staging branch rather than assumed. For production, plan to pin the version or maintain a fork if you need newer framework support.
- What does the /1c_exchange endpoint do and how does the CommerceML handshake work?
- The package registers a configurable route, by default under /1c_exchange, and a controller implements the CommerceML 2 flow: checkauth, init, file, and import. The 1C side authenticates, negotiates the exchange parameters, uploads zipped XML files, and then triggers the import step. Import and export work is delegated to services configured in config/exchange1c.php, with middleware and events available around the sync steps.
- Do I need to create database tables or migrations for the package?
- No, the package ships no migrations and no Eloquent entities because it is a protocol adapter rather than a data model. You must add the columns and tables your integration needs, such as external_id or UUID fields and the offers, warehouse, and price-type tables the package expects. This design avoids dictating your catalog schema but shifts schema work onto your Laravel team.
- How do I connect my Eloquent models to 1C products, categories and offers?
- Map abstract nodes such as product, category, offer, price, warehouse, property, and order to your models in config/exchange1c.php. Each mapped model must implement the corresponding package interface, such as ProductInterface, CategoryInterface, OfferInterface, or OrderInterface, and will usually consume the supplied traits. Integration effort is mostly in writing and validating those implementations against your existing domain.
- Can I export orders to 1C and sync statuses back?
- Yes, the package supports order export with status synchronization, and your order model must implement OrderInterface and be bound in the configuration. You need to define which local statuses map to which 1C statuses and decide whether status changes flow back into Laravel. If you only need catalog import, order export can be left out of scope.
- How do I handle large catalog imports without timeouts or partial data?
- A full catalog import is a long-running, memory-sensitive HTTP request triggered by 1C rather than a queued Laravel job, so reconcile PHP and 1C timeout and memory limits on both sides. Wrap imports in transactions or implement idempotent upserts keyed on external ID so a mid-import failure does not leave the catalog half-updated. For very large catalogs, test realistic SKU, category, and image volumes and consider a custom queued or incremental approach.
- Is bigperson/laravel-exchange1c actively maintained and production-ready?
- The package has around 33 stars, a single apparent maintainer, and a last release in December 2023, so treat vendor maintenance as the dominant risk rather than protocol capability. It is feasible for a Laravel team with PHP depth and access to a 1C integrator, but expect slow issue triage and uncertain coverage of newer Laravel and PHP versions. Plan to vendor-pin or fork and make sure you have in-house capacity to patch a low-activity dependency.
- How should I secure the 1C exchange endpoint in production?
- The endpoint must be reachable by 1C, so use HTTPS and configure basic-auth credentials on the 1C side and in your package configuration. Restrict access with an allowlist, VPN, or the package's middleware array rather than exposing the route broadly, and keep the exchange storage path writable but outside public web roots. These are security review items for your infrastructure, not concerns the library solves for you.
- How can I test the 1C integration without a live 1C instance?
- Write Laravel HTTP tests that simulate the CommerceML handshake sequence of checkauth, init, file, and import using fixture zipped XML files. Test your interface implementations and model bindings directly with representative CommerceML payloads for categories, products, offers, prices, and orders. Also assert idempotent re-import behavior and status mapping so dialect differences from 1C configurations do not surprise you in production.