Skip to content

Commit 8f7cb87

Browse files
Merge pull request #20 from paragonie/update-deps
Update dependencies
2 parents 205ab4f + 07160fd commit 8f7cb87

File tree

4 files changed

+62
-79
lines changed

4 files changed

+62
-79
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -7,90 +7,53 @@ jobs:
77
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
88
runs-on: ${{ matrix.operating-system }}
99
strategy:
10+
fail-fast: false
1011
matrix:
11-
operating-system: ['ubuntu-18.04']
12+
operating-system: ['ubuntu-latest']
1213
php-versions: ['7.0']
13-
phpunit-versions: ['7.5.20']
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v4
1717

1818
- name: Setup PHP
1919
uses: shivammathur/setup-php@v2
2020
with:
2121
php-version: ${{ matrix.php-versions }}
2222
extensions: mbstring, intl
23-
ini-values: post_max_size=256M, max_execution_time=180
24-
tools: psalm, phpunit:${{ matrix.phpunit-versions }}
25-
26-
- name: Install dependencies
27-
run: composer self-update --1; composer install
23+
ini-values: max_execution_time=600, memory_limit=256M, error_reporting=-1, display_errors=On
24+
coverage: none
2825

29-
- name: PHPUnit tests
30-
uses: php-actions/phpunit@v2
31-
with:
32-
memory_limit: 256M
26+
- name: Remove psalm
27+
run: composer remove --dev vimeo/psalm
3328

34-
moderate:
35-
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
36-
runs-on: ${{ matrix.operating-system }}
37-
strategy:
38-
matrix:
39-
operating-system: ['ubuntu-latest']
40-
php-versions: ['7.1', '7.2', '7.3']
41-
phpunit-versions: ['latest']
42-
steps:
43-
- name: Checkout
44-
uses: actions/checkout@v2
45-
46-
- name: Setup PHP
47-
uses: shivammathur/setup-php@v2
48-
with:
49-
php-version: ${{ matrix.php-versions }}
50-
extensions: mbstring, intl, sodium
51-
ini-values: post_max_size=256M, max_execution_time=180
52-
tools: psalm, phpunit:${{ matrix.phpunit-versions }}
53-
54-
- name: Install dependencies
55-
run: composer install
29+
- name: Install Composer dependencies
30+
run: composer update
5631

5732
- name: PHPUnit tests
58-
uses: php-actions/phpunit@v2
59-
timeout-minutes: 30
60-
with:
61-
memory_limit: 256M
33+
run: vendor/bin/phpunit
6234

63-
modern:
35+
moderate-modern:
6436
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
6537
runs-on: ${{ matrix.operating-system }}
6638
strategy:
6739
matrix:
6840
operating-system: ['ubuntu-latest']
69-
php-versions: ['7.4', '8.0', '8.1']
70-
phpunit-versions: ['latest']
41+
php-versions: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
42+
7143
steps:
7244
- name: Checkout
73-
uses: actions/checkout@v2
45+
uses: actions/checkout@v4
7446

7547
- name: Setup PHP
7648
uses: shivammathur/setup-php@v2
7749
with:
7850
php-version: ${{ matrix.php-versions }}
7951
extensions: mbstring, intl, sodium
80-
ini-values: post_max_size=256M, max_execution_time=180
81-
tools: psalm, phpunit:${{ matrix.phpunit-versions }}
52+
ini-values: error_reporting=-1, display_errors=On
53+
coverage: none
8254

83-
- name: Install dependencies
84-
run: composer install
55+
- name: Install Composer dependencies
56+
uses: "ramsey/composer-install@v3"
8557

8658
- name: PHPUnit tests
87-
uses: php-actions/phpunit@v2
88-
timeout-minutes: 30
89-
with:
90-
memory_limit: 256M
91-
92-
- name: Install Psalm
93-
run: composer require --dev vimeo/psalm:^4
94-
95-
- name: Static Analysis
96-
run: vendor/bin/psalm
59+
run: vendor/bin/phpunit

.github/workflows/psalm.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Psalm
2+
3+
on: [push]
4+
5+
jobs:
6+
psalm:
7+
name: Psalm on PHP ${{ matrix.php-versions }}
8+
runs-on: ${{ matrix.operating-system }}
9+
strategy:
10+
matrix:
11+
operating-system: ['ubuntu-latest']
12+
php-versions: ['7.4']
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Setup PHP
18+
uses: shivammathur/setup-php@v2
19+
with:
20+
php-version: ${{ matrix.php-versions }}
21+
tools: psalm:4
22+
coverage: none
23+
24+
- name: Install Composer dependencies
25+
uses: "ramsey/composer-install@v3"
26+
27+
- name: Static Analysis
28+
run: psalm

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
"require": {
66
"php": "^7|^8",
77
"guzzlehttp/psr7": "^1",
8-
"paragonie/constant_time_encoding": "^2",
9-
"paragonie/sodium_compat": ">= 1.15.4",
8+
"paragonie/constant_time_encoding": "^2|^3",
9+
"paragonie/sodium_compat": ">= 1.15.4 || >= 2.1",
1010
"psr/http-message": "^1"
1111
},
1212
"require-dev": {
1313
"guzzlehttp/guzzle": "^6|^7",
14-
"phpunit/phpunit": "^6|^7|^8|^9",
14+
"phpunit/phpunit": "^6|^7|^8|^9|^10",
1515
"vimeo/psalm": "^2|^3|^4"
1616
},
1717
"suggest": {

phpunit.xml.dist

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit
3-
backupGlobals="true"
4-
bootstrap="phpunit-autoload.php"
5-
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
processIsolation="false"
10-
>
11-
<testsuites>
12-
<testsuite name="Unit Tests">
13-
<directory suffix="Test.php">./tests</directory>
14-
</testsuite>
15-
</testsuites>
16-
<filter>
17-
<whitelist processUncoveredFilesFromWhitelist="true">
18-
<directory suffix=".php">./src</directory>
19-
</whitelist>
20-
</filter>
21-
</phpunit>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="true" bootstrap="phpunit-autoload.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
3+
<coverage processUncoveredFiles="true">
4+
<include>
5+
<directory suffix=".php">./src</directory>
6+
</include>
7+
</coverage>
8+
<testsuites>
9+
<testsuite name="Unit Tests">
10+
<directory suffix="Test.php">./tests</directory>
11+
</testsuite>
12+
</testsuites>
13+
</phpunit>

0 commit comments

Comments
 (0)