diff options
| -rw-r--r-- | composer.json | 10 | ||||
| -rw-r--r-- | composer.lock | 268 | ||||
| -rw-r--r-- | phpstan.neon | 5 | ||||
| -rw-r--r-- | src/BitOps/BinaryConversion.php | 5 | ||||
| -rw-r--r-- | src/WebAssembly/Execution/FuncInsts/Host.php | 4 | ||||
| -rw-r--r-- | src/WebAssembly/Execution/MemInst.php | 25 |
6 files changed, 191 insertions, 126 deletions
diff --git a/composer.json b/composer.json index e937c62..b272602 100644 --- a/composer.json +++ b/composer.json @@ -16,12 +16,12 @@ }, "require-dev": { "m3m0r7/rubyvm-on-php": "^0.3.3", - "phpstan/phpstan": "^1.12.23", - "phpstan/phpstan-deprecation-rules": "^1.2.1", - "phpstan/phpstan-strict-rules": "^1.6.2", - "phpunit/phpunit": "^12.1.0", + "phpstan/phpstan": "^2.1.17", + "phpstan/phpstan-deprecation-rules": "^2.0.3", + "phpstan/phpstan-strict-rules": "^2.0.4", + "phpunit/phpunit": "^12.2.6", "reliforp/reli-prof": "0.12.x-dev", - "symplify/easy-coding-standard": "^12.5.11" + "symplify/easy-coding-standard": "^12.5.20" }, "config": { "preferred-install": "dist", diff --git a/composer.lock b/composer.lock index bce450e..9f00859 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "476c89d52de8f0f2d5de2b5aa6f347ae", + "content-hash": "a51610e7feb01b996312a4dfc6e5fa39", "packages": [], "packages-dev": [ { @@ -1367,16 +1367,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.13.0", + "version": "1.13.3", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "024473a478be9df5fdaca2c793f2232fe788e414" + "reference": "faed855a7b5f4d4637717c2b3863e277116beb36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/024473a478be9df5fdaca2c793f2232fe788e414", - "reference": "024473a478be9df5fdaca2c793f2232fe788e414", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/faed855a7b5f4d4637717c2b3863e277116beb36", + "reference": "faed855a7b5f4d4637717c2b3863e277116beb36", "shasum": "" }, "require": { @@ -1415,7 +1415,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.13.0" + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.3" }, "funding": [ { @@ -1423,20 +1423,20 @@ "type": "tidelift" } ], - "time": "2025-02-12T12:17:51+00:00" + "time": "2025-07-05T12:25:42+00:00" }, { "name": "nikic/php-parser", - "version": "v5.4.0", + "version": "v5.5.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "447a020a1f875a434d62f2a401f53b82a396e494" + "reference": "ae59794362fe85e051a58ad36b289443f57be7a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/447a020a1f875a434d62f2a401f53b82a396e494", - "reference": "447a020a1f875a434d62f2a401f53b82a396e494", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/ae59794362fe85e051a58ad36b289443f57be7a9", + "reference": "ae59794362fe85e051a58ad36b289443f57be7a9", "shasum": "" }, "require": { @@ -1479,9 +1479,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.4.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.5.0" }, - "time": "2024-12-30T11:07:19+00:00" + "time": "2025-05-31T08:24:38+00:00" }, { "name": "phar-io/manifest", @@ -1731,20 +1731,20 @@ }, { "name": "phpstan/phpstan", - "version": "1.12.23", + "version": "2.1.17", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "29201e7a743a6ab36f91394eab51889a82631428" + "reference": "89b5ef665716fa2a52ecd2633f21007a6a349053" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/29201e7a743a6ab36f91394eab51889a82631428", - "reference": "29201e7a743a6ab36f91394eab51889a82631428", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/89b5ef665716fa2a52ecd2633f21007a6a349053", + "reference": "89b5ef665716fa2a52ecd2633f21007a6a349053", "shasum": "" }, "require": { - "php": "^7.2|^8.0" + "php": "^7.4|^8.0" }, "conflict": { "phpstan/phpstan-shim": "*" @@ -1785,30 +1785,30 @@ "type": "github" } ], - "time": "2025-03-23T14:57:32+00:00" + "time": "2025-05-21T20:55:28+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", - "version": "1.2.1", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", - "reference": "f94d246cc143ec5a23da868f8f7e1393b50eaa82" + "reference": "468e02c9176891cc901143da118f09dc9505fc2f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/f94d246cc143ec5a23da868f8f7e1393b50eaa82", - "reference": "f94d246cc143ec5a23da868f8f7e1393b50eaa82", + "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/468e02c9176891cc901143da118f09dc9505fc2f", + "reference": "468e02c9176891cc901143da118f09dc9505fc2f", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.12" + "php": "^7.4 || ^8.0", + "phpstan/phpstan": "^2.1.15" }, "require-dev": { "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^9.5" + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^9.6" }, "type": "phpstan-extension", "extra": { @@ -1830,34 +1830,33 @@ "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", "support": { "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues", - "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/1.2.1" + "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/2.0.3" }, - "time": "2024-09-11T15:52:35+00:00" + "time": "2025-05-14T10:56:57+00:00" }, { "name": "phpstan/phpstan-strict-rules", - "version": "1.6.2", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-strict-rules.git", - "reference": "b564ca479e7e735f750aaac4935af965572a7845" + "reference": "3e139cbe67fafa3588e1dbe27ca50f31fdb6236a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/b564ca479e7e735f750aaac4935af965572a7845", - "reference": "b564ca479e7e735f750aaac4935af965572a7845", + "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/3e139cbe67fafa3588e1dbe27ca50f31fdb6236a", + "reference": "3e139cbe67fafa3588e1dbe27ca50f31fdb6236a", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.12.4" + "php": "^7.4 || ^8.0", + "phpstan/phpstan": "^2.0.4" }, "require-dev": { - "nikic/php-parser": "^4.13.0", "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/phpstan-deprecation-rules": "^1.1", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^9.5" + "phpstan/phpstan-deprecation-rules": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^9.6" }, "type": "phpstan-extension", "extra": { @@ -1879,22 +1878,22 @@ "description": "Extra strict and opinionated rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-strict-rules/issues", - "source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.6.2" + "source": "https://github.com/phpstan/phpstan-strict-rules/tree/2.0.4" }, - "time": "2025-01-19T13:02:24+00:00" + "time": "2025-03-18T11:42:40+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "12.1.2", + "version": "12.3.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "05c33d01a856f9f62488d144bafddc3d7b7a4ebb" + "reference": "ddec29dfc128eba9c204389960f2063f3b7fa170" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/05c33d01a856f9f62488d144bafddc3d7b7a4ebb", - "reference": "05c33d01a856f9f62488d144bafddc3d7b7a4ebb", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ddec29dfc128eba9c204389960f2063f3b7fa170", + "reference": "ddec29dfc128eba9c204389960f2063f3b7fa170", "shasum": "" }, "require": { @@ -1912,7 +1911,7 @@ "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^12.1" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -1921,7 +1920,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "12.1.x-dev" + "dev-main": "12.3.x-dev" } }, "autoload": { @@ -1950,15 +1949,27 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/12.1.2" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/12.3.1" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-code-coverage", + "type": "tidelift" } ], - "time": "2025-04-03T14:34:39+00:00" + "time": "2025-06-18T08:58:13+00:00" }, { "name": "phpunit/php-file-iterator", @@ -2207,16 +2218,16 @@ }, { "name": "phpunit/phpunit", - "version": "12.1.0", + "version": "12.2.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c433e7972440e1370a26879bb54c359f8898aa3a" + "reference": "638644c62a58f04974da115f98981c9b48564021" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c433e7972440e1370a26879bb54c359f8898aa3a", - "reference": "c433e7972440e1370a26879bb54c359f8898aa3a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/638644c62a58f04974da115f98981c9b48564021", + "reference": "638644c62a58f04974da115f98981c9b48564021", "shasum": "" }, "require": { @@ -2226,19 +2237,19 @@ "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.13.0", + "myclabs/deep-copy": "^1.13.1", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", "php": ">=8.3", - "phpunit/php-code-coverage": "^12.1.2", + "phpunit/php-code-coverage": "^12.3.1", "phpunit/php-file-iterator": "^6.0.0", "phpunit/php-invoker": "^6.0.0", "phpunit/php-text-template": "^5.0.0", "phpunit/php-timer": "^8.0.0", "sebastian/cli-parser": "^4.0.0", - "sebastian/comparator": "^7.0.1", + "sebastian/comparator": "^7.1.0", "sebastian/diff": "^7.0.0", - "sebastian/environment": "^8.0.0", + "sebastian/environment": "^8.0.2", "sebastian/exporter": "^7.0.0", "sebastian/global-state": "^8.0.0", "sebastian/object-enumerator": "^7.0.0", @@ -2252,7 +2263,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "12.1-dev" + "dev-main": "12.2-dev" } }, "autoload": { @@ -2284,7 +2295,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/12.1.0" + "source": "https://github.com/sebastianbergmann/phpunit/tree/12.2.6" }, "funding": [ { @@ -2296,11 +2307,19 @@ "type": "github" }, { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", "type": "tidelift" } ], - "time": "2025-04-04T04:10:58+00:00" + "time": "2025-07-04T06:00:16+00:00" }, { "name": "psr/container", @@ -2717,16 +2736,16 @@ }, { "name": "sebastian/comparator", - "version": "7.0.1", + "version": "7.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "b478f34614f934e0291598d0c08cbaba9644bee5" + "reference": "03d905327dccc0851c9a08d6a979dfc683826b6f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/b478f34614f934e0291598d0c08cbaba9644bee5", - "reference": "b478f34614f934e0291598d0c08cbaba9644bee5", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/03d905327dccc0851c9a08d6a979dfc683826b6f", + "reference": "03d905327dccc0851c9a08d6a979dfc683826b6f", "shasum": "" }, "require": { @@ -2737,7 +2756,7 @@ "sebastian/exporter": "^7.0" }, "require-dev": { - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^12.2" }, "suggest": { "ext-bcmath": "For comparing BcMath\\Number objects" @@ -2745,7 +2764,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "7.1-dev" } }, "autoload": { @@ -2785,15 +2804,27 @@ "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/7.0.1" + "source": "https://github.com/sebastianbergmann/comparator/tree/7.1.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/comparator", + "type": "tidelift" } ], - "time": "2025-03-07T07:00:32+00:00" + "time": "2025-06-17T07:41:58+00:00" }, { "name": "sebastian/complexity", @@ -2922,16 +2953,16 @@ }, { "name": "sebastian/environment", - "version": "8.0.0", + "version": "8.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "8afe311eca49171bf95405cc0078be9a3821f9f2" + "reference": "d364b9e5d0d3b18a2573351a1786fbf96b7e0792" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/8afe311eca49171bf95405cc0078be9a3821f9f2", - "reference": "8afe311eca49171bf95405cc0078be9a3821f9f2", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d364b9e5d0d3b18a2573351a1786fbf96b7e0792", + "reference": "d364b9e5d0d3b18a2573351a1786fbf96b7e0792", "shasum": "" }, "require": { @@ -2974,15 +3005,27 @@ "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", "security": "https://github.com/sebastianbergmann/environment/security/policy", - "source": "https://github.com/sebastianbergmann/environment/tree/8.0.0" + "source": "https://github.com/sebastianbergmann/environment/tree/8.0.2" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/environment", + "type": "tidelift" } ], - "time": "2025-02-07T04:56:08+00:00" + "time": "2025-05-21T15:05:44+00:00" }, { "name": "sebastian/exporter", @@ -3662,16 +3705,16 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", - "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", "shasum": "" }, "require": { @@ -3684,7 +3727,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.5-dev" + "dev-main": "3.6-dev" } }, "autoload": { @@ -3709,7 +3752,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0" }, "funding": [ { @@ -3725,11 +3768,11 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-09-25T14:21:43+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -3788,7 +3831,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.32.0" }, "funding": [ { @@ -3808,7 +3851,7 @@ }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", @@ -3866,7 +3909,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.32.0" }, "funding": [ { @@ -3886,7 +3929,7 @@ }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", @@ -3947,7 +3990,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.32.0" }, "funding": [ { @@ -3967,19 +4010,20 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", "shasum": "" }, "require": { + "ext-iconv": "*", "php": ">=7.2" }, "provide": { @@ -4027,7 +4071,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.32.0" }, "funding": [ { @@ -4043,20 +4087,20 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2024-12-23T08:48:59+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" + "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", - "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4", + "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4", "shasum": "" }, "require": { @@ -4074,7 +4118,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.5-dev" + "dev-main": "3.6-dev" } }, "autoload": { @@ -4110,7 +4154,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.6.0" }, "funding": [ { @@ -4126,20 +4170,20 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2025-04-25T09:37:31+00:00" }, { "name": "symfony/string", - "version": "v6.4.15", + "version": "v6.4.21", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f" + "reference": "73e2c6966a5aef1d4892873ed5322245295370c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f", - "reference": "73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f", + "url": "https://api.github.com/repos/symfony/string/zipball/73e2c6966a5aef1d4892873ed5322245295370c6", + "reference": "73e2c6966a5aef1d4892873ed5322245295370c6", "shasum": "" }, "require": { @@ -4196,7 +4240,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.15" + "source": "https://github.com/symfony/string/tree/v6.4.21" }, "funding": [ { @@ -4212,20 +4256,20 @@ "type": "tidelift" } ], - "time": "2024-11-13T13:31:12+00:00" + "time": "2025-04-18T15:23:29+00:00" }, { "name": "symplify/easy-coding-standard", - "version": "12.5.11", + "version": "12.5.20", "source": { "type": "git", "url": "https://github.com/easy-coding-standard/easy-coding-standard.git", - "reference": "1fa356963594227d0d1a87ed0b2b419d3a42a5d8" + "reference": "bb44b0fc70dd2148d8a6362bc66a35e23dc31bc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/easy-coding-standard/easy-coding-standard/zipball/1fa356963594227d0d1a87ed0b2b419d3a42a5d8", - "reference": "1fa356963594227d0d1a87ed0b2b419d3a42a5d8", + "url": "https://api.github.com/repos/easy-coding-standard/easy-coding-standard/zipball/bb44b0fc70dd2148d8a6362bc66a35e23dc31bc4", + "reference": "bb44b0fc70dd2148d8a6362bc66a35e23dc31bc4", "shasum": "" }, "require": { @@ -4261,7 +4305,7 @@ ], "support": { "issues": "https://github.com/easy-coding-standard/easy-coding-standard/issues", - "source": "https://github.com/easy-coding-standard/easy-coding-standard/tree/12.5.11" + "source": "https://github.com/easy-coding-standard/easy-coding-standard/tree/12.5.20" }, "funding": [ { @@ -4273,7 +4317,7 @@ "type": "github" } ], - "time": "2025-03-25T10:01:37+00:00" + "time": "2025-05-30T11:42:07+00:00" }, { "name": "theseer/tokenizer", diff --git a/phpstan.neon b/phpstan.neon index 94b1d70..eafaff5 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -13,6 +13,11 @@ parameters: # - examples/php-on-wasm typeAliases: Byte: 'int' + # TODO: limit the range + U8: 'int' + S8: 'int' + U16: 'int' + S16: 'int' U32: 'int' U64: 'int' S32: 'int' diff --git a/src/BitOps/BinaryConversion.php b/src/BitOps/BinaryConversion.php index 34d4ca6..e8e7bf9 100644 --- a/src/BitOps/BinaryConversion.php +++ b/src/BitOps/BinaryConversion.php @@ -321,9 +321,6 @@ final readonly class BinaryConversion */ private static function byteSwapIfNeeded(string $s): string { - // note: currently phpstan cannot infer that strrev(non-empty-string) returns non-empty-string. - $ret = self::isLittleEndian() ? $s : strrev($s); - assert($ret !== ''); - return $ret; + return self::isLittleEndian() ? $s : strrev($s); } } diff --git a/src/WebAssembly/Execution/FuncInsts/Host.php b/src/WebAssembly/Execution/FuncInsts/Host.php index 6a66325..c5dc1cd 100644 --- a/src/WebAssembly/Execution/FuncInsts/Host.php +++ b/src/WebAssembly/Execution/FuncInsts/Host.php @@ -5,12 +5,14 @@ declare(strict_types=1); namespace Nsfisis\Waddiwasi\WebAssembly\Execution\FuncInsts; use Nsfisis\Waddiwasi\WebAssembly\Execution\FuncInst; +use Nsfisis\Waddiwasi\WebAssembly\Execution\Ref; +use Nsfisis\Waddiwasi\WebAssembly\Execution\Runtime; use Nsfisis\Waddiwasi\WebAssembly\Structure\Types\FuncType; final readonly class Host extends FuncInst { /** - * @param callable $callback + * @param callable(Runtime, int|float|Ref...): ?(int|float|Ref|list<int|float|Ref>) $callback */ public function __construct( public FuncType $type, diff --git a/src/WebAssembly/Execution/MemInst.php b/src/WebAssembly/Execution/MemInst.php index 9ced0a3..e93e79b 100644 --- a/src/WebAssembly/Execution/MemInst.php +++ b/src/WebAssembly/Execution/MemInst.php @@ -114,14 +114,14 @@ final class MemInst $this->dataS8 = $this->ffi->cast("int8_t[$this->dataSize]", $this->dataU8); // @phpstan-ignore-next-line - $castInt = fn ($n, $signed, $offset) => $this->ffi->cast( + $castInt = fn (int $n, bool $signed, int $offset) => $this->ffi->cast( sprintf("%sint%d_t[$this->dataSize/%d]", $signed ? "" : "u", $n, $n / 8), // @phpstan-ignore-next-line $this->ffi->cast("uint8_t[$this->dataSize+8]", $this->dataU8 + $offset), ); // @phpstan-ignore-next-line - $castFloat = fn ($n, $offset) => $this->ffi->cast( + $castFloat = fn (int $n, int $offset) => $this->ffi->cast( sprintf("%s[$this->dataSize/%d]", $n === 32 ? "float" : "double", $n / 8), // @phpstan-ignore-next-line $this->ffi->cast("uint8_t[$this->dataSize+8]", $this->dataU8 + $offset), @@ -214,6 +214,7 @@ final class MemInst if ($this->size() < $ptr + 1) { return null; } + /** @var S8 $c */ $c = $this->dataS8[$ptr]; assert(-0x80 <= $c && $c <= 0x7F, "$c"); return $c; @@ -227,6 +228,7 @@ final class MemInst if ($this->size() < $ptr + 1) { return null; } + /** @var U8 $c */ $c = $this->dataU8[$ptr]; assert(0 <= $c && $c <= 0xFF, "$c"); return $c; @@ -240,6 +242,7 @@ final class MemInst if ($this->size() < $ptr + 2) { return null; } + /** @var S16 $c */ $c = $this->dataS16($ptr)[$ptr >> 1]; assert(-0x8000 <= $c && $c <= 0x7FFF, "$c"); return $c; @@ -253,6 +256,7 @@ final class MemInst if ($this->size() < $ptr + 2) { return null; } + /** @var U16 $c */ $c = $this->dataU16($ptr)[$ptr >> 1]; assert(0 <= $c && $c <= 0xFFFF, "$c"); return $c; @@ -266,6 +270,7 @@ final class MemInst if ($this->size() < $ptr + 4) { return null; } + /** @var S32 $c */ $c = $this->dataS32($ptr)[$ptr >> 2]; assert(-0x80000000 <= $c && $c <= 0x7FFFFFFF, "$c"); return $c; @@ -279,6 +284,7 @@ final class MemInst if ($this->size() < $ptr + 1) { return null; } + /** @var S8 $c */ $c = $this->dataS8[$ptr]; assert(-0x80 <= $c && $c <= 0x7F, "$c"); return $c; @@ -292,6 +298,7 @@ final class MemInst if ($this->size() < $ptr + 1) { return null; } + /** @var U8 $c */ $c = $this->dataU8[$ptr]; assert(0 <= $c && $c <= 0xFF, "$c"); return $c; @@ -305,6 +312,7 @@ final class MemInst if ($this->size() < $ptr + 2) { return null; } + /** @var S16 $c */ $c = $this->dataS16($ptr)[$ptr >> 1]; assert(-0x8000 <= $c && $c <= 0x7FFF, "$c"); return $c; @@ -318,6 +326,7 @@ final class MemInst if ($this->size() < $ptr + 2) { return null; } + /** @var U16 $c */ $c = $this->dataU16($ptr)[$ptr >> 1]; assert(0 <= $c && $c <= 0xFFFF, "$c"); return $c; @@ -331,6 +340,7 @@ final class MemInst if ($this->size() < $ptr + 4) { return null; } + /** @var S32 $c */ $c = $this->dataS32($ptr)[$ptr >> 2]; assert(-0x80000000 <= $c && $c <= 0x7FFFFFFF, "$c"); return $c; @@ -344,6 +354,7 @@ final class MemInst if ($this->size() < $ptr + 4) { return null; } + /** @var U32 $c */ $c = $this->dataU32($ptr)[$ptr >> 2]; assert(0 <= $c && $c <= 0xFFFFFFFF, "$c"); return $c; @@ -357,6 +368,7 @@ final class MemInst if ($this->size() < $ptr + 8) { return null; } + /** @var S64 $c */ $c = $this->dataS64($ptr)[$ptr >> 3]; assert(-0x8000000000000000 <= $c && $c <= 0x7FFFFFFFFFFFFFFF, "$c"); return $c; @@ -372,6 +384,7 @@ final class MemInst } // f32 cannot be loaded directly from memory because PHP handles NaN // differently than WebAssembly spec defines. + /** @var U32 $i */ $i = $this->dataU32($ptr)[$ptr >> 2]; return NumericOps::f32ReinterpretI32($i); } @@ -384,7 +397,9 @@ final class MemInst if ($this->size() < $ptr + 8) { return null; } - return $this->dataF64($ptr)[$ptr >> 3]; + /** @var F64 $x */ + $x = $this->dataF64($ptr)[$ptr >> 3]; + return $x; } /** @@ -395,7 +410,9 @@ final class MemInst if ($this->size() < $ptr + 1) { return null; } - return $this->dataU8[$ptr]; + /** @var U8 $c */ + $c = $this->dataU8[$ptr]; + return $c; } /** |
