Skip to content

Commit

Permalink
Merge branch 'master' of github.com:LitusProject/Litus
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrodevog committed Oct 16, 2023
2 parents 6a73fbc + fdf1f08 commit a73f6d8
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ updates:
directory: /
schedule:
interval: daily

- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
37 changes: 36 additions & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ jobs:
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Restore PHP_CodeSniffer cache
uses: actions/cache@v3
with:
path: ${{ runner.temp }}/phpcs
key: ${{ runner.os }}-phpcs-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-phpcs-

- name: Restore PHPStan cache
uses: actions/cache@v3
with:
path: ${{ runner.temp }}/phpcs
key: ${{ runner.os }}-phpstan-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-phpstan-

- name: Install Composer dependencies
run: >
composer install \
Expand All @@ -39,12 +53,33 @@ jobs:
- name: Run PHP_CodeSniffer
if: always()
run: ./vendor/bin/phpcs -q --report=checkstyle | cs2pr --graceful-warnings
run: >
./vendor/bin/phpcs \
-q \
--cache=${{ runner.temp }}/phpcs \
--report=checkstyle \
| cs2pr --graceful-warnings
- name: Save PHP_CodeSniffer cache
uses: actions/cache/save@v3
if: always()
with:
path: ${{ runner.temp }}/phpcs
key: ${{ runner.os }}-phpcs-${{ hashFiles('**/composer.lock') }}

- name: Run PHPStan
if: always()
env:
PHPSTAN_TMP_DIR: ${{ runner.temp }}/phpstan
run: ./vendor/bin/phpstan analyse --error-format=github --no-progress

- name: Save PHPStan cache
uses: actions/cache/save@v3
if: always()
with:
path: ${{ runner.temp }}/phpstan
key: ${{ runner.os }}-phpstan-${{ hashFiles('**/composer.lock') }}

test:
name: Test
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion config/autoload/cron.global.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
array(
'command' => 'php bin/console.php form:reminders -m',
'schedule' => '0 2 * * *',
)
),
),
),
);
2 changes: 1 addition & 1 deletion config/autoload/database.global.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
'directory' => __DIR__ . '/../../migrations',
'namespace' => 'Migrations',
'table' => 'general_migrations',
'custom_template' => __DIR__ . '/../../migrations/migration.tpl'
'custom_template' => __DIR__ . '/../../migrations/migration.tpl',
),
),
),
Expand Down
2 changes: 1 addition & 1 deletion config/autoload/google.global.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
'client_email' => $_ENV['LITUS_GOOGLE_CLIENT_EMAIL'],
'client_id' => $_ENV['LITUS_GOOGLE_CLIENT_ID'],
'client_x509_cert_url' => $_ENV['LITUS_GOOGLE_CLIENT_X509_CERT_URL'],
)
),
);
}

Expand Down
2 changes: 1 addition & 1 deletion migrations/Version20220131125347.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function up(Schema $schema) : void
$this->addSql('ALTER TABLE br_match ADD CONSTRAINT FK_CDBA31974FBF094F FOREIGN KEY (company) REFERENCES br_match_matchee_map_company (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE br_match ADD CONSTRAINT FK_CDBA3197B723AF33 FOREIGN KEY (student) REFERENCES br_match_matchee_map_student (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE br_match ADD CONSTRAINT FK_CDBA3197DA04AD89 FOREIGN KEY (wave) REFERENCES br_match_companywave_match_map (id) ON DELETE SET NULL NOT DEFERRABLE INITIALLY IMMEDIATE');
}
}

/**
* @param \Doctrine\DBAL\Schema\Schema $schema
Expand Down
1 change: 0 additions & 1 deletion migrations/Version20230319225809.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ 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 logistics_inventory ADD category VARCHAR(255) DEFAULT NULL');

}

/**
Expand Down
1 change: 0 additions & 1 deletion migrations/Version20230825112313.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ 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 nodes_events ADD is_career BOOLEAN DEFAULT \'false\'');

}

/**
Expand Down
6 changes: 3 additions & 3 deletions migrations/Version20230905185405.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ public function up(Schema $schema) : void

$this->addSql('CREATE SEQUENCE shop_sessions_messages_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE shop_sessions_messages_translations_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE TABLE shop_sessions_messages (id BIGINT NOT NULL, creation_time TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, active BOOLEAN NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE shop_sessions_messages (id BIGINT NOT NULL, creation_time TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, active BOOLEAN NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE shop_sessions_messages_translations (id BIGINT NOT NULL, message BIGINT DEFAULT NULL, language BIGINT DEFAULT NULL, content VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_D38ABBADB6BD307F ON shop_sessions_messages_translations (message)');
$this->addSql('CREATE INDEX IDX_D38ABBADD4DB71B5 ON shop_sessions_messages_translations (language)');
$this->addSql('ALTER TABLE shop_sessions_messages_translations ADD CONSTRAINT FK_D38ABBADB6BD307F FOREIGN KEY (message) REFERENCES shop_sessions_messages (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE shop_sessions_messages_translations ADD CONSTRAINT FK_D38ABBADB6BD307F FOREIGN KEY (message) REFERENCES shop_sessions_messages (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE shop_sessions_messages_translations ADD CONSTRAINT FK_D38ABBADD4DB71B5 FOREIGN KEY (language) REFERENCES general_languages (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
}
}

/**
* @param \Doctrine\DBAL\Schema\Schema $schema
Expand Down
4 changes: 3 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
includes:
- phpstan.neon.php

parameters:
tmpDir: phpstan/
level: 1
paths:
- bin/
Expand Down
7 changes: 7 additions & 0 deletions phpstan.neon.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php declare(strict_types = 1);

return array(
'parameters' => array(
'tmpDir' => getenv("PHPSTAN_TMP_DIR", true) ?: "",
),
);

0 comments on commit a73f6d8

Please sign in to comment.