I have a use case where I provide Blocks as a part of a composer package. It has a ServiceProvider that does along the lines of
class FooProvider extends ServiceProvider
{
public function boot(): void
{
App::call(function(AcfComposer $acf) {
$acf->registerPath(__DIR__, __NAMESPACE__ . '\\');
});
}
}
and that seems to work just fine.
However, I would like to register Composers conditionally, not a directory at a time, so I can skip Composers that exist in the App's namespace with the same name.
Hello!
I have a use case where I provide Blocks as a part of a composer package. It has a ServiceProvider that does along the lines of
and that seems to work just fine.
However, I would like to register Composers conditionally, not a directory at a time, so I can skip Composers that exist in the App's namespace with the same name.
This would be similar to how Composers can be registered in Laravel (https://laravel.com/docs/9.x/views#view-composers).
Would it be feasible to add a method for that to AcfComposer?
For example