Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.x] add support laravel-wallet:^11.0 #55

Merged
merged 5 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions .github/workflows/code-style.yaml

This file was deleted.

89 changes: 89 additions & 0 deletions .github/workflows/fixer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: fixer

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
autofix:
runs-on: ubuntu-latest

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
extensions: mbstring, pgsql, mysql, sqlite, redis, memcached, bcmath
coverage: pcov
env:
runner: self-hosted

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run rector-fix
run: composer rector-fix

- name: Run ecs-fix
run: composer ecs-fix

- name: Run rector
run: composer rector

- name: Run ecs
run: composer ecs

- name: Run parabench
run: composer parabench

- name: "Check if build has changed"
if: success()
id: has-changes
run: |
echo "stdout<<EOF" >> $GITHUB_OUTPUT
echo "$(git diff --stat)" >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT

- name: Import GPG key
if: ${{ steps.has-changes.outputs.stdout }}
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_BOT }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
fingerprint: ${{ secrets.GPG_FINGERPRINT }}
git_config_global: true
git_user_signingkey: true
git_commit_gpgsign: true
git_committer_name: Github bot
git_committer_email: bot@babichev.net

- name: "Commit files"
if: ${{ steps.has-changes.outputs.stdout }}
env:
GH_TOKEN: ${{ secrets.BOT_TOKEN }}
run: |
gh pr checkout ${{ github.event.pull_request.number }}
git commit -S -m "autofix" -a

- name: "Push changes"
if: ${{ steps.has-changes.outputs.stdout }}
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
run: git push -u origin HEAD
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.2

- name: Validate composer.json and composer.lock
run: composer validate --strict
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/phpunits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
php-versions: [8.1, 8.2]
php-versions: [8.2, 8.3]

steps:
- name: Checkout
Expand Down Expand Up @@ -51,8 +51,8 @@ jobs:

- name: Run test suite
id: unit-run
run: composer unit
run: composer parabench

