Skip to content

Commit d1ab190

Browse files
committed
Merge branch 'release/1.4.0'
2 parents 5556f51 + 0179fc8 commit d1ab190

File tree

18 files changed

+149
-227
lines changed

18 files changed

+149
-227
lines changed

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ tests/ export-ignore
33
.gitattributes export-ignore
44
.gitignore export-ignore
55
.php-cs-fixer-dist.php export-ignore
6-
phpunit.xml.dist export-ignore
6+
phpstan.neon.dist export-ignore
7+
phpunit.xml.dist export-ignore

.github/workflows/ci.yaml

Lines changed: 84 additions & 180 deletions
Original file line numberDiff line numberDiff line change
@@ -1,187 +1,91 @@
1-
name: "CI Tests"
1+
name: Build
22

33
on:
4-
pull_request:
5-
push:
4+
pull_request: ~
5+
push: ~
66

77
jobs:
8-
9-
php-74-symfony54:
10-
name: PHP 7.4 / Symfony 5.4
11-
runs-on: ubuntu-latest
8+
phpstan:
9+
runs-on: ubuntu-20.04
10+
strategy:
11+
matrix:
12+
php:
13+
- '7.4'
14+
- '8.2'
15+
include:
16+
- description: 'Symfony 5.4'
17+
php: '7.4'
18+
symfony: 5.4.*
19+
- description: 'Symfony 6.2'
20+
php: '8.2'
21+
symfony: 6.2.*
22+
name: PHPStan - PHP ${{ matrix.php }} tests (${{ matrix.description }})
1223
steps:
13-
- name: "Checkout"
14-
uses: "actions/checkout@v3"
15-
with:
16-
fetch-depth: 2
17-
18-
- name: "Install PHP 7.4"
19-
uses: "shivammathur/setup-php@v2"
20-
with:
21-
php-version: "7.4"
22-
23-
- name: "Cache composer packages"
24-
uses: "actions/cache@v3"
25-
with:
26-
path: "~/.composer/cache"
27-
key: "php-7.4-composer-locked-${{ hashFiles('composer.lock') }}"
28-
restore-keys: "php-7.4-composer-locked-"
29-
30-
- name: "Install Symfony 5.4"
31-
run: "composer require symfony/symfony:5.4.* --no-update"
32-
33-
- name: "Install dependencies with composer"
34-
run: "composer update --no-interaction"
35-
36-
- name: "Run PHPUnit Tests"
37-
run: "composer test"
38-
39-
php-80-symfony54:
40-
name: PHP 8.0 / Symfony 5.4
41-
runs-on: ubuntu-latest
24+
- name: Checkout
25+
uses: actions/checkout@v3
26+
27+
- name: Setup PHP
28+
uses: shivammathur/setup-php@v2
29+
with:
30+
coverage: "none"
31+
php-version: ${{ matrix.php }}
32+
- run: |
33+
sed -ri 's/"symfony\/(.+)": "(.+)"/"symfony\/\1": "'${{ matrix.symfony }}'"/' composer.json;
34+
- run: composer update --no-interaction --no-progress --ansi ${{ matrix.composer_option }}
35+
- run: vendor/bin/phpstan analyse -c phpstan.neon.dist --error-format=github
36+
37+
cs-fixer:
38+
runs-on: ubuntu-20.04
39+
name: PHP-CS-Fixer
4240
steps:
43-
- name: "Checkout"
44-
uses: "actions/checkout@v3"
45-
with:
46-
fetch-depth: 2
47-
48-
- name: "Install PHP 8"
49-
uses: "shivammathur/setup-php@v2"
50-
with:
51-
php-version: "8.0"
52-
53-
- name: "Cache composer packages"
54-
uses: "actions/cache@v3"
55-
with:
56-
path: "~/.composer/cache"
57-
key: "php-8.0-composer-locked-${{ hashFiles('composer.lock') }}"
58-
restore-keys: "php-8.0-composer-locked-"
59-
60-
- name: "Install Symfony 5.4"
61-
run: "composer require symfony/symfony:5.4.* --no-update"
62-
63-
- name: "Install dependencies with composer"
64-
run: "composer update --no-interaction"
65-
66-
- name: "Run PHPUnit Tests"
67-
run: "composer test"
68-
69-
php-81-symfony54:
70-
name: PHP 8.1 / Symfony 5.4
71-
runs-on: ubuntu-latest
72-
steps:
73-
- name: "Checkout"
74-
uses: "actions/checkout@v3"
75-
with:
76-
fetch-depth: 2
77-
78-
- name: "Install PHP 8.1"
79-
uses: "shivammathur/setup-php@v2"
80-
with:
81-
php-version: "8.1"
82-
83-
- name: "Cache composer packages"
84-
uses: "actions/cache@v3"
85-
with:
86-
path: "~/.composer/cache"
87-
key: "php-8.1-composer-locked-${{ hashFiles('composer.lock') }}"
88-
restore-keys: "php-8.1-composer-locked-"
89-
90-
- name: "Install Symfony 5.4"
91-
run: "composer require symfony/symfony:5.4.* --no-update"
92-
93-
- name: "Install dependencies with composer"
94-
run: "composer update --no-interaction"
95-
96-
- name: "Run PHPUnit Tests"
97-
run: "composer test"
98-
99-
php-82-symfony54:
100-
name: PHP 8.2 / Symfony 5.4
101-
runs-on: ubuntu-latest
41+
- name: Checkout
42+
uses: actions/checkout@v3
43+
- name: Fix CS
44+
uses: docker://oskarstark/php-cs-fixer-ga
45+
tests:
46+
runs-on: ubuntu-20.04
47+
strategy:
48+
matrix:
49+
php:
50+
- '7.4'
51+
- '8.0'
52+
- '8.1'
53+
- '8.2'
54+
include:
55+
- description: 'Symfony 5.4'
56+
php: '7.4'
57+
symfony: 5.4.*
58+
composer_option: '--prefer-lowest'
59+
- description: 'Symfony 6.0'
60+
php: '8.0'
61+
symfony: 6.0.*
62+
- description: 'Symfony 6.1'
63+
php: '8.1'
64+
symfony: 6.1.*
65+
- description: 'Symfony 6.2'
66+
php: '8.2'
67+
symfony: 6.2.*
68+
- description: 'Symfony 6.3'
69+
php: '8.2'
70+
symfony: 6.3.*-dev
71+
name: PHP ${{ matrix.php }} tests (${{ matrix.description }})
10272
steps:
103-
- name: "Checkout"
104-
uses: "actions/checkout@v3"
105-
with:
106-
fetch-depth: 2
107-
108-
- name: "Install PHP 8.2"
109-
uses: "shivammathur/setup-php@v2"
110-
with:
111-
php-version: "8.2"
112-
113-
- name: "Cache composer packages"
114-
uses: "actions/cache@v3"
115-
with:
116-
path: "~/.composer/cache"
117-
key: "php-8.2-composer-locked-${{ hashFiles('composer.lock') }}"
118-
restore-keys: "php-8.2-composer-locked-"
119-
120-
- name: "Install Symfony 5.4"
121-
run: "composer require symfony/symfony:5.4.* --no-update"
122-
123-
- name: "Install dependencies with composer"
124-
run: "composer update --no-interaction"
125-
126-
- name: "Run PHPUnit Tests"
127-
run: "composer test"
128-
129-
php-81-symfony62:
130-
name: PHP 8.1 / Symfony 6.2
131-
runs-on: ubuntu-latest
132-
steps:
133-
- name: "Checkout"
134-
uses: "actions/checkout@v3"
135-
with:
136-
fetch-depth: 2
137-
138-
- name: "Install PHP 8.1"
139-
uses: "shivammathur/setup-php@v2"
140-
with:
141-
php-version: "8.1"
142-
143-
- name: "Cache composer packages"
144-
uses: "actions/cache@v3"
145-
with:
146-
path: "~/.composer/cache"
147-
key: "php-8.1-symfony-6.2-composer-locked-${{ hashFiles('composer.lock') }}"
148-
restore-keys: "php-8.1-symfony-6.2-composer-locked-"
149-
150-
- name: "Install Symfony 6.2"
151-
run: "composer require symfony/symfony:6.2.* --no-update"
152-
153-
- name: "Install dependencies with composer"
154-
run: "composer update --no-interaction"
155-
156-
- name: "Run PHPUnit Tests"
157-
run: "composer test"
158-
159-
php-82-symfony62:
160-
name: PHP 8.2 / Symfony 6.2
161-
runs-on: ubuntu-latest
162-
steps:
163-
- name: "Checkout"
164-
uses: "actions/checkout@v3"
165-
with:
166-
fetch-depth: 2
167-
168-
- name: "Install PHP 8.2"
169-
uses: "shivammathur/setup-php@v2"
170-
with:
171-
php-version: "8.2"
172-
173-
- name: "Cache composer packages"
174-
uses: "actions/cache@v3"
175-
with:
176-
path: "~/.composer/cache"
177-
key: "php-8.1-symfony-6.2-composer-locked-${{ hashFiles('composer.lock') }}"
178-
restore-keys: "php-8.1-symfony-6.2-composer-locked-"
179-
180-
- name: "Install Symfony 6.2"
181-
run: "composer require symfony/symfony:6.2.* --no-update"
182-
183-
- name: "Install dependencies with composer"
184-
run: "composer update --no-interaction"
185-
186-
- name: "Run PHPUnit Tests"
187-
run: "composer test"
73+
- name: Checkout
74+
uses: actions/checkout@v3
75+
- name: Cache
76+
uses: actions/cache@v3
77+
with:
78+
path: ~/.composer/cache/files
79+
key: ${{ matrix.php }}-${{ matrix.symfony }}-${{ matrix.composer_option }}
80+
- name: Setup PHP
81+
uses: shivammathur/setup-php@v2
82+
with:
83+
php-version: ${{ matrix.php }}
84+
- run: |
85+
sed -ri 's/"symfony\/(.+)": "(.+)"/"symfony\/\1": "'${{ matrix.symfony }}'"/' composer.json;
86+
if: contains(matrix.symfony, '-dev')
87+
- run: composer config minimum-stability dev
88+
- run: composer config prefer-stable true
89+
if: matrix.symfony
90+
- run: composer update --no-interaction --no-progress --ansi ${{ matrix.composer_option }}
91+
- run: composer test

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1+
/var
12
/vendor
23
/composer.lock
34
/.php-cs-fixer.cache
4-
.phpunit.result.cache
5+
.phpunit.result.cache

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## Unreleased
88

