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

Yorn Laravel Package

nunomaduro/yorn

Yorn is a small, focused Laravel package from Nuno Maduro (Pest, Larastan). Install it with Composer and it slots neatly into an existing app, with a clean API, no heavy configuration, and the framework-native feel his packages are known for.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Module-boundary strategy for a large PHP/Laravel codebase. Yorn is a concrete reference point for the question "should we enforce stricter module boundaries?" It demonstrates an ES-modules-style surface (import / export) on top of PHP, which lets you compare that model against what you get today from PSR-4 namespacing, service providers, and package discovery — before you spend a quarter building internal tooling.
  • Build vs. buy vs. enforce-in-userland. The real decision is where the boundary problem gets solved: userland (architecture tests, PHPStan/Psalm rules, lint conventions, monorepo tooling), framework conventions, or runtime/language changes. Yorn makes the third option tangible and legibly expensive, which usually strengthens the case for the cheaper first option.
  • Where to invest DX budget. It gives you a time-boxed artifact to test a hypothesis: do explicit exports, no namespace boilerplate, and an obvious dependency graph measurably improve onboarding or refactor safety? If a 1–2 day spike shows no lift over plain PSR-4 plus static analysis, you've cheaply closed a line of enquiry.
  • Technology radar / ecosystem sensing. ~144 stars and zero dependents means it is a signal, not a dependency. It's useful input for 12–24 month platform bets — "where are respected PHP maintainers probing the language's limits?" — and for competitive framing of your own developer-experience story.
  • Runtime-standardization and hiring conversations. Adopting anything like this means every new hire learns a non-standard interpreter. That constraint is worth quantifying now, because it also applies to more plausible future bets (custom PHP builds, preloading, FrankenPHP-style runtimes).
  • Documentation-quality gate for adoption. Note the inconsistency between the repo's own description (framed as a Symfony Console CLI toolkit) and what the package actually does (module syntax). That mismatch is itself a product signal: the packaging and positioning haven't been hardened, which should raise the bar for any pilot.

When to Consider This Package

Consider it only as an R&D artifact, when:

  • You have a time-boxed spike — days, not sprints — and someone on the team is comfortable compiling PHP extensions or running a non-standard build.
  • You control the runtime in a sandbox: containers, custom CI images, a disposable environment where a broken interpreter costs nothing.
  • You need evidence for an internal RFC on module boundaries, and a working demo persuades stakeholders faster than a design doc.
  • You're evaluating whether PHP internals / extension work is a capability worth having at all.
  • You want a teaching artifact for a greenfield prototype where you can throw the code away if the prototype outlives the tool.

Look elsewhere — deliberately — when:

  • You're shipping or maintaining a production Laravel application. PSR-4, Composer, PHPStan/Psalm, Pint, and IDE navigation are the supported path; a custom runtime breaks all of them at once.
  • You need security patching, upgrade guarantees, or any form of support. Zero dependents means zero field validation and no downstream pressure to fix bugs you hit.
  • Nobody on the team can fork and maintain the extension across PHP and Laravel upgrades.
  • The underlying problem is really architecture discipline. Architecture tests, static-analysis boundary rules, and namespace conventions deliver most of the benefit with none of the runtime risk. Default to that until it demonstrably fails.
  • Onboarding speed or long-term maintainability is a stated goal — an exotic interpreter is a permanent tax on every hire.

How to Pitch It (Stakeholders)

Executive summary: Yorn is an experimental package from a highly credible PHP maintainer (Nuno Maduro) that adds JavaScript-style import / export module syntax to PHP. It is not a candidate for adoption: it has zero dependents, requires a non-standard runtime, and would break our standard tooling (static analysis, IDEs, CI, debugging). Its value is directional. For the price of a short spike, it gives us a concrete demo of what stricter module boundaries could look like, which sharpens our decision on whether to invest in modular architecture and architecture-testing tooling over the next year.

For engineering: Treat it as a reference implementation and a conversation piece, not a dependency. Recommendation: fund a 1–2 day spike in a sandboxed container, capture findings (developer-experience gains, tooling breakage, migration cost, debugging quality), and default to userland module-boundary enforcement — architecture tests plus static analysis — for anything that ships. Re-evaluate only if PHP core or a major framework moves in this direction.

Risk framing: Low cost, low commitment, asymmetric upside. The only real risk is scope creep — someone mistaking the demo for a roadmap, or a prototype quietly becoming production code. Make that boundary explicit up front, define the exit criteria before the spike starts, and document the migration path (exported functions lift cleanly into namespaced classes) on day one.

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.
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route