Skip to content

Commit ba2d847

Browse files
authored
Merge pull request #55 from IonBazan/patch-1
Allow PHP 8.2, drop PHP 7 support
2 parents b87dee0 + a6d9179 commit ba2d847

File tree

4 files changed

+39
-46
lines changed

4 files changed

+39
-46
lines changed

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"config": {
2121
"sort-packages": true,
2222
"platform": {
23-
"php": "7.4.99"
23+
"php": "8.0.99"
2424
},
2525
"allow-plugins": {
2626
"dealerdirect/phpcodesniffer-composer-installer": true
@@ -33,20 +33,20 @@
3333
}
3434
},
3535
"require": {
36-
"php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0",
36+
"php": "~8.0.0 || ~8.1.0 || ~8.2.0",
3737
"enlightn/security-checker": "^1.10"
3838
},
3939
"require-dev": {
40-
"doctrine/migrations": "^2.0 || ^3.0",
40+
"doctrine/migrations": "^2.0 || ^3.5.2",
4141
"guzzlehttp/guzzle": "^7.5.0",
4242
"laminas/laminas-coding-standard": "~2.4.0",
43-
"laminas/laminas-loader": "^2.0",
43+
"laminas/laminas-loader": "^2.9",
4444
"mikey179/vfsstream": "^1.6.11",
45-
"php-amqplib/php-amqplib": "^2.0 || ^3.0",
45+
"php-amqplib/php-amqplib": "^2.0 || ^3.4",
4646
"phpunit/phpunit": "^9.5.26",
47-
"psalm/plugin-phpunit": "^0.18.0",
47+
"psalm/plugin-phpunit": "^0.18.3",
4848
"predis/predis": "^2.0.3",
49-
"symfony/yaml": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0",
49+
"symfony/yaml": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0.14",
5050
"vimeo/psalm": "^4.29.0"
5151
},
5252
"conflict": {

composer.lock

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

psalm-baseline.xml

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,6 @@
159159
</PropertyNotSetInConstructor>
160160
</file>
161161
<file src="src/Check/CpuPerformance.php">
162-
<InvalidNullableReturnType occurrences="1">
163-
<code>string</code>
164-
</InvalidNullableReturnType>
165162
<InvalidScalarArgument occurrences="15">
166163
<code>$a</code>
167164
<code>$a</code>
@@ -183,14 +180,11 @@
183180
<code>null</code>
184181
<code>null</code>
185182
</NullArgument>
186-
<NullableReturnStatement occurrences="1">
187-
<code>bcdiv(bcpow(bcadd($a, $b), 2), bcmul(4, $t), $precision)</code>
188-
</NullableReturnStatement>
189183
<PossiblyNullArgument occurrences="4">
190184
<code>$b</code>
191185
<code>$b</code>
192186
<code>$b</code>
193-
<code>$x</code>
187+
<code>bcsqrt(2)</code>
194188
</PossiblyNullArgument>
195189
<PropertyNotSetInConstructor occurrences="1">
196190
<code>CpuPerformance</code>
@@ -200,9 +194,6 @@
200194
</RedundantCastGivenDocblockType>
201195
</file>
202196
<file src="src/Check/DirReadable.php">
203-
<ArgumentTypeCoercion occurrences="1">
204-
<code>$this-&gt;dir</code>
205-
</ArgumentTypeCoercion>
206197
<InvalidPropertyAssignmentValue occurrences="1">
207198
<code>$path</code>
208199
</InvalidPropertyAssignmentValue>
@@ -223,14 +214,14 @@
223214
<code>current($nonDirs)</code>
224215
<code>current($unreadable)</code>
225216
</MixedOperand>
217+
<PossiblyInvalidArgument occurrences="1">
218+
<code>$this-&gt;dir</code>
219+
</PossiblyInvalidArgument>
226220
<PropertyNotSetInConstructor occurrences="1">
227221
<code>DirReadable</code>
228222
</PropertyNotSetInConstructor>
229223
</file>
230224
<file src="src/Check/DirWritable.php">
231-
<ArgumentTypeCoercion occurrences="1">
232-
<code>$this-&gt;dir</code>
233-
</ArgumentTypeCoercion>
234225
<InvalidPropertyAssignmentValue occurrences="1">
235226
<code>$path</code>
236227
</InvalidPropertyAssignmentValue>
@@ -249,6 +240,9 @@
249240
<code>$nonDirs[]</code>
250241
<code>$unwritable[]</code>
251242
</MixedAssignment>
243+
<PossiblyInvalidArgument occurrences="1">
244+
<code>$this-&gt;dir</code>
245+
</PossiblyInvalidArgument>
252246
<PropertyNotSetInConstructor occurrences="1">
253247
<code>DirWritable</code>
254248
</PropertyNotSetInConstructor>
@@ -264,13 +258,10 @@
264258
<InvalidScalarArgument occurrences="1">
265259
<code>$free</code>
266260
</InvalidScalarArgument>
267-
<MixedArgument occurrences="6">
261+
<MixedArgument occurrences="3">
268262
<code>$a</code>
269263
<code>$a</code>
270264
<code>$k</code>
271-
<code>$this-&gt;path</code>
272-
<code>$this-&gt;path</code>
273-
<code>$this-&gt;path</code>
274265
</MixedArgument>
275266
<MixedArgumentTypeCoercion occurrences="1"/>
276267
<MixedAssignment occurrences="3">
@@ -281,9 +272,8 @@
281272
<MixedInferredReturnType occurrences="1">
282273
<code>int</code>
283274
</MixedInferredReturnType>
284-
<MixedOperand occurrences="3">
275+
<MixedOperand occurrences="2">
285276
<code>$bytes</code>
286-
<code>$this-&gt;path</code>
287277
<code>$x[$i]</code>
288278
</MixedOperand>
289279
<MixedReturnStatement occurrences="1">
@@ -302,12 +292,6 @@
302292
<code>! is_float($free)</code>
303293
<code>$free === false || ! is_float($free)</code>
304294
</TypeDoesNotContainType>
305-
<UndefinedThisPropertyAssignment occurrences="1">
306-
<code>$this-&gt;path</code>
307-
</UndefinedThisPropertyAssignment>
308-
<UndefinedThisPropertyFetch occurrences="1">
309-
<code>$this-&gt;path</code>
310-
</UndefinedThisPropertyFetch>
311295
</file>
312296
<file src="src/Check/DiskUsage.php">
313297
<DocblockTypeContradiction occurrences="3">
@@ -341,9 +325,6 @@
341325
</UndefinedMethod>
342326
</file>
343327
<file src="src/Check/ExtensionLoaded.php">
344-
<ArgumentTypeCoercion occurrences="1">
345-
<code>$this-&gt;extensions</code>
346-
</ArgumentTypeCoercion>
347328
<InvalidPropertyAssignmentValue occurrences="1">
348329
<code>$extensionName</code>
349330
</InvalidPropertyAssignmentValue>
@@ -371,6 +352,9 @@
371352
<code>$ext</code>
372353
<code>$ext</code>
373354
</MixedOperand>
355+
<PossiblyInvalidArgument occurrences="1">
356+
<code>$this-&gt;extensions</code>
357+
</PossiblyInvalidArgument>
374358
<PropertyNotSetInConstructor occurrences="1">
375359
<code>ExtensionLoaded</code>
376360
</PropertyNotSetInConstructor>

src/Check/DiskFree.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,15 @@ class DiskFree extends AbstractCheck implements CheckInterface
126126
3 => 1073741824, // 2^30 == 1024^3
127127
];
128128

129+
/**
130+
* The disk path to check.
131+
*
132+
* @internal
133+
*
134+
* @var string
135+
*/
136+
public $path;
137+
129138
/**
130139
* @param int|string $size Minimum disk size in bytes or a valid byte string (IEC, SI or Jedec).
131140
* @param string $path The disk path to check, i.e. '/tmp' or 'C:' (defaults to /)

0 commit comments

Comments
 (0)