Skip to content

Commit

Permalink
Merge a3b8597 into 3b81560
Browse files Browse the repository at this point in the history
  • Loading branch information
MGatner committed Jul 31, 2022
2 parents 3b81560 + a3b8597 commit 9252f40
Show file tree
Hide file tree
Showing 26 changed files with 394 additions and 324 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
@@ -0,0 +1,15 @@
; This file is for unifying the coding style for different editors and IDEs.
; More information at http://editorconfig.org

root = true

[*]
charset = utf-8
indent_size = 4
indent_style = space
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{yml,yaml}]
indent_size = 2
7 changes: 3 additions & 4 deletions .github/workflows/deptrac.yml
Expand Up @@ -6,15 +6,15 @@ on:
- develop
paths:
- '**.php'
- 'composer.**'
- 'composer.*'
- 'depfile.yaml'
- '.github/workflows/deptrac.yml'
push:
branches:
- develop
paths:
- '**.php'
- 'composer.**'
- 'composer.*'
- 'depfile.yaml'
- '.github/workflows/deptrac.yml'

Expand All @@ -31,7 +31,7 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
php-version: '8.1'
tools: phive
extensions: intl, json, mbstring, xml
coverage: none
Expand Down Expand Up @@ -61,7 +61,6 @@ jobs:

- name: Install dependencies
run: |
composer -q config -g github-oauth.github.com "${{ secrets.GITHUB_TOKEN }}"
if [ -f composer.lock ]; then
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
else
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/infection.yml
Expand Up @@ -6,15 +6,15 @@ on:
- develop
paths:
- '**.php'
- 'composer.**'
- 'composer.*'
- 'phpunit*'
- '.github/workflows/infection.yml'
push:
branches:
- develop
paths:
- '**.php'
- 'composer.**'
- 'composer.*'
- 'phpunit*'
- '.github/workflows/infection.yml'

Expand All @@ -31,7 +31,7 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
php-version: '8.1'
tools: infection, phpunit
extensions: intl, json, mbstring, gd, xml, sqlite3
coverage: xdebug
Expand All @@ -57,7 +57,6 @@ jobs:

- name: Install dependencies
run: |
composer -q config -g github-oauth.github.com "${{ secrets.GITHUB_TOKEN }}"
if [ -f composer.lock ]; then
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
else
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpcpd.yml
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
php-version: '8.1'
tools: phpcpd
extensions: dom, mbstring
coverage: none
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/phpcsfixer.yml
Expand Up @@ -16,13 +16,9 @@ on:

jobs:
build:
name: PHP ${{ matrix.php-versions }} Coding Standards
name: Coding Standards
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
strategy:
fail-fast: false
matrix:
php-versions: ['7.4', '8.0', '8.1']

steps:
- name: Checkout
Expand All @@ -31,7 +27,7 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
php-version: '8.1'
extensions: json, tokenizer
coverage: none
env:
Expand All @@ -50,7 +46,6 @@ jobs:

- name: Install dependencies
run: |
composer -q config -g github-oauth.github.com "${{ secrets.GITHUB_TOKEN }}"
if [ -f composer.lock ]; then
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
else
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/phpstan.yml
Expand Up @@ -6,15 +6,15 @@ on:
- develop
paths:
- '**.php'
- 'composer.**'
- 'composer.*'
- 'phpstan*'
- '.github/workflows/phpstan.yml'
push:
branches:
- develop
paths:
- '**.php'
- 'composer.**'
- 'composer.*'
- 'phpstan*'
- '.github/workflows/phpstan.yml'

Expand Down Expand Up @@ -65,7 +65,6 @@ jobs:

- name: Install dependencies
run: |
composer -q config -g github-oauth.github.com "${{ secrets.GITHUB_TOKEN }}"
if [ -f composer.lock ]; then
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
else
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/phpunit.yml
Expand Up @@ -6,15 +6,15 @@ on:
- develop
paths:
- '**.php'
- 'composer.**'
- 'composer.*'
- 'phpunit*'
- '.github/workflows/phpunit.yml'
push:
branches:
- develop
paths:
- '**.php'
- 'composer.**'
- 'composer.*'
- 'phpunit*'
- '.github/workflows/phpunit.yml'

Expand Down Expand Up @@ -54,7 +54,6 @@ jobs:

