How to Override Core Class?
At that time, I just wanted to create my own custom class by extending a core class, and that turned out to be relatively straightforward. Now, though, I want to simply override a core class so that the rest of the core uses my implementation, and it's unclear how to proceed. I must be missing something.
Can anyone help?
> rest of the core uses my implementation, and it's unclear how
> to proceed.
One possibility is, what if array_merge() was used to merge the core alias list with an application alias list before passing it to registerMultiple() here...
That way, the auto loader would use the developer-defined alias, and overriding a core class would be a simple matter of making an entry in an application config file (alias array) and then implementing the class in a file that resides in the application directory.
I tried registering an alias from app.php, but that's too late in the start-up process.