You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Plugin class from olvlvl/composer-attribute-collector loads before my custom autoload logic, which registers classes dynamically. As a result, classes that should be available during the autoload process are not found, leading to undefined class errors.
I have a custom command (php artisan autoload) that is responsible for loading additional classes after the post-autoload-dump event. However, since the Plugin class registers its autoload mappings first, my classes are not recognized when the composer-attribute-collector runs.
Steps to Reproduce
Define a custom autoloading command (php artisan autoload) that dynamically loads classes after the post-autoload-dump event.
Configure olvlvl/composer-attribute-collector with the following in composer.json:
Run composer dump-autoload or any related command.
Observe that classes expected by my command are not loaded, resulting in class not found errors.
Expected Behavior
The Plugin class from olvlvl/composer-attribute-collector should allow custom autoload logic to run before it attempts to register classes, or provide a way to delay its execution until after my custom autoload process has completed.
Actual Behavior
The Plugin class is executed first, which results in classes being unavailable for the autoload process, leading to undefined class errors.
Allow the Plugin class to be manually triggered after custom autoload logic is executed, or provide a configuration option to defer its execution until after custom autoload registration is complete.
Additional Context
I currently run a custom command (php artisan autoload) in the post-autoload-dump section of composer.json:
Bug Report
Package:
olvlvl/composer-attribute-collector
Issue Summary
The
Plugin
class fromolvlvl/composer-attribute-collector
loads before my custom autoload logic, which registers classes dynamically. As a result, classes that should be available during the autoload process are not found, leading to undefined class errors.I have a custom command (
php artisan autoload
) that is responsible for loading additional classes after thepost-autoload-dump
event. However, since thePlugin
class registers its autoload mappings first, my classes are not recognized when thecomposer-attribute-collector
runs.Steps to Reproduce
Define a custom autoloading command (
php artisan autoload
) that dynamically loads classes after thepost-autoload-dump
event.Configure
olvlvl/composer-attribute-collector
with the following incomposer.json
:Run
composer dump-autoload
or any related command.Observe that classes expected by my command are not loaded, resulting in class not found errors.
Expected Behavior
The
Plugin
class fromolvlvl/composer-attribute-collector
should allow custom autoload logic to run before it attempts to register classes, or provide a way to delay its execution until after my custom autoload process has completed.Actual Behavior
The
Plugin
class is executed first, which results in classes being unavailable for the autoload process, leading to undefined class errors.Environment
olvlvl/composer-attribute-collector
version: @latestPossible Solution
Allow the
Plugin
class to be manually triggered after custom autoload logic is executed, or provide a configuration option to defer its execution until after custom autoload registration is complete.Additional Context
I currently run a custom command (
php artisan autoload
) in thepost-autoload-dump
section ofcomposer.json
:However, the
Plugin
class runs too early, preventing my autoload command from functioning properly.The text was updated successfully, but these errors were encountered: