Skip to content

Commit f3cd484

Browse files
committed
updated components to 8.2. Fixed type errors and deprecation notices 12h
1 parent 8ffa19a commit f3cd484

11 files changed

Lines changed: 56 additions & 55 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.phpunit.cache
12
.phpunit.result.cache
23
/vendor/
34
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-
"php-coveralls/php-coveralls": "2.5.2",
11-
"phpunit/phpunit": "9.5.21",
12-
"squizlabs/php_codesniffer": "3.7.1"
10+
"php-coveralls/php-coveralls": "2.6.0",
11+
"phpunit/phpunit": "10.3.3",
12+
"squizlabs/php_codesniffer": "3.7.2"
1313
},
1414
"require": {
15-
"phpugph/components": "1.0.7"
15+
"phpugph/components": "1.0.8"
1616
},
1717
"autoload": {
1818
"psr-4": {

phpunit.xml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<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"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
backupGlobals="false"
5+
colors="true"
6+
processIsolation="false"
7+
stopOnFailure="false"
8+
bootstrap="test/bootstrap.php"
9+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd"
10+
cacheDirectory=".phpunit.cache"
11+
backupStaticProperties="false"
1212
>
1313
<testsuites>
1414
<testsuite name="Handlebars Test Suite">
15-
<file>test/HandlebarsCompiler.php</file>
16-
<file>test/HandlebarsData.php</file>
17-
<file>test/HandlebarsException.php</file>
18-
<file>test/HandlebarsHandler.php</file>
19-
<file>test/HandlebarsRuntime.php</file>
20-
<file>test/HandlebarsTokenizer.php</file>
15+
<file>test/HandlebarsCompilerTest.php</file>
16+
<file>test/HandlebarsDataTest.php</file>
17+
<file>test/HandlebarsExceptionTest.php</file>
18+
<file>test/HandlebarsHandlerTest.php</file>
19+
<file>test/HandlebarsRuntimeTest.php</file>
20+
<file>test/HandlebarsTokenizerTest.php</file>
2121
</testsuite>
2222
</testsuites>
23-
24-
<coverage processUncoveredFiles="false" pathCoverage="true">
23+
<coverage pathCoverage="true"/>
24+
<source>
2525
<include>
2626
<directory suffix=".php">./src</directory>
2727
</include>
@@ -30,5 +30,5 @@
3030
<directory>./test</directory>
3131
<file>src/helpers.php</file>
3232
</exclude>
33-
</coverage>
33+
</source>
3434
</phpunit>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/**
1616
* Generated by PHPUnit_SkeletonGenerator on 2016-07-27 at 02:11:00.
1717
*/
18-
class Handlebars_HandlebarsCompiler_Test extends TestCase
18+
class HandlebarsCompilerTest extends TestCase
1919
{
2020
/**
2121
* @var HandlebarsCompiler
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/**
1414
* Generated by PHPUnit_SkeletonGenerator on 2016-07-27 at 02:11:00.
1515
*/
16-
class Handlebars_HandlebarsData_Test extends TestCase
16+
class HandlebarsDataTest extends TestCase
1717
{
1818
/**
1919
* @var HandlebarsData
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/**
1414
* Generated by PHPUnit_SkeletonGenerator on 2016-07-27 at 02:11:00.
1515
*/
16-
class Handlebars_HandlebarsException_Test extends TestCase
16+
class HandlebarsExceptionTest extends TestCase
1717
{
1818
/**
1919
* @var HandlebarsException
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/**
1616
* Generated by PHPUnit_SkeletonGenerator on 2016-07-27 at 02:11:00.
1717
*/
18-
class Handlebars_HandlebarsHandler_Test extends TestCase
18+
class HandlebarsHandlerTest extends TestCase
1919
{
2020
/**
2121
* @var HandlebarsHandler
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/**
1414
* Generated by PHPUnit_SkeletonGenerator on 2016-07-27 at 02:11:00.
1515
*/
16-
class Handlebars_HandlebarsRuntime_Test extends TestCase
16+
class HandlebarsRuntimeTest extends TestCase
1717
{
1818
/**
1919
* Sets up the fixture, for example, opens a network connection.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/**
1414
* Generated by PHPUnit_SkeletonGenerator on 2016-07-27 at 02:11:00.
1515
*/
16-
class Handlebars_HandlebarsTokenizer_Test extends TestCase
16+
class HandlebarsTokenizerTest extends TestCase
1717
{
1818
/**
1919
* @var HandlebarsTokenizer

test/assets/template1.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
$buffer .= ' clearfix">'."\n";
4040
$buffer .= ' <label class="control-label">';
41-
$buffer .= htmlspecialchars($helper['_'](
41+
$buffer .= htmlspecialchars((string) $helper['_'](
4242
'Title',
4343
array(
4444
'name' => '_',
@@ -56,7 +56,7 @@
5656
$buffer .= ' class="form-control"'."\n";
5757
$buffer .= ' name="product_title"'."\n";
5858
$buffer .= ' placeholder="';
59-
$buffer .= htmlspecialchars($helper['_'](
59+
$buffer .= htmlspecialchars((string) $helper['_'](
6060
'What is the name of this product?',
6161
array(
6262
'name' => '_',
@@ -88,7 +88,7 @@
8888
$buffer = '';
8989
$buffer .= "\n";
9090
$buffer .= ' <span class="help-text text-danger">';
91-
$buffer .= htmlspecialchars($data->find('errors.product_title'), ENT_COMPAT, 'UTF-8');
91+
$buffer .= htmlspecialchars($data->find('errors.product_title') ?? '', ENT_COMPAT, 'UTF-8');
9292

9393
$buffer .= '</span>'."\n";
9494
$buffer .= ' ';
@@ -174,7 +174,7 @@
174174

175175
$buffer .= ' clearfix">'."\n";
176176
$buffer .= ' <label class="control-label">';
177-
$buffer .= htmlspecialchars($helper['_'](
177+
$buffer .= htmlspecialchars((string) $helper['_'](
178178
'Detail',
179179
array(
180180
'name' => '_',
@@ -191,7 +191,7 @@
191191
$buffer .= ' class="form-control"'."\n";
192192
$buffer .= ' name="product_detail"'."\n";
193193
$buffer .= ' placeholder="';
194-
$buffer .= htmlspecialchars($helper['_'](
194+
$buffer .= htmlspecialchars((string) $helper['_'](
195195
'Enter some details about this product.',
196196
array(
197197
'name' => '_',
@@ -212,7 +212,7 @@
212212

213213
$buffer .= "\n";
214214
$buffer .= ' <span class="help-text text-danger">';
215-
$buffer .= htmlspecialchars($data->find('errors.product_detail'), ENT_COMPAT, 'UTF-8');
215+
$buffer .= htmlspecialchars($data->find('errors.product_detail') ?? '', ENT_COMPAT, 'UTF-8');
216216

217217
$buffer .= '</span>'."\n";
218218
$buffer .= ' ';
@@ -250,7 +250,7 @@
250250

251251
$buffer .= ' clearfix">'."\n";
252252
$buffer .= ' <label class="control-label">';
253-
$buffer .= htmlspecialchars($helper['_'](
253+
$buffer .= htmlspecialchars((string) $helper['_'](
254254
'Brand',
255255
array(
256256
'name' => '_',
@@ -281,7 +281,7 @@
281281

282282
$buffer .= '"'."\n";
283283
$buffer .= ' value="';
284-
$buffer .= htmlspecialchars($data->find('item.product_brand'), ENT_COMPAT, 'UTF-8');
284+
$buffer .= htmlspecialchars($data->find('item.product_brand') ?? '', ENT_COMPAT, 'UTF-8');
285285

286286
$buffer .= '" />'."\n";
287287
$buffer .= "\n";
@@ -300,7 +300,7 @@
300300
$buffer = '';
301301
$buffer .= "\n";
302302
$buffer .= ' <span class="help-text text-danger">';
303-
$buffer .= htmlspecialchars($data->find('errors.product_brand'), ENT_COMPAT, 'UTF-8');
303+
$buffer .= htmlspecialchars($data->find('errors.product_brand') ?? '', ENT_COMPAT, 'UTF-8');
304304

305305
$buffer .= '</span>'."\n";
306306
$buffer .= ' ';
@@ -348,7 +348,7 @@
348348

349349
$buffer .= ' clearfix">'."\n";
350350
$buffer .= ' <label class="control-label">';
351-
$buffer .= htmlspecialchars($helper['_'](
351+
$buffer .= htmlspecialchars((string) $helper['_'](
352352
'Price',
353353
array(
354354
'name' => '_',
@@ -368,7 +368,7 @@
368368
$buffer .= ' min = "0"'."\n";
369369
$buffer .= ' step = "0.01"'."\n";
370370
$buffer .= ' placeholder="';
371-
$buffer .= htmlspecialchars($helper['_'](
371+
$buffer .= htmlspecialchars((string) $helper['_'](
372372
'How much do you want to sell it for?',
373373
array(
374374
'name' => '_',
@@ -395,7 +395,7 @@
395395
$buffer = '';
396396
$buffer .= "\n";
397397
$buffer .= ' value="';
398-
$buffer .= htmlspecialchars($data->find('product_price'), ENT_COMPAT, 'UTF-8');
398+
$buffer .= htmlspecialchars($data->find('product_price') ?? '', ENT_COMPAT, 'UTF-8');
399399

400400
$buffer .= '"'."\n";
401401
$buffer .= ' ';
@@ -429,7 +429,7 @@
429429
$buffer = '';
430430
$buffer .= "\n";
431431
$buffer .= ' <span class="help-text text-danger">';
432-
$buffer .= htmlspecialchars($data->find('errors.product_price'), ENT_COMPAT, 'UTF-8');
432+
$buffer .= htmlspecialchars($data->find('errors.product_price') ?? '', ENT_COMPAT, 'UTF-8');
433433

434434
$buffer .= '</span>'."\n";
435435
$buffer .= ' ';

0 commit comments

Comments
 (0)