Skip to content

Commit 37d058c

Browse files
committed
feat: update slim
1 parent 9616dc6 commit 37d058c

File tree

8 files changed

+98
-4349
lines changed

8 files changed

+98
-4349
lines changed

.github/workflows/phpunit.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: PHPUnit
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test:
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
fail-fast: true
19+
matrix:
20+
php: [ 8.0, 8.1, 8.2, 8.3 ]
21+
22+
name: PHP ${{ matrix.php }}
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: Setup PHP
28+
uses: shivammathur/setup-php@v2
29+
with:
30+
php-version: ${{ matrix.php }}
31+
tools: composer:v2
32+
coverage: xdebug
33+
34+
- name: Validate composer.json and composer.lock
35+
run: composer validate --strict
36+
37+
- name: Install dependencies
38+
run: composer install --prefer-dist --no-progress
39+
40+
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
41+
# Docs: https://getcomposer.org/doc/articles/scripts.md
42+
43+
- name: Run test suite
44+
run: composer run-script test
45+
46+
- name: Run Coveralls
47+
env:
48+
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
COVERALLS_PARALLEL: true
50+
COVERALLS_FLAG_NAME: ${{ runner.os }} - ${{ matrix.php }}
51+
run: ./vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v
52+
53+
upload-coverage:
54+
runs-on: ubuntu-latest
55+
needs: [ test ]
56+
steps:
57+
- name: Coveralls Finished
58+
uses: coverallsapp/github-action@master
59+
with:
60+
github-token: ${{ secrets.GITHUB_TOKEN }}
61+
parallel-finished: true

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.idea/
22
/vendor/
3-
/build
3+
/build
4+
5+
composer.lock

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Casbin skeleton application with Slim Framework 4
22

3-
[![Build Status](https://travis-ci.org/php-casbin/casbin-with-slim.svg?branch=master)](https://travis-ci.org/php-casbin/casbin-with-slim)
3+
[![PHPUnit](https://github.com/php-casbin/casbin-with-slim/actions/workflows/phpunit.yml/badge.svg)](https://github.com/php-casbin/casbin-with-slim/actions/workflows/phpunit.yml)
44
[![Coverage Status](https://coveralls.io/repos/github/php-casbin/casbin-with-slim/badge.svg)](https://coveralls.io/github/php-casbin/casbin-with-slim)
55
[![Latest Stable Version](https://poser.pugx.org/casbin/casbin-with-slim/v/stable)](https://packagist.org/packages/casbin/casbin-with-slim)
66
[![Total Downloads](https://poser.pugx.org/casbin/casbin-with-slim/downloads)](https://packagist.org/packages/casbin/casbin-with-slim)

composer.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,18 @@
2020
}
2121
],
2222
"require": {
23-
"casbin/casbin": "^2.0",
24-
"monolog/monolog": "^2.0",
25-
"php-di/php-di": "^6.0",
26-
"slim/psr7": "^1.6.1",
27-
"slim/slim": "^4.2",
23+
"casbin/casbin": "^4.0",
24+
"monolog/monolog": "^2.9",
25+
"php-di/php-di": "^6.4",
26+
"slim/psr7": "^1.6",
27+
"slim/slim": "^4.12",
2828
"tuupola/slim-basic-auth": "^3.2"
2929
},
3030
"require-dev": {
31-
"phpunit/phpunit": "^7.5",
32-
"php-coveralls/php-coveralls": "^2.1"
31+
"php-coveralls/php-coveralls": "^2.1",
32+
"phpspec/prophecy": "^1.19",
33+
"phpspec/prophecy-phpunit": "^2.3",
34+
"phpunit/phpunit": "^9.0"
3335
},
3436
"config": {
3537
"process-timeout": 0,

0 commit comments

Comments
 (0)