This pull request adds support for class_alias to Tinker's configuration.
Motivation:
We created a model App\Models\Event, which conflicts with the events facade. As a result, instead of the Event model class being aliased, the events facade was aliased.
This solution allows users to map the conflicting class name to another class. For example, in config/tinker.php.
Noticed that the test fails for PHP 7.4 and below because I am using named arguments in the function. Let me know if this should support older versions of PHP. Thanks.
This pull request adds support for class_alias to Tinker's configuration.
Motivation: We created a model App\Models\Event, which conflicts with the
events
facade. As a result, instead of the Event model class being aliased, theevents
facade was aliased.This solution allows users to map the conflicting class name to another class. For example, in config/tinker.php.
Not sure if this should be merged into the 2.x branch or the develop branch?