phpsword / sword-bundle

Modern WordPress development with Symfony
https://getsword.com
MIT License
124 stars 4 forks source link

Add generics annotations for get_symfony_service #33

Closed williarin closed 1 year ago

williarin commented 1 year ago

Now the returned object type is inferred according to the service FCQN.

// No need to @var this variable anymore
$someRepository = get_symfony_service(SomeRepository::class);

If it's not a FCQN then you still need to use @var.