Skip to content

Commit

Permalink
Debug Oracle migrator
Browse files Browse the repository at this point in the history
  • Loading branch information
nickvergessen committed Sep 29, 2023
1 parent 67b2adf commit f2ef8e7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/private/DB/OracleMigrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@
use Doctrine\DBAL\Schema\ForeignKeyConstraint;
use Doctrine\DBAL\Schema\Index;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Schema\SchemaDiff;
use Doctrine\DBAL\Schema\Table;
use Doctrine\DBAL\Schema\TableDiff;

class OracleMigrator extends Migrator {
/**
Expand Down Expand Up @@ -114,6 +116,7 @@ protected function quoteForeignKeyConstraint($fkc) {
*/
protected function getDiff(Schema $targetSchema, \Doctrine\DBAL\Connection $connection) {
$schemaDiff = parent::getDiff($targetSchema, $connection);
var_dump($schemaDiff->toSql());

Check failure on line 119 in lib/private/DB/OracleMigrator.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

ForbiddenCode

lib/private/DB/OracleMigrator.php:119:3: ForbiddenCode: Unsafe var_dump (see https://psalm.dev/002)

Check failure on line 119 in lib/private/DB/OracleMigrator.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

TooFewArguments

lib/private/DB/OracleMigrator.php:119:25: TooFewArguments: Too few arguments for Doctrine\DBAL\Schema\SchemaDiff::toSql - expecting platform to be passed (see https://psalm.dev/025)

Check failure on line 119 in lib/private/DB/OracleMigrator.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

TooFewArguments

lib/private/DB/OracleMigrator.php:119:25: TooFewArguments: Too few arguments for method Doctrine\DBAL\Schema\SchemaDiff::tosql saw 0 (see https://psalm.dev/025)

Check failure

Code scanning / Psalm

ForbiddenCode Error

Unsafe var_dump

Check failure

Code scanning / Psalm

TooFewArguments Error

Too few arguments for Doctrine\DBAL\Schema\SchemaDiff::toSql - expecting platform to be passed

Check failure

Code scanning / Psalm

TooFewArguments Error

Too few arguments for method Doctrine\DBAL\Schema\SchemaDiff::tosql saw 0

// oracle forces us to quote the identifiers
$schemaDiff->newTables = array_map(function (Table $table) {

Check failure on line 122 in lib/private/DB/OracleMigrator.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

InternalProperty

lib/private/DB/OracleMigrator.php:122:3: InternalProperty: Doctrine\DBAL\Schema\SchemaDiff::$newTables is internal to Doctrine but called from OC\DB\OracleMigrator (see https://psalm.dev/176)
Expand Down Expand Up @@ -197,6 +200,7 @@ protected function getDiff(Schema $targetSchema, \Doctrine\DBAL\Connection $conn
return $this->quoteForeignKeyConstraint($fkc);
}, $tableDiff->removedForeignKeys);
}
var_dump($schemaDiff->toSql());

Check failure

Code scanning / Psalm

ForbiddenCode Error

Unsafe var_dump

Check failure

Code scanning / Psalm

TooFewArguments Error

Too few arguments for Doctrine\DBAL\Schema\SchemaDiff::toSql - expecting platform to be passed

Check failure

Code scanning / Psalm

TooFewArguments Error

Too few arguments for method Doctrine\DBAL\Schema\SchemaDiff::tosql saw 0

return $schemaDiff;
}
Expand Down

0 comments on commit f2ef8e7

Please sign in to comment.