Commit 20c69be9 authored by Emma's avatar Emma 🏳🌈

update dependencies & fix deprecations

parent 3199be25
......@@ -19,7 +19,6 @@
"ext-intl": "*",
"ext-json": "*",
"ext-pdo_pgsql": "*",
"doctrine/doctrine-migrations-bundle": "^1.2",
"eightpoints/guzzle-bundle": "^7.3",
"embed/embed": "^3.0",
"ezyang/htmlpurifier": "^4.8",
......
This diff is collapsed.
sensio_framework_extra:
router:
annotations: false
......@@ -29,11 +29,11 @@ final class VersionPass implements CompilerPassInterface {
}
private function getGitBranchName(): ?string {
return $this->getVersionFromCommand('git rev-parse --abbrev-ref HEAD');
return $this->getVersionFromCommand(['git', 'rev-parse', '--abbrev-ref', 'HEAD']);
}
private function getGitTagName(): ?string {
return $this->getVersionFromCommand('git describe --tags');
return $this->getVersionFromCommand(['git', 'describe', '--tags']);
}
private function getComposerBranchAlias(?string $branch): ?string {
......@@ -49,7 +49,7 @@ final class VersionPass implements CompilerPassInterface {
return null;
}
private function getVersionFromCommand(string $commandLine): ?string {
private function getVersionFromCommand(array $commandLine): ?string {
$process = new Process($commandLine);
$process->run();
......
......@@ -2,14 +2,14 @@
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20161229113003 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function up(Schema $schema) {
public function up(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('CREATE SEQUENCE comments_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
......@@ -57,7 +57,7 @@ class Version20161229113003 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function down(Schema $schema) {
public function down(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE comments DROP CONSTRAINT FK_5F9E962A727ACA70');
......
......@@ -2,7 +2,7 @@
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
......@@ -13,7 +13,7 @@ class Version20170101133959 extends AbstractMigration implements ContainerAwareI
/**
* @param Schema $schema
*/
public function up(Schema $schema) {
public function up(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE forums ADD canonical_name TEXT');
$this->addSql('CREATE UNIQUE INDEX UNIQ_FE5E5AB8D69C0128 ON forums (canonical_name)');
......@@ -28,7 +28,7 @@ class Version20170101133959 extends AbstractMigration implements ContainerAwareI
/**
* @param Schema $schema
*/
public function down(Schema $schema) {
public function down(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('DROP INDEX UNIQ_FE5E5AB8D69C0128');
......
......@@ -2,14 +2,14 @@
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20170102011412 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function up(Schema $schema) {
public function up(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE users ADD canonical_username TEXT');
......@@ -26,7 +26,7 @@ class Version20170102011412 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function down(Schema $schema) {
public function down(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('DROP INDEX UNIQ_1483A5E96A9AF538');
......
......@@ -2,14 +2,14 @@
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20170103055453 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function up(Schema $schema) {
public function up(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE comments ADD soft_deleted BOOLEAN DEFAULT FALSE NOT NULL');
......@@ -18,7 +18,7 @@ class Version20170103055453 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function down(Schema $schema) {
public function down(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE comments DROP soft_deleted');
......
......@@ -2,14 +2,14 @@
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20170226175041 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function up(Schema $schema) {
public function up(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE submissions DROP submission_type');
......@@ -18,7 +18,7 @@ class Version20170226175041 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function down(Schema $schema) {
public function down(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE submissions ADD submission_type VARCHAR(255) NOT NULL');
......
......@@ -2,14 +2,14 @@
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20170319141400 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function up(Schema $schema) {
public function up(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE users ADD admin BOOLEAN DEFAULT FALSE NOT NULL');
......@@ -18,7 +18,7 @@ class Version20170319141400 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function down(Schema $schema) {
public function down(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE users DROP admin');
......
......@@ -2,14 +2,14 @@
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20170409222227 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function up(Schema $schema) {
public function up(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('CREATE SEQUENCE forum_subscriptions_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
......@@ -24,7 +24,7 @@ class Version20170409222227 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function down(Schema $schema) {
public function down(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('DROP SEQUENCE forum_subscriptions_id_seq CASCADE');
......
......@@ -2,14 +2,14 @@
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20170410224921 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function up(Schema $schema) {
public function up(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE users ADD locale TEXT DEFAULT NULL');
......@@ -18,7 +18,7 @@ class Version20170410224921 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function down(Schema $schema) {
public function down(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE users DROP locale');
......
......@@ -2,14 +2,14 @@
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20170418114308 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function up(Schema $schema) {
public function up(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE comments DROP body');
......@@ -21,7 +21,7 @@ class Version20170418114308 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function down(Schema $schema) {
public function down(Schema $schema): void {
$this->throwIrreversibleMigrationException();
}
}
......@@ -2,14 +2,14 @@
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20170428155119 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function up(Schema $schema) {
public function up(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE submissions ADD image TEXT DEFAULT NULL');
......@@ -18,7 +18,7 @@ class Version20170428155119 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function down(Schema $schema) {
public function down(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE submissions DROP image');
......
......@@ -2,14 +2,14 @@
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20170504065107 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function up(Schema $schema) {
public function up(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('UPDATE users SET locale = \'en\' WHERE locale IS NULL');
......@@ -19,7 +19,7 @@ class Version20170504065107 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function down(Schema $schema) {
public function down(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE users ALTER locale DROP NOT NULL');
......
......@@ -2,14 +2,14 @@
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20170505192754 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function up(Schema $schema) {
public function up(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE forums ADD featured BOOLEAN DEFAULT FALSE NOT NULL');
......@@ -19,7 +19,7 @@ class Version20170505192754 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function down(Schema $schema) {
public function down(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('DROP INDEX forum_featured_idx');
......
......@@ -2,14 +2,14 @@
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20170506134048 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function up(Schema $schema) {
public function up(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('CREATE SEQUENCE bans_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
......@@ -36,7 +36,7 @@ class Version20170506134048 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function down(Schema $schema) {
public function down(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('DROP SEQUENCE bans_id_seq CASCADE');
......
......@@ -2,14 +2,14 @@
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20170506221902 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function up(Schema $schema) {
public function up(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE users ALTER email DROP NOT NULL');
......@@ -19,7 +19,7 @@ class Version20170506221902 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function down(Schema $schema) {
public function down(Schema $schema): void {
$this->throwIrreversibleMigrationException();
}
}
......@@ -2,14 +2,14 @@
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20170507113459 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function up(Schema $schema) {
public function up(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE moderators ADD timestamp TIMESTAMP(0) WITH TIME ZONE DEFAULT NOW() NOT NULL');
......@@ -19,7 +19,7 @@ class Version20170507113459 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function down(Schema $schema) {
public function down(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE moderators DROP timestamp');
......
......@@ -2,14 +2,14 @@
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20170508085242 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function up(Schema $schema) {
public function up(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE submissions ADD sticky BOOLEAN DEFAULT false NOT NULL');
......@@ -19,7 +19,7 @@ class Version20170508085242 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function down(Schema $schema) {
public function down(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE submissions DROP sticky');
......
......@@ -2,14 +2,14 @@
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20170508120624 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function up(Schema $schema) {
public function up(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE submissions ADD ranking BIGINT');
......@@ -20,7 +20,7 @@ class Version20170508120624 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function down(Schema $schema) {
public function down(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE submissions DROP ranking');
......
......@@ -2,14 +2,14 @@
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20170512235044 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function up(Schema $schema) {
public function up(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('CREATE SEQUENCE notifications_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
......@@ -23,7 +23,7 @@ class Version20170512235044 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function down(Schema $schema) {
public function down(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('DROP SEQUENCE notifications_id_seq CASCADE');
......
......@@ -2,14 +2,14 @@
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20170517231923 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function up(Schema $schema) {
public function up(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE users ADD night_mode BOOLEAN DEFAULT FALSE NOT NULL');
......@@ -19,7 +19,7 @@ class Version20170517231923 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function down(Schema $schema) {
public function down(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE users DROP night_mode');
......
......@@ -2,14 +2,14 @@
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20170520190400 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function up(Schema $schema) {
public function up(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE comments ALTER ip DROP NOT NULL');
......@@ -21,7 +21,7 @@ class Version20170520190400 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function down(Schema $schema) {
public function down(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql("UPDATE comments SET ip = '127.0.0.1' WHERE ip IS NULL");
......
......@@ -2,14 +2,14 @@
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20170527122847 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function up(Schema $schema) {
public function up(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE submissions ADD edited_at TIMESTAMP(0) WITH TIME ZONE DEFAULT NULL');
......@@ -21,7 +21,7 @@ class Version20170527122847 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function down(Schema $schema) {
public function down(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE submissions DROP edited_at');
......
......@@ -2,14 +2,14 @@
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20170601203249 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function up(Schema $schema) {
public function up(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('CREATE SEQUENCE message_threads_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
......@@ -37,7 +37,7 @@ class Version20170601203249 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function down(Schema $schema) {
public function down(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE notifications DROP CONSTRAINT FK_6000B0D3E2904019');
......
......@@ -2,14 +2,14 @@
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20170605021921 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function up(Schema $schema) {
public function up(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('CREATE SEQUENCE forum_categories_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
......@@ -22,7 +22,7 @@ class Version20170605021921 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function down(Schema $schema) {
public function down(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE forums DROP CONSTRAINT FK_FE5E5AB812469DE2');
......
......@@ -2,14 +2,14 @@
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20170610014902 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function up(Schema $schema) {
public function up(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE users ADD last_seen TIMESTAMP(0) WITH TIME ZONE DEFAULT NULL');
......@@ -18,7 +18,7 @@ class Version20170610014902 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function down(Schema $schema) {
public function down(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE users DROP last_seen');
......
......@@ -2,14 +2,14 @@
namespace DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
class Version20170612033717 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function up(Schema $schema) {
public function up(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('CREATE SEQUENCE wiki_pages_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
......@@ -28,7 +28,7 @@ class Version20170612033717 extends AbstractMigration {
/**
* @param Schema $schema
*/
public function down(Schema $schema) {
public function down(Schema $schema): void {
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');