ソースを参照

Updating vendors + composer

Julio Montoya 11 年 前
コミット
562787889a

+ 1 - 2
composer.json

@@ -89,8 +89,7 @@
         "sunra/php-simple-html-dom-parser": "1.5.0"
     },
     "require-dev": {
-        "knplabs/gaufrette": "0.2.*@dev",
-        "bt51/gaufrette-serviceprovider": "dev-master",
+        "league/flysystem": "0.3.3",
         "symfony/browser-kit": "~2.3",
         "symfony/web-profiler-bundle": "~2.3",
         "silex/web-profiler": "~1.0",

+ 1 - 1
vendor/autoload.php

@@ -4,4 +4,4 @@
 
 require_once __DIR__ . '/composer' . '/autoload_real.php';
 
-return ComposerAutoloaderInitc572b980089f175cae6f618557157d1d::getLoader();
+return ComposerAutoloaderInitf4df0055480c4a6738498545f1ec0cfd::getLoader();

+ 45 - 21
vendor/chamilo/chash/src/Chash/Command/Installation/CommonCommand.php

@@ -11,6 +11,8 @@ use Symfony\Component\Filesystem\Exception\IOException;
 use Alchemy\Zippy\Zippy;
 use Symfony\Component\Console\Output\OutputInterface;
 use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Finder\Finder;
+use Doctrine\DBAL\Connection;
 
 /**
  * Class CommonCommand
@@ -28,16 +30,16 @@ class CommonCommand extends AbstractCommand
     private $migrationConfigurationFile;
 
     /**
-    * @param array $configuration
-    */
+     * @param array $configuration
+     */
     public function setConfigurationArray(array $configuration)
     {
         $this->configuration = $configuration;
     }
 
     /**
-    * @return array
-    */
+     * @return array
+     */
     public function getConfigurationArray()
     {
         return $this->configuration;
@@ -114,8 +116,8 @@ class CommonCommand extends AbstractCommand
     }
 
     /**
-    * @param array $databaseSettings
-    */
+     * @param array $databaseSettings
+     */
     public function setExtraDatabaseSettings(array $databaseSettings)
     {
         $this->extraDatabaseSettings = $databaseSettings;
@@ -218,6 +220,7 @@ class CommonCommand extends AbstractCommand
             }
         }
         natsort($dirList);
+
         return $dirList;
     }
 
@@ -500,8 +503,8 @@ class CommonCommand extends AbstractCommand
                 'parent' => '1.9.0'
             ),
             '1.9.x' => array(
-              'require_update' => false,
-              'parent' => '1.9.0'
+                'require_update' => false,
+                'parent' => '1.9.0'
             ),
             '1.10.0'  => array(
                 'require_update' => true,
@@ -872,7 +875,10 @@ class CommonCommand extends AbstractCommand
         $config->setProxyDir(__DIR__ . '/Proxies');
         $config->setProxyNamespace('Proxies');
 
-        $em = \Doctrine\ORM\EntityManager::create($this->getDatabaseSettings(), $config);
+        $em = \Doctrine\ORM\EntityManager::create(
+            $this->getDatabaseSettings(),
+            $config
+        );
 
         // Fixes some errors
         $platform = $em->getConnection()->getDatabasePlatform();
@@ -881,8 +887,8 @@ class CommonCommand extends AbstractCommand
 
         $helpers = array(
             'db' => new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection()),
-            'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em),
-            'configuration' => new \Chash\Helpers\ConfigurationHelper()
+            'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em)
+            //'configuration' => new \Chash\Helpers\ConfigurationHelper()
         );
 
         foreach ($helpers as $name => $helper) {
@@ -938,6 +944,13 @@ class CommonCommand extends AbstractCommand
                         $em = \Doctrine\ORM\EntityManager::create($params, $config);
                     }
                 }
+
+                if (!empty($em)) {
+                    $platform = $em->getConnection()->getDatabasePlatform();
+                    $platform->registerDoctrineTypeMapping('enum', 'string');
+                    $platform->registerDoctrineTypeMapping('set', 'string');
+                }
+
                 $helper = new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection());
                 $this->getApplication()->getHelperSet()->set($helper, $dbInfo['database']);
             }
@@ -945,16 +958,17 @@ class CommonCommand extends AbstractCommand
     }
 
     /**
-     * @param \Symfony\Component\Finder\Finder $files
+     * @param Finder $files
      * @param OutputInterface $output
      * @return int
      */
-    public function removeFiles(\Symfony\Component\Finder\Finder $files, OutputInterface $output)
+    public function removeFiles(Finder $files, OutputInterface $output)
     {
         $dryRun = $this->getConfigurationHelper()->getDryRun();
 
         if (count($files) < 1) {
             $output->writeln('<comment>No files found.</comment>');
+
             return 0;
         }
 
@@ -976,6 +990,8 @@ class CommonCommand extends AbstractCommand
         } catch (IOException $e) {
             echo "\n An error occurred while removing the directory: ".$e->getMessage()."\n ";
         }
