Skip to content

Commit

Permalink
Fix symfony 5 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
chalasr authored and alcaeus committed Nov 26, 2019
1 parent 36620c2 commit 5c5084a
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 14 deletions.
2 changes: 2 additions & 0 deletions Command/InfoDoctrineODMCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$output->write('', true);
}
}

return 0;
}
}
4 changes: 3 additions & 1 deletion Command/LoadDataFixturesDoctrineODMCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$question = new ConfirmationQuestion('Careful, database will be purged. Do you want to continue (y/N) ?', false);

if (! $helper->ask($input, $output, $question)) {
return;
return 0;
}
}

Expand Down Expand Up @@ -118,5 +118,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$output->writeln(sprintf(' <comment>></comment> <info>%s</info>', $message));
});
$executor->execute($fixtures, $input->getOption('append'));

return 0;
}
}
2 changes: 2 additions & 0 deletions Command/TailCursorDoctrineODMCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ protected function execute(InputInterface $input, OutputInterface $output)

$dm->clear();
}

return 0;
}

/**
Expand Down
5 changes: 5 additions & 0 deletions DependencyInjection/DoctrineMongoDBExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,11 @@ protected function getMappingResourceExtension()
return 'mongodb';
}

protected function getMetadataDriverClass(string $driverType) : string
{
return '%' . $this->getObjectManagerElementName('metadata.' . $driverType . '.class') . '%';
}

public function getAlias()
{
return 'doctrine_mongodb';
Expand Down
4 changes: 2 additions & 2 deletions Tests/Form/Type/DocumentTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class DocumentTypeTest extends TypeTestCase

private $typeFQCN;

public function setUp()
public function setUp() : void
{
$this->typeFQCN = method_exists(AbstractType::class, 'getBlockPrefix');

Expand All @@ -42,7 +42,7 @@ public function setUp()
parent::setUp();
}

protected function tearDown()
protected function tearDown() : void
{
$documentClasses = [
Document::class,
Expand Down
4 changes: 2 additions & 2 deletions Tests/Form/Type/TypeGuesserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class TypeGuesserTest extends TypeTestCase

private $typeFQCN;

public function setUp()
public function setUp() : void
{
$this->typeFQCN = method_exists(AbstractType::class, 'getBlockPrefix');

Expand All @@ -39,7 +39,7 @@ public function setUp()
parent::setUp();
}

protected function tearDown()
protected function tearDown() : void
{
$documentClasses = [
Document::class,
Expand Down
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@
"doctrine/annotations": "^1.2",
"doctrine/mongodb-odm": "^2.0.0",
"psr/log": "^1.0",
"symfony/console": "^3.4 || ^4.0",
"symfony/dependency-injection": "^3.4 || ^4.0",
"symfony/doctrine-bridge": "^3.4 || ^4.0",
"symfony/config": "^3.4 || ^4.0",
"symfony/framework-bundle": "^3.4 || ^4.0",
"symfony/options-resolver": "^3.4 || ^4.0"
"symfony/console": "^3.4 || ^4.0 || ^5.0",
"symfony/dependency-injection": "^3.4 || ^4.0 || ^5.0",
"symfony/doctrine-bridge": "^3.4 || ^4.0 || ^5.0",
"symfony/config": "^3.4 || ^4.0 || ^5.0",
"symfony/framework-bundle": "^3.4 || ^4.0 || ^5.0",
"symfony/options-resolver": "^3.4 || ^4.0 || ^5.0"
},
"require-dev": {
"doctrine/coding-standard": "^6.0",
"doctrine/data-fixtures": "^1.2.2",
"phpunit/phpunit": "^7.3",
"squizlabs/php_codesniffer": "^3.5",
"symfony/form": "^3.4 || ^4.0",
"symfony/phpunit-bridge": "^3.4 || ^4.0",
"symfony/yaml": "^3.4 || ^4.0"
"symfony/form": "^3.4 || ^4.0 || ^5.0",
"symfony/phpunit-bridge": "^3.4 || ^4.0 || ^5.0",
"symfony/yaml": "^3.4 || ^4.0 || ^5.0"
},
"suggest": {
"doctrine/data-fixtures": "Load data fixtures"
Expand Down

0 comments on commit 5c5084a

Please sign in to comment.