Skip to content

Commit bf14e66

Browse files
author
roadiz-ci
committed
Merge branch hotfix/2.7.38
1 parent 6d9c613 commit bf14e66

4 files changed

Lines changed: 73 additions & 2 deletions

File tree

.github/workflows/run-test.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Unit tests, static analysis and code style
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- 'release/**'
8+
- 'hotfix/**'
9+
tags: ['**']
10+
pull_request:
11+
types:
12+
- opened
13+
- reopened
14+
- synchronize
15+
- ready_for_review
16+
17+
jobs:
18+
run-tests:
19+
runs-on: ubuntu-latest
20+
strategy:
21+
matrix:
22+
php-version: ['8.3', '8.4', '8.5']
23+
steps:
24+
- uses: shivammathur/setup-php@v2
25+
with:
26+
php-version: ${{ matrix.php-version }}
27+
- uses: actions/checkout@v3
28+
- name: Cache Composer packages
29+
id: composer-cache
30+
uses: actions/cache@v3
31+
with:
32+
path: vendor
33+
key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
34+
restore-keys: |
35+
${{ runner.os }}-php-${{ matrix.php-version }}-
36+
- name: Install Dependencies
37+
run: composer install --no-scripts --no-ansi --no-interaction --no-progress
38+
- name: Run PHPStan
39+
run: vendor/bin/phpstan analyse --no-progress -c phpstan.neon
40+
- name: Run Unit tests
41+
run: vendor/bin/phpunit -v --whitelist ./src tests

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright © 2026 Ambroise Maupate
3+
Copyright © 2025 Ambroise Maupate
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
66

phpstan.neon

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
parameters:
2+
level: 7
3+
paths:
4+
- src
5+
excludePaths:
6+
- */node_modules/*
7+
- */bower_components/*
8+
- */static/*
9+
ignoreErrors:
10+
- identifier: missingType.iterableValue
11+
- identifier: missingType.generics
12+
- '#Call to an undefined method Doctrine\\Persistence\\ObjectRepository#'
13+
- '#Call to an undefined method Doctrine\\Persistence\\ObjectManager#'
14+
- '#Call to an undefined method Doctrine\\ORM\\EntityRepository#'
15+
# PHPStan Doctrine does not support ResolveTargetEntityListener
16+
- '#Property ([a-zA-Z\\\:\$]+) type mapping mismatch: property can contain ([a-zA-Z\\\&\>\<]+)Interface\>?\|null but database expects ([a-zA-Z\\\&\>\<]+)\|null#'
17+
- '#Property ([a-zA-Z\\\:\$]+) type mapping mismatch: property can contain ([a-zA-Z\\\&\>\<]+)Interface\>? but database expects ([a-zA-Z\\\&\>\<]+)#'
18+
- '#type mapping mismatch: database can contain array\|bool\|float\|int\|JsonSerializable\|stdClass\|string\|null but property expects array\|null#'
19+
- '#Doctrine\\ORM\\Mapping\\GeneratedValue constructor expects#'
20+
- '#type mapping mismatch: property can contain Doctrine\\Common\\Collections\\Collection<int, [^\>]+> but database expects Doctrine\\Common\\Collections\\Collection&iterable<[^\>]+>#'
21+
- '#should return Doctrine\\Common\\Collections\\Collection<int, [^\>]+Interface> but returns Doctrine\\Common\\Collections\\Collection<int, [^\>]+>#'
22+
- '#but returns Doctrine\\Common\\Collections\\ReadableCollection<int, [^\>]+>#'
23+
- '#does not accept Doctrine\\Common\\Collections\\ReadableCollection<int, [^\>]+>#'
24+
reportUnmatchedIgnoredErrors: false
25+
26+
includes:
27+
- vendor/phpstan/phpstan-doctrine/extension.neon
28+
- vendor/phpstan/phpstan-doctrine/rules.neon

src/TwigExtension/DocumentExtension.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ public function display(?BaseDocumentInterface $document = null, ?array $options
106106

107107
return '';
108108
}
109-
$options ??= [];
109+
if (null === $options) {
110+
$options = [];
111+
}
110112
try {
111113
return $this->renderer->render($document, $options);
112114
} catch (InvalidEmbedId $embedException) {

0 commit comments

Comments
 (0)