|
|
|
@ -403,7 +403,7 @@ class SymfonyRequirements extends RequirementCollection |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$this->addRequirement( |
|
|
|
|
is_dir($this->getComposerVendorDir()), |
|
|
|
|
is_dir(__DIR__.'/../vendor/composer'), |
|
|
|
|
'Vendor libraries must be installed', |
|
|
|
|
'Vendor libraries are missing. Install composer following instructions from <a href="http://getcomposer.org/">http://getcomposer.org/</a>. '. |
|
|
|
|
'Then run "<strong>php composer.phar install</strong>" to install them.' |
|
|
|
@ -543,7 +543,7 @@ class SymfonyRequirements extends RequirementCollection |
|
|
|
|
/* optional recommendations follow */ |
|
|
|
|
|
|
|
|
|
$this->addRecommendation( |
|
|
|
|
file_get_contents(__FILE__) === file_get_contents($this->getComposerVendorDir().'/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/skeleton/app/SymfonyRequirements.php'), |
|
|
|
|
file_get_contents(__FILE__) === file_get_contents(__DIR__.'/../vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/skeleton/app/SymfonyRequirements.php'), |
|
|
|
|
'Requirements file should be up-to-date', |
|
|
|
|
'Your requirements file is outdated. Run composer install and re-check your configuration.' |
|
|
|
|
); |
|
|
|
@ -590,8 +590,8 @@ class SymfonyRequirements extends RequirementCollection |
|
|
|
|
|
|
|
|
|
$this->addRecommendation( |
|
|
|
|
class_exists('DomDocument'), |
|
|
|
|
'PHP-XML module should be installed', |
|
|
|
|
'Install and enable the <strong>PHP-XML</strong> module.' |
|
|
|
|
'PHP-DOM and PHP-XML modules should be installed', |
|
|
|
|
'Install and enable the <strong>PHP-DOM</strong> and the <strong>PHP-XML</strong> modules.' |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$this->addRecommendation( |
|
|
|
@ -736,21 +736,4 @@ class SymfonyRequirements extends RequirementCollection |
|
|
|
|
return (int) $size; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* In some special setups, the vendor/ directory isn't located in the project's |
|
|
|
|
* root directory. To make this command work for every case, read Composer's |
|
|
|
|
* vendor/ directory location directly from composer.json file. |
|
|
|
|
* |
|
|
|
|
* @return string |
|
|
|
|
*/ |
|
|
|
|
private function getComposerVendorDir() |
|
|
|
|
{ |
|
|
|
|
$composerJson = json_decode(file_get_contents(__DIR__.'/../composer.json')); |
|
|
|
|
if (isset($composerJson->config)) { |
|
|
|
|
return $composerJson->config->{'vendor-dir'}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return __DIR__.'/../vendor/composer'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|