Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add iio/libmergepdf PHP 8.2 support patch #68

Merged
merged 3 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
{
"require": {
"textalk/websocket": "^1.5",
"iio/libmergepdf": "^4.0"
"iio/libmergepdf": "^4.0",
"cweagans/composer-patches": "^1.7"
},
"config": {
"allow-plugins": {
"cweagans/composer-patches": true
}
},
"extra": {
"composer-exit-on-patch-failure": true,
"patches": {
"iio/libmergepdf": {
"Add PHP 8.2 support": "patches/iio-libmergepdf-support-php82.patch"
}
}
}
}
52 changes: 50 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

67 changes: 67 additions & 0 deletions patches/iio-libmergepdf-support-php82.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
diff --git a/vendor/iio/libmergepdf/tcpdi/fpdf_tpl.php b/vendor/iio/libmergepdf/tcpdi/fpdf_tpl.php
index 0da7d7b..5322fa8 100644
--- a/vendor/iio/libmergepdf/tcpdi/fpdf_tpl.php
+++ b/vendor/iio/libmergepdf/tcpdi/fpdf_tpl.php
@@ -145,7 +145,7 @@ class FPDF_TPL extends FPDF {
function endTemplate() {
if (is_subclass_of($this, 'TCPDF')) {
$args = func_get_args();
- return call_user_func_array(array($this, 'TCPDF::endTemplate'), $args);
+ return call_user_func_array(array('TCPDF', 'endTemplate'), $args);
}

if ($this->_intpl) {
@@ -275,7 +275,7 @@ class FPDF_TPL extends FPDF {
public function SetFont($family, $style = '', $size = 0, $fontfile='', $subset='default', $out=true) {
if (is_subclass_of($this, 'TCPDF')) {
$args = func_get_args();
- return call_user_func_array(array($this, 'TCPDF::SetFont'), $args);
+ return call_user_func_array(array('TCPDF', 'SetFont'), $args);
}

parent::SetFont($family, $style, $size);
@@ -299,7 +299,7 @@ class FPDF_TPL extends FPDF {
) {
if (is_subclass_of($this, 'TCPDF')) {
$args = func_get_args();
- return call_user_func_array(array($this, 'TCPDF::Image'), $args);
+ return call_user_func_array(array('TCPDF', 'Image'), $args);
}

$ret = parent::Image($file, $x, $y, $w, $h, $type, $link);
@@ -320,7 +320,7 @@ class FPDF_TPL extends FPDF {
function AddPage($orientation = '', $format = '', $keepmargins = false, $tocpage = false) {
if (is_subclass_of($this, 'TCPDF')) {
$args = func_get_args();
- return call_user_func_array(array($this, 'TCPDF::AddPage'), $args);
+ return call_user_func_array(array('TCPDF', 'AddPage'), $args);
}

if ($this->_intpl)
@@ -335,7 +335,7 @@ class FPDF_TPL extends FPDF {
function Link($x, $y, $w, $h, $link, $spaces = 0) {
if (is_subclass_of($this, 'TCPDF')) {
$args = func_get_args();
- return call_user_func_array(array($this, 'TCPDF::Link'), $args);
+ return call_user_func_array(array('TCPDF', 'Link'), $args);
}

if ($this->_intpl)
@@ -347,7 +347,7 @@ class FPDF_TPL extends FPDF {
function AddLink() {
if (is_subclass_of($this, 'TCPDF')) {
$args = func_get_args();
- return call_user_func_array(array($this, 'TCPDF::AddLink'), $args);
+ return call_user_func_array(array('TCPDF', 'AddLink'), $args);
}

if ($this->_intpl)
@@ -358,7 +358,7 @@ class FPDF_TPL extends FPDF {
function SetLink($link, $y = 0, $page = -1) {
if (is_subclass_of($this, 'TCPDF')) {
$args = func_get_args();
- return call_user_func_array(array($this, 'TCPDF::SetLink'), $args);
+ return call_user_func_array(array('TCPDF', 'SetLink'), $args);
}

if ($this->_intpl)
18 changes: 18 additions & 0 deletions vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

// autoload.php @generated by Composer

if (PHP_VERSION_ID < 50600) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, $err);
} elseif (!headers_sent()) {
echo $err;
}
}
trigger_error(
$err,
E_USER_ERROR
);
}

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInitff8ca5c94912b5ce3ac82b5c9f2b4776::getLoader();
Loading
Loading