From 3b344cfe39ec2a9d4b83a50d276becb7be213563 Mon Sep 17 00:00:00 2001 From: overtrue Date: Thu, 10 Feb 2022 15:02:53 +0800 Subject: [PATCH] Laravel 9 --- .github/workflows/ci.yml | 41 ++++++------- composer.json | 129 ++++++++++++++++++++------------------- 2 files changed, 85 insertions(+), 85 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f2d184..7a3b1ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,35 +2,34 @@ name: CI on: push: - branches: [ master ] + branches: [master] pull_request: - branches: [ master ] - + branches: [master] jobs: phpcs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Setup PHP environment - uses: shivammathur/setup-php@v2 - - name: Install dependencies - run: composer install - - name: PHPCSFixer check - run: composer check-style + - uses: actions/checkout@v2 + - name: Setup PHP environment + uses: shivammathur/setup-php@v2 + - name: Install dependencies + run: composer install + - name: PHPCSFixer check + run: composer check-style phpunit: strategy: matrix: - php_version: [7.4, 8.0] + php_version: [8.0, 8.1] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Setup PHP environment - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php_version }} - coverage: xdebug - - name: Install dependencies - run: composer install - - name: PHPUnit check - run: ./vendor/bin/phpunit --coverage-text + - uses: actions/checkout@v2 + - name: Setup PHP environment + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php_version }} + coverage: xdebug + - name: Install dependencies + run: composer install + - name: PHPUnit check + run: ./vendor/bin/phpunit --coverage-text diff --git a/composer.json b/composer.json index cf9890a..40c72fc 100644 --- a/composer.json +++ b/composer.json @@ -1,68 +1,69 @@ { - "name": "overtrue/laravel-follow", - "description": "User follow unfollow system for Laravel.", - "license": "MIT", - "authors": [ - { - "name": "overtrue", - "email": "anzhengchao@gmail.com" - } - ], - "require": { - "laravel/framework": "^8.0" - }, - "autoload": { - "psr-4": { - "Overtrue\\LaravelFollow\\": "src" - } - }, - "autoload-dev": { - "psr-4": { - "Tests\\": "tests" - } - }, - "require-dev": { - "mockery/mockery": "^1.2", - "phpunit/phpunit": "^9.0", - "orchestra/testbench": "^6.0", - "brainmaestro/composer-git-hooks": "^2.7", - "friendsofphp/php-cs-fixer": "^3.0" - }, - "extra": { - "laravel": { - "providers": ["Overtrue\\LaravelFollow\\FollowServiceProvider"] - }, - "hooks": { - "pre-commit": [ - "composer fix-style", - "composer test" - ], - "pre-push": [ - "composer test", - "composer check-style" - ] - } - }, - "scripts": { - "post-update-cmd": [ - "cghooks remove", - "cghooks add --ignore-lock", - "cghooks update" - ], - "post-merge": "composer install", - "post-install-cmd": [ - "cghooks remove", - "cghooks add --ignore-lock", - "cghooks update" - ], - "cghooks": "vendor/bin/cghooks", - "check-style": "php-cs-fixer fix --using-cache=no --diff --dry-run --ansi", - "fix-style": "php-cs-fixer fix --using-cache=no --ansi", - "test": "phpunit --colors=always" + "name": "overtrue/laravel-follow", + "description": "User follow unfollow system for Laravel.", + "license": "MIT", + "authors": [ + { + "name": "overtrue", + "email": "anzhengchao@gmail.com" + } + ], + "require": { + "laravel/framework": "^9.0" + }, + "autoload": { + "psr-4": { + "Overtrue\\LaravelFollow\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Tests\\": "tests" + } + }, + "require-dev": { + "mockery/mockery": "^1.4", + "phpunit/phpunit": "^9.5", + "orchestra/testbench": "^7.0", + "friendsofphp/php-cs-fixer": "^3.0" + }, + "extra": { + "laravel": { + "providers": [ + "Overtrue\\LaravelFollow\\FollowServiceProvider" + ] }, - "scripts-descriptions": { - "test": "Run all tests.", - "check-style": "Run style checks (only dry run - no fixing!).", - "fix-style": "Run style checks and fix violations." + "hooks": { + "pre-commit": [ + "composer fix-style", + "composer test" + ], + "pre-push": [ + "composer test", + "composer check-style" + ] } + }, + "scripts": { + "post-update-cmd": [ + "cghooks remove", + "cghooks add --ignore-lock", + "cghooks update" + ], + "post-merge": "composer install", + "post-install-cmd": [ + "cghooks remove", + "cghooks add --ignore-lock", + "cghooks update" + ], + "cghooks": "vendor/bin/cghooks", + "check-style": "php-cs-fixer fix --using-cache=no --diff --dry-run --ansi", + "fix-style": "php-cs-fixer fix --using-cache=no --ansi", + "test": "phpunit --colors=always" + }, + "scripts-descriptions": { + "test": "Run all tests.", + "check-style": "Run style checks (only dry run - no fixing!).", + "fix-style": "Run style checks and fix violations." + } }