Skip to content

Commit

Permalink
Merge pull request doctrine#5724 from nexxai/4.0.x
Browse files Browse the repository at this point in the history
Removing deprecated `isFullfilledBy()` method
  • Loading branch information
derrabus committed Oct 5, 2022
2 parents d2e1619 + 919d84f commit c9d3753
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
4 changes: 4 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ awareness about deprecated code.

# Upgrade to 4.0

## BC BREAK: removed misspelled isFullfilledBy() method

This method's name was spelled incorrectly. Use `isFulfilledBy` instead.

## BC BREAK: removed default PostgreSQL connection database.

When connecting to a PostgreSQL server, the driver will no longer connect to the "postgres" database by default.
Expand Down
1 change: 0 additions & 1 deletion psalm.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
TODO: remove in 4.0.0
-->
<referencedMethod name="Doctrine\DBAL\Schema\TableDiff::getName"/>
<referencedMethod name="Doctrine\DBAL\Schema\Index::isFullFilledBy"/>
</errorLevel>
</DeprecatedMethod>
<DeprecatedProperty>
Expand Down
11 changes: 0 additions & 11 deletions src/Schema/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,17 +160,6 @@ public function spansColumns(array $columnNames): bool
return $sameColumns;
}

/**
* Checks if the other index already fulfills all the indexing and constraint needs of the current one.
* Keeping misspelled function name for backwards compatibility
*
* @deprecated Use {@see isFulfilledBy()} instead.
*/
public function isFullfilledBy(Index $other): bool
{
return $this->isFulfilledBy($other);
}

/**
* Checks if the other index already fulfills all the indexing and constraint needs of the current one.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Schema/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ protected function _addUniqueConstraint(UniqueConstraint $constraint): self
$indexCandidate = $this->_createIndex($constraint->getColumns(), $indexName, true, false);

foreach ($this->_indexes as $existingIndex) {
if ($indexCandidate->isFullfilledBy($existingIndex)) {
if ($indexCandidate->isFulfilledBy($existingIndex)) {
return $this;
}
}
Expand Down Expand Up @@ -745,7 +745,7 @@ protected function _addForeignKeyConstraint(ForeignKeyConstraint $constraint): s
$indexCandidate = $this->_createIndex($constraint->getLocalColumns(), $indexName, false, false);

foreach ($this->_indexes as $existingIndex) {
if ($indexCandidate->isFullfilledBy($existingIndex)) {
if ($indexCandidate->isFulfilledBy($existingIndex)) {
return $this;
}
}
Expand Down

0 comments on commit c9d3753

Please sign in to comment.