don't use source directory for plugin code search
This commit is contained in:
parent
814bf56964
commit
5e573a2435
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "d3/oxid-dic-handler",
|
"name": "d3/oxid-dic-handler",
|
||||||
"description": "An alternative configurable DIContainer outside the OXID own container.",
|
"description": "Provides bridges for OXID services that are not reliably listed in the DIC cache.",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"oxid",
|
"oxid",
|
||||||
|
@ -17,6 +17,7 @@ namespace D3\DIContainerHandler;
|
|||||||
|
|
||||||
use d3DIContainerCache;
|
use d3DIContainerCache;
|
||||||
use Exception;
|
use Exception;
|
||||||
|
use OxidEsales\Eshop\Core\Config;
|
||||||
use OxidEsales\Eshop\Core\Registry;
|
use OxidEsales\Eshop\Core\Registry;
|
||||||
use OxidEsales\Facts\Config\ConfigFile;
|
use OxidEsales\Facts\Config\ConfigFile;
|
||||||
use Symfony\Component\Config\FileLocator;
|
use Symfony\Component\Config\FileLocator;
|
||||||
@ -86,7 +87,7 @@ class d3DicHandler implements d3DicHandlerInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return mixed
|
* @return Config
|
||||||
*/
|
*/
|
||||||
public function d3GetConfig()
|
public function d3GetConfig()
|
||||||
{
|
{
|
||||||
@ -116,7 +117,7 @@ class d3DicHandler implements d3DicHandlerInterface
|
|||||||
/** @var YamlFileLoader $fileLoader */
|
/** @var YamlFileLoader $fileLoader */
|
||||||
$fileLoader = oxNew(YamlFileLoader::class,
|
$fileLoader = oxNew(YamlFileLoader::class,
|
||||||
$container,
|
$container,
|
||||||
oxNew(FileLocator::class, $this->d3GetConfig()->getModulesDir())
|
oxNew(FileLocator::class, d3DicUtilities::getVendorDir())
|
||||||
);
|
);
|
||||||
|
|
||||||
return $fileLoader;
|
return $fileLoader;
|
||||||
@ -131,7 +132,7 @@ class d3DicHandler implements d3DicHandlerInterface
|
|||||||
|
|
||||||
$fileContainer = oxNew(definitionFileContainer::class);
|
$fileContainer = oxNew(definitionFileContainer::class);
|
||||||
foreach ($fileContainer->getYamlDefinitions() as $file) {
|
foreach ($fileContainer->getYamlDefinitions() as $file) {
|
||||||
$fullPath = $this->d3GetConfig()->getModulesDir().$file;
|
$fullPath = d3DicUtilities::getVendorDir().$file;
|
||||||
if (is_file($fullPath)) {
|
if (is_file($fullPath)) {
|
||||||
$loader->load($file);
|
$loader->load($file);
|
||||||
}
|
}
|
||||||
|
@ -43,4 +43,12 @@ class d3DicUtilities
|
|||||||
$argumentName
|
$argumentName
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function getVendorDir(): string
|
||||||
|
{
|
||||||
|
return rtrim(dirname(dirname(dirname(__FILE__))), '/').'/';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user