9+
## 1.4.0 - 2023-01-16
10+
### Added
11+
- Add support for php-weasyprint 0.13
12+
13+
### Deprecated
14+
- Deprecate Image response
15+
916
## 1.3.0 - 2022-12-09
1017
### Added
1118
- Add PHP 8.2

composer.json

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "pontedilana/weasyprint-bundle",
3-
"type": "symfony-bundle",
43
"description": "Easily create PDF in Symfony by converting Twig/HTML templates.",
4+
"license": "MIT",
5+
"type": "symfony-bundle",
56
"keywords": [
67
"weasyprint",
78
"pdf",
89
"bundle",
910
"symfony-bundle"
1011
],
11-
"license": "MIT",
1212
"authors": [
1313
{
1414
"name": "Pontedilana Dev Team",
@@ -17,20 +17,22 @@
1717
],
1818
"require": {
1919
"php": "7.4.* || 8.0.* || 8.1.* || 8.2.*",
20-
"pontedilana/php-weasyprint": "^0.10 || ^0.11 || ^0.12 || ^1.0",
21-
"symfony/framework-bundle": "^5.4 || ^6.0"
20+
"pontedilana/php-weasyprint": "^0.10 || ^0.11 || ^0.12 || ^0.13 || ^1.0",
21+
"symfony/config": "^5.4 || ^6.0",
22+
"symfony/dependency-injection": "^5.4 || ^6.0",
23+
"symfony/http-foundation": "^5.4 || ^6.0",
24+
"symfony/http-kernel": "^5.4 || ^6.0"
2225
},
2326
"require-dev": {
2427
"doctrine/annotations": "^1.11",
25-
"friendsofphp/php-cs-fixer": "^3.4",
28+
"friendsofphp/php-cs-fixer": "^3.13",
29+
"phpstan/extension-installer": "^1.1",
2630
"phpstan/phpstan": "^1.2",
2731
"phpstan/phpstan-phpunit": "^1.0",
2832
"phpstan/phpstan-symfony": "^1.0",
29-
"symfony/asset": "^5.4 || ^6.0",
30-
"symfony/finder": "^5.4 || ^6.0",
33+
"phpunit/phpunit": "^9.5",
34+
"symfony/framework-bundle": "^5.4 || ^6.0",
3135
"symfony/phpunit-bridge": "^5.4 || ^6.0",
32-
"symfony/security-csrf": "^5.4 || ^6.0",
33-
"symfony/templating": "^5.4 || ^6.0",
3436
"symfony/validator": "^5.4 || ^6.0",
3537
"symfony/yaml": "^5.4 || ^6.0"
3638
},
@@ -44,6 +46,13 @@
4446
"Pontedilana\\WeasyprintBundle\\Tests\\": "tests/"
4547
}
4648
},
49+
"config": {
50+
"allow-plugins": {
51+
"phpstan/extension-installer": true,
52+
"symfony/flex": true,
53+
"symfony/runtime": true
54+
}
55+
},
4756
"scripts": {
4857
"check-cs": "vendor/bin/php-cs-fixer fix --diff --dry-run --verbose",
4958
"fix-cs": "vendor/bin/php-cs-fixer fix --verbose",

config/image.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<container xmlns="http://symfony.com/schema/dic/services"
44
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
5+
xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd">
66

77
<services>
88
<service id="weasyprint.image" class="Pontedilana\PhpWeasyPrint\Image" public="true">

config/pdf.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" ?>
22

33
<container xmlns="http://symfony.com/schema/dic/services"
4-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd">
66

77
<services>
88
<service id="weasyprint.pdf" class="Pontedilana\PhpWeasyPrint\Pdf" public="true">

phpstan.neon

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)