Fox example:
In a third-party package with a
Flarum\Core\User
Class
And now I've written myself a
Flarum\Core\User
Class
I want composer to automatically load with the one I created myself.
User
class, how to do to?
The method has been found, the namespace is the original namespace of that class, so it composer
will automatically load the class I wrote.
"autoload": { "classmap": [ "vendor/path/to/src/User.php" ]},
Reply content:
Fox example:
A third-party package with a Flarum\Core\User
class
When I write a class myself now Flarum\Core\User
I want to let composer automatically load using the class I created myself User
, how to do?
The method has been found, the namespace is the original namespace of that class, so it composer
will automatically load the class I wrote.
"autoload": { "classmap": [ "vendor/path/to/src/User.php" ]},
Have a third-party library, you want to rewrite it, and load your rewritten code, is that what this means?
If your third-party library is hosted on GitHub, you fork the project, then clone to local, modify and push to GitHub, and then composer.json
reference the address of your fork project in it.