- name: Run test suite
- name: Run mutation test suite
id: infect-run
run: composer infect
38 changes: 0 additions & 38 deletions .github/workflows/rector.yaml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ composer.lock
build/
.phpunit.result.cache
.php_cs_cache
.phpunit.cache/
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
[![Mutation testing badge](https://badge.stryker-mutator.io/github.com/bavix/laravel-wallet-warmup/master)](https://packagist.org/packages/bavix/laravel-wallet-warmup)
[![Package Rank](https://phppackages.org/p/bavix/laravel-wallet-warmup/badge/rank.svg)](https://packagist.org/packages/bavix/laravel-wallet-warmup)
[![Latest Stable Version](https://poser.pugx.org/bavix/laravel-wallet-warmup/v/stable)](https://packagist.org/packages/bavix/laravel-wallet-warmup)
[![Latest Unstable Version](https://poser.pugx.org/bavix/laravel-wallet-warmup/v/unstable)](https://packagist.org/packages/bavix/laravel-wallet-warmup)
[![License](https://poser.pugx.org/bavix/laravel-wallet-warmup/license)](https://packagist.org/packages/bavix/laravel-wallet-warmup)
[![composer.lock](https://poser.pugx.org/bavix/laravel-wallet-warmup/composerlock)](https://packagist.org/packages/bavix/laravel-wallet-warmup)

laravel-wallet-warmup - Addition to the package laravel-wallet.

* **Vendor**: bavix
* **Package**: laravel-wallet-warmup
* **Version**: [![Latest Stable Version](https://poser.pugx.org/bavix/laravel-wallet-warmup/v/stable)](https://packagist.org/packages/bavix/laravel-wallet-warmup)
* **PHP Version**: 7.4+
* **Laravel Version**: `6.x`, `7.x`, `8.x`
* **[Composer](https://getcomposer.org/):** `composer require bavix/laravel-wallet-warmup`

---
Expand Down
30 changes: 15 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,20 @@
}
],
"require": {
"php": "^8.1",
"bavix/laravel-wallet": "^10.0"
"php": "^8.2",
"bavix/laravel-wallet": "^11.0"
},
"require-dev": {
"driftingly/rector-laravel": "^0.26",
"ergebnis/phpstan-rules": "^1.0",
"infection/infection": "^0.27",
"orchestra/testbench": "^8.5",
"driftingly/rector-laravel": "^1.0",
"ergebnis/phpstan-rules": "^2.1",
"infection/infection": "~0.27",
"larastan/larastan": "^2.8",
"nunomaduro/collision": "^8.0",
"orchestra/testbench": "^9.0",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^10.2",
"rector/rector": "^0.19",
"symplify/easy-coding-standard": "^11.5"
"phpunit/phpunit": "^10.5",
"rector/rector": "^1.0",
"symplify/easy-coding-standard": "^12.1"
},
"autoload": {
"psr-4": {
Expand All @@ -53,15 +55,13 @@
}
},
"scripts": {
"unit":"@php vendor/bin/phpunit --coverage-xml=build/coverage-xml --log-junit=build/junit.xml",
"infect": "@php vendor/bin/infection --coverage=build --min-msi=50 -j$(nproc)",
"phpstan": "@php vendor/bin/phpstan analyse -vvv --debug --memory-limit 2G -l 7 src/",
"phpstan-baseline": "@php vendor/bin/phpstan analyse -vvv --debug --memory-limit 2G -l 7 src/ --generate-baseline",
"parabench":"@php ./vendor/bin/testbench package:test --coverage-xml=build/coverage-xml --log-junit=build/junit.xml",
"infect": "@php vendor/bin/infection --coverage=build --min-msi=50 -j$(nproc) --only-covering-test-cases",
"phpstan": "@php vendor/bin/phpstan analyse -vvv --memory-limit 2G -c phpstan.neon",
"phpstan-baseline": "@php vendor/bin/phpstan analyse -vvv --memory-limit 2G -c phpstan.neon --generate-baseline phpstan.baseline.neon",
"ecs": "@php vendor/bin/ecs check",
"ecs-fix": "@php vendor/bin/ecs check --fix",
"ecs-cc": "@php vendor/bin/ecs --clear-cache",
"psalm": "@php vendor/bin/psalm",
"psalm-cc": "@php vendor/bin/psalm --clear-cache",
"rector": "@php vendor/bin/rector process --dry-run",
"rector-fix": "@php vendor/bin/rector process"
},
Expand Down
37 changes: 15 additions & 22 deletions ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,30 @@

declare(strict_types=1);

use PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocToCommentFixer;
use PhpCsFixer\Fixer\PhpUnit\PhpUnitTestClassRequiresCoversFixer;
use PhpCsFixer\Fixer\Strict\DeclareStrictTypesFixer;
use PhpCsFixer\Fixer\Phpdoc\GeneralPhpdocAnnotationRemoveFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;

return static function (ECSConfig $config): void {
$config->parallel();
$services = $config->services();
$services->set(ArraySyntaxFixer::class)
->call('configure', [[
'syntax' => 'short',
]]);

$services->set(DeclareStrictTypesFixer::class);

$config->paths([
__DIR__ . '/src',
__DIR__ . '/tests',
]);

$config->skip([
PhpdocToCommentFixer::class,
PhpUnitTestClassRequiresCoversFixer::class,
GeneralPhpdocAnnotationRemoveFixer::class,
]);

$config->import(SetList::CLEAN_CODE);
$config->import(SetList::PSR_12);
$config->import(SetList::CONTROL_STRUCTURES);
$config->import(SetList::NAMESPACES);
$config->import(SetList::STRICT);
$config->import(SetList::PHPUNIT);
};
$config->sets([
SetList::CLEAN_CODE,
SetList::SYMPLIFY,
SetList::ARRAY,
SetList::COMMON,
SetList::PSR_12,
SetList::CONTROL_STRUCTURES,
SetList::NAMESPACES,
SetList::STRICT,
SetList::PHPUNIT,
SetList::LARAVEL,
]);
};
8 changes: 8 additions & 0 deletions phpstan.common.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
includes:
- vendor/larastan/larastan/extension.neon
- vendor/ergebnis/phpstan-rules/rules.neon

parameters:
level: 9
fileExtensions:
- php
Loading
Loading