Skip to content

Commit

Permalink
feature: add support for laminas-cache v4
Browse files Browse the repository at this point in the history
Signed-off-by: Maximilian Bösing <[email protected]>
  • Loading branch information
boesing committed Jun 15, 2024
1 parent 28c1117 commit a75489d
Show file tree
Hide file tree
Showing 12 changed files with 908 additions and 1,155 deletions.
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
"require": {
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"ext-apcu": "^5.1.10",
"laminas/laminas-cache": "^3.12.0"
"laminas/laminas-cache": "^4.0"
},
"provide": {
"laminas/laminas-cache-storage-implementation": "1.0"
"laminas/laminas-cache-storage-implementation": "2.0"
},
"require-dev": {
"laminas/laminas-cache-storage-adapter-test": "^2.0",
"laminas/laminas-cache": "4.0.x-dev || ^4.0",
"laminas/laminas-cache-storage-adapter-test": "3.0.x-dev || ^3.0",
"laminas/laminas-coding-standard": "~2.5.0",
"psalm/plugin-phpunit": "^0.19.0",
"vimeo/psalm": "^5.18"
Expand Down
1,245 changes: 587 additions & 658 deletions composer.lock

Large diffs are not rendered by default.

25 changes: 11 additions & 14 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true">
<testsuites>
<testsuite name="Laminas cache-storage-adapter-apcu Tests">
<directory>./test</directory>
</testsuite>
</testsuites>
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
</include>
</coverage>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" bootstrap="vendor/autoload.php" colors="true" cacheDirectory=".phpunit.cache">
<testsuites>
<testsuite name="Laminas cache-storage-adapter-apcu Tests">
<directory>./test</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>
98 changes: 18 additions & 80 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,100 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.18.0@b113f3ed0259fd6e212d87c3df80eec95a6abf19">
<files psalm-version="5.24.0@462c80e31c34e58cc4f750c656be3927e80e550e">
<file src="src/Apcu.php">
<MissingClosureParamType>
<code>$event</code>
</MissingClosureParamType>
<MixedArgument>
<code>$metadata</code>
<code>$metadata</code>
<code>$normalizedKey</code>
<code><![CDATA[$params['namespace_separator']]]></code>
</MixedArgument>
<MixedArgumentTypeCoercion>
<code>$internalKey</code>
<code>$internalKey</code>
<code>$key</code>
<code>$normalizedKeyValuePairs</code>
<code>$normalizedKeys</code>
<code>$normalizedKeys</code>
<code>$normalizedKeys</code>
<code><![CDATA[$internalKey]]></code>
<code><![CDATA[$internalKey]]></code>
</MixedArgumentTypeCoercion>
<MixedArrayAccess>
<code><![CDATA[$params['namespace_separator']]]></code>
</MixedArrayAccess>
<MixedAssignment>
<code>$bool</code>
<code>$casToken</code>
<code>$internalKeyValuePairs[$internalKey]</code>
<code>$internalKeyValuePairs[$internalKey]</code>
<code>$metadata</code>
<code>$metadata</code>
<code>$normalizedKey</code>
<code>$normalizedKey</code>
<code>$normalizedKey</code>
<code>$normalizedKey</code>
<code>$params</code>
<code>$result</code>
<code>$result[substr($internalKey, $prefixL)]</code>
<code><![CDATA[$this->totalSpace]]></code>
<code>$value</code>
<code>$value</code>
<code>$value</code>
<code><![CDATA[$casToken]]></code>
<code><![CDATA[$internalKeyValuePairs[$internalKey]]]></code>
<code><![CDATA[$internalKeyValuePairs[$internalKey]]]></code>
<code><![CDATA[$result]]></code>
<code><![CDATA[$result[substr($internalKey, $prefixL)]]]></code>
<code><![CDATA[$value]]></code>
<code><![CDATA[$value]]></code>
<code><![CDATA[$value]]></code>
</MixedAssignment>
<MixedInferredReturnType>
<code>ApcuOptions</code>
<code>int|float</code>
<code>int|float</code>
</MixedInferredReturnType>
<MixedMethodCall>
<code>getParams</code>
</MixedMethodCall>
<MixedOperand>
<code>$normalizedKey</code>
<code>$normalizedKey</code>
<code>$normalizedKey</code>
<code><![CDATA[$smaInfo['num_seg']]]></code>
</MixedOperand>
<MixedReturnStatement>
<code><![CDATA[$smaInfo['avail_mem']]]></code>
<code><![CDATA[$this->options]]></code>
<code><![CDATA[$this->totalSpace]]></code>
<code><![CDATA[$this->totalSpace]]></code>
</MixedReturnStatement>
<MoreSpecificImplementedParamType>
<code>$options</code>
<code>$options</code>
</MoreSpecificImplementedParamType>
<PropertyNotSetInConstructor>
<code>Apcu</code>
</PropertyNotSetInConstructor>
<RedundantCastGivenDocblockType>
<code>(int) $value</code>
<code>(int) $value</code>
<code>(string) $namespace</code>
<code>(string) $prefix</code>
</RedundantCastGivenDocblockType>
<UnusedVariable>
<code>$key</code>
</UnusedVariable>
<PossiblyUnusedReturnValue>
<code><![CDATA[bool]]></code>
</PossiblyUnusedReturnValue>
</file>
<file src="src/Apcu/AdapterPluginManagerDelegatorFactory.php">
<UnusedParam>
<code>$container</code>
<code>$name</code>
<code><![CDATA[$container]]></code>
<code><![CDATA[$name]]></code>
</UnusedParam>
</file>
<file src="src/ApcuIterator.php">
<RedundantCastGivenDocblockType>
<code>(int) $mode</code>
<code><![CDATA[(int) $mode]]></code>
</RedundantCastGivenDocblockType>
</file>
<file src="src/ApcuOptions.php">
<PossiblyUnusedMethod>
<code>setNamespaceSeparator</code>
<code><![CDATA[setNamespaceSeparator]]></code>
</PossiblyUnusedMethod>
<RedundantCastGivenDocblockType>
<code>(string) $namespaceSeparator</code>
</RedundantCastGivenDocblockType>
</file>
</files>
Loading

0 comments on commit a75489d

Please sign in to comment.