diff --git a/assets/magium-configuration.xsd b/assets/magium-configuration.xsd index f9ad5e0..7d2121b 100644 --- a/assets/magium-configuration.xsd +++ b/assets/magium-configuration.xsd @@ -85,7 +85,16 @@ - + + + + This is the fully qualified or configurationDirectories-related path for a + specific configuration file. If you are building a module that will be included + via something like Composer do not use this. Get the ConfigurationRepository + object from the Builder and add them there. + + + diff --git a/lib/Config/BuilderFactory.php b/lib/Config/BuilderFactory.php index b92ae07..69499a7 100644 --- a/lib/Config/BuilderFactory.php +++ b/lib/Config/BuilderFactory.php @@ -55,7 +55,8 @@ public function getPersistence() public function getSecureBaseDirectories() { $cwd = getcwd(); - chdir($this->baseDirectory->getPath()); + $path = $this->baseDirectory->getRealPath(); + chdir($path); $config = $this->configuration->configurationDirectories; $config = json_encode($config); $config = json_decode($config, true); diff --git a/tests/Config/BuilderFactoryTest.php b/tests/Config/BuilderFactoryTest.php index 0edaf7f..e885a17 100644 --- a/tests/Config/BuilderFactoryTest.php +++ b/tests/Config/BuilderFactoryTest.php @@ -131,7 +131,7 @@ protected function runConfigurationFiles(\SimpleXMLElement $config, array $secur protected function getFactory(\SimpleXMLElement $config) { $factory = new BuilderFactory( - new \SplFileInfo(__DIR__ . '../../'), + new \SplFileInfo(__DIR__), $config, $this->createMock(AbstractContextConfigurationFile::class) );