Skip to content

Commit

Permalink
Merge pull request #52 from tattersoftware/retool
Browse files Browse the repository at this point in the history
Dev Kit
  • Loading branch information
MGatner committed Mar 14, 2022
2 parents 4e18658 + 9747dec commit 928b24f
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 26 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deptrac.yml
Original file line number Diff line number Diff line change
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 Down
4 changes: 2 additions & 2 deletions .github/workflows/infection.yml
Original file line number Diff line number Diff line change
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 Down
4 changes: 2 additions & 2 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
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
4 changes: 2 additions & 2 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
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
6 changes: 3 additions & 3 deletions .github/workflows/rector.yml
Original file line number Diff line number Diff line change
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 @@ -64,5 +64,5 @@ jobs:
- name: Analyze for refactoring
run: |
composer global require --dev rector/rector:^0.12.10
composer global require --dev rector/rector:^0.12.16
rector process --dry-run --no-progress-bar
16 changes: 3 additions & 13 deletions .github/workflows/unused.yml
Original file line number Diff line number Diff line change
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 Down Expand Up @@ -47,16 +47,6 @@ 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@v2
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 }}"
Expand All @@ -67,4 +57,4 @@ jobs:
fi
- name: Detect unused packages
run: composer-unused -vvv --ansi --no-interaction --no-progress --excludePackage=php
run: composer-unused -vvv --output-format=github --ansi --no-interaction --no-progress
17 changes: 17 additions & 0 deletions composer-unused.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

declare(strict_types=1);

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('symfony/config'))
// ->addPatternFilter(PatternFilter::fromString('/symfony-.*/'))
->setAdditionalFilesFor('codeigniter4/framework', [
...Glob::glob(__DIR__ . '/vendor/codeigniter4/framework/system/Helpers/*.php'),
]);
};
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"php": "^7.4 || ^8.0"
},
"require-dev": {
"codeigniter4/devkit": "^1.0",
"codeigniter4/framework": "^4.1"
"codeigniter4/framework": "^4.1",
"tatter/tools": "^2.0"
},
"config": {
"allow-plugins": {
Expand Down
5 changes: 5 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
use Rector\Php56\Rector\FunctionLike\AddDefaultValueForUndefinedVariableRector;
use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector;
use Rector\Php73\Rector\FuncCall\StringifyStrNeedlesRector;
use Rector\Php74\Rector\Property\TypedPropertyRector;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\PSR4\Rector\FileWithoutNamespace\NormalizeNamespaceByPSR4ComposerAutoloadRector;
use Rector\Set\ValueObject\LevelSetList;
Expand Down Expand Up @@ -123,4 +124,8 @@
$services->set(MakeInheritedMethodVisibilitySameAsParentRector::class);
$services->set(SimplifyEmptyArrayCheckRector::class);
$services->set(NormalizeNamespaceByPSR4ComposerAutoloadRector::class);
$services->set(TypedPropertyRector::class)
->configure([
TypedPropertyRector::INLINE_PUBLIC => true,
]);
};

0 comments on commit 928b24f

Please sign in to comment.