Skip to content

Commit 067b5f0

Browse files
authored
Merge pull request #405 from gsteel/phpunit
Allow PHPUnit 12.x + Minor QA
2 parents 6d7924d + 3ce33f1 commit 067b5f0

File tree

10 files changed

+77
-59
lines changed

10 files changed

+77
-59
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@
4343
},
4444
"require-dev": {
4545
"laminas/laminas-coding-standard": "~3.1.0",
46-
"phpunit/phpunit": "^11.5.44",
46+
"phpunit/phpunit": "^11.5.51 || ^12.5.9",
4747
"psalm/plugin-phpunit": "^0.19.5",
4848
"symfony/console": "v7.4.4",
49-
"vimeo/psalm": "^6.13.1",
49+
"vimeo/psalm": "^6.15.0",
5050
"amphp/dns": "^2.4.0",
5151
"amphp/socket": "^2.3.1"
5252
},

composer.lock

Lines changed: 29 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/book/v2/view-event.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ The methods it defines are:
3030

3131
The following events are triggered, in the following order:
3232

33-
Name | Constant | Description
34-
--------------- | -------------------------------- | -----------
35-
`renderer` | `ViewEvent::EVENT_RENDERER` | Render the view, with the help of renderers.
36-
`renderer.post` | `ViewEvent::EVENT_RENDERER_POST` | Triggers after the view is rendered.
37-
`response` | `ViewEvent::EVENT_RESPONSE` | Populate the response from the view.
33+
| Name | Constant | Description |
34+
|-----------------|----------------------------------|----------------------------------------------|
35+
| `renderer` | `ViewEvent::EVENT_RENDERER` | Render the view, with the help of renderers. |
36+
| `renderer.post` | `ViewEvent::EVENT_RENDERER_POST` | Triggers after the view is rendered. |
37+
| `response` | `ViewEvent::EVENT_RESPONSE` | Populate the response from the view. |
3838

3939
Each is described in the following sections.
4040

@@ -49,33 +49,33 @@ priority):
4949

5050
This listener is added when the strategy used for rendering is `PhpStrategy`:
5151

52-
Class | Priority | Method called | Description
53-
-------------------------------- | -------- | ---------------- | -----------
54-
`Laminas\View\Strategy\PhpStrategy` | 1 | `selectRenderer` | Return a `PhpRenderer`
52+
| Class | Priority | Method called | Description |
53+
|-------------------------------------|----------|------------------|------------------------|
54+
| `Laminas\View\Strategy\PhpStrategy` | 1 | `selectRenderer` | Return a `PhpRenderer` |
5555

5656
#### For JsonStrategy
5757

5858
This listener is added when the strategy used for rendering is `JsonStrategy`:
5959

60-
Class | Priority | Method called | Description
61-
--------------------------------- | -------- | ---------------- | -----------
62-
`Laminas\View\Strategy\JsonStrategy` | 1 | `selectRenderer` | Return a `JsonRenderer`
60+
| Class | Priority | Method called | Description |
61+
|--------------------------------------|----------|------------------|-------------------------|
62+
| `Laminas\View\Strategy\JsonStrategy` | 1 | `selectRenderer` | Return a `JsonRenderer` |
6363

6464
#### For FeedStrategy
6565

6666
This listener is added when the strategy used for rendering is `FeedStrategy`:
6767

68-
Class | Priority | Method called | Description
69-
--------------------------------- | -------- | ---------------- | -----------
70-
`Laminas\View\Strategy\FeedStrategy` | 1 | `selectRenderer` | Return a `FeedRenderer`
68+
| Class | Priority | Method called | Description |
69+
|--------------------------------------|----------|------------------|-------------------------|
70+
| `Laminas\View\Strategy\FeedStrategy` | 1 | `selectRenderer` | Return a `FeedRenderer` |
7171

7272
### Triggerers
7373

7474
This event is triggered by the following classes:
7575

76-
Class | In method | Description
77-
---------------- | --------- | -----------
78-
`Laminas\View\View` | `render` | It has a short circuit callback that stops propagation once one result return an instance of a Renderer.
76+
| Class | In method | Description |
77+
|---------------------|-----------|----------------------------------------------------------------------------------------------------------|
78+
| `Laminas\View\View` | `render` | It has a short circuit callback that stops propagation once one result return an instance of a Renderer. |
7979

8080
## ViewEvent::EVENT\_RENDERER\_POST
8181

@@ -87,9 +87,9 @@ There are currently no built-in listeners for this event.
8787

8888
This event is triggered by the following classes:
8989

90-
Class | In method | Description
91-
---------------- | --------- | -----------
92-
`Laminas\View\View` | `render` | This event is triggered after `ViewEvent::EVENT_RENDERER` and before `ViewEvent::EVENT_RESPONSE`.
90+
| Class | In method | Description |
91+
|---------------------|-----------|---------------------------------------------------------------------------------------------------|
92+
| `Laminas\View\View` | `render` | This event is triggered after `ViewEvent::EVENT_RENDERER` and before `ViewEvent::EVENT_RESPONSE`. |
9393

9494
## ViewEvent::EVENT\_RESPONSE
9595

@@ -102,30 +102,30 @@ priority):
102102

