From f804a200ee7481ff5f74fee5f1d5becc4575d2f4 Mon Sep 17 00:00:00 2001
From: Sergey Romanenko
Date: Sun, 3 Jul 2022 19:28:04 +0300
Subject: [PATCH] Csrf 3.0.0
---
.github/workflows/ci.yml | 42 +++++++++++-----------------------------
CHANGELOG.md | 4 ++++
README.md | 2 +-
composer.json | 20 ++++++++++++++-----
phpstan.neon | 1 -
5 files changed, 31 insertions(+), 38 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2ca2bee..dc668a7 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,22 +1,13 @@
name: CI
on: ['push', 'pull_request']
jobs:
- phpstan:
- name: PHP Static Analysis
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: PHPStan
- uses: docker://oskarstark/phpstan-ga
- with:
- args: analyse src/ -c phpstan.neon
- tests:
- name: Unit Tests for PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }}
+ ci:
+ name: PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
- os: [ubuntu-latest, macos-latest, windows-latest]
- php: ['7.4', '8.0', '8.1']
+ os: [ubuntu-latest, macos-latest]
+ php: ['8.1']
dependency-version: [prefer-stable]
steps:
@@ -27,7 +18,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- extensions: pcntl, mcrypt, openssl
+ extensions: pcntl, mcrypt, openssl
ini-values: disable_functions, error_reporting=E_ALL
tools: composer:v2
coverage: xdebug
@@ -37,28 +28,17 @@ jobs:
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- - name: Install PHP 7 dependencies
+ - name: Install PHP 8.1 dependencies
run: composer update --${{ matrix.dependency-version }} --no-interaction --no-progress
- if: "matrix.php < 8"
-
- - name: Install PHP 8 dependencies
- if: "matrix.php >= 8"
- run: composer update --${{ matrix.dependency-version }} --no-interaction --no-progress
-
- - name: Run Tests for PHP 7.4
- if: "matrix.php == 7.4"
- run: ./vendor/bin/pest --coverage
-
- - name: Run Tests for PHP 8.0
- if: "matrix.php == 8.0"
- run: ./vendor/bin/pest --coverage
-
+
+ - name: PHP Static Analysis for PHP 8.1
+ run: ./vendor/bin/phpstan
+
- name: Run Tests for PHP 8.1
- if: "matrix.php == 8.1"
run: ./vendor/bin/pest --coverage
support:
- needs: [phpstan, tests]
+ needs: [ci]
name: Discord Notification
runs-on: ubuntu-latest
steps:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 490c3c3..6fc3d2f 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+
+# [3.0.0](https://github.com/glowyphp/csrf) (2022-07-03)
+* Moving to PHP 8.1
+
# [2.0.1](https://github.com/glowyphp/csrf) (2021-07-02)
* Fixed issue with openssl and mcrypt
diff --git a/README.md b/README.md
index 80b0c97..6d38b11 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@ Csrf Package provides Cross Site Request Forgery protection by comparing provide
-
+
diff --git a/composer.json b/composer.json
index 3a3081b..e9e24e8 100644
--- a/composer.json
+++ b/composer.json
@@ -13,11 +13,11 @@
{
"name": "Sergey Romanenko",
"email": "awilum@msn.com",
- "homepage": "https://github.com/Awilum"
+ "homepage": "https://awilum.github.io"
}
],
"require": {
- "php": "^7.4 || ^8.0"
+ "php": "^8.1"
},
"autoload":{
"psr-4": {
@@ -26,8 +26,18 @@
},
"require-dev": {
"doctrine/coding-standard": "9.0.0",
- "pestphp/pest": "^1.21.1",
- "phpstan/phpstan": "^1.2.0",
- "symfony/var-dumper": "^5.4.0"
+ "pestphp/pest": "^1.21.3",
+ "phpstan/phpstan": "^1.8.0",
+ "victorjonsson/markdowndocs": "dev-master"
+ },
+ "config": {
+ "apcu-autoloader": true,
+ "optimize-autoloader": true,
+ "platform-check": false,
+ "sort-packages": true,
+ "allow-plugins": {
+ "pestphp/pest-plugin": true,
+ "dealerdirect/phpcodesniffer-composer-installer": true
+ }
}
}
diff --git a/phpstan.neon b/phpstan.neon
index 1c16d60..0cfc830 100644
--- a/phpstan.neon
+++ b/phpstan.neon
@@ -2,7 +2,6 @@ parameters:
level: 0
paths:
- %currentWorkingDirectory%/src/
- - %currentWorkingDirectory%/tests/
reportUnmatchedIgnoredErrors: false
checkGenericClassInNonGenericObjectType: false
checkMissingIterableValueType: false