Skip to content

Commit 9dfe8b0

Browse files
authored
Update PHP deps (#9)
* Update PHP deps * Missed symlink * Typos
1 parent 42526d2 commit 9dfe8b0

File tree

7 files changed

+1180
-677
lines changed

7 files changed

+1180
-677
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
/.gitattributes export-ignore
2121
/.gitignore export-ignore
2222
/.travis.yml export-ignore
23+
/box.json.dist export-ignore
2324
/phpunit.xml.dist export-ignore
2425
/Makefile export-ignore
2526

.github/workflows/main.yml

+159
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
#
2+
# JBZoo Toolbox - Composer-Diff
3+
#
4+
# This file is part of the JBZoo Toolbox project.
5+
# For the full copyright and license information, please view the LICENSE
6+
# file that was distributed with this source code.
7+
#
8+
# @package Composer-Diff
9+
# @license MIT
10+
# @copyright Copyright (C) JBZoo.com, All rights reserved.
11+
# @link https://github.com/JBZoo/Composer-Diff
12+
#
13+
14+
name: CI
15+
16+
on:
17+
pull_request:
18+
branches:
19+
- "*"
20+
push:
21+
branches:
22+
- 'master'
23+
schedule:
24+
- cron: '25 */8 * * *'
25+
26+
env:
27+
COLUMNS: 120
28+
TERM_PROGRAM: Hyper
29+
30+
jobs:
31+
phpunit-update:
32+
name: PHPUnit (update)
33+
runs-on: ubuntu-latest
34+
env:
35+
JBZOO_COMPOSER_UPDATE_FLAGS: ${{ matrix.composer_flags }}
36+
strategy:
37+
matrix:
38+
php-version: [ 7.2, 7.3, 7.4, 8.0 ]
39+
composer_flags: [ "--prefer-lowest", "" ]
40+
steps:
41+
- name: Checkout code
42+
uses: actions/checkout@v2
43+
with:
44+
fetch-depth: 0
45+
46+
- name: Setup PHP
47+
uses: shivammathur/setup-php@v2
48+
with:
49+
php-version: ${{ matrix.php-version }}
50+
coverage: xdebug
51+
tools: composer
52+
53+
- name: Build the Project
54+
run: make update --no-print-directory
55+
56+
- name: 🧪 PHPUnit Tests
57+
run: make test --no-print-directory
58+
59+
- name: Upload Artifacts
60+
uses: actions/upload-artifact@v2
61+
with:
62+
name: PHPUnit (update) - ${{ matrix.php-version }} - ${{ matrix.coverage }} - ${{ matrix.build-way }}
63+
path: build/
64+
65+
66+
phpunit-build:
67+
name: PHPUnit (build)
68+
runs-on: ubuntu-latest
69+
strategy:
70+
matrix:
71+
php-version: [ 7.2, 7.3, 7.4 ]
72+
steps:
73+
- name: Checkout code
74+
uses: actions/checkout@v2
75+
with:
76+
fetch-depth: 0
77+
78+
- name: Setup PHP
79+
uses: shivammathur/setup-php@v2
80+
with:
81+
php-version: ${{ matrix.php-version }}
82+
coverage: xdebug
83+
tools: composer
84+
85+
- name: Build the Project
86+
run: make build --no-print-directory
87+
88+
- name: 🧪 PHPUnit Tests
89+
run: make test --no-print-directory
90+
91+
- name: Upload Artifacts
92+
uses: actions/upload-artifact@v2
93+
with:
94+
name: PHPUnit (build) - ${{ matrix.php-version }} - ${{ matrix.coverage }} - ${{ matrix.build-way }}
95+
path: build/
96+
97+
98+
linters:
99+
name: Linters
100+
runs-on: ubuntu-latest
101+
strategy:
102+
matrix:
103+
php-version: [ 7.2, 7.3, 7.4, 8.0 ]
104+
steps:
105+
- name: Checkout code
106+
uses: actions/checkout@v2
107+
with:
108+
fetch-depth: 0
109+
110+
- name: Setup PHP
111+
uses: shivammathur/setup-php@v2
112+
with:
113+
php-version: ${{ matrix.php-version }}
114+
extensions: ast
115+
tools: composer
116+
117+
- name: Build the Project
118+
run: make update --no-print-directory
119+
120+
- name: 👍 Code Quality
121+
run: make codestyle --no-print-directory
122+
123+
- name: Upload Artifacts
124+
uses: actions/upload-artifact@v2
125+
with:
126+
name: Linters - ${{ matrix.php-version }}
127+
path: build/
128+
129+
130+
report:
131+
name: Reports
132+
runs-on: ubuntu-latest
133+
strategy:
134+
matrix:
135+
php-version: [ 7.2, 7.3, 7.4, 8.0 ]
136+
steps:
137+
- name: Checkout code
138+
uses: actions/checkout@v2
139+
with:
140+
fetch-depth: 0
141+
142+
- name: Setup PHP
143+
uses: shivammathur/setup-php@v2
144+
with:
145+
php-version: ${{ matrix.php-version }}
146+
coverage: xdebug
147+
tools: composer
148+
149+
- name: Build the Project
150+
run: make update --no-print-directory
151+
152+
- name: 📝 Build Reports
153+
run: make report-all --no-print-directory
154+
155+
- name: Upload Artifacts
156+
uses: actions/upload-artifact@v2
157+
with:
158+
name: Reports - ${{ matrix.php-version }}
159+
path: build/

.phan/config.php renamed to .phan.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
declare(strict_types=1);
1717

18-
$default = include __DIR__ . '/../vendor/jbzoo/codestyle/src/phan/default.php';
18+
$default = include __DIR__ . '/vendor/jbzoo/codestyle/src/phan/default.php';
1919

2020
return array_merge($default, [
2121
'directory_list' => [

.travis.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,25 @@ language: php
1515
os: linux
1616
dist: xenial
1717

18+
git:
19+
depth: false
20+
1821
php:
1922
- 7.2
2023
- 7.3
2124
- 7.4
2225
- 8.0
23-
- nightly
2426

2527
jobs:
2628
fast_finish: true
2729
allow_failures:
2830
- php: 8.0
29-
- php: nightly
3031

3132
before_script:
3233
- composer self-update
3334

3435
script:
35-
- make build --no-print-directory
36+
- make update --no-print-directory
3637
- make test-all --no-print-directory
3738

3839
after_script:

Makefile

+8-1
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,20 @@ build: ##@Project Install all 3rd party dependencies
2222
$(call title,"Install/Update all 3rd party dependencies")
2323
@composer install --optimize-autoloader --no-progress
2424
@make build-phar
25+
@make create-symlink
2526

2627

2728
update: ##@Project Install/Update all 3rd party dependencies
2829
$(call title,"Install/Update all 3rd party dependencies")
2930
@composer update --optimize-autoloader --no-progress
31+
@make build-phar
32+
@make create-symlink
3033
$(call title,"Show difference in composer.lock")
31-
@$(PHP_BIN) composer-diff --output=markdown
34+
@$(PHP_BIN) `pwd`/vendor/bin/composer-diff --output=markdown
35+
36+
37+
create-symlink: ##@Project Create Symlink (alias for testing)
38+
@ln -sfv `pwd`/build/composer-diff.phar `pwd`/vendor/bin/composer-diff
3239

3340

3441
test-all: ##@Project Run all project tests at once

composer.json

+7-15
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,15 @@
2323
"ext-json" : "*",
2424
"ext-filter" : "*",
2525

26-
"jbzoo/data" : "^4.2.0",
27-
"symfony/console" : ">=4.4",
28-
"symfony/process" : ">=4.4",
29-
"composer/semver" : ">=1.0"
26+
"jbzoo/data" : "^4.3.0",
27+
"symfony/console" : "^4.4|^5.0",
28+
"symfony/process" : "^4.4|^5.0",
29+
"composer/semver" : "^1.0|^2.0|^3.0"
3030
},
3131

3232
"require-dev" : {
33-
"jbzoo/utils" : "^4.3.0",
34-
"jbzoo/phpunit" : "^4.7.0",
35-
"jbzoo/codestyle" : "^2.10.0",
36-
"jbzoo/toolbox-ci" : "^1.3.5",
37-
"symfony/var-dumper" : "^4.4|^5.2.5",
38-
"php-coveralls/php-coveralls" : "^2.4.3",
39-
"roave/security-advisories" : "dev-master"
33+
"jbzoo/toolbox-dev" : "^2.13.1",
34+
"roave/security-advisories" : "dev-master"
4035
},
4136

4237
"autoload" : {
@@ -51,10 +46,7 @@
5146

5247
"bin" : ["composer-diff"],
5348
"config" : {
54-
"optimize-autoloader" : true,
55-
"platform" : {
56-
"php" : "7.2"
57-
}
49+
"optimize-autoloader" : true
5850
},
5951

6052
"extra" : {

0 commit comments

Comments
 (0)