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

Labo Laravel Package

aequation/labo

Symfony install bundle by Aequation (aequation/labo). Provides installation/setup helpers and bundle scaffolding to streamline configuring a Symfony app and its dependencies during initial project setup.

View on GitHub
Deep Wiki
Context7

Getting Started

Minimal Setup

  1. Installation

    composer require aequation/labo
    

    Add the bundle to config/bundles.php:

    Aequation\LaboBundle\LaboBundle::class => ['all' => true],
    
  2. First Use Case Run the default configuration command to generate a basic project structure:

    php bin/console labo:install
    

    This creates:

    • Base AppBundle (or custom bundle) with common traits
    • Default AppKernel with preconfigured services
    • Basic config/packages/ structure
  3. Where to Look First

    • config/labo.yaml (main configuration)
    • src/AppBundle/ (generated base bundle)
    • src/AppBundle/Traits/ (reusable traits)
    • src/AppBundle/DependencyInjection/ (custom DI extensions)

Implementation Patterns

Core Workflows

  1. Bundle Generation Extend the base bundle with custom commands:

    php bin/console make:labo-bundle MyCustomBundle
    
    • Generates a new bundle with:
      • Resources/config/services.yaml
      • DependencyInjection/ with extension classes
      • Traits/ for reusable logic
  2. Service Configuration Use labo.yaml to define shared services:

    services:
        my_service:
            class: App\Service\MyService
            arguments:
                - '@doctrine.orm.entity_manager'
    

    Access via Symfony’s container:

    $this->get('my_service');
    
  3. Trait Integration Reuse common logic across controllers/services:

    use AppBundle\Traits\ApiResponseTrait;
    
    class MyController extends AbstractController {
        use ApiResponseTrait;
    
        public function index() {
            return $this->jsonResponse(['data' => 'test']);
        }
    }
    
  4. Command-Line Automation Extend the LaboCommand base class for custom tasks:

    namespace App\Command;
    
    use Aequation\LaboBundle\Command\LaboCommand;
    
    class MyCustomCommand extends LaboCommand {
        protected function configure() {
            $this->setName('app:custom-task');
        }
    
        protected function execute(InputInterface $input, OutputInterface $output) {
            $output->writeln('Running custom task!');
        }
    }
    

Gotchas and Tips

Common Pitfalls

  1. Namespace Conflicts

    • The bundle generates AppBundle by default. Rename it if using Symfony Flex autoloader:
      php bin/console make:labo-bundle MyVendor/MyBundle
      
    • Ensure autoload in composer.json includes the new namespace.
  2. Overwriting Config

    • labo:install overwrites config/packages/ files. Backup or use --dry-run first:
      php bin/console labo:install --dry-run
      
  3. Trait Autoloading

    • Traits must be in src/AppBundle/Traits/ or Symfony’s autoloader will fail. Use:
      # config/autoload.php
      $loader->registerPrefixes([
          AppBundle::DIR.'/Traits' => 'App\\Bundle\\Traits',
      ]);
      
  4. Dependency Injection Quirks

    • Custom services in labo.yaml won’t override existing DI definitions. Use config/packages/ for priority:
      # config/packages/my_service.yaml
      services:
          my_service:
              class: App\Service\MyService
              tags: ['my.tag']
      

Pro Tips

  1. Customize the Installer Override the installer class in labo.yaml:

    installer_class: App\Installer\CustomInstaller
    

    Extend Aequation\LaboBundle\Installer\Installer to add/skip steps.

  2. Debugging Commands Use --verbose for detailed output:

    php bin/console labo:install --verbose
    
  3. Symfony 6+ Compatibility The bundle lacks Symfony 6’s autowiring support. Manually enable in config/services.yaml:

    parameters:
        container.autowiring.strict_mode: true
    
  4. Extending the Base Bundle Add your own traits/commands to AppBundle and reference them in Resources/config/services.yaml:

    services:
        _defaults:
            autowire: true
            autoconfigure: true
        App\Traits\MyTrait: ~
    
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.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui