馃悰 fix service argument - #108
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes issue #107 by ensuring the bundle鈥檚 form type services are constructed with the required Doctrine registry dependency, preventing runtime instantiation errors when the services are registered.
Changes:
- Inject
doctrineintopugx_autocompleter.autocompleteservice definition. - Inject
doctrineintopugx_autocompleter.filter_autocompleteservice definition.
馃挕 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ->class('%pugx_autocompleter.autocomplete_class%') | ||
| ->args([service('doctrine')]) | ||
| ->public() |
There was a problem hiding this comment.
Optional: instead of hard-coding the service id 'doctrine', consider referencing the dependency by type (Doctrine\Persistence\ManagerRegistry) so consumers with a custom registry service id can still use this configuration.
| ->class('%pugx_autocompleter.autocomplete_filter_class%') | ||
| ->args([service('doctrine')]) | ||
| ->public() |
There was a problem hiding this comment.
Optional: same as above鈥攃onsider injecting Doctrine\Persistence\ManagerRegistry by type rather than using the 'doctrine' string service id.
Fix #107