Skip to content

Commit d3f952b

Browse files
author
Christian Blanquera
committed
php 8 compatibilities
1 parent c800be5 commit d3f952b

9 files changed

Lines changed: 36 additions & 41 deletions

.gitignore

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
composer.phar
1+
.phpunit.result.cache
22
/vendor/
3-
4-
# Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file
5-
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
6-
# composer.lock

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
],
88
"license": "MIT",
99
"require-dev": {
10-
"phpunit/phpunit": "7.0.2",
11-
"squizlabs/php_codesniffer": "3.2.3",
12-
"php-coveralls/php-coveralls": "~2.1.0"
10+
"phpunit/phpunit": "^9.5.4",
11+
"squizlabs/php_codesniffer": "^3.5.8",
12+
"php-coveralls/php-coveralls": "^2.4.3"
1313
},
1414
"require": {
15-
"phpugph/components": "~2.2.0"
15+
"phpugph/components": "^1.0.0"
1616
},
1717
"autoload": {
1818
"psr-4": {

phpunit.xml

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
3-
<phpunit backupGlobals="false"
4-
backupStaticAttributes="false"
5-
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
processIsolation="false"
10-
stopOnFailure="false"
11-
syntaxCheck="false"
12-
bootstrap="test/bootstrap.php"
2+
<phpunit
3+
backupGlobals="false"
4+
backupStaticAttributes="false"
5+
colors="true"
6+
convertErrorsToExceptions="true"
7+
convertNoticesToExceptions="true"
8+
convertWarningsToExceptions="true"
9+
processIsolation="false"
10+
stopOnFailure="false"
11+
bootstrap="test/bootstrap.php"
1312
>
1413
<testsuites>
1514
<testsuite name="Handlebars Test Suite">
@@ -22,14 +21,14 @@
2221
</testsuite>
2322
</testsuites>
2423

25-
<filter>
26-
<whitelist>
24+
<coverage>
25+
<include>
2726
<directory suffix=".php">./src</directory>
28-
<exclude>
29-
<directory>./vendor</directory>
30-
<directory>./test</directory>
31-
<file>src/helpers.php</file>
32-
</exclude>
33-
</whitelist>
34-
</filter>
27+
</include>
28+
<exclude>
29+
<directory>./vendor</directory>
30+
<directory>./test</directory>
31+
<file>src/helpers.php</file>
32+
</exclude>
33+
</coverage>
3534
</phpunit>

test/HandlebarsCompiler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class Handlebars_HandlebarsCompiler_Test extends TestCase
4141
* Sets up the fixture, for example, opens a network connection.
4242
* This method is called before a test is executed.
4343
*/
44-
protected function setUp()
44+
protected function setUp(): void
4545
{
4646
$handler = new HandlebarsHandler;
4747
$this->source = file_get_contents(__DIR__.'/assets/tokenizer.html');
@@ -55,7 +55,7 @@ protected function setUp()
5555
* Tears down the fixture, for example, closes a network connection.
5656
* This method is called after a test is executed.
5757
*/
58-
protected function tearDown()
58+
protected function tearDown(): void
5959
{
6060
}
6161

test/HandlebarsData.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Handlebars_HandlebarsData_Test extends TestCase
2424
* Sets up the fixture, for example, opens a network connection.
2525
* This method is called before a test is executed.
2626
*/
27-
protected function setUp()
27+
protected function setUp(): void
2828
{
2929
$this->object = new HandlebarsData([
3030
'product_id' => 123,
@@ -41,7 +41,7 @@ protected function setUp()
4141
* Tears down the fixture, for example, closes a network connection.
4242
* This method is called after a test is executed.
4343
*/
44-
protected function tearDown()
44+
protected function tearDown(): void
4545
{
4646
}
4747

test/HandlebarsException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Handlebars_HandlebarsException_Test extends TestCase
2424
* Sets up the fixture, for example, opens a network connection.
2525
* This method is called before a test is executed.
2626
*/
27-
protected function setUp()
27+
protected function setUp(): void
2828
{
2929
$this->object = new HandlebarsException;
3030
}
@@ -33,7 +33,7 @@ protected function setUp()
3333
* Tears down the fixture, for example, closes a network connection.
3434
* This method is called after a test is executed.
3535
*/
36-
protected function tearDown()
36+
protected function tearDown(): void
3737
{
3838
}
3939

test/HandlebarsHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Handlebars_HandlebarsHandler_Test extends TestCase
2626
* Sets up the fixture, for example, opens a network connection.
2727
* This method is called before a test is executed.
2828
*/
29-
protected function setUp()
29+
protected function setUp(): void
3030
{
3131
$this->object = new HandlebarsHandler;
3232
}
@@ -35,7 +35,7 @@ protected function setUp()
3535
* Tears down the fixture, for example, closes a network connection.
3636
* This method is called after a test is executed.
3737
*/
38-
protected function tearDown()
38+
protected function tearDown(): void
3939
{
4040
}
4141

test/HandlebarsRuntime.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Handlebars_HandlebarsRuntime_Test extends TestCase
1919
* Sets up the fixture, for example, opens a network connection.
2020
* This method is called before a test is executed.
2121
*/
22-
protected function setUp()
22+
protected function setUp(): void
2323
{
2424
//reset the helpers and partials after every test
2525
HandlebarsHandler::i()->reset();
@@ -29,7 +29,7 @@ protected function setUp()
2929
* Tears down the fixture, for example, closes a network connection.
3030
* This method is called after a test is executed.
3131
*/
32-
protected function tearDown()
32+
protected function tearDown(): void
3333
{
3434
}
3535

test/HandlebarsTokenizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Handlebars_HandlebarsTokenizer_Test extends TestCase
2929
* Sets up the fixture, for example, opens a network connection.
3030
* This method is called before a test is executed.
3131
*/
32-
protected function setUp()
32+
protected function setUp(): void
3333
{
3434
$this->source = file_get_contents(__DIR__.'/assets/tokenizer.html');
3535
$this->object = new HandlebarsTokenizer($this->source);
@@ -39,7 +39,7 @@ protected function setUp()
3939
* Tears down the fixture, for example, closes a network connection.
4040
* This method is called after a test is executed.
4141
*/
42-
protected function tearDown()
42+
protected function tearDown(): void
4343
{
4444
}
4545

0 commit comments

Comments
 (0)