Skip to content

Commit 69e6fb5

Browse files
authored
Merge pull request #97 from laminas/feature/upgrade-dependencies
Upgraded dependencies, `composer:^2` and `php:^8`, mutation tests CI improvements
2 parents f49a97e + c5189e2 commit 69e6fb5

File tree

12 files changed

+1369
-846
lines changed

12 files changed

+1369
-846
lines changed

.github/workflows/coding-standards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
dependencies:
2020
- "locked"
2121
php-version:
22-
- "7.4"
22+
- "8.0"
2323
operating-system:
2424
- "ubuntu-latest"
2525

.github/workflows/docker-build.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2+
3+
name: "Simulate Docker Build"
4+
5+
on:
6+
pull_request:
7+
schedule:
8+
- cron: '0 2 * * *' # run daily
9+
10+
jobs:
11+
docker-build:
12+
name: "Simulate Docker Build"
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: "Checkout"
18+
uses: "actions/checkout@v2"
19+
20+
- name: "Docker Build"
21+
run: "docker build ."

.github/workflows/mutation-tests.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ name: "Mutation tests"
44

55
on:
66
pull_request:
7-
push:
8-
branches:
9-
- "master"
107

118
jobs:
129
mutation-tests:
@@ -19,14 +16,17 @@ jobs:
1916
dependencies:
2017
- "locked"
2118
php-version:
22-
- "7.4"
19+
- "8.0"
2320
operating-system:
2421
- "ubuntu-latest"
2522

2623
steps:
2724
- name: "Checkout"
2825
uses: "actions/checkout@v2"
2926

27+
- name: "Fetch github.base_ref (for diffing)"
28+
run: git fetch --depth=1 origin +refs/heads/${{github.base_ref}}:refs/remotes/origin/${{github.base_ref}}
29+
3030
- name: "Install PHP"
3131
uses: "shivammathur/setup-php@v2"
3232
with:
@@ -56,8 +56,11 @@ jobs:
5656
run: "composer install --no-interaction --no-progress --no-suggest"
5757

5858
- name: "Infection"
59-
run: "vendor/bin/infection"
59+
run: |
60+
vendor/bin/roave-infection-static-analysis-plugin \
61+
--ignore-msi-with-no-mutations \
62+
--git-diff-filter=AM \
63+
--git-diff-base=origin/${{ github.base_ref }}
6064
env:
6165
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }}
6266
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
63-

.github/workflows/phpunit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
dependencies:
2020
- "locked"
2121
php-version:
22-
- "7.4"
22+
- "8.0"
2323
operating-system:
2424
- "ubuntu-latest"
2525

.github/workflows/psalm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
dependencies:
2020
- "locked"
2121
php-version:
22-
- "7.4"
22+
- "8.0"
2323
operating-system:
2424
- "ubuntu-latest"
2525

Dockerfile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM composer:1 AS composer
1+
FROM composer:2 AS composer
22

33
FROM ubuntu:20.04
44

@@ -23,13 +23,12 @@ RUN apt update \
2323
gnupg \
2424
libzip-dev \
2525
zip \
26-
php7.4-cli \
27-
php7.4-curl \
28-
php7.4-json \
29-
php7.4-mbstring \
30-
php7.4-readline \
31-
php7.4-xml \
32-
php7.4-zip \
26+
php8.0-cli \
27+
php8.0-curl \
28+
php8.0-mbstring \
29+
php8.0-readline \
30+
php8.0-xml \
31+
php8.0-zip \
3332
&& apt clean
3433

3534
ADD composer.json /app/composer.json

bin/console.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
namespace Laminas\AutomaticReleases\WebApplication;
77

8+
use DateTimeZone;
89
use ErrorException;
910
use Http\Discovery\HttpClientDiscovery;
1011
use Http\Discovery\Psr17FactoryDiscovery;
@@ -88,7 +89,7 @@ static function (int $errorCode, string $message = '', string $file = '', int $l
8889
$httpClient
8990
));
9091
$createReleaseText = new MergeMultipleReleaseNotes([
91-
new CreateReleaseTextViaKeepAChangelog($changelogExists, new SystemClock()),
92+
new CreateReleaseTextViaKeepAChangelog($changelogExists, new SystemClock(new DateTimeZone('UTC'))),
9293
$createCommitText,
9394
]);
9495
$createRelease = new CreateReleaseThroughApiCall(
@@ -105,7 +106,7 @@ static function (int $errorCode, string $message = '', string $file = '', int $l
105106
);
106107

107108
/** @psalm-suppress DeprecatedClass */
108-
$application = new Application(Versions::ROOT_PACKAGE_NAME, Versions::getVersion('laminas/automatic-releases'));
109+
$application = new Application(Versions::rootPackageName(), Versions::getVersion('laminas/automatic-releases'));
109110

110111
$application->addCommands([
111112
new ReleaseCommand(

composer.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@
99
}
1010
},
1111
"require": {
12-
"php": "^7.4.7",
13-
"composer/package-versions-deprecated": "^1.10.99",
14-
"jwage/changelog-generator": "^1.2.1",
12+
"php": "^8.0.0",
13+
"ocramius/package-versions": "^2.3.0",
14+
"jwage/changelog-generator": "^1.3.0",
1515
"laminas/laminas-diactoros": "^2.5.0",
16-
"lcobucci/clock": "^1.3",
17-
"monolog/monolog": "^2.1",
18-
"phly/keep-a-changelog": "^2.9",
19-
"php-http/curl-client": "^2.1.0",
16+
"lcobucci/clock": "^2.0.0",
17+
"monolog/monolog": "^2.2.0",
18+
"phly/keep-a-changelog": "^2.11.0",
19+
"php-http/curl-client": "^2.2.0",
2020
"php-http/discovery": "^1.13.0",
21-
"php-http/httplug": "^2.1.0",
21+
"php-http/httplug": "^2.2.0",
2222
"psr/http-client": "^1.0.1",
2323
"psr/http-message": "^1.0.1",
24-
"psr/log": "^1.1",
25-
"symfony/console": "^4.4.10 || ^5.1.2",
26-
"symfony/process": "^5.1.3",
27-
"thecodingmachine/safe": "^v1.1.2",
24+
"psr/log": "^1.1.3",
25+
"symfony/console": "^5.2.1",
26+
"symfony/process": "^5.2.1",
27+
"thecodingmachine/safe": "^1.3.3",
2828
"webmozart/assert": "^1.9.1"
2929
},
3030
"autoload-dev": {
@@ -33,12 +33,12 @@
3333
}
3434
},
3535
"require-dev": {
36-
"doctrine/coding-standard": "^8.1.0",
37-
"infection/infection": "^0.17.5",
38-
"phpunit/phpunit": "^9.2.5",
39-
"psalm/plugin-phpunit": "^0.12.2",
36+
"doctrine/coding-standard": "^8.2.0",
37+
"phpunit/phpunit": "^9.5.0",
38+
"psalm/plugin-phpunit": "^0.15.0",
39+
"roave/infection-static-analysis-plugin": "^1.7",
4040
"squizlabs/php_codesniffer": "^3.5.8",
41-
"vimeo/psalm": "^3.18.2"
41+
"vimeo/psalm": "^4.3.2"
4242
},
4343
"config": {
4444
"sort-packages": true

0 commit comments

Comments
 (0)