Skip to content

Commit 75326de

Browse files
authored
Merge pull request #190 from SocialConnect/php-version
Update min. PHP version to 7.4
2 parents a6b6abd + 8f3b6a7 commit 75326de

46 files changed

Lines changed: 219 additions & 156 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ trim_trailing_whitespace = true
1313
[*.yml]
1414
indent_size = 2
1515

16-
[*.neon]
16+
[*.neon, *.neon.dist]
1717
indent_style = tab

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ tests export-ignore
1010
.scrutinizer.yml export-ignore
1111
phpunit.xml.dist export-ignore
1212
phpmd.xml.dist export-ignore
13+
phpstan.neon.dist export-ignore
14+
phpstan-baseline.neon export-ignore
15+
phpcs.xml export-ignore

.github/workflows/ci.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
php-version: ['7.4', '8.0', '8.1']
11+
php-version: ['8.0', '8.1', '8.2', '8.3', '8.4']
1212
composer-opts: ['']
1313
include:
14-
- php-version: '7.1'
14+
- php-version: '7.4'
1515
composer-opts: '--prefer-lowest'
1616

1717
steps:
@@ -25,19 +25,14 @@ jobs:
2525

2626
- name: Composer install
2727
run: |
28-
if [[ ${{ matrix.php-version }} == '8.0' || ${{ matrix.php-version }} == '8.1' ]]; then
29-
composer remove --dev squizlabs/php_codesniffer phpstan/phpstan-shim phpunit/phpunit
30-
composer require --dev phpunit/phpunit:^8.5
31-
else
32-
composer update ${{ matrix.composer-opts }}
33-
fi
28+
composer update ${{ matrix.composer-opts }}
3429
3530
- name: Run PHPUnit
3631
run: |
3732
if [[ ${{ matrix.php-version }} == '7.4' ]]; then
3833
vendor/bin/phpunit -v --debug --coverage-clover=coverage.clover
3934
else
40-
vendor/bin/phpunit --no-coverage
35+
vendor/bin/phpunit -v --no-coverage
4136
fi
4237
4338
- name: Code Coverage Report
@@ -64,8 +59,8 @@ jobs:
6459
run: composer install
6560

6661
- name: Run phpcs
67-
run: vendor/bin/phpcs --report=checkstyle -q --standard=PSR2 --warning-severity=0 src/ tests/Test | cs2pr
62+
run: vendor/bin/phpcs --report=checkstyle -q | cs2pr
6863

6964
- name: Run phpstan
7065
if: success() || failure()
71-
run: vendor/bin/phpstan.phar analyse src/ tests/ --no-progress --level 2
66+
run: vendor/bin/phpstan

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ composer.lock
44
example/config.php
55
build
66
.DS_Store
7+
.phpunit.result.cache

