Skip to content

Commit 5668fc6

Browse files
committed
feat(#51): finalize migration + cleanup
1 parent 3dd367e commit 5668fc6

File tree

18 files changed

+126
-98
lines changed

18 files changed

+126
-98
lines changed

.github/workflows/linux.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Linux
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- 4.x
8+
pull_request:
9+
10+
jobs:
11+
ubuntu-latest:
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
php-versions: [ '7.2', '7.3' ]
17+
coverage: [ none ]
18+
include:
19+
- php-versions: '7.4'
20+
coverage: xdebug
21+
# see https://github.com/marketplace/actions/setup-php-action#nightly-build-setup
22+
- php-versions: '8.0'
23+
experimental: true
24+
- php-versions: '8.1'
25+
experimental: true
26+
fail-fast: false
27+
28+
name: PHP ${{ matrix.php-versions }} on ubuntu-latest
29+
30+
steps:
31+
- name: PHP
32+
uses: shivammathur/setup-php@v2
33+
with:
34+
php-version: ${{ matrix.php-versions }}
35+
coverage: ${{ matrix.coverage }}
36+
37+
- name: Checkout
38+
uses: actions/checkout@v2
39+
40+
- name: Get composer cache directory
41+
id: composer-cache
42+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
43+
44+
- name: Cache dependencies
45+
uses: actions/cache@v2
46+
with:
47+
path: ${{ steps.composer-cache.outputs.dir }}
48+
key: ${{ runner.os }}-${{ matrix.php-versions }}-composer-${{ hashFiles('**/composer.json') }}
49+
restore-keys: ${{ runner.os }}-${{ matrix.php-versions }}-composer-
50+
51+
- name: Install dependencies
52+
run: composer install --prefer-dist
53+
54+
- name: Run
55+
run: vendor/bin/atoum --enable-branch-and-path-coverage --test-ext

.php_cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ return
1414
'native_function_casing' => true,
1515
'no_blank_lines_after_class_opening' => true,
1616
'no_unused_imports' => true,
17-
'no_unused_imports' => true,
1817
'no_whitespace_in_blank_line' => true,
1918
'ordered_imports' => true,
2019
'phpdoc_no_access' => true,

.styleci.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1+
risky: true
2+
13
preset: psr2
24

35
enabled:
4-
- blankline_after_open_tag
6+
- alpha_ordered_imports
7+
- blank_line_after_opening_tag
8+
- cast_spaces
59
- concat_with_spaces
6-
- join_function
710
- native_function_casing
11+
- no_alias_functions
812
- no_blank_lines_after_class_opening
9-
- ordered_use
13+
- no_leading_import_slash
14+
- no_unused_imports
15+
- no_whitespace_in_blank_line
1016
- phpdoc_no_access
11-
- remove_leading_slash_use
1217
- self_accessor
1318
- short_array_syntax
14-
- spaces_cast
15-
- unused_use
16-
- whitespacy_lines
1719

1820
finder:
1921
exclude:
@@ -24,4 +26,5 @@ finder:
2426
path:
2527
- "."
2628
not-path:
29+
- "resources/templates"
2730
- "resources/html"

.travis.yml

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

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 4.0.0 - 2020-02-05
2+
3+
* [#53](https://github.com/atoum/reports-extension/pull/53) Compatibility with atoum 4 & PHP 8 ([@franck-paul] & [@Grummfy])
4+
15
# 3.0.0 - 2017-10-02
26

37
* [#46](https://github.com/atoum/reports-extension/pull/46) Remove the telemetry report ([@jubianchi])
@@ -65,3 +69,5 @@
6569
[@jubianchi]: https://github.com/jubianchi
6670
[@ppaulis]: https://github.com/ppaulis
6771
[@vonglasow]: https://github.com/vonglasow
72+
[@Grummfy]: https://github.com/Grummfy
73+
[@franck-paul]: https://github.com/franck-paul

classes/coverage/html.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22

3-
namespace mageekguy\atoum\reports\coverage;
3+
namespace atoum\atoum\reports\coverage;
44

5-
use mageekguy\atoum;
6-
use mageekguy\atoum\reports\coverage;
7-
use mageekguy\atoum\reports\model;
8-
use mageekguy\atoum\reports\score;
5+
use atoum\atoum;
6+
use atoum\atoum\reports\coverage;
7+
use atoum\atoum\reports\model;
8+
use atoum\atoum\reports\score;
99

1010
class html extends coverage
1111
{

classes/model/coverage/klass.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
namespace mageekguy\atoum\reports\model\coverage;
3+
namespace atoum\atoum\reports\model\coverage;
44

5-
use mageekguy\atoum\reports\model;
6-
use mageekguy\atoum\reports\model\coverage;
7-
use mageekguy\atoum\reports\template;
5+
use atoum\atoum\reports\model;
6+
use atoum\atoum\reports\model\coverage;
7+
use atoum\atoum\reports\template;
88

99
class klass extends model
1010
{

classes/model/coverage/method.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace mageekguy\atoum\reports\model\coverage;
3+
namespace atoum\atoum\reports\model\coverage;
44

5-
use mageekguy\atoum\reports\model;
6-
use mageekguy\atoum\reports\template;
5+
use atoum\atoum\reports\model;
6+
use atoum\atoum\reports\template;
77

88
class method extends model
99
{

classes/template.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
namespace atoum\atoum\reports;
44

5+
use Twig\Loader\FilesystemLoader;
6+
use Twig\Environment;
7+
58
class template
69
{
710
private $source;
@@ -11,7 +14,7 @@ public function __construct($source)
1114
{
1215
$this->source = $source;
1316

14-
$this->twig = new \Twig_Environment(new \Twig_Loader_Filesystem([__DIR__ . '/../resources/html/templates']));
17+
$this->twig = new Environment(new FilesystemLoader([__DIR__ . '/../resources/html/templates']));
1518
}
1619

1720
public function render(array $model, $destination)

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
],
1414
"minimum-stability": "beta",
1515
"require": {
16-
"php": "^5.4.0 || ^7.0.0 || ^8.0.0",
17-
"twig/twig": "^1.18 | ^2.0",
18-
"symfony/filesystem": "^2.6 | ^3.0 | ^4.0",
19-
"atoum/atoum": "^2.9 || ^3.0 || ^4.0"
16+
"php": "^7.2 || ^8.0.0",
17+
"twig/twig": "^3.0",
18+
"symfony/filesystem": "^5.0",
19+
"atoum/atoum": "^4.0"
2020
},
2121
"require-dev": {
2222
"friendsofphp/php-cs-fixer": "^2"

0 commit comments

Comments
 (0)