From beb00000bc11b8377ad9035cae559eda56508650 Mon Sep 17 00:00:00 2001
From: Nguyen Van Bach
Date: Tue, 18 Jun 2024 20:20:55 +0700
Subject: [PATCH 01/13] chore: add development guide
---
DEVELOPMENT.md | 12 ++++++++++++
1 file changed, 12 insertions(+)
create mode 100644 DEVELOPMENT.md
diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md
new file mode 100644
index 0000000..500ca20
--- /dev/null
+++ b/DEVELOPMENT.md
@@ -0,0 +1,12 @@
+## Development
+
+```bash
+# 1. Build docker image for developing (first time only)
+$ docker-compose build
+
+# 2. Composer installing (first time only)
+$ docker-compose run --rm php composer install
+
+# 3. Execute phpunit
+$ docker-compose run --rm php vendor/bin/phpunit
+```
From b70ebd1a0c1cf8ddec3f2d4a59e1b2378484a9e2 Mon Sep 17 00:00:00 2001
From: Nguyen Van Bach
Date: Tue, 18 Jun 2024 20:21:21 +0700
Subject: [PATCH 02/13] chore: add .editorconfig
---
.editorconfig | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 .editorconfig
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..6842602
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,21 @@
+; This file is for unifying the coding style for different editors and IDEs.
+; More information at http://editorconfig.org
+
+root = true
+
+[*]
+indent_style = space
+indent_size = 4
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[*.bat]
+end_of_line = crlf
+
+[*.yml]
+indent_style = space
+indent_size = 2
+
+[*.md]
+trim_trailing_whitespace = false
From 21b32def3577f36f96f6a511c3e5b728557018d8 Mon Sep 17 00:00:00 2001
From: Nguyen Van Bach
Date: Tue, 18 Jun 2024 20:21:42 +0700
Subject: [PATCH 03/13] chore: add docker files
---
.docker/php/000-default.conf | 15 +++++++++++++++
.docker/php/Dockerfile | 23 +++++++++++++++++++++++
.docker/php/php.ini | 0
docker-compose.yml | 13 +++++++++++++
4 files changed, 51 insertions(+)
create mode 100644 .docker/php/000-default.conf
create mode 100644 .docker/php/Dockerfile
create mode 100644 .docker/php/php.ini
create mode 100644 docker-compose.yml
diff --git a/.docker/php/000-default.conf b/.docker/php/000-default.conf
new file mode 100644
index 0000000..8a1a891
--- /dev/null
+++ b/.docker/php/000-default.conf
@@ -0,0 +1,15 @@
+
+
+ ServerAdmin webmaster@localhost
+ DocumentRoot /var/www/html/webroot
+
+ ErrorLog ${APACHE_LOG_DIR}/error.log
+ CustomLog ${APACHE_LOG_DIR}/access.log combined
+
+
+ Options Indexes FollowSymLinks
+ AllowOverride All
+ Require all granted
+
+
+
diff --git a/.docker/php/Dockerfile b/.docker/php/Dockerfile
new file mode 100644
index 0000000..343026d
--- /dev/null
+++ b/.docker/php/Dockerfile
@@ -0,0 +1,23 @@
+FROM php:7.2-apache
+
+LABEL author="guenbakku"
+
+# Install CakePHP required extensions
+RUN apt-get update && apt-get install -y \
+ libfreetype6-dev \
+ libjpeg62-turbo-dev \
+ libpng-dev \
+ libicu-dev \
+ && docker-php-ext-install -j$(nproc) intl \
+ && docker-php-ext-install -j$(nproc) pdo_mysql \
+ && pecl install xdebug \
+ && docker-php-ext-enable xdebug
+
+# Install zip & git (Required for composer install)
+RUN apt-get install -y git zip
+
+# Install Composer
+RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
+
+# Enable apache rewrite module
+RUN ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load
diff --git a/.docker/php/php.ini b/.docker/php/php.ini
new file mode 100644
index 0000000..e69de29
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..4a80a92
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,13 @@
+version: '3'
+
+services:
+ php:
+ build: ./.docker/php
+ image: php:7.2-apache-cakephp3
+ container_name: cakepdf
+ volumes:
+ - ./.docker/php/php.ini:/usr/local/etc/php/php.ini
+ - ./.docker/php/000-default.conf:/etc/apache2/sites-enabled/000-default.conf
+ - ./:/var/www/html
+ ports:
+ - 8080:80
From d6f496788fb2524134f7cfda0057461429a565ff Mon Sep 17 00:00:00 2001
From: Nguyen Van Bach
Date: Tue, 18 Jun 2024 20:31:27 +0700
Subject: [PATCH 04/13] chore: rename vendor dir to default name `vendor`
---
.gitignore | 5 +++--
composer.json | 5 +----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/.gitignore b/.gitignore
index 64e94ec..89c98f0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
-/vendors/*
-/tests/Coverage/*
+/vendors
+/vendor
+/tests/Coverage
diff --git a/composer.json b/composer.json
index 80ecb2c..08dc2d6 100644
--- a/composer.json
+++ b/composer.json
@@ -22,8 +22,5 @@
"psr-4": {
"Guenbakku\\Cakepdf\\": "src"
}
- },
- "config": {
- "vendor-dir": "vendors/"
- }
+ }
}
From 71a4d6925e65dd02052fd97761bdb0e03ab3646c Mon Sep 17 00:00:00 2001
From: Nguyen Van Bach
Date: Tue, 18 Jun 2024 21:07:22 +0700
Subject: [PATCH 05/13] chore: bump h4cc/wkhtmltopdf to 0.12.4
---
composer.json | 4 ++--
composer.lock | 40 +++++++++++++++++++++++++++-------------
2 files changed, 29 insertions(+), 15 deletions(-)
diff --git a/composer.json b/composer.json
index 08dc2d6..9646ab5 100644
--- a/composer.json
+++ b/composer.json
@@ -12,8 +12,8 @@
"require": {
"php": ">=5.6",
"knplabs/knp-snappy": "^0.5.0",
- "h4cc/wkhtmltopdf-i386": "^0.12.3",
- "h4cc/wkhtmltopdf-amd64": "^0.12.3"
+ "h4cc/wkhtmltopdf-i386": "^0.12.4",
+ "h4cc/wkhtmltopdf-amd64": "^0.12.4"
},
"require-dev": {
"phpunit/phpunit": "^5.7|^6.0"
diff --git a/composer.lock b/composer.lock
index e633896..d90adef 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1,29 +1,34 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
- "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "16fb00f7b2f2b4d29963c3249a220d1e",
+ "content-hash": "217a95ef26d669bf05aa57a178fb935f",
"packages": [
{
"name": "h4cc/wkhtmltopdf-amd64",
- "version": "0.12.3",
+ "version": "0.12.4",
"source": {
"type": "git",
"url": "https://github.com/h4cc/wkhtmltopdf-amd64.git",
- "reference": "b80ce6720349e98cebac7e8a19426455805fa7e1"
+ "reference": "4e2ab2d032a5d7fbe2a741de8b10b8989523c95b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/h4cc/wkhtmltopdf-amd64/zipball/b80ce6720349e98cebac7e8a19426455805fa7e1",
- "reference": "b80ce6720349e98cebac7e8a19426455805fa7e1",
+ "url": "https://api.github.com/repos/h4cc/wkhtmltopdf-amd64/zipball/4e2ab2d032a5d7fbe2a741de8b10b8989523c95b",
+ "reference": "4e2ab2d032a5d7fbe2a741de8b10b8989523c95b",
"shasum": ""
},
"bin": [
"bin/wkhtmltopdf-amd64"
],
"type": "library",
+ "autoload": {
+ "psr-4": {
+ "h4cc\\WKHTMLToPDF\\": ""
+ }
+ },
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL Version 3"
@@ -44,20 +49,24 @@
"thumbnail",
"wkhtmltopdf"
],
- "time": "2016-02-02T19:38:55+00:00"
+ "support": {
+ "issues": "https://github.com/h4cc/wkhtmltopdf-amd64/issues",
+ "source": "https://github.com/h4cc/wkhtmltopdf-amd64/tree/master"
+ },
+ "time": "2018-01-15T06:57:33+00:00"
},
{
"name": "h4cc/wkhtmltopdf-i386",
- "version": "0.12.3",
+ "version": "0.12.4",
"source": {
"type": "git",
"url": "https://github.com/h4cc/wkhtmltopdf-i386.git",
- "reference": "79f2f8ed78d35f5541beceb2ec6fcd01a76e05ba"
+ "reference": "da14486ec8eba1873b026b56126ed02d2f2ae5e3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/h4cc/wkhtmltopdf-i386/zipball/79f2f8ed78d35f5541beceb2ec6fcd01a76e05ba",
- "reference": "79f2f8ed78d35f5541beceb2ec6fcd01a76e05ba",
+ "url": "https://api.github.com/repos/h4cc/wkhtmltopdf-i386/zipball/da14486ec8eba1873b026b56126ed02d2f2ae5e3",
+ "reference": "da14486ec8eba1873b026b56126ed02d2f2ae5e3",
"shasum": ""
},
"bin": [
@@ -84,7 +93,11 @@
"thumbnail",
"wkhtmltopdf"
],
- "time": "2016-02-02T19:38:57+00:00"
+ "support": {
+ "issues": "https://github.com/h4cc/wkhtmltopdf-i386/issues",
+ "source": "https://github.com/h4cc/wkhtmltopdf-i386/tree/master"
+ },
+ "time": "2018-01-15T07:18:15+00:00"
},
{
"name": "knplabs/knp-snappy",
@@ -1660,5 +1673,6 @@
"platform": {
"php": ">=5.6"
},
- "platform-dev": []
+ "platform-dev": [],
+ "plugin-api-version": "2.1.0"
}
From 72f791ca39a93fa789ac0492d31d821d442ceab3 Mon Sep 17 00:00:00 2001
From: Nguyen Van Bach
Date: Tue, 18 Jun 2024 21:21:52 +0700
Subject: [PATCH 06/13] test: minor improvement in test case
---
tests/TestCase/PdfTest.php | 30 ++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/tests/TestCase/PdfTest.php b/tests/TestCase/PdfTest.php
index cb1c4b9..bb323e1 100644
--- a/tests/TestCase/PdfTest.php
+++ b/tests/TestCase/PdfTest.php
@@ -4,20 +4,22 @@
use Guenbakku\Cakepdf\Pdf;
class PdfTest extends TestCase {
-
+
+ protected $output;
+
public function setUp() {
$this->output = dirname(__FILE__)."/pdfTest.pdf";
if (is_file($this->output)) {
unlink($this->output);
}
}
-
+
public function tearDown() {
if (is_file($this->output)) {
unlink($this->output);
}
}
-
+
public function testInstanceSnappy() {
$Pdf = new Pdf();
@@ -27,18 +29,18 @@ public function testInstanceSnappy() {
} else {
$binary = 'wkhtmltopdf-amd64';
}
-
+
$binary = implode(DS, array(
VENDOR, 'bin', $binary
));
-
+
$Snappy = new Knp\Snappy\Pdf($binary);
-
+
$this->assertEquals($Snappy, $Pdf->getSnappy());
}
public function testSetVendorManually() {
- $Pdf = new Pdf('vendors');
+ $Pdf = new Pdf('vendor');
$this->assertEquals(true, $Pdf instanceof Pdf);
}
@@ -48,7 +50,7 @@ public function testSetVendorManually() {
public function testNotFoundVendorFullPath() {
$Pdf = new Pdf('xxx');
}
-
+
public function testSetOuput() {
$Pdf = new Pdf();
$Pdf->add('Test
');
@@ -62,14 +64,14 @@ public function testGetOutput() {
$Pdf->setOutput($this->output);
$this->assertEquals($this->output, $Pdf->getOutput());
}
-
+
public function testGenerateFileByAdd() {
$Pdf = new Pdf();
$Pdf->add('Test
');
$Pdf->render($this->output);
$this->assertEquals(true, is_file($this->output));
}
-
+
public function testGenerateFileByAddPage() {
$Pdf = new Pdf();
$Pdf->add('Test1
', true);
@@ -77,14 +79,14 @@ public function testGenerateFileByAddPage() {
$Pdf->render($this->output);
$this->assertEquals(true, is_file($this->output));
}
-
+
public function testOutputByAdd() {
$Pdf = new Pdf();
$Pdf->add('Test
');
$result = $Pdf->render();
$this->assertEquals(true, !is_null($result));
}
-
+
public function testOutputByAddPage() {
$Pdf = new Pdf();
$Pdf->addPage('Test1
');
@@ -92,7 +94,7 @@ public function testOutputByAddPage() {
$result = $Pdf->render();
$this->assertEquals(true, !is_null($result));
}
-
+
public function testMagicCall() {
$Pdf = new Pdf();
$Pdf->setOption('orientation', 'Landscape');
@@ -100,4 +102,4 @@ public function testMagicCall() {
$Pdf->render($this->output);
$this->assertEquals(true, is_file($this->output));
}
-}
\ No newline at end of file
+}
From 71b3a03d7f79fa015f42474cb0d8be7b96587c2e Mon Sep 17 00:00:00 2001
From: Nguyen Van Bach
Date: Tue, 18 Jun 2024 21:30:49 +0700
Subject: [PATCH 07/13] chore: fix some issues of docker environment
1. xdebug compatibility on PHP7.x
2. turn on xdebug.mode coverage on default
3. some libraries as missing for running wkhtmltopdf
---
.docker/php/Dockerfile | 4 +++-
.docker/php/php.ini | 4 ++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/.docker/php/Dockerfile b/.docker/php/Dockerfile
index 343026d..58f8e99 100644
--- a/.docker/php/Dockerfile
+++ b/.docker/php/Dockerfile
@@ -8,9 +8,11 @@ RUN apt-get update && apt-get install -y \
libjpeg62-turbo-dev \
libpng-dev \
libicu-dev \
+ libxrender1 \
+ libfontconfig \
&& docker-php-ext-install -j$(nproc) intl \
&& docker-php-ext-install -j$(nproc) pdo_mysql \
- && pecl install xdebug \
+ && pecl install xdebug-3.1.5 \
&& docker-php-ext-enable xdebug
# Install zip & git (Required for composer install)
diff --git a/.docker/php/php.ini b/.docker/php/php.ini
index e69de29..af8ef6d 100644
--- a/.docker/php/php.ini
+++ b/.docker/php/php.ini
@@ -0,0 +1,4 @@
+[xdebug]
+zend_extension="xdebug.so"
+xdebug.mode=develop,debug,coverage
+xdebug.start_with_request = yes
From 51c71a252e8a253c1e9a913b64e5beef1417b59b Mon Sep 17 00:00:00 2001
From: Nguyen Van Bach
Date: Tue, 18 Jun 2024 21:38:16 +0700
Subject: [PATCH 08/13] security: bump knp-snappy to 1.4.4 to fix
vulnerabilities
CVE-2023-28115
CVE-2023-41330
---
composer.json | 2 +-
composer.lock | 723 ++++++++++++++++++++++++++++++++++----------------
2 files changed, 489 insertions(+), 236 deletions(-)
diff --git a/composer.json b/composer.json
index 9646ab5..50fba65 100644
--- a/composer.json
+++ b/composer.json
@@ -11,7 +11,7 @@
],
"require": {
"php": ">=5.6",
- "knplabs/knp-snappy": "^0.5.0",
+ "knplabs/knp-snappy": "1.4.x",
"h4cc/wkhtmltopdf-i386": "^0.12.4",
"h4cc/wkhtmltopdf-amd64": "^0.12.4"
},
diff --git a/composer.lock b/composer.lock
index d90adef..286e9f7 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "217a95ef26d669bf05aa57a178fb935f",
+ "content-hash": "0566a9ae395fd0878d2b3f74810e4721",
"packages": [
{
"name": "h4cc/wkhtmltopdf-amd64",
@@ -101,24 +101,29 @@
},
{
"name": "knplabs/knp-snappy",
- "version": "v0.5.0",
+ "version": "v1.4.4",
"source": {
"type": "git",
"url": "https://github.com/KnpLabs/snappy.git",
- "reference": "370da31fa92a8e583e34558c589e630647617a38"
+ "reference": "3db13fe45d12a7bccb2b83f622e5a90f7e40b111"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/KnpLabs/snappy/zipball/370da31fa92a8e583e34558c589e630647617a38",
- "reference": "370da31fa92a8e583e34558c589e630647617a38",
+ "url": "https://api.github.com/repos/KnpLabs/snappy/zipball/3db13fe45d12a7bccb2b83f622e5a90f7e40b111",
+ "reference": "3db13fe45d12a7bccb2b83f622e5a90f7e40b111",
"shasum": ""
},
"require": {
- "php": ">=5.6",
- "symfony/process": "~2.3|~3.0"
+ "php": ">=7.1",
+ "psr/log": "^1.0||^2.0||^3.0",
+ "symfony/process": "~3.4||~4.3||~5.0||~6.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.7"
+ "friendsofphp/php-cs-fixer": "^2.16||^3.0",
+ "pedrotroller/php-cs-custom-fixer": "^2.19",
+ "phpstan/phpstan": "^1.0.0",
+ "phpstan/phpstan-phpunit": "^1.0.0",
+ "phpunit/phpunit": "~7.4||~8.5"
},
"suggest": {
"h4cc/wkhtmltoimage-amd64": "Provides wkhtmltoimage-amd64 binary for Linux-compatible machines, use version `~0.12` as dependency",
@@ -130,7 +135,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "0.5.x-dev"
+ "dev-master": "1.x-dev"
}
},
"autoload": {
@@ -144,7 +149,7 @@
],
"authors": [
{
- "name": "KnpLabs Team",
+ "name": "KNP Labs Team",
"homepage": "http://knplabs.com"
},
{
@@ -152,7 +157,7 @@
"homepage": "http://github.com/KnpLabs/snappy/contributors"
}
],
- "description": "PHP5 library allowing thumbnail, snapshot or PDF generation from a url or a html page. Wrapper for wkhtmltopdf/wkhtmltoimage.",
+ "description": "PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. Wrapper for wkhtmltopdf/wkhtmltoimage.",
"homepage": "http://github.com/KnpLabs/snappy",
"keywords": [
"knp",
@@ -162,31 +167,80 @@
"thumbnail",
"wkhtmltopdf"
],
- "time": "2017-06-16T07:50:40+00:00"
+ "support": {
+ "issues": "https://github.com/KnpLabs/snappy/issues",
+ "source": "https://github.com/KnpLabs/snappy/tree/v1.4.4"
+ },
+ "time": "2023-09-13T12:18:19+00:00"
},
{
- "name": "symfony/process",
- "version": "v3.3.2",
+ "name": "psr/log",
+ "version": "1.1.4",
"source": {
"type": "git",
- "url": "https://github.com/symfony/process.git",
- "reference": "8e30690c67aafb6c7992d6d8eb0d707807dd3eaf"
+ "url": "https://github.com/php-fig/log.git",
+ "reference": "d49695b909c3b7628b6289db5479a1c204601f11"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/8e30690c67aafb6c7992d6d8eb0d707807dd3eaf",
- "reference": "8e30690c67aafb6c7992d6d8eb0d707807dd3eaf",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
+ "reference": "d49695b909c3b7628b6289db5479a1c204601f11",
"shasum": ""
},
"require": {
- "php": ">=5.5.9"
+ "php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.3-dev"
+ "dev-master": "1.1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Log\\": "Psr/Log/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
}
+ ],
+ "description": "Common interface for logging libraries",
+ "homepage": "https://github.com/php-fig/log",
+ "keywords": [
+ "log",
+ "psr",
+ "psr-3"
+ ],
+ "support": {
+ "source": "https://github.com/php-fig/log/tree/1.1.4"
+ },
+ "time": "2021-05-03T11:20:27+00:00"
+ },
+ {
+ "name": "symfony/process",
+ "version": "v3.4.47",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/process.git",
+ "reference": "b8648cf1d5af12a44a51d07ef9bf980921f15fca"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/process/zipball/b8648cf1d5af12a44a51d07ef9bf980921f15fca",
+ "reference": "b8648cf1d5af12a44a51d07ef9bf980921f15fca",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.5.9|>=7.0.8"
},
+ "type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\Process\\": ""
@@ -211,40 +265,55 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
- "time": "2017-05-22T12:32:03+00:00"
+ "support": {
+ "source": "https://github.com/symfony/process/tree/v3.4.47"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-10-24T10:57:07+00:00"
}
],
"packages-dev": [
{
"name": "doctrine/instantiator",
- "version": "1.0.5",
+ "version": "1.5.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
- "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
+ "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
- "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b",
+ "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b",
"shasum": ""
},
"require": {
- "php": ">=5.3,<8.0-DEV"
+ "php": "^7.1 || ^8.0"
},
"require-dev": {
- "athletic/athletic": "~0.1.8",
+ "doctrine/coding-standard": "^9 || ^11",
"ext-pdo": "*",
"ext-phar": "*",
- "phpunit/phpunit": "~4.0",
- "squizlabs/php_codesniffer": "~2.0"
+ "phpbench/phpbench": "^0.16 || ^1",
+ "phpstan/phpstan": "^1.4",
+ "phpstan/phpstan-phpunit": "^1",
+ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
+ "vimeo/psalm": "^4.30 || ^5.4"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
"autoload": {
"psr-4": {
"Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
@@ -258,40 +327,67 @@
{
"name": "Marco Pivetta",
"email": "ocramius@gmail.com",
- "homepage": "http://ocramius.github.com/"
+ "homepage": "https://ocramius.github.io/"
}
],
"description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
- "homepage": "https://github.com/doctrine/instantiator",
+ "homepage": "https://www.doctrine-project.org/projects/instantiator.html",
"keywords": [
"constructor",
"instantiate"
],
- "time": "2015-06-14T21:17:01+00:00"
+ "support": {
+ "issues": "https://github.com/doctrine/instantiator/issues",
+ "source": "https://github.com/doctrine/instantiator/tree/1.5.0"
+ },
+ "funding": [
+ {
+ "url": "https://www.doctrine-project.org/sponsorship.html",
+ "type": "custom"
+ },
+ {
+ "url": "https://www.patreon.com/phpdoctrine",
+ "type": "patreon"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-12-30T00:15:36+00:00"
},
{
"name": "myclabs/deep-copy",
- "version": "1.6.1",
+ "version": "1.12.0",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102"
+ "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8e6e04167378abf1ddb4d3522d8755c5fd90d102",
- "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c",
+ "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c",
"shasum": ""
},
"require": {
- "php": ">=5.4.0"
+ "php": "^7.1 || ^8.0"
+ },
+ "conflict": {
+ "doctrine/collections": "<1.6.8",
+ "doctrine/common": "<2.13.3 || >=3 <3.2.2"
},
"require-dev": {
- "doctrine/collections": "1.*",
- "phpunit/phpunit": "~4.1"
+ "doctrine/collections": "^1.6.8",
+ "doctrine/common": "^2.13.3 || ^3.2.2",
+ "phpspec/prophecy": "^1.10",
+ "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
},
"type": "library",
"autoload": {
+ "files": [
+ "src/DeepCopy/deep_copy.php"
+ ],
"psr-4": {
"DeepCopy\\": "src/DeepCopy/"
}
@@ -301,7 +397,6 @@
"MIT"
],
"description": "Create deep copies (clones) of your objects",
- "homepage": "https://github.com/myclabs/DeepCopy",
"keywords": [
"clone",
"copy",
@@ -309,7 +404,17 @@
"object",
"object graph"
],
- "time": "2017-04-12T18:52:22+00:00"
+ "support": {
+ "issues": "https://github.com/myclabs/DeepCopy/issues",
+ "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0"
+ },
+ "funding": [
+ {
+ "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-06-12T14:39:25+00:00"
},
{
"name": "phar-io/manifest",
@@ -364,6 +469,10 @@
}
],
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
+ "support": {
+ "issues": "https://github.com/phar-io/manifest/issues",
+ "source": "https://github.com/phar-io/manifest/tree/master"
+ },
"time": "2017-03-05T18:14:27+00:00"
},
{
@@ -411,39 +520,38 @@
}
],
"description": "Library for handling version information and constraints",
+ "support": {
+ "issues": "https://github.com/phar-io/version/issues",
+ "source": "https://github.com/phar-io/version/tree/master"
+ },
"time": "2017-03-05T17:38:23+00:00"
},
{
"name": "phpdocumentor/reflection-common",
- "version": "1.0",
+ "version": "2.2.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
- "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c"
+ "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
- "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b",
+ "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b",
"shasum": ""
},
"require": {
- "php": ">=5.5"
- },
- "require-dev": {
- "phpunit/phpunit": "^4.6"
+ "php": "^7.2 || ^8.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-2.x": "2.x-dev"
}
},
"autoload": {
"psr-4": {
- "phpDocumentor\\Reflection\\": [
- "src"
- ]
+ "phpDocumentor\\Reflection\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -465,38 +573,46 @@
"reflection",
"static analysis"
],
- "time": "2015-12-27T11:43:31+00:00"
+ "support": {
+ "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues",
+ "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x"
+ },
+ "time": "2020-06-27T09:03:43+00:00"
},
{
"name": "phpdocumentor/reflection-docblock",
- "version": "3.1.1",
+ "version": "5.3.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
- "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e"
+ "reference": "622548b623e81ca6d78b721c5e029f4ce664f170"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e",
- "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170",
+ "reference": "622548b623e81ca6d78b721c5e029f4ce664f170",
"shasum": ""
},
"require": {
- "php": ">=5.5",
- "phpdocumentor/reflection-common": "^1.0@dev",
- "phpdocumentor/type-resolver": "^0.2.0",
- "webmozart/assert": "^1.0"
+ "ext-filter": "*",
+ "php": "^7.2 || ^8.0",
+ "phpdocumentor/reflection-common": "^2.2",
+ "phpdocumentor/type-resolver": "^1.3",
+ "webmozart/assert": "^1.9.1"
},
"require-dev": {
- "mockery/mockery": "^0.9.4",
- "phpunit/phpunit": "^4.4"
+ "mockery/mockery": "~1.3.2",
+ "psalm/phar": "^4.8"
},
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "5.x-dev"
+ }
+ },
"autoload": {
"psr-4": {
- "phpDocumentor\\Reflection\\": [
- "src/"
- ]
+ "phpDocumentor\\Reflection\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -507,44 +623,50 @@
{
"name": "Mike van Riel",
"email": "me@mikevanriel.com"
+ },
+ {
+ "name": "Jaap van Otterdijk",
+ "email": "account@ijaap.nl"
}
],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
- "time": "2016-09-30T07:12:33+00:00"
+ "support": {
+ "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
+ "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0"
+ },
+ "time": "2021-10-19T17:43:47+00:00"
},
{
"name": "phpdocumentor/type-resolver",
- "version": "0.2.1",
+ "version": "1.6.1",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
- "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb"
+ "reference": "77a32518733312af16a44300404e945338981de3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb",
- "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb",
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3",
+ "reference": "77a32518733312af16a44300404e945338981de3",
"shasum": ""
},
"require": {
- "php": ">=5.5",
- "phpdocumentor/reflection-common": "^1.0"
+ "php": "^7.2 || ^8.0",
+ "phpdocumentor/reflection-common": "^2.0"
},
"require-dev": {
- "mockery/mockery": "^0.9.4",
- "phpunit/phpunit": "^5.2||^4.8.24"
+ "ext-tokenizer": "*",
+ "psalm/phar": "^4.8"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-1.x": "1.x-dev"
}
},
"autoload": {
"psr-4": {
- "phpDocumentor\\Reflection\\": [
- "src/"
- ]
+ "phpDocumentor\\Reflection\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -557,42 +679,47 @@
"email": "me@mikevanriel.com"
}
],
- "time": "2016-11-25T06:54:22+00:00"
+ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
+ "support": {
+ "issues": "https://github.com/phpDocumentor/TypeResolver/issues",
+ "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1"
+ },
+ "time": "2022-03-15T21:29:03+00:00"
},
{
"name": "phpspec/prophecy",
- "version": "v1.7.0",
+ "version": "v1.10.3",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
- "reference": "93d39f1f7f9326d746203c7c056f300f7f126073"
+ "reference": "451c3cd1418cf640de218914901e51b064abb093"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073",
- "reference": "93d39f1f7f9326d746203c7c056f300f7f126073",
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093",
+ "reference": "451c3cd1418cf640de218914901e51b064abb093",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.0.2",
"php": "^5.3|^7.0",
- "phpdocumentor/reflection-docblock": "^2.0|^3.0.2",
- "sebastian/comparator": "^1.1|^2.0",
- "sebastian/recursion-context": "^1.0|^2.0|^3.0"
+ "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0",
+ "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0",
+ "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0"
},
"require-dev": {
- "phpspec/phpspec": "^2.5|^3.2",
- "phpunit/phpunit": "^4.8 || ^5.6.5"
+ "phpspec/phpspec": "^2.5 || ^3.2",
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.6.x-dev"
+ "dev-master": "1.10.x-dev"
}
},
"autoload": {
- "psr-0": {
- "Prophecy\\": "src/"
+ "psr-4": {
+ "Prophecy\\": "src/Prophecy"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -620,45 +747,48 @@
"spy",
"stub"
],
- "time": "2017-03-02T20:05:34+00:00"
+ "support": {
+ "issues": "https://github.com/phpspec/prophecy/issues",
+ "source": "https://github.com/phpspec/prophecy/tree/v1.10.3"
+ },
+ "time": "2020-03-05T15:02:03+00:00"
},
{
"name": "phpunit/php-code-coverage",
- "version": "5.2.1",
+ "version": "5.3.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "dc421f9ca5082a0c0cb04afb171c765f79add85b"
+ "reference": "c89677919c5dd6d3b3852f230a663118762218ac"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/dc421f9ca5082a0c0cb04afb171c765f79add85b",
- "reference": "dc421f9ca5082a0c0cb04afb171c765f79add85b",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c89677919c5dd6d3b3852f230a663118762218ac",
+ "reference": "c89677919c5dd6d3b3852f230a663118762218ac",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-xmlwriter": "*",
"php": "^7.0",
- "phpunit/php-file-iterator": "^1.3",
- "phpunit/php-text-template": "^1.2",
- "phpunit/php-token-stream": "^1.4.11 || ^2.0",
- "sebastian/code-unit-reverse-lookup": "^1.0",
+ "phpunit/php-file-iterator": "^1.4.2",
+ "phpunit/php-text-template": "^1.2.1",
+ "phpunit/php-token-stream": "^2.0.1",
+ "sebastian/code-unit-reverse-lookup": "^1.0.1",
"sebastian/environment": "^3.0",
- "sebastian/version": "^2.0",
+ "sebastian/version": "^2.0.1",
"theseer/tokenizer": "^1.1"
},
"require-dev": {
- "ext-xdebug": "^2.5",
"phpunit/phpunit": "^6.0"
},
"suggest": {
- "ext-xdebug": "^2.5.3"
+ "ext-xdebug": "^2.5.5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.2.x-dev"
+ "dev-master": "5.3.x-dev"
}
},
"autoload": {
@@ -673,7 +803,7 @@
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
+ "email": "sebastian@phpunit.de",
"role": "lead"
}
],
@@ -684,20 +814,24 @@
"testing",
"xunit"
],
- "time": "2017-04-21T08:03:57+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/5.3"
+ },
+ "time": "2018-04-06T15:36:58+00:00"
},
{
"name": "phpunit/php-file-iterator",
- "version": "1.4.2",
+ "version": "1.4.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5"
+ "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
- "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4",
+ "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4",
"shasum": ""
},
"require": {
@@ -731,7 +865,12 @@
"filesystem",
"iterator"
],
- "time": "2016-10-03T07:40:28+00:00"
+ "support": {
+ "irc": "irc://irc.freenode.net/phpunit",
+ "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
+ "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/1.4.5"
+ },
+ "time": "2017-11-27T13:52:08+00:00"
},
{
"name": "phpunit/php-text-template",
@@ -772,6 +911,10 @@
"keywords": [
"template"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-text-template/issues",
+ "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1"
+ },
"time": "2015-06-21T13:50:34+00:00"
},
{
@@ -821,33 +964,37 @@
"keywords": [
"timer"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-timer/issues",
+ "source": "https://github.com/sebastianbergmann/php-timer/tree/master"
+ },
"time": "2017-02-26T11:10:40+00:00"
},
{
"name": "phpunit/php-token-stream",
- "version": "1.4.11",
+ "version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
- "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7"
+ "reference": "791198a2c6254db10131eecfe8c06670700904db"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e03f8f67534427a787e21a385a67ec3ca6978ea7",
- "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db",
+ "reference": "791198a2c6254db10131eecfe8c06670700904db",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
- "php": ">=5.3.3"
+ "php": "^7.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.2"
+ "phpunit/phpunit": "^6.2.4"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4-dev"
+ "dev-master": "2.0-dev"
}
},
"autoload": {
@@ -870,20 +1017,25 @@
"keywords": [
"tokenizer"
],
- "time": "2017-02-27T10:12:30+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/php-token-stream/issues",
+ "source": "https://github.com/sebastianbergmann/php-token-stream/tree/master"
+ },
+ "abandoned": true,
+ "time": "2017-11-27T05:48:46+00:00"
},
{
"name": "phpunit/phpunit",
- "version": "6.2.2",
+ "version": "6.5.14",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "f2786490399836d2a544a34785c4a8d3ab32cf0e"
+ "reference": "bac23fe7ff13dbdb461481f706f0e9fe746334b7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f2786490399836d2a544a34785c4a8d3ab32cf0e",
- "reference": "f2786490399836d2a544a34785c4a8d3ab32cf0e",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/bac23fe7ff13dbdb461481f706f0e9fe746334b7",
+ "reference": "bac23fe7ff13dbdb461481f706f0e9fe746334b7",
"shasum": ""
},
"require": {
@@ -892,24 +1044,24 @@
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-xml": "*",
- "myclabs/deep-copy": "^1.3",
+ "myclabs/deep-copy": "^1.6.1",
"phar-io/manifest": "^1.0.1",
"phar-io/version": "^1.0",
"php": "^7.0",
"phpspec/prophecy": "^1.7",
- "phpunit/php-code-coverage": "^5.2",
- "phpunit/php-file-iterator": "^1.4",
- "phpunit/php-text-template": "^1.2",
- "phpunit/php-timer": "^1.0.6",
- "phpunit/phpunit-mock-objects": "^4.0",
- "sebastian/comparator": "^2.0",
- "sebastian/diff": "^1.4.3 || ^2.0",
- "sebastian/environment": "^3.0.2",
+ "phpunit/php-code-coverage": "^5.3",
+ "phpunit/php-file-iterator": "^1.4.3",
+ "phpunit/php-text-template": "^1.2.1",
+ "phpunit/php-timer": "^1.0.9",
+ "phpunit/phpunit-mock-objects": "^5.0.9",
+ "sebastian/comparator": "^2.1",
+ "sebastian/diff": "^2.0",
+ "sebastian/environment": "^3.1",
"sebastian/exporter": "^3.1",
- "sebastian/global-state": "^1.1 || ^2.0",
- "sebastian/object-enumerator": "^3.0.2",
+ "sebastian/global-state": "^2.0",
+ "sebastian/object-enumerator": "^3.0.3",
"sebastian/resource-operations": "^1.0",
- "sebastian/version": "^2.0"
+ "sebastian/version": "^2.0.1"
},
"conflict": {
"phpdocumentor/reflection-docblock": "3.0.2",
@@ -928,7 +1080,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "6.2.x-dev"
+ "dev-master": "6.5.x-dev"
}
},
"autoload": {
@@ -954,33 +1106,37 @@
"testing",
"xunit"
],
- "time": "2017-06-13T14:07:07+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/phpunit/issues",
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/6.5.14"
+ },
+ "time": "2019-02-01T05:22:47+00:00"
},
{
"name": "phpunit/phpunit-mock-objects",
- "version": "4.0.2",
+ "version": "5.0.10",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
- "reference": "d8833b396dce9162bb2eb5d59aee5a3ab3cfa5b4"
+ "reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/d8833b396dce9162bb2eb5d59aee5a3ab3cfa5b4",
- "reference": "d8833b396dce9162bb2eb5d59aee5a3ab3cfa5b4",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/cd1cf05c553ecfec36b170070573e540b67d3f1f",
+ "reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f",
"shasum": ""
},
"require": {
- "doctrine/instantiator": "^1.0.2",
+ "doctrine/instantiator": "^1.0.5",
"php": "^7.0",
- "phpunit/php-text-template": "^1.2",
- "sebastian/exporter": "^3.0"
+ "phpunit/php-text-template": "^1.2.1",
+ "sebastian/exporter": "^3.1"
},
"conflict": {
"phpunit/phpunit": "<6.0"
},
"require-dev": {
- "phpunit/phpunit": "^6.0"
+ "phpunit/phpunit": "^6.5.11"
},
"suggest": {
"ext-soap": "*"
@@ -988,7 +1144,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0.x-dev"
+ "dev-master": "5.0.x-dev"
}
},
"autoload": {
@@ -1003,7 +1159,7 @@
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
+ "email": "sebastian@phpunit.de",
"role": "lead"
}
],
@@ -1013,27 +1169,32 @@
"mock",
"xunit"
],
- "time": "2017-06-30T08:15:21+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/phpunit-mock-objects/issues",
+ "source": "https://github.com/sebastianbergmann/phpunit-mock-objects/tree/5.0.10"
+ },
+ "abandoned": true,
+ "time": "2018-08-09T05:50:03+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
- "version": "1.0.1",
+ "version": "1.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
- "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18"
+ "reference": "92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
- "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54",
+ "reference": "92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54",
"shasum": ""
},
"require": {
- "php": "^5.6 || ^7.0"
+ "php": ">=5.6"
},
"require-dev": {
- "phpunit/phpunit": "^5.7 || ^6.0"
+ "phpunit/phpunit": "^8.5"
},
"type": "library",
"extra": {
@@ -1058,34 +1219,44 @@
],
"description": "Looks up which function or method a line of code belongs to",
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
- "time": "2017-03-04T06:30:41+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues",
+ "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-01T13:45:45+00:00"
},
{
"name": "sebastian/comparator",
- "version": "2.0.0",
+ "version": "2.1.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "20f84f468cb67efee293246e6a09619b891f55f0"
+ "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/20f84f468cb67efee293246e6a09619b891f55f0",
- "reference": "20f84f468cb67efee293246e6a09619b891f55f0",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9",
+ "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9",
"shasum": ""
},
"require": {
"php": "^7.0",
- "sebastian/diff": "^1.2",
- "sebastian/exporter": "^3.0"
+ "sebastian/diff": "^2.0 || ^3.0",
+ "sebastian/exporter": "^3.1"
},
"require-dev": {
- "phpunit/phpunit": "^6.0"
+ "phpunit/phpunit": "^6.4"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "2.1.x-dev"
}
},
"autoload": {
@@ -1116,38 +1287,42 @@
}
],
"description": "Provides the functionality to compare PHP values for equality",
- "homepage": "http://www.github.com/sebastianbergmann/comparator",
+ "homepage": "https://github.com/sebastianbergmann/comparator",
"keywords": [
"comparator",
"compare",
"equality"
],
- "time": "2017-03-03T06:26:08+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/comparator/issues",
+ "source": "https://github.com/sebastianbergmann/comparator/tree/master"
+ },
+ "time": "2018-02-01T13:46:46+00:00"
},
{
"name": "sebastian/diff",
- "version": "1.4.3",
+ "version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4"
+ "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4",
- "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd",
+ "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd",
"shasum": ""
},
"require": {
- "php": "^5.3.3 || ^7.0"
+ "php": "^7.0"
},
"require-dev": {
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
+ "phpunit/phpunit": "^6.2"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4-dev"
+ "dev-master": "2.0-dev"
}
},
"autoload": {
@@ -1174,7 +1349,11 @@
"keywords": [
"diff"
],
- "time": "2017-05-22T07:24:03+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/diff/issues",
+ "source": "https://github.com/sebastianbergmann/diff/tree/master"
+ },
+ "time": "2017-08-03T08:09:46+00:00"
},
{
"name": "sebastian/environment",
@@ -1224,29 +1403,33 @@
"environment",
"hhvm"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/environment/issues",
+ "source": "https://github.com/sebastianbergmann/environment/tree/master"
+ },
"time": "2017-07-01T08:51:00+00:00"
},
{
"name": "sebastian/exporter",
- "version": "3.1.0",
+ "version": "3.1.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "234199f4528de6d12aaa58b612e98f7d36adb937"
+ "reference": "1939bc8fd1d39adcfa88c5b35335910869214c56"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937",
- "reference": "234199f4528de6d12aaa58b612e98f7d36adb937",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/1939bc8fd1d39adcfa88c5b35335910869214c56",
+ "reference": "1939bc8fd1d39adcfa88c5b35335910869214c56",
"shasum": ""
},
"require": {
- "php": "^7.0",
+ "php": ">=7.2",
"sebastian/recursion-context": "^3.0"
},
"require-dev": {
"ext-mbstring": "*",
- "phpunit/phpunit": "^6.0"
+ "phpunit/phpunit": "^8.5"
},
"type": "library",
"extra": {
@@ -1264,6 +1447,10 @@
"BSD-3-Clause"
],
"authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
@@ -1272,17 +1459,13 @@
"name": "Volker Dusch",
"email": "github@wallbash.com"
},
- {
- "name": "Bernhard Schussek",
- "email": "bschussek@2bepublished.at"
- },
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- },
{
"name": "Adam Harvey",
"email": "aharvey@php.net"
+ },
+ {
+ "name": "Bernhard Schussek",
+ "email": "bschussek@gmail.com"
}
],
"description": "Provides the functionality to export PHP variables for visualization",
@@ -1291,7 +1474,17 @@
"export",
"exporter"
],
- "time": "2017-04-03T13:19:02+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/exporter/issues",
+ "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.6"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-02T06:21:38+00:00"
},
{
"name": "sebastian/global-state",
@@ -1342,25 +1535,29 @@
"keywords": [
"global state"
],
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/global-state/issues",
+ "source": "https://github.com/sebastianbergmann/global-state/tree/2.0.0"
+ },
"time": "2017-04-27T15:39:26+00:00"
},
{
"name": "sebastian/object-enumerator",
- "version": "3.0.2",
+ "version": "3.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
- "reference": "31dd3379d16446c5d86dec32ab1ad1f378581ad8"
+ "reference": "ac5b293dba925751b808e02923399fb44ff0d541"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/31dd3379d16446c5d86dec32ab1ad1f378581ad8",
- "reference": "31dd3379d16446c5d86dec32ab1ad1f378581ad8",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/ac5b293dba925751b808e02923399fb44ff0d541",
+ "reference": "ac5b293dba925751b808e02923399fb44ff0d541",
"shasum": ""
},
"require": {
- "php": "^7.0",
- "sebastian/object-reflector": "^1.0",
+ "php": ">=7.0",
+ "sebastian/object-reflector": "^1.1.1",
"sebastian/recursion-context": "^3.0"
},
"require-dev": {
@@ -1389,24 +1586,34 @@
],
"description": "Traverses array structures and object graphs to enumerate all referenced objects",
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
- "time": "2017-03-12T15:17:29+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/object-enumerator/issues",
+ "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.5"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-01T13:54:02+00:00"
},
{
"name": "sebastian/object-reflector",
- "version": "1.1.1",
+ "version": "1.1.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-reflector.git",
- "reference": "773f97c67f28de00d397be301821b06708fca0be"
+ "reference": "1d439c229e61f244ff1f211e5c99737f90c67def"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be",
- "reference": "773f97c67f28de00d397be301821b06708fca0be",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/1d439c229e61f244ff1f211e5c99737f90c67def",
+ "reference": "1d439c229e61f244ff1f211e5c99737f90c67def",
"shasum": ""
},
"require": {
- "php": "^7.0"
+ "php": ">=7.0"
},
"require-dev": {
"phpunit/phpunit": "^6.0"
@@ -1434,24 +1641,34 @@
],
"description": "Allows reflection of object attributes, including inherited and non-public ones",
"homepage": "https://github.com/sebastianbergmann/object-reflector/",
- "time": "2017-03-29T09:07:27+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/object-reflector/issues",
+ "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-01T13:56:04+00:00"
},
{
"name": "sebastian/recursion-context",
- "version": "3.0.0",
+ "version": "3.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8"
+ "reference": "9bfd3c6f1f08c026f542032dfb42813544f7d64c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
- "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/9bfd3c6f1f08c026f542032dfb42813544f7d64c",
+ "reference": "9bfd3c6f1f08c026f542032dfb42813544f7d64c",
"shasum": ""
},
"require": {
- "php": "^7.0"
+ "php": ">=7.0"
},
"require-dev": {
"phpunit/phpunit": "^6.0"
@@ -1472,14 +1689,14 @@
"BSD-3-Clause"
],
"authors": [
- {
- "name": "Jeff Welch",
- "email": "whatthejeff@gmail.com"
- },
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
+ {
+ "name": "Jeff Welch",
+ "email": "whatthejeff@gmail.com"
+ },
{
"name": "Adam Harvey",
"email": "aharvey@php.net"
@@ -1487,7 +1704,17 @@
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
- "time": "2017-03-03T06:23:57+00:00"
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/recursion-context/issues",
+ "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.2"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-01T14:07:30+00:00"
},
{
"name": "sebastian/resource-operations",
@@ -1529,6 +1756,10 @@
],
"description": "Provides a list of PHP built-in functions that operate on resources",
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/resource-operations/issues",
+ "source": "https://github.com/sebastianbergmann/resource-operations/tree/master"
+ },
"time": "2015-07-28T20:34:47+00:00"
},
{
@@ -1572,27 +1803,31 @@
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/version/issues",
+ "source": "https://github.com/sebastianbergmann/version/tree/master"
+ },
"time": "2016-10-03T07:35:21+00:00"
},
{
"name": "theseer/tokenizer",
- "version": "1.1.0",
+ "version": "1.2.3",
"source": {
"type": "git",
"url": "https://github.com/theseer/tokenizer.git",
- "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b"
+ "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b",
- "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b",
+ "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2",
+ "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-tokenizer": "*",
"ext-xmlwriter": "*",
- "php": "^7.0"
+ "php": "^7.2 || ^8.0"
},
"type": "library",
"autoload": {
@@ -1612,33 +1847,47 @@
}
],
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
- "time": "2017-04-07T12:08:54+00:00"
+ "support": {
+ "issues": "https://github.com/theseer/tokenizer/issues",
+ "source": "https://github.com/theseer/tokenizer/tree/1.2.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/theseer",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-03T12:36:25+00:00"
},
{
"name": "webmozart/assert",
- "version": "1.2.0",
+ "version": "1.11.0",
"source": {
"type": "git",
- "url": "https://github.com/webmozart/assert.git",
- "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f"
+ "url": "https://github.com/webmozarts/assert.git",
+ "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f",
- "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f",
+ "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991",
+ "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991",
"shasum": ""
},
"require": {
- "php": "^5.3.3 || ^7.0"
+ "ext-ctype": "*",
+ "php": "^7.2 || ^8.0"
+ },
+ "conflict": {
+ "phpstan/phpstan": "<0.12.20",
+ "vimeo/psalm": "<4.6.1 || 4.6.2"
},
"require-dev": {
- "phpunit/phpunit": "^4.6",
- "sebastian/version": "^1.0.1"
+ "phpunit/phpunit": "^8.5.13"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.3-dev"
+ "dev-master": "1.10-dev"
}
},
"autoload": {
@@ -1662,7 +1911,11 @@
"check",
"validate"
],
- "time": "2016-11-23T20:04:58+00:00"
+ "support": {
+ "issues": "https://github.com/webmozarts/assert/issues",
+ "source": "https://github.com/webmozarts/assert/tree/1.11.0"
+ },
+ "time": "2022-06-03T18:03:27+00:00"
}
],
"aliases": [],
@@ -1674,5 +1927,5 @@
"php": ">=5.6"
},
"platform-dev": [],
- "plugin-api-version": "2.1.0"
+ "plugin-api-version": "2.6.0"
}
From de7db1de0b7c5466f2a3343625c3ca0a44a1eb56 Mon Sep 17 00:00:00 2001
From: Nguyen Van Bach
Date: Wed, 19 Jun 2024 08:13:13 +0700
Subject: [PATCH 09/13] test: bump phpunit to 8.5.38
---
.gitignore | 1 +
composer.json | 2 +-
composer.lock | 772 ++++++++++++++-----------------------
phpunit.xml.dist | 3 +-
tests/TestCase/PdfTest.php | 10 +-
5 files changed, 288 insertions(+), 500 deletions(-)
diff --git a/.gitignore b/.gitignore
index 89c98f0..f1cbcad 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
/vendors
/vendor
/tests/Coverage
+.phpunit.result.cache
diff --git a/composer.json b/composer.json
index 50fba65..e3c9c67 100644
--- a/composer.json
+++ b/composer.json
@@ -16,7 +16,7 @@
"h4cc/wkhtmltopdf-amd64": "^0.12.4"
},
"require-dev": {
- "phpunit/phpunit": "^5.7|^6.0"
+ "phpunit/phpunit": "^8.5.38"
},
"autoload": {
"psr-4": {
diff --git a/composer.lock b/composer.lock
index 286e9f7..fed4ef3 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "0566a9ae395fd0878d2b3f74810e4721",
+ "content-hash": "2de592395a553ab500805fc45eee7a4f",
"packages": [
{
"name": "h4cc/wkhtmltopdf-amd64",
@@ -418,28 +418,30 @@
},
{
"name": "phar-io/manifest",
- "version": "1.0.1",
+ "version": "2.0.4",
"source": {
"type": "git",
"url": "https://github.com/phar-io/manifest.git",
- "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0"
+ "reference": "54750ef60c58e43759730615a392c31c80e23176"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0",
- "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0",
+ "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176",
+ "reference": "54750ef60c58e43759730615a392c31c80e23176",
"shasum": ""
},
"require": {
"ext-dom": "*",
+ "ext-libxml": "*",
"ext-phar": "*",
- "phar-io/version": "^1.0.1",
- "php": "^5.6 || ^7.0"
+ "ext-xmlwriter": "*",
+ "phar-io/version": "^3.0.1",
+ "php": "^7.2 || ^8.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "2.0.x-dev"
}
},
"autoload": {
@@ -471,26 +473,32 @@
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
"support": {
"issues": "https://github.com/phar-io/manifest/issues",
- "source": "https://github.com/phar-io/manifest/tree/master"
+ "source": "https://github.com/phar-io/manifest/tree/2.0.4"
},
- "time": "2017-03-05T18:14:27+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/theseer",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-03T12:33:53+00:00"
},
{
"name": "phar-io/version",
- "version": "1.0.1",
+ "version": "3.2.1",
"source": {
"type": "git",
"url": "https://github.com/phar-io/version.git",
- "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df"
+ "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df",
- "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df",
+ "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
+ "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
"shasum": ""
},
"require": {
- "php": "^5.6 || ^7.0"
+ "php": "^7.2 || ^8.0"
},
"type": "library",
"autoload": {
@@ -522,273 +530,46 @@
"description": "Library for handling version information and constraints",
"support": {
"issues": "https://github.com/phar-io/version/issues",
- "source": "https://github.com/phar-io/version/tree/master"
+ "source": "https://github.com/phar-io/version/tree/3.2.1"
},
- "time": "2017-03-05T17:38:23+00:00"
- },
- {
- "name": "phpdocumentor/reflection-common",
- "version": "2.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
- "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b",
- "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b",
- "shasum": ""
- },
- "require": {
- "php": "^7.2 || ^8.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-2.x": "2.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "phpDocumentor\\Reflection\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Jaap van Otterdijk",
- "email": "opensource@ijaap.nl"
- }
- ],
- "description": "Common reflection classes used by phpdocumentor to reflect the code structure",
- "homepage": "http://www.phpdoc.org",
- "keywords": [
- "FQSEN",
- "phpDocumentor",
- "phpdoc",
- "reflection",
- "static analysis"
- ],
- "support": {
- "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues",
- "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x"
- },
- "time": "2020-06-27T09:03:43+00:00"
- },
- {
- "name": "phpdocumentor/reflection-docblock",
- "version": "5.3.0",
- "source": {
- "type": "git",
- "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
- "reference": "622548b623e81ca6d78b721c5e029f4ce664f170"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170",
- "reference": "622548b623e81ca6d78b721c5e029f4ce664f170",
- "shasum": ""
- },
- "require": {
- "ext-filter": "*",
- "php": "^7.2 || ^8.0",
- "phpdocumentor/reflection-common": "^2.2",
- "phpdocumentor/type-resolver": "^1.3",
- "webmozart/assert": "^1.9.1"
- },
- "require-dev": {
- "mockery/mockery": "~1.3.2",
- "psalm/phar": "^4.8"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "5.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "phpDocumentor\\Reflection\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Mike van Riel",
- "email": "me@mikevanriel.com"
- },
- {
- "name": "Jaap van Otterdijk",
- "email": "account@ijaap.nl"
- }
- ],
- "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
- "support": {
- "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
- "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0"
- },
- "time": "2021-10-19T17:43:47+00:00"
- },
- {
- "name": "phpdocumentor/type-resolver",
- "version": "1.6.1",
- "source": {
- "type": "git",
- "url": "https://github.com/phpDocumentor/TypeResolver.git",
- "reference": "77a32518733312af16a44300404e945338981de3"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3",
- "reference": "77a32518733312af16a44300404e945338981de3",
- "shasum": ""
- },
- "require": {
- "php": "^7.2 || ^8.0",
- "phpdocumentor/reflection-common": "^2.0"
- },
- "require-dev": {
- "ext-tokenizer": "*",
- "psalm/phar": "^4.8"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-1.x": "1.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "phpDocumentor\\Reflection\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Mike van Riel",
- "email": "me@mikevanriel.com"
- }
- ],
- "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
- "support": {
- "issues": "https://github.com/phpDocumentor/TypeResolver/issues",
- "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1"
- },
- "time": "2022-03-15T21:29:03+00:00"
- },
- {
- "name": "phpspec/prophecy",
- "version": "v1.10.3",
- "source": {
- "type": "git",
- "url": "https://github.com/phpspec/prophecy.git",
- "reference": "451c3cd1418cf640de218914901e51b064abb093"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093",
- "reference": "451c3cd1418cf640de218914901e51b064abb093",
- "shasum": ""
- },
- "require": {
- "doctrine/instantiator": "^1.0.2",
- "php": "^5.3|^7.0",
- "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0",
- "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0",
- "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0"
- },
- "require-dev": {
- "phpspec/phpspec": "^2.5 || ^3.2",
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.10.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Prophecy\\": "src/Prophecy"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Konstantin Kudryashov",
- "email": "ever.zet@gmail.com",
- "homepage": "http://everzet.com"
- },
- {
- "name": "Marcello Duarte",
- "email": "marcello.duarte@gmail.com"
- }
- ],
- "description": "Highly opinionated mocking framework for PHP 5.3+",
- "homepage": "https://github.com/phpspec/prophecy",
- "keywords": [
- "Double",
- "Dummy",
- "fake",
- "mock",
- "spy",
- "stub"
- ],
- "support": {
- "issues": "https://github.com/phpspec/prophecy/issues",
- "source": "https://github.com/phpspec/prophecy/tree/v1.10.3"
- },
- "time": "2020-03-05T15:02:03+00:00"
+ "time": "2022-02-21T01:04:05+00:00"
},
{
"name": "phpunit/php-code-coverage",
- "version": "5.3.2",
+ "version": "7.0.17",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "c89677919c5dd6d3b3852f230a663118762218ac"
+ "reference": "40a4ed114a4aea5afd6df8d0f0c9cd3033097f66"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c89677919c5dd6d3b3852f230a663118762218ac",
- "reference": "c89677919c5dd6d3b3852f230a663118762218ac",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/40a4ed114a4aea5afd6df8d0f0c9cd3033097f66",
+ "reference": "40a4ed114a4aea5afd6df8d0f0c9cd3033097f66",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-xmlwriter": "*",
- "php": "^7.0",
- "phpunit/php-file-iterator": "^1.4.2",
+ "php": ">=7.2",
+ "phpunit/php-file-iterator": "^2.0.2",
"phpunit/php-text-template": "^1.2.1",
- "phpunit/php-token-stream": "^2.0.1",
+ "phpunit/php-token-stream": "^3.1.3 || ^4.0",
"sebastian/code-unit-reverse-lookup": "^1.0.1",
- "sebastian/environment": "^3.0",
+ "sebastian/environment": "^4.2.2",
"sebastian/version": "^2.0.1",
- "theseer/tokenizer": "^1.1"
+ "theseer/tokenizer": "^1.1.3"
},
"require-dev": {
- "phpunit/phpunit": "^6.0"
+ "phpunit/phpunit": "^8.2.2"
},
"suggest": {
- "ext-xdebug": "^2.5.5"
+ "ext-xdebug": "^2.7.2"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.3.x-dev"
+ "dev-master": "7.0-dev"
}
},
"autoload": {
@@ -816,31 +597,40 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
- "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/5.3"
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.17"
},
- "time": "2018-04-06T15:36:58+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-02T06:09:37+00:00"
},
{
"name": "phpunit/php-file-iterator",
- "version": "1.4.5",
+ "version": "2.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4"
+ "reference": "69deeb8664f611f156a924154985fbd4911eb36b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4",
- "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/69deeb8664f611f156a924154985fbd4911eb36b",
+ "reference": "69deeb8664f611f156a924154985fbd4911eb36b",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=7.1"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^8.5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4.x-dev"
+ "dev-master": "2.0.x-dev"
}
},
"autoload": {
@@ -855,7 +645,7 @@
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
+ "email": "sebastian@phpunit.de",
"role": "lead"
}
],
@@ -866,11 +656,16 @@
"iterator"
],
"support": {
- "irc": "irc://irc.freenode.net/phpunit",
"issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
- "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/1.4.5"
+ "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.6"
},
- "time": "2017-11-27T13:52:08+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-01T13:39:50+00:00"
},
{
"name": "phpunit/php-text-template",
@@ -919,28 +714,28 @@
},
{
"name": "phpunit/php-timer",
- "version": "1.0.9",
+ "version": "2.1.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f"
+ "reference": "a691211e94ff39a34811abd521c31bd5b305b0bb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
- "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/a691211e94ff39a34811abd521c31bd5b305b0bb",
+ "reference": "a691211e94ff39a34811abd521c31bd5b305b0bb",
"shasum": ""
},
"require": {
- "php": "^5.3.3 || ^7.0"
+ "php": ">=7.1"
},
"require-dev": {
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
+ "phpunit/phpunit": "^8.5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0-dev"
+ "dev-master": "2.1-dev"
}
},
"autoload": {
@@ -955,7 +750,7 @@
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
+ "email": "sebastian@phpunit.de",
"role": "lead"
}
],
@@ -966,35 +761,41 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-timer/issues",
- "source": "https://github.com/sebastianbergmann/php-timer/tree/master"
+ "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.4"
},
- "time": "2017-02-26T11:10:40+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-01T13:42:41+00:00"
},
{
"name": "phpunit/php-token-stream",
- "version": "2.0.2",
+ "version": "4.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
- "reference": "791198a2c6254db10131eecfe8c06670700904db"
+ "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db",
- "reference": "791198a2c6254db10131eecfe8c06670700904db",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/a853a0e183b9db7eed023d7933a858fa1c8d25a3",
+ "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
- "php": "^7.0"
+ "php": "^7.3 || ^8.0"
},
"require-dev": {
- "phpunit/phpunit": "^6.2.4"
+ "phpunit/phpunit": "^9.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-master": "4.0-dev"
}
},
"autoload": {
@@ -1021,58 +822,59 @@
"issues": "https://github.com/sebastianbergmann/php-token-stream/issues",
"source": "https://github.com/sebastianbergmann/php-token-stream/tree/master"
},
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
"abandoned": true,
- "time": "2017-11-27T05:48:46+00:00"
+ "time": "2020-08-04T08:28:15+00:00"
},
{
"name": "phpunit/phpunit",
- "version": "6.5.14",
+ "version": "8.5.38",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "bac23fe7ff13dbdb461481f706f0e9fe746334b7"
+ "reference": "1ecad678646c817a29e55a32c930f3601c3f5a8c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/bac23fe7ff13dbdb461481f706f0e9fe746334b7",
- "reference": "bac23fe7ff13dbdb461481f706f0e9fe746334b7",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1ecad678646c817a29e55a32c930f3601c3f5a8c",
+ "reference": "1ecad678646c817a29e55a32c930f3601c3f5a8c",
"shasum": ""
},
"require": {
+ "doctrine/instantiator": "^1.3.1",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-xml": "*",
- "myclabs/deep-copy": "^1.6.1",
- "phar-io/manifest": "^1.0.1",
- "phar-io/version": "^1.0",
- "php": "^7.0",
- "phpspec/prophecy": "^1.7",
- "phpunit/php-code-coverage": "^5.3",
- "phpunit/php-file-iterator": "^1.4.3",
+ "ext-xmlwriter": "*",
+ "myclabs/deep-copy": "^1.10.0",
+ "phar-io/manifest": "^2.0.3",
+ "phar-io/version": "^3.0.2",
+ "php": ">=7.2",
+ "phpunit/php-code-coverage": "^7.0.12",
+ "phpunit/php-file-iterator": "^2.0.4",
"phpunit/php-text-template": "^1.2.1",
- "phpunit/php-timer": "^1.0.9",
- "phpunit/phpunit-mock-objects": "^5.0.9",
- "sebastian/comparator": "^2.1",
- "sebastian/diff": "^2.0",
- "sebastian/environment": "^3.1",
- "sebastian/exporter": "^3.1",
- "sebastian/global-state": "^2.0",
+ "phpunit/php-timer": "^2.1.2",
+ "sebastian/comparator": "^3.0.5",
+ "sebastian/diff": "^3.0.2",
+ "sebastian/environment": "^4.2.3",
+ "sebastian/exporter": "^3.1.5",
+ "sebastian/global-state": "^3.0.0",
"sebastian/object-enumerator": "^3.0.3",
- "sebastian/resource-operations": "^1.0",
+ "sebastian/resource-operations": "^2.0.1",
+ "sebastian/type": "^1.1.3",
"sebastian/version": "^2.0.1"
},
- "conflict": {
- "phpdocumentor/reflection-docblock": "3.0.2",
- "phpunit/dbunit": "<3.0"
- },
- "require-dev": {
- "ext-pdo": "*"
- },
"suggest": {
- "ext-xdebug": "*",
- "phpunit/php-invoker": "^1.1"
+ "ext-soap": "To be able to generate mocks based on WSDL files",
+ "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage",
+ "phpunit/php-invoker": "To allow enforcing time limits"
},
"bin": [
"phpunit"
@@ -1080,7 +882,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "6.5.x-dev"
+ "dev-master": "8.5-dev"
}
},
"autoload": {
@@ -1108,73 +910,24 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/6.5.14"
- },
- "time": "2019-02-01T05:22:47+00:00"
- },
- {
- "name": "phpunit/phpunit-mock-objects",
- "version": "5.0.10",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
- "reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/cd1cf05c553ecfec36b170070573e540b67d3f1f",
- "reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f",
- "shasum": ""
- },
- "require": {
- "doctrine/instantiator": "^1.0.5",
- "php": "^7.0",
- "phpunit/php-text-template": "^1.2.1",
- "sebastian/exporter": "^3.1"
- },
- "conflict": {
- "phpunit/phpunit": "<6.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^6.5.11"
- },
- "suggest": {
- "ext-soap": "*"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "5.0.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
+ "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.38"
},
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
+ "funding": [
{
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
+ "url": "https://phpunit.de/sponsors.html",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit",
+ "type": "tidelift"
}
],
- "description": "Mock Object library for PHPUnit",
- "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
- "keywords": [
- "mock",
- "xunit"
- ],
- "support": {
- "issues": "https://github.com/sebastianbergmann/phpunit-mock-objects/issues",
- "source": "https://github.com/sebastianbergmann/phpunit-mock-objects/tree/5.0.10"
- },
- "abandoned": true,
- "time": "2018-08-09T05:50:03+00:00"
+ "time": "2024-04-05T04:31:23+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
@@ -1233,30 +986,30 @@
},
{
"name": "sebastian/comparator",
- "version": "2.1.3",
+ "version": "3.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9"
+ "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9",
- "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dc7ceb4a24aede938c7af2a9ed1de09609ca770",
+ "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770",
"shasum": ""
},
"require": {
- "php": "^7.0",
- "sebastian/diff": "^2.0 || ^3.0",
+ "php": ">=7.1",
+ "sebastian/diff": "^3.0",
"sebastian/exporter": "^3.1"
},
"require-dev": {
- "phpunit/phpunit": "^6.4"
+ "phpunit/phpunit": "^8.5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.1.x-dev"
+ "dev-master": "3.0-dev"
}
},
"autoload": {
@@ -1269,6 +1022,10 @@
"BSD-3-Clause"
],
"authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
@@ -1280,10 +1037,6 @@
{
"name": "Bernhard Schussek",
"email": "bschussek@2bepublished.at"
- },
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
}
],
"description": "Provides the functionality to compare PHP values for equality",
@@ -1295,34 +1048,41 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/comparator/issues",
- "source": "https://github.com/sebastianbergmann/comparator/tree/master"
+ "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.5"
},
- "time": "2018-02-01T13:46:46+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2022-09-14T12:31:48+00:00"
},
{
"name": "sebastian/diff",
- "version": "2.0.1",
+ "version": "3.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd"
+ "reference": "98ff311ca519c3aa73ccd3de053bdb377171d7b6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd",
- "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/98ff311ca519c3aa73ccd3de053bdb377171d7b6",
+ "reference": "98ff311ca519c3aa73ccd3de053bdb377171d7b6",
"shasum": ""
},
"require": {
- "php": "^7.0"
+ "php": ">=7.1"
},
"require-dev": {
- "phpunit/phpunit": "^6.2"
+ "phpunit/phpunit": "^7.5 || ^8.0",
+ "symfony/process": "^2 || ^3.3 || ^4"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-master": "3.0-dev"
}
},
"autoload": {
@@ -1335,50 +1095,62 @@
"BSD-3-Clause"
],
"authors": [
- {
- "name": "Kore Nordmann",
- "email": "mail@kore-nordmann.de"
- },
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
+ },
+ {
+ "name": "Kore Nordmann",
+ "email": "mail@kore-nordmann.de"
}
],
"description": "Diff implementation",
"homepage": "https://github.com/sebastianbergmann/diff",
"keywords": [
- "diff"
+ "diff",
+ "udiff",
+ "unidiff",
+ "unified diff"
],
"support": {
"issues": "https://github.com/sebastianbergmann/diff/issues",
- "source": "https://github.com/sebastianbergmann/diff/tree/master"
+ "source": "https://github.com/sebastianbergmann/diff/tree/3.0.6"
},
- "time": "2017-08-03T08:09:46+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-02T06:16:36+00:00"
},
{
"name": "sebastian/environment",
- "version": "3.1.0",
+ "version": "4.2.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5"
+ "reference": "56932f6049a0482853056ffd617c91ffcc754205"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5",
- "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/56932f6049a0482853056ffd617c91ffcc754205",
+ "reference": "56932f6049a0482853056ffd617c91ffcc754205",
"shasum": ""
},
"require": {
- "php": "^7.0"
+ "php": ">=7.1"
},
"require-dev": {
- "phpunit/phpunit": "^6.1"
+ "phpunit/phpunit": "^7.5"
+ },
+ "suggest": {
+ "ext-posix": "*"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.1.x-dev"
+ "dev-master": "4.2-dev"
}
},
"autoload": {
@@ -1405,9 +1177,15 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/environment/issues",
- "source": "https://github.com/sebastianbergmann/environment/tree/master"
+ "source": "https://github.com/sebastianbergmann/environment/tree/4.2.5"
},
- "time": "2017-07-01T08:51:00+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-01T13:49:59+00:00"
},
{
"name": "sebastian/exporter",
@@ -1488,23 +1266,26 @@
},
{
"name": "sebastian/global-state",
- "version": "2.0.0",
+ "version": "3.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4"
+ "reference": "91c7c47047a971f02de57ed6f040087ef110c5d9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
- "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/91c7c47047a971f02de57ed6f040087ef110c5d9",
+ "reference": "91c7c47047a971f02de57ed6f040087ef110c5d9",
"shasum": ""
},
"require": {
- "php": "^7.0"
+ "php": ">=7.2",
+ "sebastian/object-reflector": "^1.1.1",
+ "sebastian/recursion-context": "^3.0"
},
"require-dev": {
- "phpunit/phpunit": "^6.0"
+ "ext-dom": "*",
+ "phpunit/phpunit": "^8.0"
},
"suggest": {
"ext-uopz": "*"
@@ -1512,7 +1293,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-master": "3.0-dev"
}
},
"autoload": {
@@ -1537,9 +1318,15 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/global-state/issues",
- "source": "https://github.com/sebastianbergmann/global-state/tree/2.0.0"
+ "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.5"
},
- "time": "2017-04-27T15:39:26+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-02T06:13:16+00:00"
},
{
"name": "sebastian/object-enumerator",
@@ -1718,25 +1505,25 @@
},
{
"name": "sebastian/resource-operations",
- "version": "1.0.0",
+ "version": "2.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/resource-operations.git",
- "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52"
+ "reference": "72a7f7674d053d548003b16ff5a106e7e0e06eee"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
- "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
+ "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/72a7f7674d053d548003b16ff5a106e7e0e06eee",
+ "reference": "72a7f7674d053d548003b16ff5a106e7e0e06eee",
"shasum": ""
},
"require": {
- "php": ">=5.6.0"
+ "php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "2.0-dev"
}
},
"autoload": {
@@ -1757,10 +1544,71 @@
"description": "Provides a list of PHP built-in functions that operate on resources",
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
"support": {
- "issues": "https://github.com/sebastianbergmann/resource-operations/issues",
- "source": "https://github.com/sebastianbergmann/resource-operations/tree/master"
+ "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.3"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-01T13:59:09+00:00"
+ },
+ {
+ "name": "sebastian/type",
+ "version": "1.1.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/type.git",
+ "reference": "18f071c3a29892b037d35e6b20ddf3ea39b42874"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/18f071c3a29892b037d35e6b20ddf3ea39b42874",
+ "reference": "18f071c3a29892b037d35e6b20ddf3ea39b42874",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^8.2"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Collection of value objects that represent the types of the PHP type system",
+ "homepage": "https://github.com/sebastianbergmann/type",
+ "support": {
+ "issues": "https://github.com/sebastianbergmann/type/issues",
+ "source": "https://github.com/sebastianbergmann/type/tree/1.1.5"
},
- "time": "2015-07-28T20:34:47+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2024-03-01T14:04:07+00:00"
},
{
"name": "sebastian/version",
@@ -1858,64 +1706,6 @@
}
],
"time": "2024-03-03T12:36:25+00:00"
- },
- {
- "name": "webmozart/assert",
- "version": "1.11.0",
- "source": {
- "type": "git",
- "url": "https://github.com/webmozarts/assert.git",
- "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991",
- "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991",
- "shasum": ""
- },
- "require": {
- "ext-ctype": "*",
- "php": "^7.2 || ^8.0"
- },
- "conflict": {
- "phpstan/phpstan": "<0.12.20",
- "vimeo/psalm": "<4.6.1 || 4.6.2"
- },
- "require-dev": {
- "phpunit/phpunit": "^8.5.13"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.10-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Webmozart\\Assert\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Bernhard Schussek",
- "email": "bschussek@gmail.com"
- }
- ],
- "description": "Assertions to validate method input/output with nice error messages.",
- "keywords": [
- "assert",
- "check",
- "validate"
- ],
- "support": {
- "issues": "https://github.com/webmozarts/assert/issues",
- "source": "https://github.com/webmozarts/assert/tree/1.11.0"
- },
- "time": "2022-06-03T18:03:27+00:00"
}
],
"aliases": [],
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index af2233f..c9b678b 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -3,7 +3,6 @@
colors="true"
processIsolation="false"
stopOnFailure="false"
- syntaxCheck="false"
bootstrap="./tests/bootstrap.php"
>
@@ -23,7 +22,7 @@
./src/
-
+
diff --git a/tests/TestCase/PdfTest.php b/tests/TestCase/PdfTest.php
index bb323e1..57e73e5 100644
--- a/tests/TestCase/PdfTest.php
+++ b/tests/TestCase/PdfTest.php
@@ -7,14 +7,14 @@ class PdfTest extends TestCase {
protected $output;
- public function setUp() {
+ public function setUp(): void {
$this->output = dirname(__FILE__)."/pdfTest.pdf";
if (is_file($this->output)) {
unlink($this->output);
}
}
- public function tearDown() {
+ public function tearDown(): void {
if (is_file($this->output)) {
unlink($this->output);
}
@@ -44,11 +44,9 @@ public function testSetVendorManually() {
$this->assertEquals(true, $Pdf instanceof Pdf);
}
- /**
- * @expectedException RuntimeException
- */
public function testNotFoundVendorFullPath() {
- $Pdf = new Pdf('xxx');
+ $this->expectException(RuntimeException::class);
+ new Pdf('xxx');
}
public function testSetOuput() {
From 509561de6c689aaea6524b3250e8f4a77b9f8361 Mon Sep 17 00:00:00 2001
From: Nguyen Van Bach
Date: Wed, 19 Jun 2024 08:28:23 +0700
Subject: [PATCH 10/13] chore: drop support for PHP versions prior to 7.2
---
composer.json | 2 +-
composer.lock | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/composer.json b/composer.json
index e3c9c67..af2a074 100644
--- a/composer.json
+++ b/composer.json
@@ -10,7 +10,7 @@
}
],
"require": {
- "php": ">=5.6",
+ "php": "^7.2",
"knplabs/knp-snappy": "1.4.x",
"h4cc/wkhtmltopdf-i386": "^0.12.4",
"h4cc/wkhtmltopdf-amd64": "^0.12.4"
diff --git a/composer.lock b/composer.lock
index fed4ef3..133c6b7 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "2de592395a553ab500805fc45eee7a4f",
+ "content-hash": "427e402e20adbe91c6562bce5625e845",
"packages": [
{
"name": "h4cc/wkhtmltopdf-amd64",
@@ -1714,7 +1714,7 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
- "php": ">=5.6"
+ "php": "^7.2"
},
"platform-dev": [],
"plugin-api-version": "2.6.0"
From 35638a59aa9c81f34627afed1e611b9e87ec1ff1 Mon Sep 17 00:00:00 2001
From: Nguyen Van Bach
Date: Wed, 19 Jun 2024 08:35:00 +0700
Subject: [PATCH 11/13] chore: update README.md
---
README.md | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 5b8646a..5c38811 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,14 @@
# Cakepdf
-CakePHP plugin for converting HTML to PDF.
-This plugin is compatible with CakePHP 2.x and CakePHP 3.x.
-This plugin could not be made without awesome library [Snappy](https://github.com/KnpLabs/snappy).
-Thankful to the authors of library Snappy.
+Easily generate PDFs from your HTML content.
+
+This versatile tool can be used as:
+
+* A CakePHP plugin: Seamlessly integrate PDF generation into your CakePHP 2.x and above applications.
+* A standalone library: Use it independently outside of CakePHP for maximum flexibility.
+
+Powered by Snappy (https://github.com/KnpLabs/snappy)
+I want to give a big thanks to the creators of the fantastic Snappy library, which makes this functionality possible.
## Installation
From 671d7200b0d08245603d8bc38ee005a74ef1af96 Mon Sep 17 00:00:00 2001
From: Nguyen Van Bach
Date: Wed, 19 Jun 2024 09:20:36 +0700
Subject: [PATCH 12/13] chore: add playground scripts
---
playground/.gitignore | 1 +
playground/generate.php | 40 +++++++++++++++++++++++
playground/html/README.html | 64 +++++++++++++++++++++++++++++++++++++
playground/html/table.html | 22 +++++++++++++
4 files changed, 127 insertions(+)
create mode 100644 playground/.gitignore
create mode 100644 playground/generate.php
create mode 100644 playground/html/README.html
create mode 100644 playground/html/table.html
diff --git a/playground/.gitignore b/playground/.gitignore
new file mode 100644
index 0000000..a136337
--- /dev/null
+++ b/playground/.gitignore
@@ -0,0 +1 @@
+*.pdf
diff --git a/playground/generate.php b/playground/generate.php
new file mode 100644
index 0000000..ffe2463
--- /dev/null
+++ b/playground/generate.php
@@ -0,0 +1,40 @@
+Page
';
+$pdf->addPage($page)
+ ->addPage($page);
+
+$pdf->setOption('page-size', 'A4')
+ ->setOption('orientation', 'Landscape')
+ ->render(PG_PATH . DS . 'simple.pdf', [], true);
+
+// ---------
+
+$pdf = new Pdf();
+$page = file_get_contents(HTML_PATH . DS . 'table.html');
+$pdf->addPage($page);
+$pdf->render(PG_PATH . DS . 'table.pdf', [], true);
+
+// ---------
+
+$pdf = new Pdf();
+$page = file_get_contents(HTML_PATH . DS . 'README.html');
+$pdf->addPage($page);
+$pdf->render(PG_PATH . DS . 'readme.pdf', [], true);
diff --git a/playground/html/README.html b/playground/html/README.html
new file mode 100644
index 0000000..260a0f3
--- /dev/null
+++ b/playground/html/README.html
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
Cakepdf
+
Easily generate PDFs from your HTML content.
+
This versatile tool can be used as:
+
+- A CakePHP plugin: Seamlessly integrate PDF generation into your CakePHP 2.x and above applications.
+- A standalone library: Use it independently outside of CakePHP for maximum flexibility.
+
+
Powered by Snappy (https://github.com/KnpLabs/snappy)
+I want to give a big thanks to the creators of the fantastic Snappy library, which makes this functionality possible.
+
Installation
+
You can install this library using composer.
+
composer require guenbakku/cakepdf
+
Usage
+
<?php
+
+use Guenbakku\Cakepdf\Pdf;
+
+
+
+
+
+
+$Pdf = new Pdf();
+
+
+
+$html = '<p>Long html for long pdf</p>';
+$Pdf->add($html);
+
+
+$page = '<p>Page</p>';
+$Pdf->addPage($page)
+ ->addPage($page);
+
+
+header('Content-Type: application/pdf');
+header('Content-Disposition: inline; filename="file.pdf"');
+$result = $Pdf->render();
+echo $result;
+
+
+$output = '/tmp/cakepdf.pdf';
+$Pdf->render($output);
+
+
+
+$Pdf = new Pdf();
+$Pdf->setOption('page-size', 'A4')
+ ->setOption('orientation', 'Landscape');
+
+
diff --git a/playground/html/table.html b/playground/html/table.html
new file mode 100644
index 0000000..ade6c28
--- /dev/null
+++ b/playground/html/table.html
@@ -0,0 +1,22 @@
+
+
+ Name |
+ Age |
+ Country |
+
+
+ Harry Depp |
+ 28 |
+ Britain |
+
+
+ John Smith |
+ 35 |
+ USA |
+
+
+ Ram Krishna |
+ 19 |
+ Nepal |
+
+
From da46e9c9aa59b3fba39af01269fc139495ec7b6a Mon Sep 17 00:00:00 2001
From: Nguyen Van Bach
Date: Wed, 19 Jun 2024 09:21:48 +0700
Subject: [PATCH 13/13] refactor: add typehint and beatify code
---
README.md | 14 ++--
src/Pdf.php | 148 ++++++++++++++++++++-----------------
tests/TestCase/PdfTest.php | 58 +++++++--------
3 files changed, 116 insertions(+), 104 deletions(-)
diff --git a/README.md b/README.md
index 5c38811..289a82e 100644
--- a/README.md
+++ b/README.md
@@ -30,31 +30,31 @@ use Guenbakku\Cakepdf\Pdf;
// wkhtmltopdf binary which is installed as composer dependencies.
// So following setup also automatically set wkhtmltopdf binary's path
// corresponding to current processor's structure (32 or 64 bit).
-$Pdf = new Pdf();
+$pdf = new Pdf();
// Add html to render to pdf.
// Break page will be inserted automatically by wkhtmltopdf.
$html = 'Long html for long pdf
';
-$Pdf->add($html);
+$pdf->add($html);
// Add each html as a seperated pdf page.
$page = 'Page
';
-$Pdf->addPage($page)
+$pdf->addPage($page)
->addPage($page);
// Render output to display in browser.
header('Content-Type: application/pdf');
header('Content-Disposition: inline; filename="file.pdf"');
-$result = $Pdf->render();
+$result = $pdf->render();
echo $result;
// Or render output to pdf file.
$output = '/tmp/cakepdf.pdf';
-$Pdf->render($output);
+$pdf->render($output);
// Set options for wkhtmltopdf.
// Basically same with Snappy's interface.
-$Pdf = new Pdf();
-$Pdf->setOption('page-size', 'A4')
+$pdf = new Pdf();
+$pdf->setOption('page-size', 'A4')
->setOption('orientation', 'Landscape');
```
diff --git a/src/Pdf.php b/src/Pdf.php
index 64e6516..dccbc50 100644
--- a/src/Pdf.php
+++ b/src/Pdf.php
@@ -1,9 +1,8 @@
.page-container {
@@ -38,22 +52,25 @@ class Pdf {
page-break-after: auto;
}
';
-
+
protected $pageContainer = '%s
';
-
- public function __construct($vendor = array('vendor', 'vendors')) {
+
+ /**
+ * @param string[]|string $vendor
+ */
+ public function __construct($vendor = ['vendor', 'vendors']) {
$this->_setVendor($vendor);
$this->_setBinary();
- $this->Snappy = new \Knp\Snappy\Pdf($this->binary);
+ $this->snappy = new \Knp\Snappy\Pdf($this->binary);
}
-
+
/**
* Set output path of pdf file
*
- * @param string: output path
- * @return object: this object
+ * @param string $path path of output file
+ * @return Pdf this object
*/
- public function setOutput($path) {
+ public function setOutput(string $path): Pdf {
$this->output = $path;
return $this;
}
@@ -61,20 +78,19 @@ public function setOutput($path) {
/**
* Get output path of pdf file
*
- * @param void
- * @return string
+ * @return string
*/
- public function getOutput() {
+ public function getOutput(): ?string {
return $this->output;
}
/**
- * Add html as seperated pdf page
+ * Add html as separated pdf page
*
- * @param string: html
- * @return object: this object
+ * @param string $html html string of a page
+ * @return Pdf this object
*/
- public function addPage($html) {
+ public function addPage(string $html): Pdf {
$page = sprintf($this->pageContainer, $html);
if (strpos($this->html, $this->pageStyle) === false) {
$this->html .= $this->pageStyle . $page;
@@ -87,11 +103,11 @@ public function addPage($html) {
/**
* Add html to generate pdf
*
- * @param string: html
- * @param bool: add as seperated page or not
- * @return object: this object
+ * @param string $html html string
+ * @param bool $breakPage add as separated page or not
+ * @return Pdf this object
*/
- public function add($html, $breakPage = false) {
+ public function add(string $html, bool $breakPage = false): Pdf {
if ($breakPage === false) {
$this->html .= $html;
} else {
@@ -99,52 +115,49 @@ public function add($html, $breakPage = false) {
}
return $this;
}
-
+
/**
* Render pdf from added html
*
- * @param string: output path
- * @param array: an array of options for this generation only
- * @param bool: overwrite existing file or not.
- * Only take effect if output is not null
- * @return string|null: pdf content or null if output to file
+ * @param string $output path of output file
+ * @param array $options an array of options for this generation only
+ * @param bool $overwrite overwrite existing file or not. Only take effect if output is not null
+ * @return string|null pdf content or null if output to file
*/
- public function render($output = null, $options = array(), $overwrite = false) {
+ public function render(?string $output = null, array $options = [], bool $overwrite = false) {
if ($output !== null) {
$this->setOutput($output);
}
if (empty($this->getOutput())) {
- return $this->Snappy->getOutputFromHtml($this->html, $options);
+ return $this->snappy->getOutputFromHtml($this->html, $options);
} else {
- return $this->Snappy->generateFromHtml($this->html, $this->getOutput(), $options, $overwrite);
+ return $this->snappy->generateFromHtml($this->html, $this->getOutput(), $options, $overwrite);
}
}
-
+
/**
* Return Snappy object
*
- * @param void
- * @return object: Snappy object
+ * @return object Snappy object
*/
- public function getSnappy() {
- return $this->Snappy;
+ public function getSnappy(): \Knp\Snappy\Pdf {
+ return $this->snappy;
}
-
+
/**
* This magic is used for calling methods of Snappy object
*/
public function __call($name, $arguments) {
- $this->Snappy->$name(...$arguments);
+ $this->snappy->$name(...$arguments);
return $this;
}
-
+
/**
* Find root of application
*
- * @param string: path of current script
- * @return string: path of root
+ * @return string path of root
*/
- protected function _findVendorFullPath() {
+ protected function _findVendorFullPath(): string {
$findRoot = function ($vendor) {
$root = __FILE__;
do {
@@ -154,10 +167,10 @@ protected function _findVendorFullPath() {
return $root;
}
} while ($root !== $lastRoot);
-
+
return null;
};
-
+
foreach ($this->vendor as $vendor) {
$root = $findRoot($vendor);
if (!empty($root)) {
@@ -166,49 +179,48 @@ protected function _findVendorFullPath() {
));
}
}
-
+
throw new RuntimeException('Cannot find the root of the application');
}
/**
* Set path to vendor's folder
*
- * @param string|array: path(s) to vendor's folder
- * @return object: this object
+ * @param string[]|string $vendor path(s) of vendor's folder
+ * @return Pdf this object
*/
- protected function _setVendor($vendor) {
+ protected function _setVendor($vendor): Pdf {
if (!is_array($vendor)) {
$vendor = array($vendor);
}
$this->vendor = $vendor;
return $this;
}
-
+
/**
* Set path of wkhtmltopdf.
- * This will set the correct wkhtmltopdf binary
+ * This will set the correct wkhtmltopdf binary
* corresponding to structure of current processor (32 or 64 bit)
*
- * @param void
- * @return string: path of binary
+ * @return string path of binary
*/
- protected function _setBinary() {
+ protected function _setBinary(): string {
$is32bit = PHP_INT_SIZE === 4;
if ($is32bit) {
$binary = 'wkhtmltopdf-i386';
} else {
$binary = 'wkhtmltopdf-amd64';
}
-
+
$vendorFullPath = $this->_findVendorFullPath();
$binary = implode(DIRECTORY_SEPARATOR, array(
$vendorFullPath, 'bin', $binary
));
-
+
if (is_file($binary) || is_link($binary)) {
$this->binary = $binary;
}
-
+
return $this->binary;
}
}
diff --git a/tests/TestCase/PdfTest.php b/tests/TestCase/PdfTest.php
index 57e73e5..307e2ea 100644
--- a/tests/TestCase/PdfTest.php
+++ b/tests/TestCase/PdfTest.php
@@ -21,7 +21,7 @@ public function tearDown(): void {
}
public function testInstanceSnappy() {
- $Pdf = new Pdf();
+ $pdf = new Pdf();
$is32bit = PHP_INT_SIZE === 4;
if ($is32bit) {
@@ -36,12 +36,12 @@ public function testInstanceSnappy() {
$Snappy = new Knp\Snappy\Pdf($binary);
- $this->assertEquals($Snappy, $Pdf->getSnappy());
+ $this->assertEquals($Snappy, $pdf->getSnappy());
}
public function testSetVendorManually() {
- $Pdf = new Pdf('vendor');
- $this->assertEquals(true, $Pdf instanceof Pdf);
+ $pdf = new Pdf('vendor');
+ $this->assertEquals(true, $pdf instanceof Pdf);
}
public function testNotFoundVendorFullPath() {
@@ -50,54 +50,54 @@ public function testNotFoundVendorFullPath() {
}
public function testSetOuput() {
- $Pdf = new Pdf();
- $Pdf->add('Test
');
- $Pdf->setOutput($this->output);
- $Pdf->render();
+ $pdf = new Pdf();
+ $pdf->add('Test
');
+ $pdf->setOutput($this->output);
+ $pdf->render();
$this->assertEquals(true, is_file($this->output));
}
public function testGetOutput() {
- $Pdf = new Pdf();
- $Pdf->setOutput($this->output);
- $this->assertEquals($this->output, $Pdf->getOutput());
+ $pdf = new Pdf();
+ $pdf->setOutput($this->output);
+ $this->assertEquals($this->output, $pdf->getOutput());
}
public function testGenerateFileByAdd() {
- $Pdf = new Pdf();
- $Pdf->add('Test
');
- $Pdf->render($this->output);
+ $pdf = new Pdf();
+ $pdf->add('Test
');
+ $pdf->render($this->output);
$this->assertEquals(true, is_file($this->output));
}
public function testGenerateFileByAddPage() {
- $Pdf = new Pdf();
- $Pdf->add('Test1
', true);
- $Pdf->addPage('Test2
');
- $Pdf->render($this->output);
+ $pdf = new Pdf();
+ $pdf->add('Test1
', true);
+ $pdf->addPage('Test2
');
+ $pdf->render($this->output);
$this->assertEquals(true, is_file($this->output));
}
public function testOutputByAdd() {
- $Pdf = new Pdf();
- $Pdf->add('Test
');
- $result = $Pdf->render();
+ $pdf = new Pdf();
+ $pdf->add('Test
');
+ $result = $pdf->render();
$this->assertEquals(true, !is_null($result));
}
public function testOutputByAddPage() {
- $Pdf = new Pdf();
- $Pdf->addPage('Test1
');
- $Pdf->addPage('Test2
');
- $result = $Pdf->render();
+ $pdf = new Pdf();
+ $pdf->addPage('Test1
');
+ $pdf->addPage('Test2
');
+ $result = $pdf->render();
$this->assertEquals(true, !is_null($result));
}
public function testMagicCall() {
- $Pdf = new Pdf();
- $Pdf->setOption('orientation', 'Landscape');
- $Pdf->add('Test
');
- $Pdf->render($this->output);
+ $pdf = new Pdf();
+ $pdf->setOption('orientation', 'Landscape');
+ $pdf->add('Test
');
+ $pdf->render($this->output);
$this->assertEquals(true, is_file($this->output));
}
}