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

Core Laravel Package

atk4/core

Agile Core is a set of reusable PHP traits for building object-oriented frameworks. Provides containers (parent/child), hooks with priorities, automatic init, dynamic methods, factory by class string, app scope injection, and improved exceptions.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Framework Agnostic Object-Oriented Design: Enables rapid development of modular, reusable components (e.g., microservices, domain-specific frameworks) without coupling to a full-stack framework like Laravel/Symfony. Ideal for teams building internal tools, APIs, or domain-specific languages (DSLs).
  • Build vs. Buy: Buy for teams needing lightweight, composable OOP utilities (e.g., hooks, dependency injection, dynamic methods) without the overhead of Laravel’s full ecosystem. Build only if requiring deep customization beyond traits (e.g., custom ORM logic).
  • Roadmap Acceleration:
    • Event-Driven Architecture: Leverage Hooks to decouple components (e.g., payment processing, notifications) without tight coupling.
    • Dynamic Method Generation: Enable runtime method injection (e.g., CRUD operations for dynamically discovered database tables).
    • Dependency Injection: Replace manual service locators with DiContainerTrait for testability and maintainability.
  • Use Cases:
    • Internal Tools: Rapidly prototype admin panels, CLI tools, or workflow engines (e.g., approval pipelines).
    • Legacy Modernization: Gradually introduce OOP patterns into procedural PHP codebases.
    • Education: Teach OOP principles via traits (e.g., university projects, bootcamps).

When to Consider This Package

Adopt if:

  • Your team prioritizes composability over convention (e.g., avoiding Laravel’s service container or Eloquent ORM).
  • You need fine-grained control over object lifecycle (e.g., Initializers, Hooks with priorities).
  • Building a framework-like system (e.g., CMS plugins, SaaS multi-tenancy) where traits reduce boilerplate.
  • PHP 8.1+ compatibility is required, and you want modern OOP (e.g., typed properties, strict modes).

Look elsewhere if:

  • You’re fully committed to Laravel/Symfony: Use their built-in service container, events, and traits (e.g., Illuminate\Support\Traits).
  • Need database integration: Pair with Agile Data or use Laravel’s Eloquent.
  • Requiring UI components: Combine with Agile UI or use Laravel Blade/Livewire.
  • Performance-critical: Traits add minimal overhead, but benchmark if using dynamic methods heavily.
  • Team lacks OOP experience: Traits abstract complexity but require understanding of composition over inheritance.

How to Pitch It (Stakeholders)

For Executives: "Atk4/Core lets us build modular PHP systems faster by reusing pre-built object patterns—like Lego blocks for code. Instead of reinventing dependency injection, hooks, or dynamic behavior, we plug in traits to accelerate development of internal tools, APIs, or even custom frameworks. It’s MIT-licensed, PHP 8.4-ready, and used by the Agile Toolkit team to power their UI/ORM stack. This reduces technical debt while keeping us flexible to pivot without vendor lock-in."

For Engineers: *"This is a Swiss Army knife for OOP in PHP:

  • Hooks: Decouple components with priority-based callbacks (e.g., on('user.created', fn($user) => ...)).
  • Dynamic Methods: Add runtime methods to classes (e.g., User::addMethod('exportCSV', ...)).
  • DI Container: Lightweight alternative to Laravel’s service container with setDefault() and assertInstanceOf().
  • Exceptions: Rich error handling with HTML/CLI renderers and stack traces. Perfect for teams tired of Laravel’s bloat or needing composable logic. Docs are solid, and it’s battle-tested in the Agile Toolkit ecosystem. Start with composer require atk4/core and replace manual spl_object_hash() or event listeners with traits."
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.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky