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

Hidev Chkipper Laravel Package

hiqdev/hidev-chkipper

View on GitHub
Deep Wiki
Context7

Getting Started

Install the package via Composer:

composer require vendor/package-name

After installation, the package now stores its configuration in the root directory (e.g., config/package-name.php) instead of a subdirectory. Run:

php artisan vendor:publish --provider="Vendor\Package\ServiceProvider" --tag="config"

to publish the config file to the expected location. The package now uses yiisoft/composer-config-plugin for dependency resolution, which may require updating your composer.json to include:

{
  "config": {
    "optimize-autoloader": true,
    "preferred-install": "dist"
  },
  "extra": {
    "yiisoft/composer-config-plugin": {
      "include": ["vendor/package-name"]
    }
  }
}

Implementation Patterns

Configuration Management

  • Root Directory Config: All package configurations are now centralized in the root config/ directory. Update your IDE to recognize the new path for autocompletion.
  • Composer Plugin Integration: Leverage yiisoft/composer-config-plugin for optimized autoloading. Ensure your composer.json includes the extra config block to avoid autoloader conflicts.

Workflow Adjustments

  1. Publish Config Early: Publish the config file immediately after installation to avoid path-related issues.
  2. Environment-Specific Overrides: Use Laravel’s config/caching or environment variables to override settings without modifying the published config directly.
  3. Dependency Resolution: If using custom package dependencies, ensure the yiisoft/composer-config-plugin is compatible with your project’s Composer version (tested on Composer 2+).

Gotchas and Tips

Breaking Changes

  • Config Path Migration: The config file has moved from config/package-name/ to config/package-name.php. Update any hardcoded paths in your codebase or CI/CD pipelines.
  • Composer Plugin Dependency: Projects using older Composer versions (<2.0) may encounter issues. Pin the Composer version in your composer.json if needed:
    "config": {
      "platform-check": false,
      "platform": {
        "php": "8.0"
      }
    }
    

Debugging Tips

  • Missing Config File: If the config file isn’t published, verify the --tag="config" flag is used and the provider is registered in config/app.php.
  • Autoloader Errors: Clear Composer’s cache and regenerate the autoloader:
    composer dump-autoload --optimize
    
  • Plugin Conflicts: Disable the plugin temporarily to isolate issues:
    composer config extra.yiisoft/composer-config-plugin null
    

Extension Points

  • Custom Config Paths: Override the config path in your config/app.php under the package-name key if needed:
    'package-name' => [
        'path' => 'custom/path/to/config.php',
    ],
    
  • Plugin Configuration: Extend the yiisoft/composer-config-plugin behavior by adding custom rules to the extra section of composer.json.

Performance Note

The yiisoft/composer-config-plugin may slightly increase build times during composer install. For production, ensure optimize-autoloader is enabled in composer.json.

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.
besmartand-pro/php-quality-config
sentix/ai-chatbot
codifyo/ts-generator-bundle
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