- Is this package compatible with Laravel 10+ or only Symfony?
- This package is Symfony-centric and lacks native Laravel 10+ support. You’ll need to bridge it with SymfonyBridge or create custom Laravel wrappers, which may introduce architectural friction. Test thoroughly, as Eloquent and Doctrine ORM conflicts require manual schema translations.
- How do I install and configure the package in a Laravel project?
- Run `composer require baks-dev/materials-sign` alongside `phpoffice/phpspreadsheet` and `baks-dev/barcode`. Then, manually set up the upload directory (`public/upload/material_sign_code`) with proper permissions. Linux dependencies like `pdftk`, `imagemagick`, and `texlive` must be installed via `apt`, and ImageMagick’s `policy.xml` requires manual edits for PDF support.
- Will this work in a multi-tenant Laravel app with shared storage?
- No, the package hardcodes the upload path (`public/upload/material_sign_code`), making multi-tenant setups difficult. You’ll need to either symlink directories per tenant or refactor the storage logic to use Laravel’s filesystem abstraction (e.g., `storage_path()`). This isn’t natively supported.
- Can I use Laravel Queues to process PDFs/barcodes asynchronously?
- No, the package lacks built-in Laravel Queue support. PDF processing (via `pdftk`/`ImageMagick`) is synchronous, risking slow responses under load. To mitigate this, you’d need to wrap the workflow in a Laravel Job and dispatch it manually, but this requires significant customization.
- Does this package support non-Russian regions (e.g., EU Deforestation Regulation)?
- No, it’s hardcoded for Russian Честный знак сырья compliance. Extending it for EU/US regulations would require rewriting core logic, as the package assumes specific regulatory workflows. This limits global scalability without forking.
- How do I test this package in a Laravel project?
- The existing tests are Symfony-specific (`phpunit --group=materials-sign`). Laravel integrations aren’t tested, so you’ll need to write custom tests for Doctrine-Eloquent interactions, migrations, and Artisan command compatibility. This adds ~1–2 days of effort.
- Are there alternatives to this package for Laravel?
- For barcode generation, consider `miloschuman/php-barcode` or `tecnickcom/tcpdf`. For regulatory compliance, evaluate `spatie/laravel-activitylog` (for auditing) or build a custom solution using Laravel’s filesystem and queue systems. However, no direct Честный знак alternative exists for Laravel.
- What Laravel versions does this package officially support?
- The package doesn’t specify Laravel version support—it’s Symfony-focused. PHP 8.4+ is required, but compatibility with Laravel 9/10 isn’t guaranteed. You’ll need to test migrations, Doctrine-Eloquent conflicts, and Artisan command integrations manually.
- How do I deploy this in Docker or cloud environments like Heroku?
- Docker support is undocumented, and Linux dependencies (`pdftk`, `imagemagick`) require manual installation in containers. Heroku may block `sudo` for `pdfcrop` or ImageMagick policy changes. Plan for DevOps overhead or refactor to avoid external binaries.
- Is this package actively maintained? What’s the risk of using it?
- The package has no stars, contributors, or recent updates (hypothetical 2026 release). The MIT license offers no support, and tight coupling to `baks-dev/core` may force forks for Laravel-specific changes. Evaluate if the regulatory risk outweighs the maintenance risk.