Compare commits
8 commits
Author | SHA1 | Date | |
---|---|---|---|
b7e3418f0f | |||
e40beaa2d1 | |||
2793c36fa9 | |||
e7ecf55e04 | |||
![]() |
00f72e3be9 | ||
9993d760d6 | |||
b1792809e1 | |||
713b047068 |
6 changed files with 65 additions and 21 deletions
34
.forgejo/workflows/push.yml
Normal file
34
.forgejo/workflows/push.yml
Normal 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
|
|
@ -9,9 +9,9 @@
|
|||
},
|
||||
"require": {
|
||||
"php": "^8.3",
|
||||
"slevomat/coding-standard": "^8.15.0",
|
||||
"symplify/easy-coding-standard": "^12.1.14",
|
||||
"rector/rector": "^1.0.4"
|
||||
"slevomat/coding-standard": "^8.15",
|
||||
"symplify/easy-coding-standard": "^12.3.5",
|
||||
"rector/rector": "^1.0.5"
|
||||
},
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
|
|
29
composer.lock
generated
29
composer.lock
generated
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "43ac5346cfac27bedc2e1990eccc6e6e",
|
||||
"content-hash": "6eb7806e6594ecc073d158d2f9b483f0",
|
||||
"packages": [
|
||||
{
|
||||
"name": "dealerdirect/phpcodesniffer-composer-installer",
|
||||
|
@ -191,16 +191,16 @@
|
|||
},
|
||||
{
|
||||
"name": "rector/rector",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/rectorphp/rector.git",
|
||||
"reference": "6e04d0eb087aef707fa0c5686d33d6ff61f4a555"
|
||||
"reference": "73eb63e4f9011dba6b7c66c3262543014e352f34"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/rectorphp/rector/zipball/6e04d0eb087aef707fa0c5686d33d6ff61f4a555",
|
||||
"reference": "6e04d0eb087aef707fa0c5686d33d6ff61f4a555",
|
||||
"url": "https://api.github.com/repos/rectorphp/rector/zipball/73eb63e4f9011dba6b7c66c3262543014e352f34",
|
||||
"reference": "73eb63e4f9011dba6b7c66c3262543014e352f34",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -238,7 +238,7 @@
|
|||
],
|
||||
"support": {
|
||||
"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": [
|
||||
{
|
||||
|
@ -246,7 +246,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2024-04-05T09:01:07+00:00"
|
||||
"time": "2024-05-10T05:31:15+00:00"
|
||||
},
|
||||
{
|
||||
"name": "slevomat/coding-standard",
|
||||
|
@ -395,16 +395,16 @@
|
|||
},
|
||||
{
|
||||
"name": "symplify/easy-coding-standard",
|
||||
"version": "12.1.14",
|
||||
"version": "12.3.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/easy-coding-standard/easy-coding-standard.git",
|
||||
"reference": "e3c4a241ee36704f7cf920d5931f39693e64afd5"
|
||||
"reference": "0d7c2cfee3debdf11c12135e90d69d1d9f4eef03"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/easy-coding-standard/easy-coding-standard/zipball/e3c4a241ee36704f7cf920d5931f39693e64afd5",
|
||||
"reference": "e3c4a241ee36704f7cf920d5931f39693e64afd5",
|
||||
"url": "https://api.github.com/repos/easy-coding-standard/easy-coding-standard/zipball/0d7c2cfee3debdf11c12135e90d69d1d9f4eef03",
|
||||
"reference": "0d7c2cfee3debdf11c12135e90d69d1d9f4eef03",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -415,6 +415,9 @@
|
|||
"phpcsstandards/php_codesniffer": "<3.8",
|
||||
"symplify/coding-standard": "<12.1"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-dom": "Needed to support checkstyle output format in class CheckstyleOutputFormatter"
|
||||
},
|
||||
"bin": [
|
||||
"bin/ecs"
|
||||
],
|
||||
|
@ -437,7 +440,7 @@
|
|||
],
|
||||
"support": {
|
||||
"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": [
|
||||
{
|
||||
|
@ -449,7 +452,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2024-02-23T13:10:40+00:00"
|
||||
"time": "2024-08-08T08:43:50+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
use PhpCsFixer\Fixer\ClassNotation\ClassAttributesSeparationFixer;
|
||||
use PhpCsFixer\Fixer\Import\OrderedImportsFixer;
|
||||
use PhpCsFixer\Fixer\LanguageConstruct\FunctionToConstantFixer;
|
||||
use PhpCsFixer\Fixer\Operator\NewWithBracesFixer;
|
||||
|
@ -77,6 +78,17 @@ return ECSConfig::configure()
|
|||
]
|
||||
)
|
||||
->withConfiguredRule(
|
||||
ClassAttributesSeparationFixer::class,
|
||||
[
|
||||
'elements' => [
|
||||
'const' => 'none',
|
||||
'method' => 'one',
|
||||
'property' => 'none',
|
||||
'trait_import' => 'none',
|
||||
'case' => 'none',
|
||||
],
|
||||
],
|
||||
)->withConfiguredRule(
|
||||
DeclareStrictTypesSniff::class,
|
||||
[
|
||||
'declareOnFirstLine' => true,
|
||||
|
|
|
@ -16,7 +16,6 @@ use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector;
|
|||
use Rector\CodingStyle\Rector\If_\NullableCompareToNullRector;
|
||||
use Rector\Config\RectorConfig;
|
||||
use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector;
|
||||
use Rector\EarlyReturn\Rector\If_\ChangeAndIfToEarlyReturnRector;
|
||||
use Rector\EarlyReturn\Rector\If_\ChangeNestedIfsToEarlyReturnRector;
|
||||
use Rector\EarlyReturn\Rector\If_\ChangeOrIfContinueToMultiContinueRector;
|
||||
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\ReturnTypeFromReturnDirectArrayRector;
|
||||
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromReturnNewRector;
|
||||
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictBoolReturnExprRector;
|
||||
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictConstantReturnRector;
|
||||
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictNativeCallRector;
|
||||
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictNewArrayRector;
|
||||
|
@ -59,7 +57,6 @@ return RectorConfig::configure()
|
|||
AddReturnTypeDeclarationBasedOnParentClassMethodRector::class,
|
||||
AddReturnTypeDeclarationFromYieldsRector::class,
|
||||
BooleanNotIdenticalToNotIdenticalRector::class,
|
||||
ChangeAndIfToEarlyReturnRector::class,
|
||||
ChangeNestedForeachIfsToEarlyContinueRector::class,
|
||||
ChangeNestedIfsToEarlyReturnRector::class,
|
||||
ChangeOrIfContinueToMultiContinueRector::class,
|
||||
|
@ -78,7 +75,6 @@ return RectorConfig::configure()
|
|||
ReturnEarlyIfVariableRector::class,
|
||||
ReturnTypeFromReturnDirectArrayRector::class,
|
||||
ReturnTypeFromReturnNewRector::class,
|
||||
ReturnTypeFromStrictBoolReturnExprRector::class,
|
||||
ReturnTypeFromStrictConstantReturnRector::class,
|
||||
ReturnTypeFromStrictNativeCallRector::class,
|
||||
ReturnTypeFromStrictNewArrayRector::class,
|
||||
|
|
|
@ -5,6 +5,5 @@ namespace Lubiana\CodeQuality;
|
|||
final class LubiSetList
|
||||
{
|
||||
public const string RECTOR = __DIR__ . '/../config/rector.php';
|
||||
|
||||
public const string ECS = __DIR__ . '/../config/ecs.php';
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue