Skip to content

Commit 08c321e

Browse files
committed
CI: run tests only on PHP 8.4
1 parent d36d5fe commit 08c321e

File tree

6 files changed

+15
-33
lines changed

6 files changed

+15
-33
lines changed

.github/workflows/codesniffer.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ jobs:
1313
codesniffer:
1414
name: "Codesniffer"
1515
uses: contributte/.github/.github/workflows/codesniffer.yml@v1
16+
with:
17+
php: "8.4"

.github/workflows/coverage.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ on:
1111

1212
jobs:
1313
coverage:
14-
name: "Phpunit"
14+
name: "Coverage"
1515
uses: contributte/.github/.github/workflows/phpunit-coverage.yml@v1
1616
with:
17+
php: "8.4"
1718
make: "init coverage"

.github/workflows/database.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Setup PHP
3737
uses: shivammathur/setup-php@v2
3838
with:
39-
php-version: "8.2"
39+
php-version: "8.4"
4040
extensions: pdo, pdo_pgsql
4141

4242
- name: Install dependencies

.github/workflows/phpstan.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ jobs:
1414
name: "Phpstan"
1515
uses: contributte/.github/.github/workflows/phpstan.yml@v1
1616
with:
17+
php: "8.4"
1718
make: "init phpstan"

.github/workflows/tests.yml

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Phpunit"
1+
name: "Tester"
22

33
on:
44
pull_request:
@@ -10,30 +10,9 @@ on:
1010
- cron: "0 8 * * 1"
1111

1212
jobs:
13-
test82:
14-
name: "Phpunit"
15-
uses: contributte/.github/.github/workflows/phpunit.yml@v1
16-
with:
17-
php: "8.2"
18-
make: "init tests"
19-
20-
test83:
21-
name: "Phpunit"
22-
uses: contributte/.github/.github/workflows/phpunit.yml@v1
23-
with:
24-
php: "8.3"
25-
make: "init tests"
26-
2713
test84:
28-
name: "Phpunit"
14+
name: "Tester"
2915
uses: contributte/.github/.github/workflows/phpunit.yml@v1
3016
with:
3117
php: "8.4"
3218
make: "init tests"
33-
34-
test85:
35-
name: "Phpunit"
36-
uses: contributte/.github/.github/workflows/phpunit.yml@v1
37-
with:
38-
php: "8.5"
39-
make: "init tests"

db/Migrations/Version20190407153346.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Database\Migrations;
66

7+
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
78
use Doctrine\DBAL\Schema\Schema;
89
use Doctrine\Migrations\AbstractMigration;
910

@@ -12,26 +13,24 @@
1213
*/
1314
final class Version20190407153346 extends AbstractMigration
1415
{
15-
public function getDescription() : string
16+
public function getDescription(): string
1617
{
17-
return '';
18+
return 'Create user table';
1819
}
1920

20-
public function up(Schema $schema) : void
21+
public function up(Schema $schema): void
2122
{
22-
// this up() migration is auto-generated, please modify it to your needs
23-
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
23+
$this->abortIf(!$this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform, 'Migration can only be executed safely on PostgreSQL.');
2424

2525
$this->addSql('CREATE SEQUENCE "user_id_seq" INCREMENT BY 1 MINVALUE 1 START 1');
2626
$this->addSql('CREATE TABLE "user" (id INT NOT NULL, name VARCHAR(255) NOT NULL, surname VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, username VARCHAR(255) NOT NULL, state INT NOT NULL, password VARCHAR(255) NOT NULL, role VARCHAR(255) NOT NULL, last_logged_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, updated_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY(id))');
2727
$this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D649E7927C74 ON "user" (email)');
2828
$this->addSql('CREATE UNIQUE INDEX UNIQ_8D93D649F85E0677 ON "user" (username)');
2929
}
3030

31-
public function down(Schema $schema) : void
31+
public function down(Schema $schema): void
3232
{
33-
// this down() migration is auto-generated, please modify it to your needs
34-
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
33+
$this->abortIf(!$this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform, 'Migration can only be executed safely on PostgreSQL.');
3534

3635
$this->addSql('DROP SEQUENCE "user_id_seq" CASCADE');
3736
$this->addSql('DROP TABLE "user"');

0 commit comments

Comments
 (0)