Skip to content
Open
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
13 changes: 13 additions & 0 deletions lib/Doctrine/Migrations/AbstractMigration.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,19 @@ public function isTransactional() : bool
return true;
}

/**
* Description of this migration.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tautological, either improve or remove

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

*
* Describe what this migration does in simple terms. This information is displayed when you view the list of migrations.
*/
Comment on lines +63 to +67
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/**
* Description of this migration.
*
* Describe what this migration does in simple terms. This information is displayed when you view the list of migrations.
*/
/**
* Describe what this migration does in simple terms. This information is displayed when you view the list of migrations.
*/

public function getDescription() : string
{
return '';
}

/**
* Warn with a message if some condition is met.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's made fairly clear just by reading the signature (you don't have to read the code inside the method)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

*/
public function warnIf(bool $condition, string $message = 'Unknown Reason') : void
{
if (! $condition) {
Expand Down Expand Up @@ -155,6 +163,11 @@ public function getSql() : array
return $this->plannedSql;
}

/**
* Write some debug information to the console.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debug information is written with debug(), this is a notice.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

*
* Debug information is written with debug().
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 I mean it should, but it's actually written with notice(), so that comment is just misleading

*/
protected function write(string $message) : void
{
$this->logger->notice($message, ['migration' => $this]);
Expand Down