Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded to doctrine/doctrine-module ^6.2.0 #764

Merged
merged 1 commit into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"ext-json": "*",
"doctrine/dbal": "^3.3.2",
"doctrine/doctrine-laminas-hydrator": "^3.0.0",
"doctrine/doctrine-module": "^5.3.0 || ^6.0.5",
"doctrine/doctrine-laminas-hydrator": "^3.2.0",
"doctrine/doctrine-module": "^6.2.0",
"doctrine/event-manager": "^2.0.0",
"doctrine/orm": "^2.13.0",
"doctrine/persistence": "^2.3.0 || ^3.0.0",
"laminas/laminas-eventmanager": "^3.4.0",
"doctrine/persistence": "^3.0.0",
"laminas/laminas-eventmanager": "^3.5.0",
"laminas/laminas-modulemanager": "^2.11.0",
"laminas/laminas-mvc": "^3.3.2",
"laminas/laminas-paginator": "^2.12.2",
"laminas/laminas-mvc": "^3.3.5",
"laminas/laminas-paginator": "^2.13.0",
"laminas/laminas-servicemanager": "^3.17.0",
"laminas/laminas-stdlib": "^3.7.1",
"laminas/laminas-stdlib": "^3.13.0",
"psr/container": "^1.1.2",
"symfony/console": "^5.4.3 || ^6.0.3"
"symfony/console": "^6.1.2 || ^7.0.0"
},
"require-dev": {
"doctrine/annotations": "^1.13.2",
"doctrine/annotations": "^2.0.0",
"doctrine/coding-standard": "^9.0.0",
"doctrine/data-fixtures": "^1.5.2",
"doctrine/migrations": "^3.8.0",
Expand All @@ -45,7 +45,8 @@
"squizlabs/php_codesniffer": "^3.6.2"
},
"conflict": {
"doctrine/migrations": "<3.8"
"doctrine/migrations": "<3.8",
"laminas/laminas-form": "<3.10"
},
"suggest": {
"doctrine/migrations": "doctrine migrations if you want to keep your schema definitions versioned",
Expand Down
25 changes: 1 addition & 24 deletions tests/CliConfiguratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
namespace DoctrineORMModuleTest\Listener;

use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Tools\Console\Command\ImportCommand;
use Doctrine\DBAL\Tools\Console\Command\ReservedWordsCommand;
use Doctrine\DBAL\Tools\Console\Command\RunSqlCommand;
use Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper;
use Doctrine\Migrations\Tools\Console\Command\DiffCommand;
use Doctrine\Migrations\Tools\Console\Command\ExecuteCommand;
use Doctrine\Migrations\Tools\Console\Command\GenerateCommand;
Expand All @@ -30,7 +28,6 @@
use Laminas\ServiceManager\ServiceManager;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;

use function assert;
use function class_exists;
Expand Down Expand Up @@ -112,15 +109,6 @@ public function testValidHelpers(): void
assert($emHelper instanceof EntityManagerHelper);
$this->assertInstanceOf(EntityManagerHelper::class, $emHelper);
$this->assertSame($this->objectManager, $emHelper->getEntityManager());

if (! class_exists(ConnectionHelper::class)) {
return;
}

$dbHelper = $helperSet->get('db');
assert($dbHelper instanceof ConnectionHelper);
$this->assertInstanceOf(ConnectionHelper::class, $dbHelper);
$this->assertSame($this->objectManager->getConnection(), $dbHelper->getConnection());
}

/**
Expand All @@ -140,7 +128,6 @@ public function testValidCommands(string $commandName, string $className): void
$cliConfigurator->configure($application);

$command = $application->get($commandName);
assert($command instanceof Command);
$this->assertInstanceOf($className, $command);

// check for the entity-manager option
Expand All @@ -161,7 +148,7 @@ public function testValidCommands(string $commandName, string $className): void
*/
public function dataProviderForTestValidCommands(): array
{
$data = [
return [
[
'dbal:run-sql',
RunSqlCommand::class,
Expand Down Expand Up @@ -223,15 +210,5 @@ public function dataProviderForTestValidCommands(): array
ExecuteCommand::class,
],
];

// this is only available with DBAL 2.x
if (class_exists(ImportCommand::class)) {
$data[] = [
'dbal:import',
ImportCommand::class,
];
}

return $data;
}
}