Maravel-Framework 10.72: Autodiscovery For autowiring:cache From Packages

php dev.to


Maravel-Framework

Versions10.72 and 20.0.0-RC24 fix autowiring:cache for FQN instead of folder and also introduce autodiscovery for packages that want to cache certain folders or classes.

Packages can auto add these via their composer.json:

{"extra":{"maravel":{"autowiring":[{"path":"src/ExampleFolder","methods":[]},{"path":"\\Vendor\\ExampleClass","methods":[]}]}}}
Enter fullscreen mode Exit fullscreen mode

The documentation has been updated.

This applies to both Maravel and Maravelith templates.

Note that this is used only during the autowiring:cache command , NOT on each request.

Source: dev.to

arrow_back Back to Tutorials