Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Assetic Laravel Package

apelaez-link/assetic

View on GitHub
Deep Wiki
Context7

Backup sanpi assetic repository 2021-10-18 due to sanpis repos deletion.

Frequently asked questions about Assetic
Can I use apelaez-link/assetic in Laravel 9 or 10 for production?
No, this package is untested on Laravel 9/10 and may conflict with Symfony 6.x components (e.g., symfony/asset). The last release predates Laravel 9, so dependency conflicts and missing optimizations are likely. Use only in Laravel 8.x with PHP 8.0+ and pin symfony/assetic:^3.0 explicitly.
How do I configure Assetic in Laravel without breaking existing Symfony components?
Manually register the service provider in `config/app.php` under `'providers'`. Avoid using `php artisan vendor:publish` if you’re on Laravel 9+ due to Symfony Asset conflicts. Test in a staging environment first, as Assetic’s asset pipeline may clash with Laravel’s native asset management.
Does this package support modern PHP (8.1+) or Symfony 6+?
No, the fork targets older PHP/Symfony versions. PHP 8.1+ may require patches, and Symfony 6.x (used in Laravel 9+) is unsupported. If you need PHP 8.1+, audit the codebase for compatibility issues or consider alternatives like Laravel Mix.
What’s the migration path from apelaez-link/assetic to Laravel Mix/Vite?
Audit your YAML configs and custom filters (e.g., Less, CoffeeScript) for compatibility with Webpack or Vite. Replace Assetic’s `{% stylesheets %}` Twig tags with `@vite(['resources/css/app.css'])` or Mix’s `@mix` directives. Test incrementally in a staging environment.
Will this package receive security updates if Symfony Assetic has CVEs?
Unlikely. The fork lacks maintenance, and underlying dependencies (e.g., symfony/assetic) may not receive patches. Audit dependencies with `sensio-labs/security-checker` and plan to migrate if vulnerabilities arise. Prioritize projects using this package for a quick replacement.
Can I use Assetic alongside Laravel Mix or Vite?
No. Assetic compiles assets at runtime, conflicting with build-time tools like Mix/Vite. Choose one pipeline: either use Assetic for legacy workflows or migrate to Mix/Vite for modern asset handling. Running both will cause duplicate asset processing and performance overhead.
How do I handle custom Assetic filters (e.g., Less, CoffeeScript) in Laravel?
Install filter dependencies via Composer (e.g., `league/less-php` for Less). Configure filters in your Assetic YAML or PHP code, then reference them in asset collections. Example: `new FileAsset('/path/to/file.less', [new LessFilter()])`. Note: Some filters (e.g., YUI compressor) require Java/Ruby.
Does this package work with Laravel’s Blade templates or only Twig?
Assetic primarily integrates with Twig via `{% stylesheets %}` tags. For Blade, you’ll need to manually dump assets in PHP or use a custom Blade directive. If you’re using Twig, ensure `twig/extra-bundle` is installed, but beware of conflicts with Laravel’s Symfony components.
What’s the performance impact of runtime asset compilation vs. Vite’s build-time optimization?
Assetic compiles assets on every request, adding latency (especially for large projects). Vite or Laravel Mix compile assets during development builds, serving pre-optimized files in production. Benchmark your workflow: Assetic may be 10–100x slower for dynamic asset generation.
Are there alternatives to apelaez-link/assetic for Laravel asset management?
Yes. For modern Laravel (8+), use **Laravel Mix** (Webpack) or **Vite** (ESBuild/Rollup) for build-time optimization. For runtime assets, Symfony’s **AssetMapper** (Laravel 9+) is a drop-in replacement. If you’re stuck with Assetic, consider **Encore** (Symfony’s Webpack bridge) as a middle ground.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
bugban/symfony
beyonder-capi/workflow-extensions-bundle
beyonder-capi/job-queue-bundle
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin