1

I am working my way through a Joomla 4 component tutorial. I have setup Visual Studio Code's Intelephense to be able to find Joomla classes using includepath. That seems to be working fine for the first php file in the tutorial, "script.php" (for example, VS Code can find Text::_()).

However, the second php file, "provider.php", defines a class that derives from Joomla\DI\ServiceProviderInterface. Intelephense can't seem to find where that class is defined and, after looking through my local instance of Joomla's source code, neither can I.

Where is Joomla\DI\ServiceProviderInterface defined?

And if such dependencies are not part of the Joomla source code, where does Joomla get them from at runtime?

0

1 Answer 1

1

Joomla's Dependency Injection package is available at https://github.com/joomla-framework/di .

Hopefully this saves someone else the few hours I spent tracking this down.

Likewise, retrieve Psr\Container\ContainerInterface from https://github.com/php-fig/container .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.