Skip to content

Commit

Permalink
Fix PHP 8.2 deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaasuni committed Sep 6, 2023
1 parent ed7243f commit 71797ee
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.0.23
8.0.24
2 changes: 1 addition & 1 deletion resources/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ Vcs-Git: https://github.com/~#VENDOR#~/~#PROJECT#~.git
Package: ~#PKGNAME#~
Provides: php-~#PROJECT#~
Architecture: all
Depends: php (>= 5.4.0), php-date, php-tecnickcom-tc-lib-barcode (<< 2.0.0), php-tecnickcom-tc-lib-barcode (>= 1.17.26), php-tecnickcom-tc-lib-color (<< 2.0.0), php-tecnickcom-tc-lib-color (>= 1.14.25), php-tecnickcom-tc-lib-pdf-image (<< 2.0.0), php-tecnickcom-tc-lib-pdf-image (>= 1.4.6), php-tecnickcom-tc-lib-pdf-font (<< 2.0.0), php-tecnickcom-tc-lib-pdf-font (>= 1.11.7), php-tecnickcom-tc-lib-file (<< 2.0.0), php-tecnickcom-tc-lib-file (>= 1.7.25), php-tecnickcom-tc-lib-pdf-encrypt (<< 2.0.0), php-tecnickcom-tc-lib-pdf-encrypt (>= 1.6.21), php-tecnickcom-tc-lib-unicode-data (<< 2.0.0), php-tecnickcom-tc-lib-unicode-data (>= 1.7.19), php-tecnickcom-tc-lib-unicode (<< 2.0.0), php-tecnickcom-tc-lib-unicode (>= 1.4.19), php-tecnickcom-tc-lib-pdf-page (<< 3.0.0), php-tecnickcom-tc-lib-pdf-page (>= 3.1.7), php-tecnickcom-tc-lib-pdf-graph (<< 2.0.0), php-tecnickcom-tc-lib-pdf-graph (>= 1.7.9), ${misc:Depends}
Depends: php (>= 5.4.0), php-date, php-tecnickcom-tc-lib-barcode (<< 2.0.0), php-tecnickcom-tc-lib-barcode (>= 1.17.27), php-tecnickcom-tc-lib-color (<< 2.0.0), php-tecnickcom-tc-lib-color (>= 1.14.26), php-tecnickcom-tc-lib-pdf-image (<< 2.0.0), php-tecnickcom-tc-lib-pdf-image (>= 1.4.7), php-tecnickcom-tc-lib-pdf-font (<< 2.0.0), php-tecnickcom-tc-lib-pdf-font (>= 1.11.8), php-tecnickcom-tc-lib-file (<< 2.0.0), php-tecnickcom-tc-lib-file (>= 1.7.26), php-tecnickcom-tc-lib-pdf-encrypt (<< 2.0.0), php-tecnickcom-tc-lib-pdf-encrypt (>= 1.6.22), php-tecnickcom-tc-lib-unicode-data (<< 2.0.0), php-tecnickcom-tc-lib-unicode-data (>= 1.7.20), php-tecnickcom-tc-lib-unicode (<< 2.0.0), php-tecnickcom-tc-lib-unicode (>= 1.4.20), php-tecnickcom-tc-lib-pdf-page (<< 3.0.0), php-tecnickcom-tc-lib-pdf-page (>= 3.1.8), php-tecnickcom-tc-lib-pdf-graph (<< 2.0.0), php-tecnickcom-tc-lib-pdf-graph (>= 1.7.10), ${misc:Depends}
Description: PHP Barcode library
This library includes PHP classes to generate PDF documents.
20 changes: 10 additions & 10 deletions resources/rpm/rpm.spec
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,25 @@ Requires: php(language) >= 5.4.0
Requires: php-date
Requires: php-pcre
Requires: php-composer(%{c_vendor}/tc-lib-barcode) < 2.0.0
Requires: php-composer(%{c_vendor}/tc-lib-barcode) >= 1.17.26
Requires: php-composer(%{c_vendor}/tc-lib-barcode) >= 1.17.27
Requires: php-composer(%{c_vendor}/tc-lib-color) < 2.0.0
Requires: php-composer(%{c_vendor}/tc-lib-color) >= 1.14.25
Requires: php-composer(%{c_vendor}/tc-lib-color) >= 1.14.26
Requires: php-composer(%{c_vendor}/tc-lib-pdf-image) < 2.0.0
Requires: php-composer(%{c_vendor}/tc-lib-pdf-image) >= 1.4.6
Requires: php-composer(%{c_vendor}/tc-lib-pdf-image) >= 1.4.7
Requires: php-composer(%{c_vendor}/tc-lib-pdf-font) < 2.0.0
Requires: php-composer(%{c_vendor}/tc-lib-pdf-font) >= 1.11.7
Requires: php-composer(%{c_vendor}/tc-lib-pdf-font) >= 1.11.8
Requires: php-composer(%{c_vendor}/tc-lib-file) < 2.0.0
Requires: php-composer(%{c_vendor}/tc-lib-file) >= 1.7.25
Requires: php-composer(%{c_vendor}/tc-lib-file) >= 1.7.26
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) < 2.0.0
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) >= 1.6.21
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) >= 1.6.22
Requires: php-composer(%{c_vendor}/tc-lib-unicode-data) < 2.0.0
Requires: php-composer(%{c_vendor}/tc-lib-unicode-data) >= 1.7.19
Requires: php-composer(%{c_vendor}/tc-lib-unicode-data) >= 1.7.20
Requires: php-composer(%{c_vendor}/tc-lib-unicode) < 2.0.0
Requires: php-composer(%{c_vendor}/tc-lib-unicode) >= 1.4.19
Requires: php-composer(%{c_vendor}/tc-lib-unicode) >= 1.4.20
Requires: php-composer(%{c_vendor}/tc-lib-pdf-page) < 3.0.0
Requires: php-composer(%{c_vendor}/tc-lib-pdf-page) >= 3.1.7
Requires: php-composer(%{c_vendor}/tc-lib-pdf-page) >= 3.1.8
Requires: php-composer(%{c_vendor}/tc-lib-pdf-graph) < 2.0.0
Requires: php-composer(%{c_vendor}/tc-lib-pdf-graph) >= 1.7.9
Requires: php-composer(%{c_vendor}/tc-lib-pdf-graph) >= 1.7.10

