Skip to content

Commit

Permalink
Add PHP 8 support and rename namespace from mageekguy to atoum
Browse files Browse the repository at this point in the history
  • Loading branch information
franck-paul committed Feb 4, 2021
1 parent 3bbaf96 commit 3dd367e
Show file tree
Hide file tree
Showing 19 changed files with 67 additions and 64 deletions.
8 changes: 4 additions & 4 deletions .atoum.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

use
mageekguy\atoum\reports\coverage,
mageekguy\atoum\writers\std
atoum\atoum\reports\coverage,
atoum\atoum\writers\std
;

$script->addDefaultReport();
Expand All @@ -12,5 +12,5 @@
$coverage->setOutPutDirectory(__DIR__ . '/coverage');
$runner->addReport($coverage);

$script->noCodeCoverageForClasses('mageekguy\atoum\reports\asynchronous');
$script->noCodeCoverageForClasses('mageekguy\atoum\report');
$script->noCodeCoverageForClasses('atoum\atoum\reports\asynchronous');
$script->noCodeCoverageForClasses('atoum\atoum\report');
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ php:
- 5.6
- 7.0
- 7.1
- 8.0
- nightly

cache:
Expand All @@ -27,6 +28,8 @@ matrix:
env: COMPOSER_PREFER="--prefer-lowest"
- php: 7.1
env: COMPOSER_PREFER="--prefer-lowest"
- php: 8.0
env: COMPOSER_PREFER="--prefer-lowest"
- php: nightly
env: COMPOSER_PREFER="--prefer-lowest"

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Enable the extension using atoum configuration file:

require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';

use mageekguy\atoum\reports;
use atoum\atoum\reports;

$extension = new reports\extension($script);

Expand All @@ -37,9 +37,9 @@ Add the following code to your configuration file:

// .atoum.php

use mageekguy\atoum\reports;
use mageekguy\atoum\reports\coverage;
use mageekguy\atoum\writers\std;
use atoum\atoum\reports;
use atoum\atoum\reports\coverage;
use atoum\atoum\writers\std;

$script->addDefaultReport();

Expand Down Expand Up @@ -75,13 +75,13 @@ $script->enableBranchAndPathCoverage();
To add generic code coverage for sonar.

```php
$xunit = new \mageekguy\atoum\reports\sonar\xunit();
$writer = new \mageekguy\atoum\writers\file('./sonar-xunit.xml');
$xunit = new \atoum\atoum\reports\sonar\xunit();
$writer = new \atoum\atoum\writers\file('./sonar-xunit.xml');
$xunit->addWriter($writer);
$runner->addReport($xunit);

$clover = new \mageekguy\atoum\reports\sonar\clover();
$writer = new \mageekguy\atoum\writers\file('./sonar-clover.xml');
$clover = new \atoum\atoum\reports\sonar\clover();
$writer = new \atoum\atoum\writers\file('./sonar-clover.xml');
$clover->addWriter($writer);
$runner->addReport($clover);
```
Expand Down
4 changes: 2 additions & 2 deletions classes/coverage.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace mageekguy\atoum\reports;
namespace atoum\atoum\reports;

use mageekguy\atoum;
use atoum\atoum;

