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

Composer Construction Kit Installer Laravel Package

c33s/composer-construction-kit-installer

Composer plugin for C33s Construction Kit: detects installed packages with the c33s-building-blocks extra and writes a list of blocks to {$appDir}/config/config/c33s_construction_kit.composer.yml for use by c33s/construction-kit-bundle.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Symfony/Laravel Alignment: The package is designed for Symfony (via C33sConstructionKitBundle), not Laravel. While Laravel can use Symfony bundles via symfony/flex, this plugin’s core functionality—auto-registering "building blocks" in a composer.yml config file—is Symfony-centric and may not align with Laravel’s autoloading/dependency injection (DI) container or configuration paradigms.
  • Plugin vs. Standalone: The plugin hooks into Composer’s lifecycle (post-update-cmd), which is compatible with Laravel’s Composer integration but may introduce unexpected side effects (e.g., writing to config/ directory, which Laravel typically avoids for dynamic files).
  • Bundle Dependency: Requires c33s/construction-kit-bundle, adding vendor lock-in and potential maintenance overhead if the bundle evolves.

Integration Feasibility

  • Laravel Compatibility:
    • Pros: Can be installed as a Composer plugin; no PHP version conflicts (PHP 7.4+).
    • Cons:
      • Laravel’s config/ directory is not a standard location for dynamically generated files (typically uses config/c33s_construction_kit.php or cached config).
      • No Laravel Service Provider/Bundle Registration: The plugin assumes Symfony’s Bundle autoloading, which Laravel lacks natively.
      • DI Container Conflict: Laravel’s container may not recognize Symfony bundles without explicit configuration.
  • Key Technical Blocks:
    • Config File Location: Hardcoded {$appDir}/config/config/c33s_construction_kit.composer.yml may clash with Laravel’s config/ structure.
    • Bundle Activation: Symfony bundles require manual registration in AppKernel.php (deprecated) or config/bundles.php (Symfony 4+). Laravel has no equivalent.
    • Event Hooks: The plugin’s post-update-cmd script may interfere with Laravel’s post-update-cmd or post-install-cmd scripts.

Technical Risk

Risk Area Severity Mitigation Strategy
Symfony-Specific Logic High Abstract bundle registration into a Laravel-compatible layer (e.g., custom service provider).
Config File Collisions Medium Override file path in plugin config or use Laravel’s config_cache.
DI Container Issues High Manually load Symfony bundles via Bundle::registerBundles() in a Laravel event listener.
Plugin Conflicts Medium Test with other Composer plugins (e.g., laravel/installer).
Maintenance Overhead Medium Monitor for updates to c33s/construction-kit-bundle.

Key Questions

  1. Why Symfony? Is the goal to support Symfony bundles in Laravel, or is there a Laravel-native alternative (e.g., package discovery via composer.json extras)?
  2. Config Management: How will Laravel handle the .composer.yml file? Will it be merged into Laravel’s config system, or ignored?
  3. Bundle Lifecycle: How will Symfony bundles be initialized in Laravel’s context (e.g., service providers, routes, commands)?
  4. Fallback Mechanism: What happens if the plugin fails (e.g., permission issues writing to config/)? Is there a manual override?
  5. Testing: Are there existing Laravel projects using this plugin? If not, what’s the risk of undocumented behavior?

Integration Approach

Stack Fit

  • Composer Plugin Layer: The plugin integrates cleanly with Composer’s ecosystem, which Laravel already uses. No major stack conflicts.
  • Symfony Dependencies:
    • Hard Blockers:
      • c33s/construction-kit-bundle (Symfony-specific).
      • Symfony’s Bundle class and Kernel (not natively supported in Laravel).
    • Workarounds:
      • Use a wrapper package to translate Symfony bundles into Laravel service providers.
      • Leverage symfony/dependency-injection and symfony/http-kernel as standalone libraries (if bundles are modular).
  • Laravel-Specific Tools:
    • Package Discovery: Laravel’s composer.json extras can be parsed manually (alternative to the plugin).
    • Config Caching: Use Laravel’s config_cache to merge .composer.yml into PHP config.

