But --provider="Spatie\Permission\PermissionServiceProvider" ist not used, when I use workbench:build. When I only use vendor:publish in testbench.yaml, I will be asked what provider to use. Then it works. I can select Spatie\Permission\PermissionServiceProvider.
But how can I preselect the provider in my testbench.yaml? Also wenn I use vendor:publish --provider="Spatie\Permission\PermissionServiceProvider" in my terminal it works.
The issue is that commands in the build section of testbench.yaml are interpreted as simple strings and may not handle complex console argument parsing (like --provider=...), particularly with quoting. The argument may not be passed correctly to the underlying Artisan call during the testbench build process.
Solution: Use array notation for the command and its arguments
Instead of the single string command, use array format in testbench.yaml. For example:
Command "vendor:publish --provider=Spatie\Permission\PermissionServiceProvider --tag=migrations" is not defined. Did you mean one of these?
⇂ vendor:publish
So it seems there is the same problem. It think maybe it is just a syntax problem, but cant find a solution.