mirror of
https://github.com/hauke68/Magallanes.git
synced 2026-08-27 09:48:55 +02:00
Remove SPYC library for Yamls and use Symfony/Component/Yaml instead.
This commit is contained in:
+4
-1
@@ -23,8 +23,11 @@ class Autoload
|
||||
*/
|
||||
public static function autoload($className)
|
||||
{
|
||||
$isVendor = explode('\\', $className);
|
||||
$isVendor = $isVendor[0] == 'Mage' ? false : true;
|
||||
|
||||
$baseDir = dirname(dirname(__FILE__));
|
||||
$classFile = $baseDir . '/' . str_replace(array('_', '\\'), '/', $className . '.php');
|
||||
$classFile = $baseDir . '/' . ($isVendor ? 'vendor/' : '') . str_replace(array('_', '\\'), '/', $className . '.php');
|
||||
require_once $classFile;
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -10,6 +10,7 @@
|
||||
|
||||
namespace Mage;
|
||||
|
||||
use Symfony\Component\Yaml\Yaml;
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
@@ -99,7 +100,7 @@ class Config
|
||||
protected function loadGeneral()
|
||||
{
|
||||
if (file_exists('.mage/config/general.yml')) {
|
||||
$this->config['general'] = spyc_load_file('.mage/config/general.yml');
|
||||
$this->config['general'] = Yaml::parse('.mage/config/general.yml');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +114,7 @@ class Config
|
||||
{
|
||||
$environment = $this->getEnvironment();
|
||||
if (($environment != false) && file_exists('.mage/config/environment/' . $environment . '.yml')) {
|
||||
$this->config['environment'] = spyc_load_file('.mage/config/environment/' . $environment . '.yml');
|
||||
$this->config['environment'] = Yaml::parse('.mage/config/environment/' . $environment . '.yml');
|
||||
|
||||
// Create temporal directory for clone
|
||||
if (isset($this->config['environment']['deployment']['source']) && is_array($this->config['environment']['deployment']['source'])) {
|
||||
|
||||
-1046
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user