Closed taka-oyama closed 2 weeks ago
The pull request introduces modifications to several files, primarily focusing on enhancing type safety and error handling within the schema management components of the codebase. The phpstan.neon
configuration file has been updated to remove the ignoring of a specific error related to IndexDefinition
. The Grammar
class has seen updates to method signatures and a refactor of the compileIndex
method for improved clarity. Additionally, new properties have been added to the IndexDefinition
and InterleaveDefinition
classes, along with deprecating an outdated method.
File | Change Summary |
---|---|
phpstan.neon |
Updated ignoreErrors to remove the error pattern related to Colopl\Spanner\Schema\IndexDefinition . |
src/Schema/Grammar.php |
Updated method signatures for compileDropIndex , compileDropUnique , and compileDropForeign to change parameter type from Fluent to IndexDefinition . Refactored compileIndex for clarity and added type assertions in addInterleaveToTable . Updated addRowDeletionPolicy to throw RuntimeException for unknown policies. |
src/Schema/IndexDefinition.php |
Added new properties: string $indexType , string $index , list<string>|array<string, string> $columns , string|null $interleaveIn , string|null $nullFiltered , list<string>|null $storing . Deprecated method interleave(string $table) with a LogicException . |
src/Schema/InterleaveDefinition.php |
Added properties: string $table , string|null $onDelete . Introduced method cascadeOnDelete() to set onDelete to 'cascade'. |
phpstan.neon
regarding the ignoreErrors
section are related as both PRs modify the same configuration file, albeit in different ways, focusing on error handling for PHPStan.bug
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Resolve some of the phpstan errors that were ignored.
Summary by CodeRabbit
New Features
IndexDefinition
andInterleaveDefinition
classes for improved functionality.interleave(string $table)
in favor ofinterleaveIn(string $table)
.Bug Fixes
Documentation