Compare commits

...

8 commits
1.6.1 ... main

Author SHA1 Message Date
b7e3418f0f
remove deprecated rectors
All checks were successful
/ ls (push) Successful in 28s
2024-08-18 09:17:23 +02:00
e40beaa2d1
bump-dependencies
All checks were successful
/ ls (push) Successful in 29s
2024-08-18 09:09:16 +02:00
2793c36fa9 Merge pull request 'add_ClassAttributeSeparationFixer' (#3) from add_ClassAttributeSeparationFixer into main
All checks were successful
/ ls (push) Successful in 13s
Reviewed-on: #3
2024-05-04 18:26:43 +00:00
e7ecf55e04
ci-fix
All checks were successful
/ ls (push) Successful in 12s
2024-05-04 20:24:57 +02:00
Continuous Integration
00f72e3be9 Continuous Integration Fixes 2024-05-04 17:42:09 +00:00
9993d760d6
add ClassAttributeSeparationFixer
All checks were successful
/ ls (push) Successful in 17s
2024-05-04 19:41:48 +02:00
b1792809e1 Merge pull request 'add workflow' (#2) from add_actions into main
All checks were successful
/ ls (push) Successful in 16s
Reviewed-on: #2
2024-05-04 17:34:39 +00:00
713b047068
add workflow
All checks were successful
/ ls (push) Successful in 16s
2024-05-04 19:33:42 +02:00
6 changed files with 65 additions and 21 deletions

View file

@ -0,0 +1,34 @@
on: [push]
jobs:
ls:
runs-on: docker
container:
image: git.php.fail/lubiana/container/php:ci
steps:
- name: Manually checkout
env:
REPO: '${{ github.repository }}'
TOKEN: '${{ secrets.GITHUB_TOKEN }}'
GIT_SERVER: 'git.php.fail'
run: |
git clone --branch $GITHUB_REF_NAME https://${TOKEN}@${GIT_SERVER}/${REPO}.git .
git fetch
git checkout ${{ github.head_ref }}
- name: composer install
env:
COMPOSER_CACHE_DIR: /opt/hostedtoolcache/.composer/cache/files
run: |
mkdir -p ${{ env.COMPOSER_CACHE_DIR }}
composer install
- run: composer lint
- name: GIT commit and push all changed files
env:
CI_COMMIT_MESSAGE: Continuous Integration Fixes
CI_COMMIT_AUTHOR: Continuous Integration
run: |
if [[ -n "$(git status -s)" ]]; then
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "gitbot@users.noreply.php.fail"
git commit -am "${{ env.CI_COMMIT_MESSAGE }}"
git push
fi

View file

@ -9,9 +9,9 @@
}, },
"require": { "require": {
"php": "^8.3", "php": "^8.3",
"slevomat/coding-standard": "^8.15.0", "slevomat/coding-standard": "^8.15",
"symplify/easy-coding-standard": "^12.1.14", "symplify/easy-coding-standard": "^12.3.5",
"rector/rector": "^1.0.4" "rector/rector": "^1.0.5"
}, },
"config": { "config": {
"allow-plugins": { "allow-plugins": {

29
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "43ac5346cfac27bedc2e1990eccc6e6e", "content-hash": "6eb7806e6594ecc073d158d2f9b483f0",
"packages": [ "packages": [
{ {
"name": "dealerdirect/phpcodesniffer-composer-installer", "name": "dealerdirect/phpcodesniffer-composer-installer",
@ -191,16 +191,16 @@
}, },
{ {
"name": "rector/rector", "name": "rector/rector",
"version": "1.0.4", "version": "1.0.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/rectorphp/rector.git", "url": "https://github.com/rectorphp/rector.git",
"reference": "6e04d0eb087aef707fa0c5686d33d6ff61f4a555" "reference": "73eb63e4f9011dba6b7c66c3262543014e352f34"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/rectorphp/rector/zipball/6e04d0eb087aef707fa0c5686d33d6ff61f4a555", "url": "https://api.github.com/repos/rectorphp/rector/zipball/73eb63e4f9011dba6b7c66c3262543014e352f34",
"reference": "6e04d0eb087aef707fa0c5686d33d6ff61f4a555", "reference": "73eb63e4f9011dba6b7c66c3262543014e352f34",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -238,7 +238,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/rectorphp/rector/issues", "issues": "https://github.com/rectorphp/rector/issues",
"source": "https://github.com/rectorphp/rector/tree/1.0.4" "source": "https://github.com/rectorphp/rector/tree/1.0.5"
}, },
"funding": [ "funding": [
{ {
@ -246,7 +246,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2024-04-05T09:01:07+00:00" "time": "2024-05-10T05:31:15+00:00"
}, },
{ {
"name": "slevomat/coding-standard", "name": "slevomat/coding-standard",
@ -395,16 +395,16 @@
}, },
{ {
"name": "symplify/easy-coding-standard", "name": "symplify/easy-coding-standard",
"version": "12.1.14", "version": "12.3.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/easy-coding-standard/easy-coding-standard.git", "url": "https://github.com/easy-coding-standard/easy-coding-standard.git",
"reference": "e3c4a241ee36704f7cf920d5931f39693e64afd5" "reference": "0d7c2cfee3debdf11c12135e90d69d1d9f4eef03"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/easy-coding-standard/easy-coding-standard/zipball/e3c4a241ee36704f7cf920d5931f39693e64afd5", "url": "https://api.github.com/repos/easy-coding-standard/easy-coding-standard/zipball/0d7c2cfee3debdf11c12135e90d69d1d9f4eef03",
"reference": "e3c4a241ee36704f7cf920d5931f39693e64afd5", "reference": "0d7c2cfee3debdf11c12135e90d69d1d9f4eef03",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -415,6 +415,9 @@
"phpcsstandards/php_codesniffer": "<3.8", "phpcsstandards/php_codesniffer": "<3.8",
"symplify/coding-standard": "<12.1" "symplify/coding-standard": "<12.1"
}, },
"suggest": {
"ext-dom": "Needed to support checkstyle output format in class CheckstyleOutputFormatter"
},
"bin": [ "bin": [
"bin/ecs" "bin/ecs"
], ],
@ -437,7 +440,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/easy-coding-standard/easy-coding-standard/issues", "issues": "https://github.com/easy-coding-standard/easy-coding-standard/issues",
"source": "https://github.com/easy-coding-standard/easy-coding-standard/tree/12.1.14" "source": "https://github.com/easy-coding-standard/easy-coding-standard/tree/12.3.5"
}, },
"funding": [ "funding": [
{ {
@ -449,7 +452,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2024-02-23T13:10:40+00:00" "time": "2024-08-08T08:43:50+00:00"
} }
], ],
"packages-dev": [], "packages-dev": [],

View file

@ -1,5 +1,6 @@
<?php declare(strict_types=1); <?php declare(strict_types=1);
use PhpCsFixer\Fixer\ClassNotation\ClassAttributesSeparationFixer;
use PhpCsFixer\Fixer\Import\OrderedImportsFixer; use PhpCsFixer\Fixer\Import\OrderedImportsFixer;
use PhpCsFixer\Fixer\LanguageConstruct\FunctionToConstantFixer; use PhpCsFixer\Fixer\LanguageConstruct\FunctionToConstantFixer;
use PhpCsFixer\Fixer\Operator\NewWithBracesFixer; use PhpCsFixer\Fixer\Operator\NewWithBracesFixer;
@ -77,6 +78,17 @@ return ECSConfig::configure()
] ]
) )
->withConfiguredRule( ->withConfiguredRule(
ClassAttributesSeparationFixer::class,
[
'elements' => [
'const' => 'none',
'method' => 'one',
'property' => 'none',
'trait_import' => 'none',
'case' => 'none',
],
],
)->withConfiguredRule(
DeclareStrictTypesSniff::class, DeclareStrictTypesSniff::class,
[ [
'declareOnFirstLine' => true, 'declareOnFirstLine' => true,

View file

@ -16,7 +16,6 @@ use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector;
use Rector\CodingStyle\Rector\If_\NullableCompareToNullRector; use Rector\CodingStyle\Rector\If_\NullableCompareToNullRector;
use Rector\Config\RectorConfig; use Rector\Config\RectorConfig;
use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector; use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector;
use Rector\EarlyReturn\Rector\If_\ChangeAndIfToEarlyReturnRector;
use Rector\EarlyReturn\Rector\If_\ChangeNestedIfsToEarlyReturnRector; use Rector\EarlyReturn\Rector\If_\ChangeNestedIfsToEarlyReturnRector;
use Rector\EarlyReturn\Rector\If_\ChangeOrIfContinueToMultiContinueRector; use Rector\EarlyReturn\Rector\If_\ChangeOrIfContinueToMultiContinueRector;
use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector; use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector;
@ -32,7 +31,6 @@ use Rector\TypeDeclaration\Rector\ClassMethod\ParamTypeByMethodCallTypeRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ParamTypeByParentCallTypeRector; use Rector\TypeDeclaration\Rector\ClassMethod\ParamTypeByParentCallTypeRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromReturnDirectArrayRector; use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromReturnDirectArrayRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromReturnNewRector; use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromReturnNewRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictBoolReturnExprRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictConstantReturnRector; use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictConstantReturnRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictNativeCallRector; use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictNativeCallRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictNewArrayRector; use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictNewArrayRector;
@ -59,7 +57,6 @@ return RectorConfig::configure()
AddReturnTypeDeclarationBasedOnParentClassMethodRector::class, AddReturnTypeDeclarationBasedOnParentClassMethodRector::class,
AddReturnTypeDeclarationFromYieldsRector::class, AddReturnTypeDeclarationFromYieldsRector::class,
BooleanNotIdenticalToNotIdenticalRector::class, BooleanNotIdenticalToNotIdenticalRector::class,
ChangeAndIfToEarlyReturnRector::class,
ChangeNestedForeachIfsToEarlyContinueRector::class, ChangeNestedForeachIfsToEarlyContinueRector::class,
ChangeNestedIfsToEarlyReturnRector::class, ChangeNestedIfsToEarlyReturnRector::class,
ChangeOrIfContinueToMultiContinueRector::class, ChangeOrIfContinueToMultiContinueRector::class,
@ -78,7 +75,6 @@ return RectorConfig::configure()
ReturnEarlyIfVariableRector::class, ReturnEarlyIfVariableRector::class,
ReturnTypeFromReturnDirectArrayRector::class, ReturnTypeFromReturnDirectArrayRector::class,
ReturnTypeFromReturnNewRector::class, ReturnTypeFromReturnNewRector::class,
ReturnTypeFromStrictBoolReturnExprRector::class,
ReturnTypeFromStrictConstantReturnRector::class, ReturnTypeFromStrictConstantReturnRector::class,
ReturnTypeFromStrictNativeCallRector::class, ReturnTypeFromStrictNativeCallRector::class,
ReturnTypeFromStrictNewArrayRector::class, ReturnTypeFromStrictNewArrayRector::class,

View file

@ -5,6 +5,5 @@ namespace Lubiana\CodeQuality;
final class LubiSetList final class LubiSetList
{ {
public const string RECTOR = __DIR__ . '/../config/rector.php'; public const string RECTOR = __DIR__ . '/../config/rector.php';
public const string ECS = __DIR__ . '/../config/ecs.php'; public const string ECS = __DIR__ . '/../config/ecs.php';
} }