Migration Path

  1. Assessment Phase:
    • Audit existing composer.json for c33s-building-blocks extras.
    • Identify Symfony bundles and their Laravel equivalents or wrapper requirements.
  2. Pilot Integration:
    • Install the plugin as a dev dependency (composer require --dev c33s/composer-construction-kit-installer).
    • Test composer update to verify .composer.yml generation.
    • Manually register Symfony bundles in Laravel’s AppServiceProvider (temporary).
  3. Customization:
    • Override the plugin’s config path (e.g., via extra.c33s-construction-kit-path in composer.json).
    • Create a Laravel event listener to process .composer.yml into Laravel’s config.
  4. Fallback Implementation:
    • Replace plugin logic with a custom Composer script or Laravel service provider if plugin issues arise.

Compatibility

Component Compatibility Status Notes
Composer 2.x ✅ High Plugin supports Composer 2.x.
PHP 8.0+ ✅ High No PHP version conflicts.
Laravel 8/9/10 ⚠️ Medium Symfony bundles may require manual DI container setup.
Symfony Bundles ❌ Low Not natively supported; requires workarounds.
Other Composer Plugins ⚠️ Medium Risk of script execution conflicts (e.g., post-update-cmd).

Sequencing

  1. Pre-Integration:
    • Fork the plugin to customize config file paths and bundle registration.
    • Develop a Laravel service provider to handle Symfony bundle initialization.
  2. Plugin Installation:
    • Add to composer.json with type: "composer-plugin".
    • Configure via extra keys (e.g., c33s-construction-kit-path: "config/c33s_kit.php").
  3. Post-Installation:
    • Run composer dump-autoload to ensure autoloading works.
    • Test bundle functionality (e.g., routes, services) in Laravel’s context.
  4. Monitoring:
    • Log plugin execution in Laravel’s storage/logs/laravel.log.
    • Set up a health check for .composer.yml file existence.

Operational Impact

Maintenance

  • Plugin Updates:
    • Risk: Breaking changes if c33s/construction-kit-bundle evolves.
    • Mitigation: Pin plugin version in composer.json and monitor for updates.
  • Custom Code:
    • Overhead: Custom service providers/listeners add maintenance burden.
    • Documentation: Clearly document the integration path for future devs.
  • Dependency Bloat:
    • Symfony Dependencies: Adding symfony/dependency-injection may increase bundle size.

Support

  • Debugging Complexity:
    • Plugin-Specific Issues: Debugging Composer plugin behavior requires deep knowledge of Composer’s lifecycle.
    • Symfony-Laravel Bridge: Errors may stem from DI container mismatches (e.g., missing ContainerInterface implementations).
  • Community Support:
    • Limited Adoption: No stars/dependents suggest niche use; expect minimal community help.
    • Fallback: Rely on Laravel/Symfony docs for workarounds.
  • Error Handling:
    • Graceful Degradation: Implement a fallback to manual bundle registration if the plugin fails.

Scaling

  • Performance Impact:
    • Minimal: Plugin runs during composer update; no runtime overhead.
    • Config Parsing: Merging .composer.yml into Laravel’s config may add <100ms to boot time.
  • Multi-Environment:
    • CI/CD: Test plugin execution in CI (e.g., GitHub Actions) to catch config file issues early.
    • Production: Ensure config/ directory is writable (may need storage:link adjustments).
  • Horizontal Scaling:
    • No Impact: Plugin is install-time only; no runtime scaling concerns.

Failure Modes

Failure Scenario Impact Recovery Strategy
Plugin Fails to Write Config Broken bundle registration Fallback to manual composer run-script execution.
Symfony Bundle DI Errors Application crashes Isolate bundles in a separate micro-service or use Laravel’s `make:provider
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.
make-dev/orca
dmstr/symfony-system-resources-bundle
dmstr/symfony-job-queue-bundle
dmstr/openapi-json-schema-bundle
dmstr/keycloak-security-bundle
dmstr/doctrine-audit-log-bundle
dmstr/api-platform-utils-bundle
dmstr/api-configuration-bundle
chrisdev/ux-components
baks-dev/finances
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