README.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SocialConnect Auth
44
[![Packagist](https://img.shields.io/packagist/v/socialconnect/auth.svg?style=flat-square)](https://packagist.org/packages/socialconnect/auth)
55
[![License](http://img.shields.io/packagist/l/SocialConnect/auth.svg?style=flat-square)](https://github.com/SocialConnect/auth/blob/master/LICENSE)
66
[![Scrutinizer Code Quality](http://img.shields.io/scrutinizer/g/socialconnect/auth/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/SocialConnect/auth/?branch=master)
7-
[![Build Status](https://img.shields.io/github/workflow/status/SocialConnect/auth/CI/master?style=flat-square)](https://github.com/SocialConnect/auth/actions?query=workflow%3ACI+branch%3Amaster)
7+
[![Build Status](https://img.shields.io/github/actions/workflow/status/SocialConnect/auth/ci.yml?branch=master&style=flat-square)](https://github.com/SocialConnect/auth/actions/workflows/ci.yml?query=branch%3Amaster)
88
[![Scrutinizer Code Coverage](https://img.shields.io/scrutinizer/coverage/g/socialconnect/auth/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/SocialConnect/auth/?branch=master)
99
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FSocialConnect%2Fauth.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FSocialConnect%2Fauth?ref=badge_shield)
1010

@@ -45,30 +45,21 @@ There is a documentation for [Installation & Getting Started](https://socialconn
4545
## Referenced projects
4646

4747
- [OrgHeiglHybridAuth](https://github.com/heiglandreas/HybridAuth) from [@heiglandreas](https://github.com/heiglandreas) - Authentication-layer for your ZendFramework3 App.
48-
- [cakephp-social-auth](https://github.com/ADmad/cakephp-social-auth) from [@ADmad](https://github.com/ADmad) - CakePHP plugin.
48+
- [cakephp-social-auth](https://github.com/ADmad/cakephp-social-auth) from [@ADmad](https://github.com/ADmad) - CakePHP plugin.
4949
- [Phalcon-module-skeleton](https://github.com/ovr/phalcon-module-skeleton) from [@ovr](https://github.com/ovr) - There is a module for Phalcon inside project.
5050

5151
## Versions
5252

5353
| Version | Status | EOL | PHP Version |
5454
|----------------------------------------------------------|-------------|------------|-------------|
55-
| [3.x](https://github.com/SocialConnect/auth/tree/master) | Current | -- | >= 7.1 |
55+
| [3.x](https://github.com/SocialConnect/auth/tree/master) | Current | -- | >= 7.4 |
5656
| [2.x](https://github.com/SocialConnect/auth/tree/2.x) | Maintenance | 2020-06-01 | >= 7.0 |
5757
| [1.x](https://github.com/SocialConnect/auth/tree/1.x) | EOL | 2020-01-24 | >= 5.5 |
5858

5959
Contributors
6060
============
6161

62-
This project exists thanks to all the people who contribute. Contributions are welcome!
63-
64-
[![](https://sourcerer.io/fame/ovr/SocialConnect/auth/images/0)](https://sourcerer.io/fame/ovr/SocialConnect/auth/links/0)
65-
[![](https://sourcerer.io/fame/ovr/SocialConnect/auth/images/1)](https://sourcerer.io/fame/ovr/SocialConnect/auth/links/1)
66-
[![](https://sourcerer.io/fame/ovr/SocialConnect/auth/images/2)](https://sourcerer.io/fame/ovr/SocialConnect/auth/links/2)
67-
[![](https://sourcerer.io/fame/ovr/SocialConnect/auth/images/3)](https://sourcerer.io/fame/ovr/SocialConnect/auth/links/3)
68-
[![](https://sourcerer.io/fame/ovr/SocialConnect/auth/images/4)](https://sourcerer.io/fame/ovr/SocialConnect/auth/links/4)
69-
[![](https://sourcerer.io/fame/ovr/SocialConnect/auth/images/5)](https://sourcerer.io/fame/ovr/SocialConnect/auth/links/5)
70-
[![](https://sourcerer.io/fame/ovr/SocialConnect/auth/images/6)](https://sourcerer.io/fame/ovr/SocialConnect/auth/links/6)
71-
[![](https://sourcerer.io/fame/ovr/SocialConnect/auth/images/7)](https://sourcerer.io/fame/ovr/SocialConnect/auth/links/7)
62+
This project exists thanks to all the people who [contribute](https://github.com/SocialConnect/auth/graphs/contributors). Contributions are welcome!
7263

7364
### License
7465

composer.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,26 @@
1919
],
2020
"license": "MIT",
2121
"minimum-stability": "dev",
22+
"prefer-stable": true,
2223
"authors": [
2324
{
2425
"name": "Dmitry Patsura",
2526
"email": "talk@dmtry.me"
2627
}
2728
],
2829
"require": {
29-
"php": ">=7.1",
30+
"php": "^7.4|^8.0",
3031
"ext-json": "*",
3132
"psr/http-client": "^1.0 || ^2.0",
3233
"psr/simple-cache": "^1.0 || ^2.0 || ^3.0",
3334
"psr/http-factory": "^1.0 || ^2.0",
3435
"socialconnect/jwx": "^1.0"
3536
},
3637
"require-dev": {
37-
"squizlabs/php_codesniffer": "^3.3.2",
38-
"phpunit/phpunit": "^7.5",
38+
"squizlabs/php_codesniffer": "^3.12",
39+
"phpunit/phpunit": "^9.6",
3940
"socialconnect/http-client": "^1.0",
40-
"phpstan/phpstan-shim": "^0.11.12"
41+
"phpstan/phpstan": "^2.1"
4142
},
4243
"autoload": {
4344
"psr-4": {

example/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"symfony/cache": "^4.3",
1010
"php-http/guzzle6-adapter": "^2.0",
1111
"guzzlehttp/psr7": "^1.6",
12-
"zendframework/zend-diactoros": "^2.1",
1312
"socialconnect/http-client": "^1.0"
1413
},
1514
"license": "MIT",

phpcs.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="SocialConnect Auth">
3+
<file>src/</file>
4+
<file>tests/Test/</file>
5+
6+
<rule ref="PSR2"/>
7+
8+
<arg value="s"/>
9+
10+
<rule ref="Generic.Files.LineLength.TooLong">
11+
<severity>0</severity>
12+
</rule>
13+
</ruleset>

phpstan-baseline.neon

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
parameters:
2+
ignoreErrors:
3+
-
4+
message: '#^Trait SocialConnect\\Common\\HttpClient is used zero times and is not analysed\.$#'
5+
identifier: trait.unused
6+
count: 1
7+
path: src/Common/HttpClient.php
8+
9+
-
10+
message: '#^Property SocialConnect\\OAuth1\\AbstractProvider\:\:\$consumerToken \(SocialConnect\\OAuth1\\Token\) does not accept SocialConnect\\Provider\\AccessTokenInterface\.$#'
11+
identifier: assign.propertyType
12+
count: 1
13+
path: src/OAuth1/Provider/Atlassian.php
14+
15+
-
16+
message: '#^Property SocialConnect\\OAuth1\\AbstractProvider\:\:\$consumerToken \(SocialConnect\\OAuth1\\Token\) does not accept SocialConnect\\Provider\\AccessTokenInterface\.$#'
17+
identifier: assign.propertyType
18+
count: 1
19+
path: src/OAuth1/Provider/Px500.php
20+
21+
-
22+
message: '#^Property SocialConnect\\OAuth1\\AbstractProvider\:\:\$consumerToken \(SocialConnect\\OAuth1\\Token\) does not accept SocialConnect\\Provider\\AccessTokenInterface\.$#'
23+
identifier: assign.propertyType
24+
count: 1
25+
path: src/OAuth1/Provider/Trello.php
26+
27+
-
28+
message: '#^Property SocialConnect\\OAuth1\\AbstractProvider\:\:\$consumerToken \(SocialConnect\\OAuth1\\Token\) does not accept SocialConnect\\Provider\\AccessTokenInterface\.$#'
29+
identifier: assign.propertyType
30+
count: 1
31+
path: src/OAuth1/Provider/Tumblr.php
32+
33+
-
34+
message: '#^Property SocialConnect\\OAuth1\\AbstractProvider\:\:\$consumerToken \(SocialConnect\\OAuth1\\Token\) does not accept SocialConnect\\Provider\\AccessTokenInterface\.$#'
35+
identifier: assign.propertyType
36+
count: 1
37+
path: src/OAuth1/Provider/Twitter.php

phpstan.neon.dist

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
includes:
2+
- phpstan-baseline.neon
3+
4+
parameters:
5+
level: 4
6+
paths:
7+
- src/
8+
ignoreErrors:

0 commit comments

Comments
 (0)