class coverage extends asynchronous
{
Expand Down
8 changes: 4 additions & 4 deletions classes/extension.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace mageekguy\atoum\reports;
namespace atoum\atoum\reports;

use mageekguy\atoum;
use mageekguy\atoum\observable;
use mageekguy\atoum\runner;
use atoum\atoum;
use atoum\atoum\observable;
use atoum\atoum\runner;

class extension implements atoum\extension
{
Expand Down
12 changes: 6 additions & 6 deletions classes/fields/runner/event/nyancat.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

namespace mageekguy\atoum\reports\fields\runner\event;
namespace atoum\atoum\reports\fields\runner\event;

use mageekguy\atoum\cli\colorizer;
use mageekguy\atoum\cli\progressBar;
use mageekguy\atoum\report\fields\runner\event\cli;
use mageekguy\atoum\runner;
use mageekguy\atoum\test;
use atoum\atoum\cli\colorizer;
use atoum\atoum\cli\progressBar;
use atoum\atoum\report\fields\runner\event\cli;
use atoum\atoum\runner;
use atoum\atoum\test;

class nyancat extends cli
{
Expand Down
10 changes: 5 additions & 5 deletions classes/fields/runner/event/santa.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace mageekguy\atoum\reports\fields\runner\event;
namespace atoum\atoum\reports\fields\runner\event;

use mageekguy\atoum\cli\colorizer;
use mageekguy\atoum\cli\progressBar;
use mageekguy\atoum\report\fields\runner\event\cli;
use mageekguy\atoum\runner;
use atoum\atoum\cli\colorizer;
use atoum\atoum\cli\progressBar;
use atoum\atoum\report\fields\runner\event\cli;
use atoum\atoum\runner;

class santa extends cli
{
Expand Down
2 changes: 1 addition & 1 deletion classes/model.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace mageekguy\atoum\reports;
namespace atoum\atoum\reports;

abstract class model
{
Expand Down
6 changes: 3 additions & 3 deletions classes/model/coverage.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace mageekguy\atoum\reports\model;
namespace atoum\atoum\reports\model;

use mageekguy\atoum\reports\model;
use mageekguy\atoum\reports\template;
use atoum\atoum\reports\model;
use atoum\atoum\reports\template;

class coverage extends model
{
Expand Down
12 changes: 6 additions & 6 deletions classes/realtime/nyancat.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

namespace mageekguy\atoum\reports\realtime;
namespace atoum\atoum\reports\realtime;

use mageekguy\atoum\cli\colorizer;
use mageekguy\atoum\cli\prompt;
use mageekguy\atoum\report\fields\runner;
use mageekguy\atoum\reports\fields\runner\event\nyancat as nyancatField;
use mageekguy\atoum\reports\realtime;
use atoum\atoum\cli\colorizer;
use atoum\atoum\cli\prompt;
use atoum\atoum\report\fields\runner;
use atoum\atoum\reports\fields\runner\event\nyancat as nyancatField;
use atoum\atoum\reports\realtime;

class nyancat extends realtime
{
Expand Down
16 changes: 8 additions & 8 deletions classes/realtime/santa.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

namespace mageekguy\atoum\reports\realtime;

use mageekguy\atoum\cli\colorizer;
use mageekguy\atoum\cli\prompt;
use mageekguy\atoum\report\fields\runner;
use mageekguy\atoum\report\fields\runner\tests\void\cli;
use mageekguy\atoum\reports\fields\runner\event\santa as santaField;
use mageekguy\atoum\reports\realtime;
namespace atoum\atoum\reports\realtime;

use atoum\atoum\cli\colorizer;
use atoum\atoum\cli\prompt;
use atoum\atoum\report\fields\runner;
use atoum\atoum\report\fields\runner\tests\void\cli;
use atoum\atoum\reports\fields\runner\event\santa as santaField;
use atoum\atoum\reports\realtime;

class santa extends realtime
{
Expand Down
4 changes: 2 additions & 2 deletions classes/score/coverage.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace mageekguy\atoum\reports\score;
namespace atoum\atoum\reports\score;

use mageekguy\atoum\reports\model;
use atoum\atoum\reports\model;

class coverage
{
Expand Down
6 changes: 3 additions & 3 deletions classes/sonar/clover.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace mageekguy\atoum\reports\sonar;
namespace atoum\atoum\reports\sonar;

use mageekguy\atoum;
use mageekguy\atoum\exceptions;
use atoum\atoum;
use atoum\atoum\exceptions;

class clover extends atoum\reports\asynchronous
{
Expand Down
6 changes: 3 additions & 3 deletions classes/sonar/xunit.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace mageekguy\atoum\reports\sonar;
namespace atoum\atoum\reports\sonar;

use mageekguy\atoum;
use mageekguy\atoum\exceptions;
use atoum\atoum;
use atoum\atoum\exceptions;

class xunit extends atoum\reports\asynchronous
{
Expand Down
2 changes: 1 addition & 1 deletion classes/template.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace mageekguy\atoum\reports;
namespace atoum\atoum\reports;

class template
{
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
],
"minimum-stability": "beta",
"require": {
"php": "^5.4.0 || ^7.0.0",
"php": "^5.4.0 || ^7.0.0 || ^8.0.0",
"twig/twig": "^1.18 | ^2.0",
"symfony/filesystem": "^2.6 | ^3.0 | ^4.0",
"atoum/atoum": "^2.9 || ^3.0"
"atoum/atoum": "^2.9 || ^3.0 || ^4.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2"
},
"autoload": {
"psr-4": {
"mageekguy\\atoum\\reports\\": "classes"
"atoum\\atoum\\reports\\": "classes"
},
"files": ["configuration.php"]
}
Expand Down
6 changes: 3 additions & 3 deletions configuration.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

use mageekguy\atoum;
use mageekguy\atoum\scripts;
use atoum\atoum;
use atoum\atoum\scripts;

if (defined('mageekguy\atoum\scripts\runner') === true) {
if (defined('atoum\atoum\scripts\runner') === true) {
scripts\runner::addConfigurationCallable(function (atoum\configurator $script, atoum\runner $runner) {
$extension = new atoum\reports\extension($script);

Expand Down
2 changes: 1 addition & 1 deletion resources/configurations/runner/nyancat.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Sample atoum configuration file to use the Santa report
Do "php path/to/test/file -c path/to/this/file" or "php path/to/atoum/scripts/runner.php -c path/to/this/file -f path/to/test/file" to use it.
*/

use mageekguy\atoum;
use atoum\atoum;

/*
Write all on stdout.
Expand Down
2 changes: 1 addition & 1 deletion resources/configurations/runner/santa.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Sample atoum configuration file to use the Santa report
Do "php path/to/test/file -c path/to/this/file" or "php path/to/atoum/scripts/runner.php -c path/to/this/file -f path/to/test/file" to use it.
*/

use mageekguy\atoum;
use atoum\atoum;

/*
Write all on stdout.
Expand Down

0 comments on commit 3dd367e

Please sign in to comment.