Skip to content

Commit

Permalink
require-dev support for ORM 3
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaicher committed Mar 16, 2024
1 parent a946f3c commit c7f6135
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
"twig/twig": "^3.0"
},
"require-dev": {
"dama/doctrine-test-bundle": "^8.0",
"doctrine/doctrine-bundle": "^2.7",
"doctrine/orm": "^2.14",
"dama/doctrine-test-bundle": "^8.0.2",
"doctrine/doctrine-bundle": "^2.11",
"doctrine/orm": "^2.16 || ^3.0",
"friendsofphp/php-cs-fixer": "^3.4",
"knplabs/knp-menu-bundle": "^3.0",
"matthiasnoback/symfony-config-test": "^4.2 || ^5.0",
Expand Down
3 changes: 3 additions & 0 deletions tests/App/Entity/Media.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

#[ORM\Entity]
#[ORM\Table(name: 'media__media')]
#[ORM\AttributeOverrides([
new ORM\AttributeOverride(name: 'length', column: new ORM\Column(type: Types::DECIMAL, precision: 2, nullable: true)),
])]
class Media extends BaseMedia
{
#[ORM\Id]
Expand Down
1 change: 1 addition & 0 deletions tests/App/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ doctrine:
orm:
entity_managers:
default:
report_fields_where_declared: true
mappings:
SonataMediaBundle: null
SonataFormatterTest:
Expand Down
7 changes: 1 addition & 6 deletions tests/custom_bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

$kernel = new AppKernel($_SERVER['APP_ENV'] ?? 'test', (bool) ($_SERVER['APP_DEBUG'] ?? false));
$application = new Application($kernel);
$application->setCatchExceptions(false);
$application->setAutoExit(false);

$input = new ArrayInput([
Expand All @@ -27,12 +28,6 @@
]);
$application->run($input, new NullOutput());

$input = new ArrayInput([
'command' => 'doctrine:database:create',
'--no-interaction' => true,
]);
$application->run($input, new NullOutput());

$input = new ArrayInput([
'command' => 'doctrine:schema:create',
]);
Expand Down

0 comments on commit c7f6135

Please sign in to comment.