103103
This listener is added when the strategy used for rendering is `PhpStrategy`:
104104

105-
Class | Priority | Method called | Description
106-
-------------------------------- | -------- | ---------------- | -----------
107-
`Laminas\View\Strategy\PhpStrategy` | 1 | `injectResponse` | Populate the `Response` object from the rendered view.
105+
| Class | Priority | Method called | Description |
106+
|-------------------------------------|----------|------------------|--------------------------------------------------------|
107+
| `Laminas\View\Strategy\PhpStrategy` | 1 | `injectResponse` | Populate the `Response` object from the rendered view. |
108108

109109
#### For JsonStrategy
110110

111111
This listener is added when the strategy used for rendering is `JsonStrategy`:
112112

113-
Class | Priority | Method called | Description
114-
--------------------------------- | -------- | ---------------- | -----------
115-
`Laminas\View\Strategy\JsonStrategy` | 1 | `injectResponse` | Populate the `Response` object with the serialized JSON content.
113+
| Class | Priority | Method called | Description |
114+
|--------------------------------------|----------|------------------|------------------------------------------------------------------|
115+
| `Laminas\View\Strategy\JsonStrategy` | 1 | `injectResponse` | Populate the `Response` object with the serialized JSON content. |
116116

117117
#### For FeedStrategy
118118

119119
This listener is added when the strategy used for rendering is `FeedStrategy`:
120120

121-
Class | Priority | Method called | Description
122-
--------------------------------- | -------- | ---------------- | -----------
123-
`Laminas\View\Strategy\FeedStrategy` | 1 | `injectResponse` | Populate the `Response` object with the rendered feed.
121+
| Class | Priority | Method called | Description |
122+
|--------------------------------------|----------|------------------|--------------------------------------------------------|
123+
| `Laminas\View\Strategy\FeedStrategy` | 1 | `injectResponse` | Populate the `Response` object with the rendered feed. |
124124

125125
### Triggerers
126126

127127
This event is triggered by the following classes:
128128

129-
Class | In method | Description
130-
---------------- | --------- | -----------
131-
`Laminas\View\View` | `render` | This event is triggered after `ViewEvent::EVENT_RENDERER` and `ViewEvent::EVENT_RENDERER_POST`.
129+
| Class | In method | Description |
130+
|---------------------|-----------|-------------------------------------------------------------------------------------------------|
131+
| `Laminas\View\View` | `render` | This event is triggered after `ViewEvent::EVENT_RENDERER` and `ViewEvent::EVENT_RENDERER_POST`. |

psalm-baseline.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="6.13.1@1e3b7f0a8ab32b23197b91107adc0a7ed8a05b51">
2+
<files psalm-version="6.15.0@204d06619833a297b402cbc66be7f2df74437db4">
33
<file src="src/Helper/Escaper/AbstractHelper.php">
44
<MixedAssignment>
55
<code><![CDATA[$value[$k]]]></code>
@@ -28,4 +28,9 @@
2828
<code><![CDATA[$id]]></code>
2929
</MethodSignatureMismatch>
3030
</file>
31+
<file src="test/HelperPluginManagerCompatibilityTest.php">
32+
<TooManyArguments>
33+
<code><![CDATA[DataProvider('aliasProvider', false)]]></code>
34+
</TooManyArguments>
35+
</file>
3136
</files>

test/HelperPluginManagerCompatibilityTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function testLoadingInvalidElementRaisesException(): void
8686
$manager->get('test');
8787
}
8888

89-
#[DataProvider('aliasProvider')]
89+
#[DataProvider('aliasProvider', false)]
9090
public function testPluginAliasesResolve(string $alias): void
9191
{
9292
$instance = self::getPluginManager()->get($alias);

test/HelperPluginManagerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function testRequestingAnUnregisteredHelperRaisesServiceNotFoundException
4545

4646
public function testCanOverrideAFactoryViaConfigurationPassedToConstructor(): void
4747
{
48-
$helper = $this->createMock(HelperInterface::class);
48+
$helper = $this->createStub(HelperInterface::class);
4949
$helpers = new HelperPluginManager(new ServiceManager(), [
5050
'factories' => [
5151
Partial::class => static fn(): HelperInterface => $helper,

tools/infection/composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
"laminas/laminas-escaper": "^2.18.0",
1414
"laminas/laminas-servicemanager": "^4.5.0",
1515
"laminas/laminas-stdlib": "^3.21.0",
16-
"laminas/laminas-translator": "^1.2",
16+
"laminas/laminas-translator": "^1.3",
1717
"psr/container": "^1 || ^2.0.2"
1818
},
1919
"require-dev": {
2020
"psalm/plugin-phpunit": "^0.19.5",
21-
"roave/infection-static-analysis-plugin": "^1.39",
22-
"vimeo/psalm": "^6.13.1"
21+
"roave/infection-static-analysis-plugin": "^1.40",
22+
"vimeo/psalm": "^6.15.0"
2323
},
2424
"autoload": {
2525
"psr-4": {

tools/infection/composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/rector/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
}
66
},
77
"require-dev": {
8-
"rector/rector": "^2.2.8"
8+
"rector/rector": "^2.3.5"
99
}
1010
}

tools/rector/composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)