diff --git a/composer.json b/composer.json index 2d557fa..67a20d3 100644 --- a/composer.json +++ b/composer.json @@ -5,15 +5,15 @@ "license": "GPL-2.0-only", "require": { "php": "^7.3", - "doctrine/dbal": "^2.9", - "symfony/config": "^4.3", - "symfony/dependency-injection": "^4.3", - "symfony/http-kernel": "^4.3", - "symfony/yaml": "^4.3" + "doctrine/dbal": "^2.10", + "symfony/config": "^5.0", + "symfony/dependency-injection": "^5.0", + "symfony/http-kernel": "^5.0", + "symfony/yaml": "^5.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.14", - "phpunit/phpunit": "^7.5" + "friendsofphp/php-cs-fixer": "^2.16", + "phpunit/phpunit": "^8.5" }, "autoload": { "psr-4": { diff --git a/src/bundle/DependencyInjection/DoctrineSchemaExtension.php b/src/bundle/DependencyInjection/DoctrineSchemaExtension.php index 3208f1e..f8f46a1 100644 --- a/src/bundle/DependencyInjection/DoctrineSchemaExtension.php +++ b/src/bundle/DependencyInjection/DoctrineSchemaExtension.php @@ -18,8 +18,6 @@ class DoctrineSchemaExtension extends Extension { /** * Override default extension alias name to include eZ vendor in name. - * - * @return string */ public function getAlias(): string { @@ -29,9 +27,6 @@ public function getAlias(): string /** * Load Doctrine Schema Extension config. * - * @param array $configs - * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container - * * @throws \Exception */ public function load(array $configs, ContainerBuilder $container) diff --git a/src/lib/API/Builder/SchemaBuilder.php b/src/lib/API/Builder/SchemaBuilder.php index b03eba2..06798cd 100644 --- a/src/lib/API/Builder/SchemaBuilder.php +++ b/src/lib/API/Builder/SchemaBuilder.php @@ -23,17 +23,11 @@ interface SchemaBuilder * * @see \EzSystems\DoctrineSchema\API\Event\SchemaBuilderEvent * @see \EzSystems\DoctrineSchema\API\Event\SchemaBuilderEvents::BUILD_SCHEMA - * - * @return \Doctrine\DBAL\Schema\Schema */ public function buildSchema(): Schema; /** * Import Schema from Yaml schema definition file into Schema object. - * - * @param string $schemaFilePath - * - * @return \Doctrine\DBAL\Schema\Schema */ public function importSchemaFromFile(string $schemaFilePath): Schema; } diff --git a/src/lib/API/Event/SchemaBuilderEvent.php b/src/lib/API/Event/SchemaBuilderEvent.php index cb2da40..6c9ff52 100644 --- a/src/lib/API/Event/SchemaBuilderEvent.php +++ b/src/lib/API/Event/SchemaBuilderEvent.php @@ -24,10 +24,6 @@ class SchemaBuilderEvent extends Event */ private $schema; - /** - * @param \EzSystems\DoctrineSchema\API\Builder\SchemaBuilder $schemaBuilder - * @param \Doctrine\DBAL\Schema\Schema $schema - */ public function __construct(SchemaBuilder $schemaBuilder, Schema $schema) { $this->schemaBuilder = $schemaBuilder; diff --git a/src/lib/API/SchemaExporter.php b/src/lib/API/SchemaExporter.php index 39750e6..f7e19f5 100644 --- a/src/lib/API/SchemaExporter.php +++ b/src/lib/API/SchemaExporter.php @@ -17,10 +17,6 @@ interface SchemaExporter { /** * Export \Doctrine\DBAL\Schema object to the custom Yaml format. - * - * @param \Doctrine\DBAL\Schema\Schema $schemaDefinition - * - * @return string */ public function export(Schema $schemaDefinition): string; } diff --git a/src/lib/API/SchemaImporter.php b/src/lib/API/SchemaImporter.php index fceff6e..e813663 100644 --- a/src/lib/API/SchemaImporter.php +++ b/src/lib/API/SchemaImporter.php @@ -20,7 +20,6 @@ interface SchemaImporter /** * Import database schema into \Doctrine\DBAL\Schema from file containing custom Yaml format. * - * @param string $schemaFilePath * @param \Doctrine\DBAL\Schema\Schema|null $targetSchema existing schema to import into, if not given, an empty one will be created * * @return \Doctrine\DBAL\Schema\Schema imported schema @@ -33,7 +32,6 @@ public function importFromFile(string $schemaFilePath, ?Schema $targetSchema = n /** * Import database schema into \Doctrine\DBAL\Schema from string containing custom Yaml format. * - * @param string $schemaDefinition * @param \Doctrine\DBAL\Schema\Schema|null $targetSchema existing schema to import into, if not given, an empty one will be created * * @return \Doctrine\DBAL\Schema\Schema imported schema diff --git a/src/lib/Builder/SchemaBuilder.php b/src/lib/Builder/SchemaBuilder.php index 65930ba..b7de735 100644 --- a/src/lib/Builder/SchemaBuilder.php +++ b/src/lib/Builder/SchemaBuilder.php @@ -45,11 +45,6 @@ class SchemaBuilder implements APISchemaBuilder */ private $defaultTableOptions; - /** - * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher - * @param \EzSystems\DoctrineSchema\API\SchemaImporter $schemaImporter - * @param array $defaultTableOptions - */ public function __construct( EventDispatcherInterface $eventDispatcher, SchemaImporter $schemaImporter, diff --git a/src/lib/Database/DbPlatform/DbPlatform.php b/src/lib/Database/DbPlatform/DbPlatform.php index 7c75e3f..d23d30f 100644 --- a/src/lib/Database/DbPlatform/DbPlatform.php +++ b/src/lib/Database/DbPlatform/DbPlatform.php @@ -19,15 +19,11 @@ interface DbPlatform * (or its implementation). * * @see \Doctrine\DBAL\Platforms\AbstractPlatform - * - * @return string */ public function getDriverName(): string; /** * Add event subscribers predefined and required by an implementation. - * - * @param \Doctrine\Common\EventManager $eventManager */ public function addEventSubscribers(EventManager $eventManager): void; } diff --git a/src/lib/Database/DbPlatform/PostgreSqlDbPlatform.php b/src/lib/Database/DbPlatform/PostgreSqlDbPlatform.php index fcf64a8..5b53bb5 100644 --- a/src/lib/Database/DbPlatform/PostgreSqlDbPlatform.php +++ b/src/lib/Database/DbPlatform/PostgreSqlDbPlatform.php @@ -45,8 +45,6 @@ public function getCreateSchemaSQL($schemaName) * * @param \Doctrine\DBAL\Schema\Table|string $table * - * @return string - * * @throws \InvalidArgumentException */ public function getDropTableSQL($table): string diff --git a/src/lib/Database/DbPlatform/SqliteDbPlatform.php b/src/lib/Database/DbPlatform/SqliteDbPlatform.php index c81543b..1ba6027 100644 --- a/src/lib/Database/DbPlatform/SqliteDbPlatform.php +++ b/src/lib/Database/DbPlatform/SqliteDbPlatform.php @@ -53,8 +53,6 @@ public function getDriverName(): string /** * Override default behavior of Sqlite db platform to force generating foreign keys. - * - * @return bool */ public function supportsForeignKeyConstraints(): bool { diff --git a/src/lib/Exporter/SchemaExporter.php b/src/lib/Exporter/SchemaExporter.php index 27046bc..c227034 100644 --- a/src/lib/Exporter/SchemaExporter.php +++ b/src/lib/Exporter/SchemaExporter.php @@ -33,8 +33,6 @@ public function __construct(SchemaTableExporter $tableYamlExporter) /** * Export \Doctrine\DBAL\Schema object to the custom Yaml format. * - * @param \Doctrine\DBAL\Schema\Schema $schema - * * @return string representation of database schema in Yaml format * * @throws \Doctrine\DBAL\DBALException diff --git a/src/lib/Exporter/Table/SchemaTableExporter.php b/src/lib/Exporter/Table/SchemaTableExporter.php index 71c9d46..90117eb 100644 --- a/src/lib/Exporter/Table/SchemaTableExporter.php +++ b/src/lib/Exporter/Table/SchemaTableExporter.php @@ -18,10 +18,6 @@ class SchemaTableExporter /** * Export \Doctrine\DBAL\Schema\Table to array representation. * - * @param \Doctrine\DBAL\Schema\Table $table - * - * @return array - * * @throws \Doctrine\DBAL\DBALException */ public function export(Table $table): array @@ -57,9 +53,6 @@ private function filterOutIndexDefaultOptions(array $options): array /** * Export Schema Table indices. * - * @param array $tableMetadata - * @param \Doctrine\DBAL\Schema\Table $table - * * @return array modified $tableMetadata */ private function exportIndices(array $tableMetadata, Table $table): array @@ -95,9 +88,6 @@ private function exportIndices(array $tableMetadata, Table $table): array /** * Export Schema Table columns. * - * @param array $tableMetadata - * @param \Doctrine\DBAL\Schema\Table $table - * * @return array modified $tableMetadata * * @throws \Doctrine\DBAL\DBALException @@ -135,9 +125,6 @@ private function exportColumns(array $tableMetadata, Table $table): array /** * Export Schema Table columns. * - * @param array $tableMetadata - * @param \Doctrine\DBAL\Schema\Table $table - * * @return array modified $tableMetadata */ private function exportForeignKeys(array $tableMetadata, Table $table): array diff --git a/src/lib/Importer/SchemaImporter.php b/src/lib/Importer/SchemaImporter.php index d964762..068b901 100644 --- a/src/lib/Importer/SchemaImporter.php +++ b/src/lib/Importer/SchemaImporter.php @@ -44,11 +44,6 @@ public function importFromSource(string $schemaDefinition, ?Schema $targetSchema /** * Import schema described by array loaded from Yaml custom format to the currently configured database. - * - * @param array $schemaDefinition - * @param \Doctrine\DBAL\Schema\Schema|null $targetSchema - * - * @return \Doctrine\DBAL\Schema\Schema */ private function importFromArray(array $schemaDefinition, ?Schema $targetSchema = null): Schema { @@ -67,8 +62,6 @@ private function importFromArray(array $schemaDefinition, ?Schema $targetSchema * Import table from the given configuration to the given schema. * * @param \Doctrine\DBAL\Schema\Schema target schema - * @param string $tableName - * @param array $tableConfiguration */ private function importSchemaTable( Schema $schema, @@ -124,7 +117,6 @@ private function importSchemaTable( /** * Adds columns to the given $table. * - * @param \Doctrine\DBAL\Schema\Table $table * @param array $columnList list of columns with their configuration */ private function addSchemaTableColumns(Table $table, array $columnList): void diff --git a/tests/lib/Database/Builder/MySqlTestDatabaseBuilder.php b/tests/lib/Database/Builder/MySqlTestDatabaseBuilder.php index c9c6811..122d965 100644 --- a/tests/lib/Database/Builder/MySqlTestDatabaseBuilder.php +++ b/tests/lib/Database/Builder/MySqlTestDatabaseBuilder.php @@ -16,8 +16,6 @@ class MySqlTestDatabaseBuilder implements TestDatabaseBuilder { /** - * @return \Doctrine\DBAL\Connection - * * @throws \Doctrine\DBAL\DBALException * @throws \EzSystems\Tests\DoctrineSchema\Database\TestDatabaseConfigurationException */ diff --git a/tests/lib/Database/Builder/SqliteTestDatabaseBuilder.php b/tests/lib/Database/Builder/SqliteTestDatabaseBuilder.php index 386d5a6..aac2a56 100644 --- a/tests/lib/Database/Builder/SqliteTestDatabaseBuilder.php +++ b/tests/lib/Database/Builder/SqliteTestDatabaseBuilder.php @@ -17,8 +17,6 @@ class SqliteTestDatabaseBuilder implements TestDatabaseBuilder { /** - * @return \Doctrine\DBAL\Connection - * * @throws \Doctrine\DBAL\DBALException */ public function buildDatabase(): Connection diff --git a/tests/lib/Database/Builder/TestDatabaseBuilder.php b/tests/lib/Database/Builder/TestDatabaseBuilder.php index 11749d8..403b04d 100644 --- a/tests/lib/Database/Builder/TestDatabaseBuilder.php +++ b/tests/lib/Database/Builder/TestDatabaseBuilder.php @@ -13,8 +13,6 @@ interface TestDatabaseBuilder { /** - * @return \Doctrine\DBAL\Connection - * * @throws \Doctrine\DBAL\DBALException * @throws \EzSystems\Tests\DoctrineSchema\Database\TestDatabaseConfigurationException */ diff --git a/tests/lib/Database/TestDatabaseFactory.php b/tests/lib/Database/TestDatabaseFactory.php index 5fafa77..8299c4d 100644 --- a/tests/lib/Database/TestDatabaseFactory.php +++ b/tests/lib/Database/TestDatabaseFactory.php @@ -27,10 +27,6 @@ public function __construct() } /** - * @param \Doctrine\DBAL\Platforms\AbstractPlatform $databasePlatform - * - * @return \Doctrine\DBAL\Connection - * * @throws \EzSystems\Tests\DoctrineSchema\Database\TestDatabaseConfigurationException * @throws \Doctrine\DBAL\DBALException */ diff --git a/tests/lib/Exporter/SchemaExporterTest.php b/tests/lib/Exporter/SchemaExporterTest.php index e356f04..7c8c6ac 100644 --- a/tests/lib/Exporter/SchemaExporterTest.php +++ b/tests/lib/Exporter/SchemaExporterTest.php @@ -30,7 +30,7 @@ class SchemaExporterTest extends TestCase */ private $testDatabaseFactory; - public function setUp() + public function setUp(): void { $this->exporter = new SchemaExporter( new SchemaTableExporter() @@ -42,8 +42,6 @@ public function setUp() * Load expected input/output fixtures for SchemaExporter. * * @see testExport - * - * @return array */ public function providerForTestExport(): array { @@ -88,11 +86,7 @@ public function providerForTestExport(): array /** * @dataProvider providerForTestExport * - * @param \Doctrine\DBAL\Platforms\AbstractPlatform $databasePlatform * @param string $inputSchemaSQL - * @param string $expectedSchemaDefinition - * @param string $inputFilePath - * @param string $outputFilePath * * @throws \Doctrine\DBAL\DBALException */ @@ -137,10 +131,6 @@ public function testExport( } /** - * @param \Doctrine\DBAL\Platforms\AbstractPlatform $databasePlatform - * - * @return \Doctrine\DBAL\Connection - * * @throws \EzSystems\Tests\DoctrineSchema\Database\TestDatabaseConfigurationException * @throws \Doctrine\DBAL\DBALException */ diff --git a/tests/lib/Importer/SchemaImporterTest.php b/tests/lib/Importer/SchemaImporterTest.php index 1ba5248..5870aa4 100644 --- a/tests/lib/Importer/SchemaImporterTest.php +++ b/tests/lib/Importer/SchemaImporterTest.php @@ -179,7 +179,6 @@ public function providerForTestImportFromFile(): array * @dataProvider providerForTestImportFromFile * * @param string $yamlSchemaDefinitionFile custom Yaml schema definition fixture file name - * @param \Doctrine\DBAL\Schema\Schema $expectedSchema * * @throws \EzSystems\DoctrineSchema\API\Exception\InvalidConfigurationException * @throws \Doctrine\DBAL\DBALException