Skip to content

Commit

Permalink
Updated Yaml loading to use parse method (Symfony beta5 changes).
Browse files Browse the repository at this point in the history
  • Loading branch information
richsage committed Jun 17, 2011
1 parent ad9fd1a commit 81485d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Command/GenerateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
if (is_dir($dir)) {
$finder = new Finder();
foreach ($finder->files()->name('*.yml')->followLinks()->in($dir) as $file) {
foreach ((array) Yaml::load($file) as $class => $configClass) {
foreach ((array) Yaml::parse($file) as $class => $configClass) {
// class
if (0 !== strpos($class, 'Model\\')) {
throw new \RuntimeException('The Mandango documents must been in the "Model\" namespace.');
Expand All @@ -78,7 +78,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
if (is_dir($dir = $bundle->getPath().'/Resources/config/mandango')) {
$finder = new Finder();
foreach ($finder->files()->name('*.yml')->followLinks()->in($dir) as $file) {
foreach ((array) Yaml::load($file) as $class => $configClass) {
foreach ((array) Yaml::parse($file) as $class => $configClass) {
// class
if (0 !== strpos($class, 'Model\\')) {
throw new \RuntimeException('The mandango documents must been in the "Model\" namespace.');
Expand Down
2 changes: 1 addition & 1 deletion Command/LoadFixturesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

$data = array();
foreach ($files as $file) {
$data = Util::arrayDeepMerge($data, (array) Yaml::load($file));
$data = Util::arrayDeepMerge($data, (array) Yaml::parse($file));
}

if (!$data) {
Expand Down

0 comments on commit 81485d7

Please sign in to comment.