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

Framework Installer Bundle Laravel Package

avoo/framework-installer-bundle

View on GitHub
Deep Wiki
Context7

Getting Started

Minimal Setup

  1. Installation

    composer require avoo/framework-installer-bundle
    

    Ensure Avoo\FrameworkInstallerBundle\AvooFrameworkInstallerBundle is enabled in config/bundles.php:

    return [
        // ...
        Avoo\FrameworkInstallerBundle\AvooFrameworkInstallerBundle::class => ['all' => true],
    ];
    
  2. First Use Case Run the installer via CLI:

    php bin/console avoo:installer:install
    

    Follow prompts to configure your Symfony/Sylius-based project (e.g., database, admin credentials).

  3. Key Files to Review

    • config/packages/avoo_framework_installer.yaml (default config)
    • src/AvooFrameworkInstallerBundle/Resources/config/services.yaml (services)
    • src/AvooFrameworkInstallerBundle/Command/ (CLI commands)

Implementation Patterns

Workflow Integration

  1. Pre-Installation Hooks Extend the installer by overriding the Installer service:

    # config/services.yaml
    services:
        App\CustomInstaller:
            decorates: 'avoo_framework_installer.installer'
            arguments: ['@avoo_framework_installer.installer']
    

    Implement Avoo\FrameworkInstallerBundle\Installer\InstallerInterface methods (e.g., configureDatabase()).

  2. Post-Installation Tasks Use Symfony’s event system to trigger actions after installation:

    // src/EventListener/PostInstallListener.php
    namespace App\EventListener;
    
    use Avoo\FrameworkInstallerBundle\Event\PostInstallEvent;
    use Symfony\Component\EventDispatcher\EventSubscriberInterface;
    
    class PostInstallListener implements EventSubscriberInterface
    {
        public static function getSubscribedEvents()
        {
            return [
                PostInstallEvent::NAME => 'onPostInstall',
            ];
        }
    
        public function onPostInstall(PostInstallEvent $event)
        {
            // Custom logic (e.g., seed data, send email)
        }
    }
    
  3. Configuration Management Store installer settings in config/packages/avoo_framework_installer.yaml:

    avoo_framework_installer:
        database_driver: 'pdo_mysql'
        database_host: '127.0.0.1'
        database_port: 3306
        database_name: 'sylius'
        database_user: 'root'
        database_password: 'password'
    
  4. Sylius-Specific Extensions If using Sylius, leverage its installer traits:

    use Sylius\Bundle\CoreBundle\Installer\InstallerInterface as SyliusInstaller;
    

Gotchas and Tips

Pitfalls

  1. License Conflict

    • The composer.json lists license: proprietary, but the repo uses MIT. Verify license compliance before use.
  2. Deprecated Symfony2

    • Requires PHP ≥5.3.3 and Symfony2, which is end-of-life. Test thoroughly in a compatible environment.
  3. No Active Maintenance

    • 0 stars, 0 dependents, and no recent commits suggest limited community support. Fork or extend cautiously.
  4. Database Schema Assumptions

    • Assumes a Sylius-like schema. Customize the Installer service if your project diverges.

Debugging Tips

  1. Enable Verbose Mode Run the installer with -v for detailed logs:

    php bin/console avoo:installer:install -v
    
  2. Check Event Dispatcher If post-install events fail, verify the PostInstallEvent is dispatched:

    // Debug in a listener
    dump($event->getInstaller()->getConfig());
    
  3. Override Default Config Use config/packages/avoo_framework_installer.yaml to override defaults:

    avoo_framework_installer:
        skip_steps: ['create_database'] # Skip specific steps
    

Extension Points

  1. Custom Steps Add new installation steps by implementing StepInterface:

    namespace App\Installer;
    
    use Avoo\FrameworkInstallerBundle\Installer\StepInterface;
    
    class CustomStep implements StepInterface
    {
        public function execute(): void
        {
            // Custom logic
        }
    }
    

    Register it in services.yaml:

    services:
        App\Installer\CustomStep:
            tags: ['avoo_framework_installer.step']
    
  2. Validation Logic Extend the Validator service to add custom checks:

    use Avoo\FrameworkInstallerBundle\Validator\ValidatorInterface;
    
    class CustomValidator implements ValidatorInterface
    {
        public function validate(array $config): void
        {
            if (!extension_loaded('pdo_mysql')) {
                throw new \RuntimeException('PDO MySQL extension required.');
            }
        }
    }
    
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
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
spatie/mailcoach-vapor