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+.
Architecture fit. The package is labelled "Laravel/PHP" but its actual surface is Symfony-shaped. Every documented command — php bin/console baks:assets:install, doctrine:migrations:diff, doctrine:migrations:migrate, bin/phpunit --group=... — is a Symfony/BaksDev convention. A stock Laravel application has no bin/console, no baks:assets:install, and uses Eloquent migrations, not Doctrine's. Combined with the baks-dev namespace (a platform vendor, not a library vendor), the realistic reading is: this is a module of the BaksDev Symfony distribution for 4tochki's product domain, published to Packagist for that platform's consumers. Fit is therefore strong for a Symfony/BaksDev host, weak for a Laravel host, and workable as an isolated sidecar service.
Integration feasibility. composer require will resolve; whether the result is usable is a separate question. The README documents no configuration keys, no environment variables, no service IDs, no entity names, no HTTP endpoints, and no 4tochki API contract. The only external reference is a B2B warehouse-ID lookup page. The prior product and engineering assessments in this repo reference ProductSyncService, InventoryService, .env keys like FOURTOCHKI_PARTNER_ID, and traits like Syncable — none of these appear in the README or release notes. Treat all of them as hypotheses to be validated against vendor/baks-dev/four-tochki-products/src/, not as documented capability. The MIT license is the saving grace: source inspection is always available.
Technical risk.
| Risk | Severity | Rationale |
|---|---|---|
| Platform mismatch (Symfony vs. Laravel) | High | Commands and persistence layer assume Doctrine + Console |
| Single-maintainer bus factor | High | 0 stars, 0 dependents, one vendor namespace |
| No test surface | High | PHPUnit group referenced but no CI badge, no coverage, no fixtures shown |
| Documentation | Medium-High | Russian-only, ~15 lines, no API/schema reference |
| Release opacity | Medium | v7.4.10 → v7.4.11 → v7.4.12 with body text equal to the version string; every bump is a blind upgrade |
| Runtime floor | Medium | PHP 8.4+ is aggressive for most 2025-era production fleets |
| Schema collision | Medium | Doctrine migrations will add tables into a shared DB unless isolated |
| Domain/geographic | Medium | Russian B2B marketplace integration carries payments, data-residency and sanctions-adjacent review |
Version numbering at 7.4.x with zero public adoption strongly suggests the version tracks the maintainer's internal platform, not semver obligations to outside consumers. Downstream, that means breaking changes can arrive in patch releases.
Key questions to answer before commitment.
composer why-not output against our pinned framework)?Stack fit decision. Run one decision gate before any engineering:
Migration path for a Laravel shop. Three options, ranked:
Compatibility work. Confirm PHP 8.4 availability in the target runtime image, then run composer why-not baks-dev/four-tochki-products <version> against the pinned Symfony/Doctrine/Laravel set. Expect friction on doctrine/migrations and symfony/console. Pin the package with an exact version constraint and composer.lock commit; do not allow ^7.4.
Sequencing.
| Phase | Deliverable | Exit criterion |
|---|---|---|
| 0. Spike (3–5 days) | Throwaway env, package installed, container dumped, config surfaced, source read | Written capability inventory replacing the guessed API from prior docs |
| 1. Data model mapping | Product / variant / price / warehouse / stock field-by-field map vs. our schema | Signed-off mapping, naming-collision list |
| 2. Read-only integration | Sandbox credentials, catalog pull, warehouse-ID list loaded | Catalog visible in a test admin view |
| 3. One-way sync | Write path behind a flag, audit log, idempotency verified | Duplicate-free replay of a 100-SKU batch |
| 4. Stock/price push | Queue-driven, backoff on rate limit | Error budget defined and met over a week |
| 5. Production | Single category pilot, then expand | Rollback rehearsed |
Gate each phase on the audit log producing clean data; do not parallelise phases 2–4.
Maintenance. Assume you are the maintainer. Plan for an internal fork under our own namespace within the first quarter, with a documented upstream-merge policy. Because release notes carry no content, every upstream bump requires a source diff review — budget roughly half a day per upgrade, not the usual minutes. Assign a named owner; this package cannot be left ownerless.
Support. There is no community, no issue history of substance, and no vendor SLA. Support channels are (a) the internal team that read the source, and (b) the 4tochki B2B account relationship. Both must exist before go-live. Critically, retain a raw-API fallback: if the package breaks and the vendor is unresponsive, the team must be able to reach 4tochki's endpoints directly. That means credential custody and endpoint documentation must live with us, not only inside the library.
Scaling. Two ceilings, both unknown at evaluation time and both must be measured in the spike: 4tochki's API rate limits, and the package's batching behaviour. Never call the package synchronously from a web request — push all remote operations through a queue with per-warehouse concurrency limits and exponential backoff. Persist in a dedicated schema or connection so Doctrine migrations cannot touch the core product tables and so stock-volume growth does not contaminate primary DB sizing.
Failure modes to instrument.
AvailableWarehouses list is a live external reference; a partner removing a warehouse invalidates a hardcoded config.Ramp-up. Russian-language documentation plus a thin README means onboarding cost is dominated by source reading, not reading docs. Estimate one engineer at 1–2 weeks to reach confident operation, plus a commerce/ops counterpart who owns SKU and warehouse data quality. Produce our own English README, config reference and runbook as the first deliverable of the spike — it is the artefact that makes the package supportable and de-risks the bus factor. Given the zero-adoption baseline, treat the whole engagement as a build-vs-buy decision already tilted toward "buy the source, own the integration," and price it accordingly.
How can I help you explore Laravel packages today?