clgsru/composer-modify-autoload

Simple library for updated the vendor/autoload.php so it manually includes any files specified in composer.json's files array.

1.0.1 2023-06-19 17:55 UTC

This package is auto-updated.

Last update: 2024-05-19 19:55:30 UTC


README

Simple library for updated the vendor/autoload.php so it manually includes any files specified in composer.json's files array. See composer issues #6768

composer.json

Files that need to be included at the very beginning

{
 // ... 
  "autoload": {
    "priority": [
      "your_file.php"
    ]
  }
 // ...
}

Autorun script after composer update

{
 // ... 
  "scripts": {
    "post-autoload-dump": [
      "@php vendor/bin/composer-modify-autoload.php"
    ]
  }
 // ...
}

See also funkjedi/composer-include-files