Skip to content

Commit

Permalink
minor #188 don't use deprecated Yaml component features (xabbuh)
Browse files Browse the repository at this point in the history
This PR was merged into the master branch.

Discussion
----------

don't use deprecated Yaml component features

Since Symfony 2.2, the ability to pass file names to the `Yaml::parse()`
method is deprecated.

Commits
-------

884d5a1 don't use deprecated Yaml component features
  • Loading branch information
javiereguiluz committed Mar 12, 2015
2 parents 30964ab + 884d5a1 commit 51f5871
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Tests/Configuration/ConfiguratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function testGetEntityConfiguration($inputFixtureFilepath, $outputFixture
{
$this->markTestSkipped('Skip test until we can find the solution for the following error: "Argument 1 passed to EasyAdminBundle\Configuration\Configurator::processEntityPropertiesMetadata() must be an instance of Doctrine\ORM\Mapping\ClassMetadata, instance of Mock_ClassMetadataInfo_2057af3e given');

$backendConfig = Yaml::parse($inputFixtureFilepath);
$backendConfig = Yaml::parse(file_get_contents($inputFixtureFilepath));
$backendConfig['easy_admin']['entities'] = $this->extension->getEntitiesConfiguration($backendConfig['easy_admin']['entities']);
$configurator = new Configurator($backendConfig['easy_admin'], $this->inspector, $this->reflector);
$configuration = $configurator->getEntityConfiguration('TestEntity');
Expand Down
2 changes: 1 addition & 1 deletion Tests/DependencyInjection/EasyAdminExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function setUp()
*/
public function testGetEntitiesConfiguration($inputFixtureFilepath, $outputFixtureFilepath)
{
$backendConfig = Yaml::parse($inputFixtureFilepath);
$backendConfig = Yaml::parse(file_get_contents($inputFixtureFilepath));
$configuration = $this->extension->getEntitiesConfiguration($backendConfig['easy_admin']['entities']);
// Yaml component dumps empty arrays as hashes, fix it to increase configuration readability
$yamlConfiguration = str_replace('{ }', '[]', Yaml::dump($configuration));
Expand Down

0 comments on commit 51f5871

Please sign in to comment.