How can get filesystem path of composer package?
composer.json example:
{
\"require\" : {
\"codeception/codeception\" : \"@stable\",
Try ReflectionClass::getFileName - Gets the filename of the file in which the class has been defined. http://www.php.net/manual/en/reflectionclass.getfilename.php
Example:
$reflector = new ReflectionClass("\Geocoder\HttpAdapter\HttpAdapterInterface");
echo $reflector->getFileName();
Or you may use this:
$loader = require './vendor/autoload.php';
echo $loader->findFile("\Geocoder\HttpAdapter\HttpAdapterInterface");
The first method try to load class and return loaded class path. The second method return path from composer database without class autoload.