1
0
mirror of synced 2025-01-09 18:47:10 +03:00

Merge pull request #1205 from Ocramius/hotfix/#1200-Yaml-parse-does-not-accept-files-in-symfony-2-6-fix

Hotfix - #1200 - Symfony 2.7.x deprecation fixes
This commit is contained in:
Marco Pivetta 2014-12-04 13:59:02 +01:00
commit 798a8b6d91
4 changed files with 7 additions and 7 deletions

View File

@ -18,7 +18,7 @@
"doctrine/collections": "~1.2",
"doctrine/dbal": ">=2.5-dev,<2.6-dev",
"doctrine/instantiator": "~1.0.1",
"symfony/console": "~2.3"
"symfony/console": "~2.5"
},
"require-dev": {
"symfony/yaml": "~2.1",

View File

@ -788,6 +788,6 @@ class YamlDriver extends FileDriver
*/
protected function loadMappingFile($file)
{
return Yaml::parse($file);
return Yaml::parse(file_get_contents($file));
}
}

View File

@ -22,7 +22,7 @@ namespace Doctrine\ORM\Tools\Console\Command;
use Doctrine\Common\Persistence\Mapping\MappingException;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\TableHelper;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
@ -79,7 +79,7 @@ EOT
*/
private function displayEntity($entityName, EntityManagerInterface $entityManager, OutputInterface $output)
{
$table = new TableHelper();
$table = new Table($output);
$table->setHeaders(array('Field', 'Value'));
@ -126,7 +126,7 @@ EOT
)
);
$table->render($output);
$table->render();
}
/**

View File

@ -77,10 +77,10 @@ class ConvertDoctrine1Schema
if (is_dir($path)) {
$files = glob($path . '/*.yml');
foreach ($files as $file) {
$schema = array_merge($schema, (array) Yaml::parse($file));
$schema = array_merge($schema, (array) Yaml::parse(file_get_contents($file)));
}
} else {
$schema = array_merge($schema, (array) Yaml::parse($path));
$schema = array_merge($schema, (array) Yaml::parse(file_get_contents($file)));
}
}