Skip to content

Commit ddaccec

Browse files
authored
Merge pull request AydinHassan#10 from AydinHassan/php8
PHP8
2 parents 521f9ac + 5fe5ca5 commit ddaccec

Some content is hidden

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

46 files changed

+1521
-1076
lines changed

.github/workflows/build.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CliMdRenderer
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
php: [7.1, 7.2, 7.3, 7.4, 8.0]
16+
17+
name: PHP ${{ matrix.php }}
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v2
21+
22+
- name: Setup PHP
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: ${{ matrix.php }}
26+
tools: composer:v1
27+
28+
- name: Install Dependencies
29+
run: composer update
30+
31+
- name: Run phpunit tests
32+
run: |
33+
mkdir -p build/logs
34+
vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml
35+
36+
- name: Run phpcs
37+
run: composer cs
38+
39+
- name: Run phpstan
40+
run: composer static
41+
42+
- name: Coverage upload
43+
if: matrix.php == '7.4'
44+
run: bash <(curl -s https://codecov.io/bash)
45+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
data
33
/vendor/
44
public/assets/vendor/
5+
.phpunit.result.cache

.scrutinizer.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
CLI Markdown Renderer
22
===========
3-
[![Build Status](https://img.shields.io/travis/AydinHassan/cli-md-renderer.svg?style=flat-square&label=Linux)](https://travis-ci.org/AydinHassan/cli-md-renderer)
3+
<img src="https://github.com/AydinHassan/cli-md-renderer/workflows/CliMdRenderer/badge.svg">
4+
5+
[![Build Status](https://github.com/AydinHassan/cli-md-renderer/workflows/CliMdRenderer/badge.svg)](https://github.com/AydinHassan/cli-md-renderer/actions)
46
[![Windows Build Status](https://img.shields.io/appveyor/ci/AydinHassan/cli-md-renderer/master.svg?style=flat-square&label=Windows)](https://ci.appveyor.com/project/AydinHassan/cli-md-renderer)
57
[![Coverage Status](https://img.shields.io/codecov/c/github/AydinHassan/cli-md-renderer.svg?style=flat-square)](https://codecov.io/github/AydinHassan/cli-md-renderer)
6-
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/AydinHassan/cli-md-renderer.svg?style=flat-square)](https://scrutinizer-ci.com/g/AydinHassan/cli-md-renderer/)
78

89
### Usage
910

composer.json

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@
99
}
1010
],
1111
"require" : {
12-
"php" : ">=5.6",
13-
"league/commonmark": "^0.13",
12+
"php" : ">=7.1",
13+
"league/commonmark": "^1.5.6",
1414
"kadet/keylighter": "^0.8.3",
1515
"kevinlebrun/colors.php": "^1.0"
1616
},
1717
"require-dev": {
18-
"phpunit/phpunit": "^5.7",
19-
"squizlabs/php_codesniffer": "~2.0"
18+
"phpunit/phpunit": "^7.0 | ^8.0 | ^9.0",
19+
"squizlabs/php_codesniffer": "^3.0",
20+
"phpstan/phpstan": "^0.12.50"
2021
},
2122
"autoload" : {
2223
"psr-4" : {
@@ -25,5 +26,16 @@
2526
},
2627
"autoload-dev": {
2728
"psr-4": { "AydinHassan\\CliMdRendererTest\\": "test/" }
29+
},
30+
"scripts" : {
31+
"cs" : [
32+
"phpcs src --standard=PSR12 --encoding=UTF-8",
33+
"phpcs test --standard=PSR12 --encoding=UTF-8"
34+
],
35+
"cs-fix" : [
36+
"phpcbf src --standard=PSR12 --encoding=UTF-8",
37+
"phpcbf test --standard=PSR12 --encoding=UTF-8"
38+
],
39+
"static": "phpstan --ansi analyse --level max src"
2840
}
2941
}

0 commit comments

Comments
 (0)