- name: Install dependencies
run: |
composer -q config -g github-oauth.github.com "${{ secrets.GITHUB_TOKEN }}"
if [ -f composer.lock ]; then
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
else
Expand Down
71 changes: 71 additions & 0 deletions .github/workflows/psalm.yml
@@ -0,0 +1,71 @@
name: Psalm

on:
pull_request:
branches:
- develop
paths:
- '**.php'
- 'composer.*'
- 'psalm*'
- '.github/workflows/psalm.yml'
push:
branches:
- develop
paths:
- '**.php'
- 'composer.*'
- 'psalm*'
- '.github/workflows/psalm.yml'

jobs:
build:
name: Psalm Analysis
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: phpstan, phpunit
extensions: intl, json, mbstring, xml
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Create Psalm cache directory
run: mkdir -p build/psalm

- name: Cache Psalm results
uses: actions/cache@v3
with:
path: build/psalm
key: ${{ runner.os }}-psalm-${{ github.sha }}
restore-keys: ${{ runner.os }}-psalm-

- name: Install dependencies
run: |
if [ -f composer.lock ]; then
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
else
composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader
fi
- name: Run Psalm analysis
run: vendor/bin/psalm
7 changes: 3 additions & 4 deletions .github/workflows/rector.yml
Expand Up @@ -6,15 +6,15 @@ on:
- develop
paths:
- '**.php'
- 'composer.**'
- 'composer.*'
- 'rector.php'
- '.github/workflows/rector.yml'
push:
branches:
- develop
paths:
- '**.php'
- 'composer.**'
- 'composer.*'
- 'rector.php'
- '.github/workflows/rector.yml'

Expand Down Expand Up @@ -55,7 +55,6 @@ jobs:

- name: Install dependencies
run: |
composer -q config -g github-oauth.github.com "${{ secrets.GITHUB_TOKEN }}"
if [ -f composer.lock ]; then
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
else
Expand All @@ -64,5 +63,5 @@ jobs:
- name: Analyze for refactoring
run: |
composer global require --dev rector/rector:dev-main
composer global require --dev rector/rector:^0.13.8
rector process --dry-run --no-progress-bar
17 changes: 3 additions & 14 deletions .github/workflows/unused.yml
Expand Up @@ -6,14 +6,14 @@ on:
- develop
paths:
- '**.php'
- 'composer.**'
- 'composer.*'
- '.github/workflows/unused.yml'
push:
branches:
- develop
paths:
- '**.php'
- 'composer.**'
- 'composer.*'
- '.github/workflows/unused.yml'

jobs:
Expand All @@ -29,7 +29,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
php-version: '8.1'
tools: composer, composer-unused
extensions: intl, json, mbstring, xml
coverage: none
Expand All @@ -47,19 +47,8 @@ jobs:
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Create PHPStan cache directory
run: mkdir -p build/phpstan

- name: Cache PHPStan results
uses: actions/cache@v3
with:
path: build/phpstan
key: ${{ runner.os }}-phpstan-${{ github.sha }}
restore-keys: ${{ runner.os }}-phpstan-

- name: Install dependencies
run: |
composer -q config -g github-oauth.github.com "${{ secrets.GITHUB_TOKEN }}"
if [ -f composer.lock ]; then
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
else
Expand Down
14 changes: 7 additions & 7 deletions composer-unused.php
Expand Up @@ -4,11 +4,11 @@

use ComposerUnused\ComposerUnused\Configuration\Configuration;
use ComposerUnused\ComposerUnused\Configuration\NamedFilter;
use ComposerUnused\ComposerUnused\Configuration\PatternFilter;
use Webmozart\Glob\Glob;

return static function (Configuration $config): Configuration {
return $config
->addNamedFilter(NamedFilter::fromString('enyo/dropzone'))
->setAdditionalFilesFor('tatter/preferences', [
__DIR__ . '/vendor/tatter/preferences/src/Helpers/preferences_helper.php',
]);
};
return static fn (Configuration $config): Configuration => $config
->addNamedFilter(NamedFilter::fromString('enyo/dropzone'))
->setAdditionalFilesFor('tatter/preferences', [
__DIR__ . '/vendor/tatter/preferences/src/Helpers/preferences_helper.php',
]);

0 comments on commit 9252f40

Please sign in to comment.