Skip to content

Commit

Permalink
Merge pull request #55 from IonBazan/patch-1
Browse files Browse the repository at this point in the history
Allow PHP 8.2, drop PHP 7 support
  • Loading branch information
Ocramius authored Dec 20, 2022
2 parents b87dee0 + a6d9179 commit ba2d847
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 46 deletions.
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"config": {
"sort-packages": true,
"platform": {
"php": "7.4.99"
"php": "8.0.99"
},
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
Expand All @@ -33,20 +33,20 @@
}
},
"require": {
"php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0",
"php": "~8.0.0 || ~8.1.0 || ~8.2.0",
"enlightn/security-checker": "^1.10"
},
"require-dev": {
"doctrine/migrations": "^2.0 || ^3.0",
"doctrine/migrations": "^2.0 || ^3.5.2",
"guzzlehttp/guzzle": "^7.5.0",
"laminas/laminas-coding-standard": "~2.4.0",
"laminas/laminas-loader": "^2.0",
"laminas/laminas-loader": "^2.9",
"mikey179/vfsstream": "^1.6.11",
"php-amqplib/php-amqplib": "^2.0 || ^3.0",
"php-amqplib/php-amqplib": "^2.0 || ^3.4",
"phpunit/phpunit": "^9.5.26",
"psalm/plugin-phpunit": "^0.18.0",
"psalm/plugin-phpunit": "^0.18.3",
"predis/predis": "^2.0.3",
"symfony/yaml": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0",
"symfony/yaml": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0.14",
"vimeo/psalm": "^4.29.0"
},
"conflict": {
Expand Down
22 changes: 11 additions & 11 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 12 additions & 28 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,6 @@
</PropertyNotSetInConstructor>
</file>
<file src="src/Check/CpuPerformance.php">
<InvalidNullableReturnType occurrences="1">
<code>string</code>
</InvalidNullableReturnType>
<InvalidScalarArgument occurrences="15">
<code>$a</code>
<code>$a</code>
Expand All @@ -183,14 +180,11 @@
<code>null</code>
<code>null</code>
</NullArgument>
<NullableReturnStatement occurrences="1">
<code>bcdiv(bcpow(bcadd($a, $b), 2), bcmul(4, $t), $precision)</code>
</NullableReturnStatement>
<PossiblyNullArgument occurrences="4">
<code>$b</code>
<code>$b</code>
<code>$b</code>
<code>$x</code>
<code>bcsqrt(2)</code>
</PossiblyNullArgument>
<PropertyNotSetInConstructor occurrences="1">
<code>CpuPerformance</code>
Expand All @@ -200,9 +194,6 @@
</RedundantCastGivenDocblockType>
</file>
<file src="src/Check/DirReadable.php">
<ArgumentTypeCoercion occurrences="1">
<code>$this-&gt;dir</code>
</ArgumentTypeCoercion>
<InvalidPropertyAssignmentValue occurrences="1">
<code>$path</code>
</InvalidPropertyAssignmentValue>
Expand All @@ -223,14 +214,14 @@
<code>current($nonDirs)</code>
<code>current($unreadable)</code>
</MixedOperand>
<PossiblyInvalidArgument occurrences="1">
<code>$this-&gt;dir</code>
</PossiblyInvalidArgument>
<PropertyNotSetInConstructor occurrences="1">
<code>DirReadable</code>
</PropertyNotSetInConstructor>
</file>
<file src="src/Check/DirWritable.php">
<ArgumentTypeCoercion occurrences="1">
<code>$this-&gt;dir</code>
</ArgumentTypeCoercion>
<InvalidPropertyAssignmentValue occurrences="1">
<code>$path</code>
</InvalidPropertyAssignmentValue>
Expand All @@ -249,6 +240,9 @@
<code>$nonDirs[]</code>
<code>$unwritable[]</code>
</MixedAssignment>
<PossiblyInvalidArgument occurrences="1">
<code>$this-&gt;dir</code>
</PossiblyInvalidArgument>
<PropertyNotSetInConstructor occurrences="1">
<code>DirWritable</code>
</PropertyNotSetInConstructor>
Expand All @@ -264,13 +258,10 @@
<InvalidScalarArgument occurrences="1">
<code>$free</code>
</InvalidScalarArgument>
<MixedArgument occurrences="6">
<MixedArgument occurrences="3">
<code>$a</code>
<code>$a</code>
<code>$k</code>
<code>$this-&gt;path</code>
<code>$this-&gt;path</code>
<code>$this-&gt;path</code>
</MixedArgument>
<MixedArgumentTypeCoercion occurrences="1"/>
<MixedAssignment occurrences="3">
Expand All @@ -281,9 +272,8 @@
<MixedInferredReturnType occurrences="1">
<code>int</code>
</MixedInferredReturnType>
<MixedOperand occurrences="3">
<MixedOperand occurrences="2">
<code>$bytes</code>
<code>$this-&gt;path</code>
<code>$x[$i]</code>
</MixedOperand>
<MixedReturnStatement occurrences="1">
Expand All @@ -302,12 +292,6 @@
<code>! is_float($free)</code>
<code>$free === false || ! is_float($free)</code>
</TypeDoesNotContainType>
<UndefinedThisPropertyAssignment occurrences="1">
<code>$this-&gt;path</code>
</UndefinedThisPropertyAssignment>
<UndefinedThisPropertyFetch occurrences="1">
<code>$this-&gt;path</code>
</UndefinedThisPropertyFetch>
</file>
<file src="src/Check/DiskUsage.php">
<DocblockTypeContradiction occurrences="3">
Expand Down Expand Up @@ -341,9 +325,6 @@
</UndefinedMethod>
</file>
<file src="src/Check/ExtensionLoaded.php">
<ArgumentTypeCoercion occurrences="1">
<code>$this-&gt;extensions</code>
</ArgumentTypeCoercion>
<InvalidPropertyAssignmentValue occurrences="1">
<code>$extensionName</code>
</InvalidPropertyAssignmentValue>
Expand Down Expand Up @@ -371,6 +352,9 @@
<code>$ext</code>
<code>$ext</code>
</MixedOperand>
<PossiblyInvalidArgument occurrences="1">
<code>$this-&gt;extensions</code>
</PossiblyInvalidArgument>
<PropertyNotSetInConstructor occurrences="1">
<code>ExtensionLoaded</code>
</PropertyNotSetInConstructor>
Expand Down
9 changes: 9 additions & 0 deletions src/Check/DiskFree.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,15 @@ class DiskFree extends AbstractCheck implements CheckInterface
3 => 1073741824, // 2^30 == 1024^3
];

/**
* The disk path to check.
*
* @internal
*
* @var string
*/
public $path;

/**
* @param int|string $size Minimum disk size in bytes or a valid byte string (IEC, SI or Jedec).
* @param string $path The disk path to check, i.e. '/tmp' or 'C:' (defaults to /)
Expand Down

0 comments on commit ba2d847

Please sign in to comment.