From 9c7d2f60cd7d6d9dcd95d20410a201be4a459dbe Mon Sep 17 00:00:00 2001 From: Marc Aschmann Date: Wed, 22 Jul 2015 11:21:40 +0200 Subject: [PATCH 1/2] Added filecheck, now loading with file_get_contents before YAML::read() --- Config/AbstractConfig.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Config/AbstractConfig.php b/Config/AbstractConfig.php index 6bb29ce..550ddac 100644 --- a/Config/AbstractConfig.php +++ b/Config/AbstractConfig.php @@ -113,10 +113,14 @@ public function setConfig($file) */ private function readFile($file) { - if ($this->filecheck && !is_file($file)) { - throw new \InvalidArgumentException( - 'Config::Abstract() - Given config file ' . $file . ' does not exist!' - ); + if ($this->filecheck) { + if (is_file($file)) { + $file = file_get_contents($file); + } else { + throw new \InvalidArgumentException( + 'Config::Abstract() - Given config file ' . $file . ' does not exist!' + ); + } } return (array)Yaml::parse($file); From 9aaca4b6ace3a25b242f86d3af25df9aedc81113 Mon Sep 17 00:00:00 2001 From: Marc Aschmann Date: Wed, 22 Jul 2015 11:34:29 +0200 Subject: [PATCH 2/2] testing container based infrastructure @ travis --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index aa01db7..d5980d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: php +sudo: false php: - 5.4