Weave 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

Wp Asset Manager Laravel Package

alleyinteractive/wp-asset-manager

A WordPress library for registering and enqueueing theme and plugin assets from build-tool manifests, handling versioning, dependencies, and cache busting so compiled scripts and styles load reliably.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Roadmap: performance work is unblocked on modern stacks. am_preload() now accepts imagesrcset, imagesizes, and fetchpriority, so responsive-image LCP preloading is a first-class capability rather than a hand-rolled <link> tag. If Core Web Vitals or LCP targets are on the roadmap, this is the concrete lever to schedule.
  • Build vs buy tilts toward buy — but the value has narrowed. WordPress 6.3+ core now handles async/defer through the strategy argument, and this release deletes the plugin's own pre-6.3 fallback accordingly. What remains uniquely valuable is: preload hint generation (including responsive variants), correct dependency ordering for assets the plugin prints itself, SVG sprite management, and structured asset-error surfacing. Price the build option against those four things, not against async/defer generally.
  • Upgrade scoping is now a known, bounded piece of work. v2.0.0 is a hard major: PHP 8.3+, WordPress 6.3+, a text-domain rename (am → wp-asset-manager), and removal of the async-defer load method, Scripts::$async_scripts/add_to_async()/add_attributes()/disable_concat()/manage_async(), Asset_Manager::$assets_by_dependency/$assets_manual, and the preload style method. Anyone on PHP 8.0–8.2 cannot take this release at all — that is an infrastructure decision, not a library decision.
  • A silent production bug is fixed; treat this as a risk-reduction purchase. am_modify_load_method() was silently failing to apply async/defer on WordPress 6.3+ (#62). Any team that believed they were shipping deferred scripts on a modern WP may not have been. Audit current behaviour before and after the upgrade — the performance delta may be positive and unexpected, or may reveal that prior benchmarks were measuring nothing.
  • Dependency ordering for self-printed assets is now correct (#22). Inline, async, and defer assets bypass wp_enqueue_* and previously never reached core dependency resolution. This is the kind of fix that removes a class of intermittent, environment-specific breakage — worth calling out as a reason to upgrade rather than defer.
  • Stylesheet timing changes are a user-visible decision. The defer method for stylesheets now behaves as async: previously deferred CSS began downloading after DOMContentLoaded; now it begins during HTML parsing. The bundled loadCSS library (archived upstream) is no longer shipped or auto-enqueued. Expect a measurable change in first-paint and layout-shift metrics on any page relying on deferred CSS — this needs a before/after measurement, not an assumption.
  • Deprecation clock is running on am_* template tags. They will be formally deprecated in the next major. Any theme or plugin code calling them should be scheduled for replacement now, while 2.x keeps them working, rather than during a future forced upgrade.
  • Maintainability signal supports continued investment. PHPStan at level 9, CI across PHP 8.3/8.4/8.5 plus a dedicated minimum-WordPress job, a linted test suite, phpcs.xml.dist for local overrides, and CONTRIBUTING.md all indicate an actively maintained dependency rather than an abandoned one. That is a genuine procurement input when comparing against an internal build.

When to Consider This Package

Adopt when:

  • The platform is PHP 8.3+ and WordPress 6.3+. Below either threshold this release is simply unavailable; the pre-2.0 line is the only option and is now off the mainline.
  • You need preload hints for responsive images (imagesrcset/imagesizes/fetchpriority) as part of an LCP strategy — this is the clearest capability gap versus core.
  • You ship inline, async, or defer assets that have real inter-dependencies; the transitive ordering fix is the single strongest technical argument for adoption in this release.
  • You manage SVG sprites and want safe_style_css handling and symbol creation that does not emit warnings on every rendered page.
  • You want structured, capability-gated asset error reporting rather than silent failures — now without the fatal that previously accompanied the invalid_enqueue_function branch.
  • You value a dependency with level-9 static analysis and multi-version CI, i.e. you are buying down future upgrade risk.

Look elsewhere, or stay put, when:

  • You are on PHP ≤ 8.2 or WordPress < 6.3, or cannot move within the current planning horizon.
  • Your only requirement is async/defer on scripts — WordPress core's strategy argument covers this natively, and this release removes the plugin's own fallback for exactly that reason. Do not carry a dependency for a solved problem.
  • You depend on the removed surfaces: Scripts::add_to_async(), manage_async(), disable_concat(), $assets_by_dependency, $assets_manual, the preload style method, or the bundled loadCSS library. Migration precedes adoption here.
  • You rely on maintained translations. The text domain moved from am to wp-asset-manager; existing translation files under the old domain will not resolve. Budget for re-translation.
  • Your asset pipeline is not WordPress — the package is WP-specific by construction and offers nothing for a framework-agnostic or Laravel-native front end.
  • You need first-paint determinism on stylesheets and cannot absorb the defer → async timing shift without measuring it first.

How to Pitch It (Stakeholders)

To executives: This is a maintenance-driven major upgrade of a small, actively maintained WordPress asset library, and the headline is risk reduction rather than new capability. It fixes a bug where async/defer script loading had been silently not applying on modern WordPress, and it fixes a fatal error path that could take down admin-visible asset pages. It also fixes a warning that fired on every rendered page for sites using SVG sprites. The cost is an infrastructure prerequisite — PHP 8.3 and WordPress 6.3 — plus a bounded set of removed legacy APIs. There is one genuine new capability worth funding: responsive-image preloading with fetchpriority, which maps directly to LCP and Core Web Vitals. Recommendation: treat this as a scheduled upgrade tied to the PHP 8.3+ platform work, not a standalone project.

To engineering: v2.0.0 is a clean major that deletes the pre-6.3 async/defer fallback in favour of core's strategy argument, so the library's surface shrinks in a good way. Four things to plan for: (1) the PHP 8.3 / WP 6.3 floor; (2) the text-domain rename, which invalidates existing .mo files under am; (3) the defer-for-stylesheets method now behaving as async, with a _doing_it_wrong() notice and a real change in fetch timing — measure first paint and CLS before and after; and (4) removal of Scripts::add_to_async()/manage_async()/add_attributes()/disable_concat() and the loadCSS library. In exchange you get correct transitive dependency ordering for inline/async/defer assets, working am_modify_load_method() on 6.3+, array|string accepted consistently across am_* helpers, and a batch of fatal-error and null-destructuring fixes. The repo is now at PHPStan level 9 with CI on PHP 8.3–8.5 and a dedicated minimum-WP job, so future upgrades should be cheaper. Start migrating off am_* template tags now — they are on the deprecation path for the next major.

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.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast