Limenius / LiformBundle

Symfony Bundle to render Symfony Forms to JSON Schema
MIT License
138 stars 44 forks source link

Allow injection via LiformInterface #34

Open tacman opened 1 year ago

tacman commented 1 year ago

Fetching the service via $this->get, as described in the README, has been removed in Symfony 6, as all services are private by default and the container and get() helper methods aren't available.

Instead, the documentation should reflect getting the service by injecting it in the contructor or the controller method, e..g

__construct(private Liform $liform)

Ideally, though, this would work with LiformInterface (the abstract instead of the concrete).