baks-dev/four-tochki-products
Laravel module for 4tochki products. Install via Composer, publish assets with baks:assets:install, run Doctrine migrations, and configure partner warehouse IDs. Includes PHPUnit tests. Requires PHP 8.4+.
Despite being described as "Laravel/PHP," baks-dev/four-tochki-products is a Symfony bundle. Every installation step in the README assumes a Symfony app: bin/console, baks:assets:install, Doctrine migrations, PHPUnit test groups. There is no php artisan, no config/*.php publish tag, no Eloquent model, and no service provider. Treat this as a Symfony component you consume from Laravel, not a Laravel package you composer require and move on.
composer require baks-dev/four-tochki-productsconfig/bundles.php (the README omits this — check the bundle for its *Bundle class name).php bin/console baks:assets:install — installs config + file resources into the Symfony app.php bin/console doctrine:migrations:diff && php bin/console doctrine:migrations:migrate — generates and runs the schema (products, warehouses, inventory).php bin/phpunit --group=four-tochki-productssrc/: the bundle has no documented services, so the Entity and Service/Repository folders are your only source of truth for what the package can actually do. Read Entity/* to learn the schema before touching migrations.config/: after baks:assets:install, this is where the package's configuration lands. This is where API credentials and warehouse IDs will go.https://b2b.4tochki.ru/Account/AvailableWarehouses: the only documented external dependency — you must know your partner warehouse IDs before any sync makes sense.resources/ / templates/: assets installed by the console command.The realistic first use case is product catalog mirroring: pull the 4tochki product/warehouse data into your app's schema, then expose it to Laravel. Because the bundle's schema is Doctrine-managed, the shortest path is:
doctrine:migrations:diff and capture the generated SQL.This is slower than composer require implies, but it is the only pattern that keeps the ORM worlds separated while still being honest about where the data comes from.
Do not mix Doctrine and Eloquent in one process. The bundle assumes Doctrine's EntityManager, Symfony's console, and its own config loader; dropping it into a Laravel app will fight the framework at every boot.
Http::withToken(...). You keep Laravel on Eloquent and leave Doctrine to the sidecar.This matches the "Symfony micro-service in Docker" approach the product team already flagged as the safe path.
If you must keep a single app:
doctrine:migrations:diff output as a reference, not as a runtime dependency.Schema::create(...) files in database/migrations.FourTochkiProduct, FourTochkiWarehouse, FourTochkiStock) that mirror the Doctrine entities 1:1.tools/ Composer workspace so it never enters your production autoloader.4tochki is warehouse-centric (that is the whole point of the AvailableWarehouses link). Structure your sync around warehouses, not SKUs:
(sku, warehouse_id) for stock levels.Schedule::command('fourtochki:stock')->hourly() on the Laravel side, calling the sidecar.Catalog and stock updates are the kind of thing that will be retried. Make every write upsert on SKU, and wrap network calls in a queued job with exponential backoff. The package does not advertise a queue integration, so assume none exists and build one.
Baks\ namespace classes.sync_state column on your Eloquent models (pending, synced, failed, last_error) — you will need it for debugging because the README documents no error-handling surface.php artisan baks:assets:install will not work. The command is Symfony Console. Use php bin/console baks:assets:install inside the Symfony host.php artisan test --group=four-tochki-products will not work. That flag belongs to PHPUnit; run php bin/phpunit --group=four-tochki-products in the Symfony host.php artisan migrate will not pick up the bundle's migrations. They are Doctrine migrations, run via doctrine:migrations:migrate.ProductSyncService::syncProduct(...) as a Laravel call is invented — the README does not expose such a class. Verify class names in src/ before writing code against them.PHP 8.4 minimum means you are pinned to Laravel 11.x/12.x era runtimes. If you are on Laravel 10 or older, either upgrade or keep the bundle strictly in the sidecar. Do not try to downgrade the package.
The bundle will generate tables with names it controls (product, warehouse, or similar). These will collide with your existing Laravel products table if you share a database. Use a dedicated schema / prefix (four_tochki_*) or, better, separate databases entirely.
## v7.4.12 is literally the whole release note). You cannot infer breaking changes from version numbers.config/bundles.php in the Symfony host and by running php bin/console debug:container | grep -i tochki.baks:assets:install; if the command silently succeeds with nothing written, you are likely missing the bundle registration.doctrine:migrations:diff produces an empty diff, your Entity mapping is not being scanned — check doctrine.orm.mappings in the Symfony config/packages/doctrine.yaml.There are no documented extension points. Anything you need beyond what src/ provides means forking: add your own Symfony services that wrap the bundle's repositories, and expose them over your sidecar controller. Budget for this — do not assume the package will grow to meet your needs.
If your requirement is anything beyond pulling catalog/warehouse data into a schema you control, and your team is a pure Laravel team, the honest comparison is Guzzle against the 4tochki B2B API directly. The package saves you the reverse-engineering of an undocumented API; it does not save you the integration work.
How can I help you explore Laravel packages today?