Skip to content

Commit 76487ff

Browse files
committed
fix issues
1 parent 93817d4 commit 76487ff

File tree

88 files changed

+3627
-555
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+3627
-555
lines changed

composer.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@
5656
"rector/rector": "^0.18.6",
5757
"ruflin/elastica": "^7.3.1",
5858
"symfony/mailer": "^v6.3.5",
59-
"symfony/mime": "^v6.3.5",
60-
"vimeo/psalm": "^5.15.0"
59+
"symfony/mime": "^v6.3.5"
6160
},
6261
"suggest": {
6362
"ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",

psalm.xml

-18
This file was deleted.

tests/Client/ElasticsearchV7FactoryTest.php

+19-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
namespace Mimmi20Test\MonologFactory\Client;
1414

1515
use Elasticsearch\Client as V7Client;
16+
use Elasticsearch\Common\Exceptions\AuthenticationConfigException;
1617
use Laminas\ServiceManager\Exception\ServiceNotCreatedException;
1718
use Mimmi20\MonologFactory\Client\ElasticsearchV7Factory;
1819
use PHPUnit\Framework\Exception;
@@ -23,7 +24,11 @@
2324

2425
final class ElasticsearchV7FactoryTest extends TestCase
2526
{
26-
/** @throws Exception */
27+
/**
28+
* @throws Exception
29+
* @throws ServiceNotCreatedException
30+
* @throws AuthenticationConfigException
31+
*/
2732
public function testInvokeWithoutConfig(): void
2833
{
2934
$container = $this->getMockBuilder(ContainerInterface::class)
@@ -43,7 +48,11 @@ public function testInvokeWithoutConfig(): void
4348
$factory($container, '');
4449
}
4550

46-
/** @throws Exception */
51+
/**
52+
* @throws Exception
53+
* @throws ServiceNotCreatedException
54+
* @throws AuthenticationConfigException
55+
*/
4756
public function testInvokeWithEmptyConfig(): void
4857
{
4958
$container = $this->getMockBuilder(ContainerInterface::class)
@@ -65,6 +74,8 @@ public function testInvokeWithEmptyConfig(): void
6574

6675
/**
6776
* @throws Exception
77+
* @throws ServiceNotCreatedException
78+
* @throws AuthenticationConfigException
6879
*
6980
* @requires extension curl
7081
*/
@@ -93,6 +104,8 @@ public function testInvokeWithConfigWithWrongHostConfig(): void
93104

94105
/**
95106
* @throws Exception
107+
* @throws ServiceNotCreatedException
108+
* @throws AuthenticationConfigException
96109
*
97110
* @requires extension curl
98111
*/
@@ -119,6 +132,8 @@ public function testInvokeWithConfigWithConfig(): void
119132

120133
/**
121134
* @throws Exception
135+
* @throws ServiceNotCreatedException
136+
* @throws AuthenticationConfigException
122137
*
123138
* @requires extension curl
124139
*/
@@ -145,6 +160,8 @@ public function testInvokeWithConfigWithConfig2(): void
145160

146161
/**
147162
* @throws Exception
163+
* @throws ServiceNotCreatedException
164+
* @throws AuthenticationConfigException
148165
*
149166
* @requires extension curl
150167
*/

tests/Client/ElasticsearchV8FactoryTest.php

+16-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@
2323

2424
final class ElasticsearchV8FactoryTest extends TestCase
2525
{
26-
/** @throws Exception */
26+
/**
27+
* @throws Exception
28+
* @throws ServiceNotCreatedException
29+
*/
2730
public function testInvokeWithoutConfig(): void
2831
{
2932
if (!class_exists(V8Client::class)) {
@@ -47,7 +50,10 @@ public function testInvokeWithoutConfig(): void
4750
$factory($container, '');
4851
}
4952

50-
/** @throws Exception */
53+
/**
54+
* @throws Exception
55+
* @throws ServiceNotCreatedException
56+
*/
5157
public function testInvokeWithEmptyConfig(): void
5258
{
5359
$container = $this->getMockBuilder(ContainerInterface::class)
@@ -67,7 +73,10 @@ public function testInvokeWithEmptyConfig(): void
6773
$factory($container, '', []);
6874
}
6975

70-
/** @throws Exception */
76+
/**
77+
* @throws Exception
78+
* @throws ServiceNotCreatedException
79+
*/
7180
public function testInvokeWithConfigWithWrongClient(): void
7281
{
7382
if (!class_exists(V8Client::class)) {
@@ -93,6 +102,7 @@ public function testInvokeWithConfigWithWrongClient(): void
93102

94103
/**
95104
* @throws Exception
105+
* @throws ServiceNotCreatedException
96106
*
97107
* @requires extension curl
98108
*/
@@ -119,6 +129,7 @@ public function testInvokeWithConfigWithConfig(): void
119129

120130
/**
121131
* @throws Exception
132+
* @throws ServiceNotCreatedException
122133
*
123134
* @requires extension curl
124135
*/
@@ -145,6 +156,7 @@ public function testInvokeWithConfigWithConfig2(): void
145156

146157
/**
147158
* @throws Exception
159+
* @throws ServiceNotCreatedException
148160
*
149161
* @requires extension curl
150162
*/
@@ -171,6 +183,7 @@ public function testInvokeWithConfigWithConfig3(): void
171183

172184
/**
173185
* @throws Exception
186+
* @throws ServiceNotCreatedException
174187
*
175188
* @requires extension curl
176189
*/

tests/ClientPluginManagerFactoryTest.php

+24-6
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424

2525
final class ClientPluginManagerFactoryTest extends TestCase
2626
{
27-
/** @throws Exception */
27+
/**
28+
* @throws Exception
29+
* @throws ServiceNotFoundException
30+
*/
2831
public function testInvoke1(): void
2932
{
3033
$requestedName = HtmlFormatter::class;
@@ -48,7 +51,10 @@ public function testInvoke1(): void
4851
);
4952
}
5053

51-
/** @throws Exception */
54+
/**
55+
* @throws Exception
56+
* @throws ServiceNotFoundException
57+
*/
5258
public function testInvoke2(): void
5359
{
5460
$requestedName = HtmlFormatter::class;
@@ -76,7 +82,10 @@ public function testInvoke2(): void
7682
);
7783
}
7884

79-
/** @throws Exception */
85+
/**
86+
* @throws Exception
87+
* @throws ServiceNotFoundException
88+
*/
8089
public function testInvoke3(): void
8190
{
8291
$requestedName = HtmlFormatter::class;
@@ -107,7 +116,10 @@ public function testInvoke3(): void
107116
$factory($container, $requestedName, $options);
108117
}
109118

110-
/** @throws Exception */
119+
/**
120+
* @throws Exception
121+
* @throws ServiceNotFoundException
122+
*/
111123
public function testInvoke4(): void
112124
{
113125
$requestedName = HtmlFormatter::class;
@@ -138,7 +150,10 @@ public function testInvoke4(): void
138150
);
139151
}
140152

141-
/** @throws Exception */
153+
/**
154+
* @throws Exception
155+
* @throws ServiceNotFoundException
156+
*/
142157
public function testInvoke5(): void
143158
{
144159
$requestedName = HtmlFormatter::class;
@@ -169,7 +184,10 @@ public function testInvoke5(): void
169184
);
170185
}
171186

172-
/** @throws Exception */
187+
/**
188+
* @throws Exception
189+
* @throws ServiceNotFoundException
190+
*/
173191
public function testInvoke6(): void
174192
{
175193
$requestedName = HtmlFormatter::class;

tests/Formatter/ElasticaFormatterFactoryTest.php

+16-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@
2222

2323
final class ElasticaFormatterFactoryTest extends TestCase
2424
{
25-
/** @throws Exception */
25+
/**
26+
* @throws Exception
27+
* @throws ServiceNotCreatedException
28+
*/
2629
public function testInvokeWithoutConfig(): void
2730
{
2831
$container = $this->getMockBuilder(ContainerInterface::class)
@@ -42,7 +45,10 @@ public function testInvokeWithoutConfig(): void
4245
$factory($container, '');
4346
}
4447

45-
/** @throws Exception */
48+
/**
49+
* @throws Exception
50+
* @throws ServiceNotCreatedException
51+
*/
4652
public function testInvokeWithoutIndex(): void
4753
{
4854
$container = $this->getMockBuilder(ContainerInterface::class)
@@ -62,7 +68,10 @@ public function testInvokeWithoutIndex(): void
6268
$factory($container, '', []);
6369
}
6470

65-
/** @throws Exception */
71+
/**
72+
* @throws Exception
73+
* @throws ServiceNotCreatedException
74+
*/
6675
public function testInvokeWithIndex(): void
6776
{
6877
$index = 'abc';
@@ -93,7 +102,10 @@ public function testInvokeWithIndex(): void
93102
);
94103
}
95104

96-
/** @throws Exception */
105+
/**
106+
* @throws Exception
107+
* @throws ServiceNotCreatedException
108+
*/
97109
public function testInvokeWithIndexAndType(): void
98110
{
99111
$maxNormalizeDepth = 42;

tests/Formatter/ElasticsearchFormatterFactoryTest.php

+16-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@
2323

2424
final class ElasticsearchFormatterFactoryTest extends TestCase
2525
{
26-
/** @throws Exception */
26+
/**
27+
* @throws Exception
28+
* @throws ServiceNotCreatedException
29+
*/
2730
public function testInvokeWithoutConfig(): void
2831
{
2932
$container = $this->getMockBuilder(ContainerInterface::class)
@@ -43,7 +46,10 @@ public function testInvokeWithoutConfig(): void
4346
$factory($container, '');
4447
}
4548

46-
/** @throws Exception */
49+
/**
50+
* @throws Exception
51+
* @throws ServiceNotCreatedException
52+
*/
4753
public function testInvokeWithoutIndex(): void
4854
{
4955
$container = $this->getMockBuilder(ContainerInterface::class)
@@ -63,7 +69,10 @@ public function testInvokeWithoutIndex(): void
6369
$factory($container, '', []);
6470
}
6571

66-
/** @throws Exception */
72+
/**
73+
* @throws Exception
74+
* @throws ServiceNotCreatedException
75+
*/
6776
public function testInvokeWithIndex(): void
6877
{
6978
$index = 'abc';
@@ -94,7 +103,10 @@ public function testInvokeWithIndex(): void
94103
);
95104
}
96105

97-
/** @throws Exception */
106+
/**
107+
* @throws Exception
108+
* @throws ServiceNotCreatedException
109+
*/
98110
public function testInvokeWithIndexAndType(): void
99111
{
100112
$maxNormalizeDepth = 42;

tests/Formatter/FlowdockFormatterFactoryTest.php

+13-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@
2323

2424
final class FlowdockFormatterFactoryTest extends TestCase
2525
{
26-
/** @throws Exception */
26+
/**
27+
* @throws Exception
28+
* @throws ServiceNotCreatedException
29+
*/
2730
public function testInvokeWithoutConfig(): void
2831
{
2932
$container = $this->getMockBuilder(ContainerInterface::class)
@@ -43,7 +46,10 @@ public function testInvokeWithoutConfig(): void
4346
$factory($container, '');
4447
}
4548

46-
/** @throws Exception */
49+
/**
50+
* @throws Exception
51+
* @throws ServiceNotCreatedException
52+
*/
4753
public function testInvokeWithoutSource(): void
4854
{
4955
$container = $this->getMockBuilder(ContainerInterface::class)
@@ -63,7 +69,10 @@ public function testInvokeWithoutSource(): void
6369
$factory($container, '', []);
6470
}
6571

66-
/** @throws Exception */
72+
/**
73+
* @throws Exception
74+
* @throws ServiceNotCreatedException
75+
*/
6776
public function testInvokeWithoutSourceEmail(): void
6877
{
6978
$source = 'abc';
@@ -88,6 +97,7 @@ public function testInvokeWithoutSourceEmail(): void
8897
/**
8998
* @throws Exception
9099
* @throws ReflectionException
100+
* @throws ServiceNotCreatedException
91101
*/
92102
public function testInvokeWithSouceAndSourceEmail(): void
93103
{

0 commit comments

Comments
 (0)