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

Ladybug Installer Laravel Package

raulfraile/ladybug-installer

Composer installer for Ladybug, a PHP variable dumper/debug tool. Adds automatic setup during package installation so Ladybug integrates smoothly into your project with minimal manual configuration.

View on GitHub
Deep Wiki
Context7

Getting Started

Minimal Setup

  1. Installation Add the package via Composer:

    composer require raulfraile/ladybug-installer
    

    Publish the config file (if available) with:

    php artisan vendor:publish --provider="LadybugInstaller\LadybugInstallerServiceProvider"
    
  2. Basic Usage The package provides a unified installer for Ladybug addons (likely Laravel packages or extensions). Start by checking the config/ladybug-installer.php for available addons and their configurations.

  3. First Use Case Install an addon via Artisan:

    php artisan ladybug:install <addon-name>
    

    Verify installation by checking the config/ladybug.php (or equivalent) for updated settings.


Implementation Patterns

Workflow Integration

  1. Addon Discovery Use the LadybugInstaller facade to programmatically list available addons:

    $addons = LadybugInstaller::available();
    

    Iterate over them to build a custom installer UI (e.g., in a Laravel Nova tool or admin panel).

  2. Conditional Installation Check if an addon is already installed before running the installer:

    if (!LadybugInstaller::isInstalled('addon-name')) {
        LadybugInstaller::install('addon-name');
    }
    
  3. Post-Install Hooks Extend the installer by publishing custom post-install logic:

    LadybugInstaller::extend('addon-name', function () {
        // Run migrations, seeders, or other setup tasks
    });
    
  4. Bulk Operations Install multiple addons in a single command:

    LadybugInstaller::install(['addon1', 'addon2', 'addon3']);
    

Common Use Cases

  • Laravel Package Development: Use this to standardize addon installation for your own packages.
  • Custom Admin Panels: Integrate with Laravel Nova/Backpack to let users self-serve addon installations.
  • Deployment Scripts: Automate addon installation in CI/CD pipelines (e.g., GitHub Actions).

Gotchas and Tips

Pitfalls

  1. Outdated Package

    • Last release was in 2013. Verify compatibility with modern Laravel (8+). Test thoroughly, especially if using PHP 8+ features.
    • Check for forks or alternatives (e.g., spatie/laravel-package-tools for modern package development).
  2. Missing Documentation

    • The package lacks detailed docs. Inspect the source (vendor/raulfraile/ladybug-installer) for undocumented features.
    • Key classes to review:
      • LadybugInstallerServiceProvider
      • LadybugInstaller facade
      • Installer class (core logic).
  3. Config Overrides

    • Some addons may hardcode paths or configurations. Override them in config/ladybug-installer.php:
      'addons' => [
          'addon-name' => [
              'config_path' => 'custom/path/to/config.php',
          ],
      ],
      
  4. Dependency Conflicts

    • Addons may pull in conflicting versions of Laravel or other packages. Use composer why-not to debug:
      composer why-not laravel/framework 8.*
      

Debugging Tips

  • Enable Debug Mode Set debug to true in config/ladybug-installer.php to log installation steps:

    'debug' => env('APP_DEBUG', false),
    
  • Check Installation Logs Tail Laravel logs during installation:

    tail -f storage/logs/laravel.log
    
  • Manual Installation Fallback If the installer fails, manually:

    1. Copy addon files to vendor/ or packages/.
    2. Run composer dump-autoload.
    3. Publish config/migrations manually.

Extension Points

  1. Custom Addon Definitions Dynamically register addons via service provider:

    LadybugInstaller::addAddon('custom-addon', [
        'installer' => CustomAddonInstaller::class,
        'config'    => 'custom-config',
    ]);
    
  2. Override Installer Logic Bind a custom installer class to an addon:

    LadybugInstaller::macro('install', function ($addon) {
        // Custom logic here
    });
    
  3. Event Listeners Listen for LadybugInstaller.Installed events to trigger post-install actions:

    Event::listen('LadybugInstaller.Installed', function ($addon) {
        // Example: Send Slack notification
    });
    
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