Provides: php-composer(%{c_vendor}/%{gh_project}) = %{version}
Provides: php-%{gh_project} = %{version}
Expand Down
2 changes: 1 addition & 1 deletion src/MetaInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ abstract class MetaInfo extends \Com\Tecnick\Pdf\Output
*
* @var string
*/
protected $version = '8.0.23';
protected $version = '8.0.24';

/**
* Time is seconds since EPOCH when the document was created.
Expand Down
8 changes: 4 additions & 4 deletions test/TestUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,31 +32,31 @@ class TestUtil extends TestCase
{
public function bcAssertEqualsWithDelta($expected, $actual, $delta = 0.01, $message = '')
{
if (\is_callable(['parent', 'assertEqualsWithDelta'])) {
if (\is_callable([self::class, 'assertEqualsWithDelta'])) {
return parent::assertEqualsWithDelta($expected, $actual, $delta, $message);
}
return $this->assertEquals($expected, $actual, $message, $delta);
}

public function bcExpectException($exception)
{
if (\is_callable(['parent', 'expectException'])) {
if (\is_callable([self::class, 'expectException'])) {
return parent::expectException($exception);
}
return parent::setExpectedException($exception);
}

public function bcAssertIsResource($res)
{
if (\is_callable(['parent', 'assertIsResource'])) {
if (\is_callable([self::class, 'assertIsResource'])) {
return parent::assertIsResource($res);
}
return parent::assertInternalType('resource', $res);
}

public function bcAssertMatchesRegularExpression($pattern, $string, $message = '')
{
if (\is_callable(['parent', 'assertMatchesRegularExpression'])) {
if (\is_callable([self::class, 'assertMatchesRegularExpression'])) {
return parent::assertMatchesRegularExpression($pattern, $string, $message);
}
return parent::assertRegExp($pattern, $string, $message);
Expand Down

0 comments on commit 71797ee

Please sign in to comment.