+
+        return 0;
     }
 
     /**
@@ -1007,8 +1023,8 @@ class CommonCommand extends AbstractCommand
         $fs = new Filesystem();
 
         // Download the chamilo package from from github:
+        $versionTag = str_replace('.', '_', $version);
         if (empty($updateInstallation)) {
-            $versionTag = str_replace('.', '_', $version);
             $updateInstallation = "https://github.com/chamilo/chamilo-lms/archive/CHAMILO_".$versionTag."_STABLE.zip";
 
             switch($version) {
@@ -1027,6 +1043,7 @@ class CommonCommand extends AbstractCommand
             // Check temp folder
             if (!is_writable($defaultTempFolder)) {
                 $output->writeln("<comment>We don't have permissions to write in the temp folder: $defaultTempFolder</comment>");
+
                 return 0;
             }
 
@@ -1034,6 +1051,7 @@ class CommonCommand extends AbstractCommand
             if (strpos($updateInstallation, 'http') === false) {
                 if (!file_exists($updateInstallation)) {
                     $output->writeln("<comment>File does not exists: $updateInstallation</comment>");
+
                     return 0;
                 }
             } else {
@@ -1060,6 +1078,7 @@ class CommonCommand extends AbstractCommand
                 if (!file_exists($updateInstallationLocalName)) {
                     $output->writeln("<error>Can't download the file!</error>");
                     $output->writeln("<comment>Check if you can download this file in your browser first:</comment> <info>$updateInstallation</info>");
+
                     return 0;
                 }
             }
@@ -1077,6 +1096,7 @@ class CommonCommand extends AbstractCommand
                     $chamiloPath = $folderPath.'/chamilo-lms-CHAMILO_'.$versionTag.'_STABLE/main/inc/global.inc.php';
                     if (file_exists($chamiloPath)) {
                         $output->writeln("<comment>Files have been already extracted here: </comment><info>".$folderPath.'/chamilo-lms-CHAMILO_'.$versionTag.'_STABLE/'."</info>");
+
                         return $folderPath.'/chamilo-lms-CHAMILO_'.$versionTag.'_STABLE/';
                     }
                 }
@@ -1105,9 +1125,9 @@ class CommonCommand extends AbstractCommand
 
                         unlink($updateInstallation);
                         $output->writeln("<comment>Removing file</comment>:<info>$updateInstallation</info>");
-
                         //$output->writeln("Error:");
                         //$output->writeln($e->getMessage());
+
                         return 0;
                     }
                 }
@@ -1116,15 +1136,19 @@ class CommonCommand extends AbstractCommand
 
                 if (empty($chamiloLocationPath)) {
                     $output->writeln("<error>Chamilo folder structure not found in package.</error>");
+
                     return 0;
                 }
 
                 return $chamiloLocationPath;
             } else {
                 $output->writeln("<comment>File doesn't exist.</comment>");
+
                 return 0;
             }
         }
+
+        return 0;
     }
 
     /**
@@ -1294,10 +1318,10 @@ class CommonCommand extends AbstractCommand
     }
 
     /**
-     * @param \Symfony\Component\Console\Output\OutputInterface $output
-     * @param \Doctrine\DBAL\Connection $connection
+     * @param OutputInterface $output
+     * @param Connection $connection
      */
-    public function setPortalSettingsInChamilo(OutputInterface $output, \Doctrine\DBAL\Connection $connection)
+    public function setPortalSettingsInChamilo(OutputInterface $output, Connection $connection)
     {
         $adminSettings = $this->getAdminSettings();
 
@@ -1319,10 +1343,10 @@ class CommonCommand extends AbstractCommand
     }
 
     /**
-     * @param \Symfony\Component\Console\Output\OutputInterface $output
-     * @param \Doctrine\DBAL\Connection $connection
+     * @param OutputInterface $output
+     * @param Connection $connection
      */
-    public function setAdminSettingsInChamilo(OutputInterface $output, \Doctrine\DBAL\Connection $connection)
+    public function setAdminSettingsInChamilo(OutputInterface $output, Connection $connection)
     {
         $settings = $this->getAdminSettings();
 

+ 5 - 5
vendor/composer/autoload_real.php

@@ -2,7 +2,7 @@
 
 // autoload_real.php @generated by Composer
 
-class ComposerAutoloaderInitc572b980089f175cae6f618557157d1d
+class ComposerAutoloaderInitf4df0055480c4a6738498545f1ec0cfd
 {
     private static $loader;
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitc572b980089f175cae6f618557157d1d
             return self::$loader;
         }
 
-        spl_autoload_register(array('ComposerAutoloaderInitc572b980089f175cae6f618557157d1d', 'loadClassLoader'), true, true);
+        spl_autoload_register(array('ComposerAutoloaderInitf4df0055480c4a6738498545f1ec0cfd', 'loadClassLoader'), true, true);
         self::$loader = $loader = new \Composer\Autoload\ClassLoader();
-        spl_autoload_unregister(array('ComposerAutoloaderInitc572b980089f175cae6f618557157d1d', 'loadClassLoader'));
+        spl_autoload_unregister(array('ComposerAutoloaderInitf4df0055480c4a6738498545f1ec0cfd', 'loadClassLoader'));
 
         $vendorDir = dirname(__DIR__);
         $baseDir = dirname($vendorDir);
@@ -45,14 +45,14 @@ class ComposerAutoloaderInitc572b980089f175cae6f618557157d1d
 
         $includeFiles = require __DIR__ . '/autoload_files.php';
         foreach ($includeFiles as $file) {
-            composerRequirec572b980089f175cae6f618557157d1d($file);
+            composerRequiref4df0055480c4a6738498545f1ec0cfd($file);
         }
 
         return $loader;
     }
 }
 
-function composerRequirec572b980089f175cae6f618557157d1d($file)
+function composerRequiref4df0055480c4a6738498545f1ec0cfd($file)
 {
     require $file;
 }