Skip to content

Commit

Permalink
Merge 595cf14 into 0ac4d26
Browse files Browse the repository at this point in the history
  • Loading branch information
MGatner committed Jul 26, 2022
2 parents 0ac4d26 + 595cf14 commit aa6c03b
Show file tree
Hide file tree
Showing 15 changed files with 195 additions and 181 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deptrac.yml
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/infection.yml
Expand Up @@ -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 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
8 changes: 2 additions & 6 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 Down
4 changes: 1 addition & 3 deletions .github/workflows/phpunit.yml
Expand Up @@ -25,9 +25,7 @@ jobs:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
strategy:
matrix:
# Temporarily disabled 8.1 until CodeIgniter 4.2
# php-versions: ['7.4', '8.0', '8.1']
php-versions: ['7.4', '8.0']
php-versions: ['7.4', '8.0', '8.1']

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/psalm.yml
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
php-version: '8.1'
tools: phpstan, phpunit
extensions: intl, json, mbstring, xml
coverage: none
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rector.yml
Expand Up @@ -63,5 +63,5 @@ jobs:
- name: Analyze for refactoring
run: |
composer global require --dev rector/rector:^0.12.16
composer global require --dev rector/rector:^0.13.8
rector process --dry-run --no-progress-bar
1 change: 1 addition & 0 deletions .php-cs-fixer.dist.php
Expand Up @@ -11,6 +11,7 @@
__DIR__ . '/tests/',
])
->exclude('build')
->exclude('Views/errors')
->append([__FILE__]);

$overrides = [];
Expand Down
4 changes: 2 additions & 2 deletions app/Models/SubmissionModel.php
Expand Up @@ -55,15 +55,15 @@ public function fromKind(Kind $kind): array
'body' => $kind->body,
'html' => $kind->body_html,
]);
break;
break;

case 'Link':
$row = array_merge($row, [
'title' => $kind->title,
'body' => $kind->selftext,
'html' => $kind->selftext_html,
]);
break;
break;

default:
throw new RuntimeException('Unsupport Kind:' . get_class($kind));
Expand Down
14 changes: 6 additions & 8 deletions composer-unused.php
Expand Up @@ -7,11 +7,9 @@
use ComposerUnused\ComposerUnused\Configuration\PatternFilter;
use Webmozart\Glob\Glob;

return static function (Configuration $config): Configuration {
return $config
// ->addNamedFilter(NamedFilter::fromString('symfony/config'))
// ->addPatternFilter(PatternFilter::fromString('/symfony-.*/'))
->setAdditionalFilesFor('codeigniter4/framework', [
...Glob::glob(__DIR__ . '/vendor/codeigniter4/framework/system/Helpers/*.php'),
]);
};
return static fn (Configuration $config): Configuration => $config
// ->addNamedFilter(NamedFilter::fromString('symfony/config'))
// ->addPatternFilter(PatternFilter::fromString('/symfony-.*/'))
->setAdditionalFilesFor('codeigniter4/framework', [
...Glob::glob(__DIR__ . '/vendor/codeigniter4/framework/system/Helpers/*.php'),
]);
5 changes: 3 additions & 2 deletions composer.json
Expand Up @@ -51,15 +51,16 @@
"scripts": {
"analyze": [
"phpstan analyze",
"psalm"
"psalm",
"rector process --dry-run"
],
"ci": [
"Composer\\Config::disableProcessTimeout",
"@deduplicate",
"@analyze",
"@composer normalize --dry-run",
"@test",
"@inspect",
"rector process",
"@style"
],
"deduplicate": "phpcpd app/ src/",
Expand Down

0 comments on commit aa6c03b

Please sign in to comment.