From b83b3829f73fa0db8db121e9e3c3bee22f03e548 Mon Sep 17 00:00:00 2001 From: Marcello Duarte Date: Sat, 6 Dec 2025 16:02:30 +0000 Subject: [PATCH 01/18] Finalize static analysis and prep for 1.0.0 --- composer.json | 12 +- composer.lock | 572 +++++++++++++++++++++++--------------------------- 2 files changed, 266 insertions(+), 318 deletions(-) diff --git a/composer.json b/composer.json index 94efa6d..4c26554 100644 --- a/composer.json +++ b/composer.json @@ -4,9 +4,9 @@ "type": "library", "license": "MIT", "require": { - "php": ">=8.2", - "phunkie/phunkie": "^0.11.3", - "phunkie/effect": "^0.4.1" + "php": "^8.2 || ^8.3 || ^8.4", + "phunkie/phunkie": "^1.0.0", + "phunkie/effect": "^1.0.0" }, "autoload": { "psr-4": { @@ -40,8 +40,8 @@ "scripts": { "test": "pest", "phpstan": "phpstan analyse", - "cs-fix": "php-cs-fixer fix", - "cs-check": "php-cs-fixer fix --dry-run --diff" + "cs-fix": "php-cs-fixer fix --allow-risky=yes", + "cs-check": "php-cs-fixer fix --dry-run --diff --allow-risky=yes" }, "config": { "bin-dir": "bin", @@ -49,4 +49,4 @@ "pestphp/pest-plugin": true } } -} +} \ No newline at end of file diff --git a/composer.lock b/composer.lock index 3a76962..2cdb819 100644 --- a/composer.lock +++ b/composer.lock @@ -4,45 +4,57 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e89ff0b48d382f3f61139f773e1871d6", + "content-hash": "5b3d528d97ffc97484049d1d94246db4", "packages": [ { "name": "phunkie/effect", - "version": "v0.4.1", - "source": { - "type": "git", - "url": "https://github.com/phunkie/effect.git", - "reference": "cfadc91c2b67931d078a12c49abf9a04f60d9568" - }, + "version": "1.0.0", "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phunkie/effect/zipball/cfadc91c2b67931d078a12c49abf9a04f60d9568", - "reference": "cfadc91c2b67931d078a12c49abf9a04f60d9568", - "shasum": "" + "type": "path", + "url": "../effect", + "reference": "dd033e03edb4b02bbe2d36b6c503556d06308fc7" }, "require": { - "php": ">=8.2", - "phunkie/phunkie": "^0.11" + "php": "^8.2 || ^8.3 || ^8.4", + "phunkie/phunkie": "^1.0.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.75", "phpstan/phpstan": "^2.1", "phpunit/phpunit": "^10.5", - "phunkie/phunkie-console": "dev-master" + "phunkie/console": "^1.0.0" }, "suggest": { "ext-parallel": "Required for parallel execution using threads. PHP must be compiled with ZTS support." }, "type": "library", "autoload": { + "psr-4": { + "Phunkie\\Effect\\": "src/" + }, "files": [ "src/Functions/common.php" - ], + ] + }, + "autoload-dev": { "psr-4": { - "Phunkie\\Effect\\": "src/" + "Tests\\Unit\\Phunkie\\Effect\\": "tests/Unit/" } }, - "notification-url": "https://packagist.org/downloads/", + "scripts": { + "test": [ + "phpunit" + ], + "phpstan": [ + "phpstan analyse" + ], + "cs-fix": [ + "php-cs-fixer fix" + ], + "cs-check": [ + "php-cs-fixer fix --dry-run --diff" + ] + }, "license": [ "MIT" ], @@ -53,47 +65,60 @@ } ], "description": "A functional effects library for PHP inspired by Scala's cats-effect", - "support": { - "issues": "https://github.com/phunkie/effect/issues", - "source": "https://github.com/phunkie/effect/tree/v0.4.1" - }, - "time": "2025-10-14T20:51:52+00:00" + "transport-options": { + "relative": true + } }, { "name": "phunkie/phunkie", - "version": "0.11.7", - "source": { - "type": "git", - "url": "https://github.com/phunkie/phunkie.git", - "reference": "1d7620e41062c86e3f1d3dbf22f7035b4675667e" - }, + "version": "1.0.0", "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phunkie/phunkie/zipball/1d7620e41062c86e3f1d3dbf22f7035b4675667e", - "reference": "1d7620e41062c86e3f1d3dbf22f7035b4675667e", - "shasum": "" + "type": "path", + "url": "../phunkie", + "reference": "898fed43f1ef0eee9a82b0c0440a58a83e9f82d9" }, "require": { - "php": ">=8.1" + "php": "^8.2 || ^8.3 || ^8.4" }, "require-dev": { "ergebnis/composer-normalize": "^2", "friendsofphp/php-cs-fixer": "^3", "giorgiosironi/eris": "^0", + "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^9" }, "type": "library", "autoload": { - "files": [ - "src/Phunkie/Functions/common.php" - ], "psr-0": { "": [ "src/" ] + }, + "files": [ + "src/Phunkie/Functions/common.php" + ] + }, + "autoload-dev": { + "psr-4": { + "\\spec\\": [ + "spec/" + ] } }, - "notification-url": "https://packagist.org/downloads/", + "scripts": { + "cs-fix": [ + "bin/php-cs-fixer fix --config=.php-cs-fixer.php --diff --verbose" + ], + "phpstan": [ + "bin/phpstan analyse src" + ], + "test": [ + "bin/phpunit -c phpunit.xml.dist --do-not-cache-result" + ], + "test-debug": [ + "bin/phpunit -c phpunit.xml.dist --debug" + ] + }, "license": [ "MIT" ], @@ -104,11 +129,9 @@ } ], "description": "Functional structures library for PHP", - "support": { - "issues": "https://github.com/phunkie/phunkie/issues", - "source": "https://github.com/phunkie/phunkie/tree/0.11.7" - }, - "time": "2025-02-22T21:55:21+00:00" + "transport-options": { + "relative": true + } } ], "packages-dev": [ @@ -720,58 +743,58 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.88.2", + "version": "v3.75.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "a8d15584bafb0f0d9d938827840060fd4a3ebc99" + "reference": "399a128ff2fdaf4281e4e79b755693286cdf325c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/a8d15584bafb0f0d9d938827840060fd4a3ebc99", - "reference": "a8d15584bafb0f0d9d938827840060fd4a3ebc99", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/399a128ff2fdaf4281e4e79b755693286cdf325c", + "reference": "399a128ff2fdaf4281e4e79b755693286cdf325c", "shasum": "" }, "require": { - "clue/ndjson-react": "^1.3", + "clue/ndjson-react": "^1.0", "composer/semver": "^3.4", - "composer/xdebug-handler": "^3.0.5", + "composer/xdebug-handler": "^3.0.3", "ext-filter": "*", "ext-hash": "*", "ext-json": "*", "ext-tokenizer": "*", - "fidry/cpu-core-counter": "^1.3", + "fidry/cpu-core-counter": "^1.2", "php": "^7.4 || ^8.0", - "react/child-process": "^0.6.6", - "react/event-loop": "^1.5", - "react/promise": "^3.3", - "react/socket": "^1.16", - "react/stream": "^1.4", - "sebastian/diff": "^4.0.6 || ^5.1.1 || ^6.0.2 || ^7.0", - "symfony/console": "^5.4.47 || ^6.4.24 || ^7.0", - "symfony/event-dispatcher": "^5.4.45 || ^6.4.24 || ^7.0", - "symfony/filesystem": "^5.4.45 || ^6.4.24 || ^7.0", - "symfony/finder": "^5.4.45 || ^6.4.24 || ^7.0", - "symfony/options-resolver": "^5.4.45 || ^6.4.24 || ^7.0", - "symfony/polyfill-mbstring": "^1.33", - "symfony/polyfill-php80": "^1.33", - "symfony/polyfill-php81": "^1.33", - "symfony/polyfill-php84": "^1.33", - "symfony/process": "^5.4.47 || ^6.4.24 || ^7.2", - "symfony/stopwatch": "^5.4.45 || ^6.4.24 || ^7.0" + "react/child-process": "^0.6.5", + "react/event-loop": "^1.0", + "react/promise": "^2.0 || ^3.0", + "react/socket": "^1.0", + "react/stream": "^1.0", + "sebastian/diff": "^4.0 || ^5.1 || ^6.0 || ^7.0", + "symfony/console": "^5.4 || ^6.4 || ^7.0", + "symfony/event-dispatcher": "^5.4 || ^6.4 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.4 || ^7.0", + "symfony/finder": "^5.4 || ^6.4 || ^7.0", + "symfony/options-resolver": "^5.4 || ^6.4 || ^7.0", + "symfony/polyfill-mbstring": "^1.31", + "symfony/polyfill-php80": "^1.31", + "symfony/polyfill-php81": "^1.31", + "symfony/process": "^5.4 || ^6.4 || ^7.2", + "symfony/stopwatch": "^5.4 || ^6.4 || ^7.0" }, "require-dev": { - "facile-it/paraunit": "^1.3.1 || ^2.7", - "infection/infection": "^0.31.0", - "justinrainbow/json-schema": "^6.5", - "keradus/cli-executor": "^2.2", + "facile-it/paraunit": "^1.3.1 || ^2.6", + "infection/infection": "^0.29.14", + "justinrainbow/json-schema": "^5.3 || ^6.2", + "keradus/cli-executor": "^2.1", "mikey179/vfsstream": "^1.6.12", - "php-coveralls/php-coveralls": "^2.8", + "php-coveralls/php-coveralls": "^2.7", + "php-cs-fixer/accessible-object": "^1.1", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.6", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.6", - "phpunit/phpunit": "^9.6.25 || ^10.5.53 || ^11.5.34", - "symfony/var-dumper": "^5.4.48 || ^6.4.24 || ^7.3.2", - "symfony/yaml": "^5.4.45 || ^6.4.24 || ^7.3.2" + "phpunit/phpunit": "^9.6.22 || ^10.5.45 || ^11.5.12", + "symfony/var-dumper": "^5.4.48 || ^6.4.18 || ^7.2.3", + "symfony/yaml": "^5.4.45 || ^6.4.18 || ^7.2.3" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -812,7 +835,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.88.2" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.75.0" }, "funding": [ { @@ -820,7 +843,7 @@ "type": "github" } ], - "time": "2025-09-27T00:24:15+00:00" + "time": "2025-03-31T18:40:42+00:00" }, { "name": "jean85/pretty-package-versions", @@ -944,16 +967,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.6.1", + "version": "v5.7.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2" + "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2", - "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dca41cd15c2ac9d055ad70dbfd011130757d1f82", + "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82", "shasum": "" }, "require": { @@ -996,9 +1019,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.7.0" }, - "time": "2025-08-13T20:13:15+00:00" + "time": "2025-12-06T11:56:16+00:00" }, { "name": "nunomaduro/collision", @@ -1099,31 +1122,31 @@ }, { "name": "nunomaduro/termwind", - "version": "v2.3.1", + "version": "v2.3.3", "source": { "type": "git", "url": "https://github.com/nunomaduro/termwind.git", - "reference": "dfa08f390e509967a15c22493dc0bac5733d9123" + "reference": "6fb2a640ff502caace8e05fd7be3b503a7e1c017" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/dfa08f390e509967a15c22493dc0bac5733d9123", - "reference": "dfa08f390e509967a15c22493dc0bac5733d9123", + "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/6fb2a640ff502caace8e05fd7be3b503a7e1c017", + "reference": "6fb2a640ff502caace8e05fd7be3b503a7e1c017", "shasum": "" }, "require": { "ext-mbstring": "*", "php": "^8.2", - "symfony/console": "^7.2.6" + "symfony/console": "^7.3.6" }, "require-dev": { - "illuminate/console": "^11.44.7", - "laravel/pint": "^1.22.0", + "illuminate/console": "^11.46.1", + "laravel/pint": "^1.25.1", "mockery/mockery": "^1.6.12", - "pestphp/pest": "^2.36.0 || ^3.8.2", - "phpstan/phpstan": "^1.12.25", + "pestphp/pest": "^2.36.0 || ^3.8.4 || ^4.1.3", + "phpstan/phpstan": "^1.12.32", "phpstan/phpstan-strict-rules": "^1.6.2", - "symfony/var-dumper": "^7.2.6", + "symfony/var-dumper": "^7.3.5", "thecodingmachine/phpstan-strict-rules": "^1.0.0" }, "type": "library", @@ -1166,7 +1189,7 @@ ], "support": { "issues": "https://github.com/nunomaduro/termwind/issues", - "source": "https://github.com/nunomaduro/termwind/tree/v2.3.1" + "source": "https://github.com/nunomaduro/termwind/tree/v2.3.3" }, "funding": [ { @@ -1182,7 +1205,7 @@ "type": "github" } ], - "time": "2025-05-08T08:14:37+00:00" + "time": "2025-11-20T02:34:59+00:00" }, { "name": "pestphp/pest", @@ -1607,16 +1630,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.6.3", + "version": "5.6.5", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "94f8051919d1b0369a6bcc7931d679a511c03fe9" + "reference": "90614c73d3800e187615e2dd236ad0e2a01bf761" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94f8051919d1b0369a6bcc7931d679a511c03fe9", - "reference": "94f8051919d1b0369a6bcc7931d679a511c03fe9", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/90614c73d3800e187615e2dd236ad0e2a01bf761", + "reference": "90614c73d3800e187615e2dd236ad0e2a01bf761", "shasum": "" }, "require": { @@ -1665,22 +1688,22 @@ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.3" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.5" }, - "time": "2025-08-01T19:43:32+00:00" + "time": "2025-11-27T19:50:05+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.10.0", + "version": "1.12.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a" + "reference": "92a98ada2b93d9b201a613cb5a33584dde25f195" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/679e3ce485b99e84c775d28e2e96fade9a7fb50a", - "reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/92a98ada2b93d9b201a613cb5a33584dde25f195", + "reference": "92a98ada2b93d9b201a613cb5a33584dde25f195", "shasum": "" }, "require": { @@ -1723,9 +1746,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.10.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.12.0" }, - "time": "2024-11-09T15:12:26+00:00" + "time": "2025-11-21T15:09:14+00:00" }, { "name": "phpstan/phpdoc-parser", @@ -2551,16 +2574,16 @@ }, { "name": "react/dns", - "version": "v1.13.0", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/reactphp/dns.git", - "reference": "eb8ae001b5a455665c89c1df97f6fb682f8fb0f5" + "reference": "7562c05391f42701c1fccf189c8225fece1cd7c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/dns/zipball/eb8ae001b5a455665c89c1df97f6fb682f8fb0f5", - "reference": "eb8ae001b5a455665c89c1df97f6fb682f8fb0f5", + "url": "https://api.github.com/repos/reactphp/dns/zipball/7562c05391f42701c1fccf189c8225fece1cd7c3", + "reference": "7562c05391f42701c1fccf189c8225fece1cd7c3", "shasum": "" }, "require": { @@ -2615,7 +2638,7 @@ ], "support": { "issues": "https://github.com/reactphp/dns/issues", - "source": "https://github.com/reactphp/dns/tree/v1.13.0" + "source": "https://github.com/reactphp/dns/tree/v1.14.0" }, "funding": [ { @@ -2623,20 +2646,20 @@ "type": "open_collective" } ], - "time": "2024-06-13T14:18:03+00:00" + "time": "2025-11-18T19:34:28+00:00" }, { "name": "react/event-loop", - "version": "v1.5.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/reactphp/event-loop.git", - "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354" + "reference": "ba276bda6083df7e0050fd9b33f66ad7a4ac747a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/event-loop/zipball/bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", - "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/ba276bda6083df7e0050fd9b33f66ad7a4ac747a", + "reference": "ba276bda6083df7e0050fd9b33f66ad7a4ac747a", "shasum": "" }, "require": { @@ -2687,7 +2710,7 @@ ], "support": { "issues": "https://github.com/reactphp/event-loop/issues", - "source": "https://github.com/reactphp/event-loop/tree/v1.5.0" + "source": "https://github.com/reactphp/event-loop/tree/v1.6.0" }, "funding": [ { @@ -2695,7 +2718,7 @@ "type": "open_collective" } ], - "time": "2023-11-13T13:48:05+00:00" + "time": "2025-11-17T20:46:25+00:00" }, { "name": "react/promise", @@ -2772,16 +2795,16 @@ }, { "name": "react/socket", - "version": "v1.16.0", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/reactphp/socket.git", - "reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1" + "reference": "ef5b17b81f6f60504c539313f94f2d826c5faa08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/socket/zipball/23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1", - "reference": "23e4ff33ea3e160d2d1f59a0e6050e4b0fb0eac1", + "url": "https://api.github.com/repos/reactphp/socket/zipball/ef5b17b81f6f60504c539313f94f2d826c5faa08", + "reference": "ef5b17b81f6f60504c539313f94f2d826c5faa08", "shasum": "" }, "require": { @@ -2840,7 +2863,7 @@ ], "support": { "issues": "https://github.com/reactphp/socket/issues", - "source": "https://github.com/reactphp/socket/tree/v1.16.0" + "source": "https://github.com/reactphp/socket/tree/v1.17.0" }, "funding": [ { @@ -2848,7 +2871,7 @@ "type": "open_collective" } ], - "time": "2024-07-26T10:38:09+00:00" + "time": "2025-11-19T20:47:34+00:00" }, { "name": "react/stream", @@ -3883,16 +3906,16 @@ }, { "name": "symfony/console", - "version": "v7.3.4", + "version": "v7.4.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "2b9c5fafbac0399a20a2e82429e2bd735dcfb7db" + "reference": "0bc0f45254b99c58d45a8fbf9fb955d46cbd1bb8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/2b9c5fafbac0399a20a2e82429e2bd735dcfb7db", - "reference": "2b9c5fafbac0399a20a2e82429e2bd735dcfb7db", + "url": "https://api.github.com/repos/symfony/console/zipball/0bc0f45254b99c58d45a8fbf9fb955d46cbd1bb8", + "reference": "0bc0f45254b99c58d45a8fbf9fb955d46cbd1bb8", "shasum": "" }, "require": { @@ -3900,7 +3923,7 @@ "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^7.2" + "symfony/string": "^7.2|^8.0" }, "conflict": { "symfony/dependency-injection": "<6.4", @@ -3914,16 +3937,16 @@ }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/event-dispatcher": "^6.4|^7.0", - "symfony/http-foundation": "^6.4|^7.0", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/lock": "^6.4|^7.0", - "symfony/messenger": "^6.4|^7.0", - "symfony/process": "^6.4|^7.0", - "symfony/stopwatch": "^6.4|^7.0", - "symfony/var-dumper": "^6.4|^7.0" + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/event-dispatcher": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0", + "symfony/lock": "^6.4|^7.0|^8.0", + "symfony/messenger": "^6.4|^7.0|^8.0", + "symfony/process": "^6.4|^7.0|^8.0", + "symfony/stopwatch": "^6.4|^7.0|^8.0", + "symfony/var-dumper": "^6.4|^7.0|^8.0" }, "type": "library", "autoload": { @@ -3957,7 +3980,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.3.4" + "source": "https://github.com/symfony/console/tree/v7.4.0" }, "funding": [ { @@ -3977,7 +4000,7 @@ "type": "tidelift" } ], - "time": "2025-09-22T15:31:00+00:00" + "time": "2025-11-27T13:27:24+00:00" }, { "name": "symfony/deprecation-contracts", @@ -4048,16 +4071,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v7.3.3", + "version": "v7.4.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "b7dc69e71de420ac04bc9ab830cf3ffebba48191" + "reference": "9dddcddff1ef974ad87b3708e4b442dc38b2261d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b7dc69e71de420ac04bc9ab830cf3ffebba48191", - "reference": "b7dc69e71de420ac04bc9ab830cf3ffebba48191", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9dddcddff1ef974ad87b3708e4b442dc38b2261d", + "reference": "9dddcddff1ef974ad87b3708e4b442dc38b2261d", "shasum": "" }, "require": { @@ -4074,13 +4097,14 @@ }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/error-handler": "^6.4|^7.0", - "symfony/expression-language": "^6.4|^7.0", - "symfony/http-foundation": "^6.4|^7.0", + "symfony/config": "^6.4|^7.0|^8.0", + "symfony/dependency-injection": "^6.4|^7.0|^8.0", + "symfony/error-handler": "^6.4|^7.0|^8.0", + "symfony/expression-language": "^6.4|^7.0|^8.0", + "symfony/framework-bundle": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^6.4|^7.0|^8.0", "symfony/service-contracts": "^2.5|^3", - "symfony/stopwatch": "^6.4|^7.0" + "symfony/stopwatch": "^6.4|^7.0|^8.0" }, "type": "library", "autoload": { @@ -4108,7 +4132,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v7.3.3" + "source": "https://github.com/symfony/event-dispatcher/tree/v7.4.0" }, "funding": [ { @@ -4128,7 +4152,7 @@ "type": "tidelift" } ], - "time": "2025-08-13T11:49:31+00:00" + "time": "2025-10-28T09:38:46+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -4208,16 +4232,16 @@ }, { "name": "symfony/filesystem", - "version": "v7.3.2", + "version": "v7.4.0", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd" + "reference": "d551b38811096d0be9c4691d406991b47c0c630a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/edcbb768a186b5c3f25d0643159a787d3e63b7fd", - "reference": "edcbb768a186b5c3f25d0643159a787d3e63b7fd", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/d551b38811096d0be9c4691d406991b47c0c630a", + "reference": "d551b38811096d0be9c4691d406991b47c0c630a", "shasum": "" }, "require": { @@ -4226,7 +4250,7 @@ "symfony/polyfill-mbstring": "~1.8" }, "require-dev": { - "symfony/process": "^6.4|^7.0" + "symfony/process": "^6.4|^7.0|^8.0" }, "type": "library", "autoload": { @@ -4254,7 +4278,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.3.2" + "source": "https://github.com/symfony/filesystem/tree/v7.4.0" }, "funding": [ { @@ -4274,27 +4298,27 @@ "type": "tidelift" } ], - "time": "2025-07-07T08:17:47+00:00" + "time": "2025-11-27T13:27:24+00:00" }, { "name": "symfony/finder", - "version": "v7.3.2", + "version": "v7.4.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe" + "reference": "340b9ed7320570f319028a2cbec46d40535e94bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/2a6614966ba1074fa93dae0bc804227422df4dfe", - "reference": "2a6614966ba1074fa93dae0bc804227422df4dfe", + "url": "https://api.github.com/repos/symfony/finder/zipball/340b9ed7320570f319028a2cbec46d40535e94bd", + "reference": "340b9ed7320570f319028a2cbec46d40535e94bd", "shasum": "" }, "require": { "php": ">=8.2" }, "require-dev": { - "symfony/filesystem": "^6.4|^7.0" + "symfony/filesystem": "^6.4|^7.0|^8.0" }, "type": "library", "autoload": { @@ -4322,7 +4346,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.3.2" + "source": "https://github.com/symfony/finder/tree/v7.4.0" }, "funding": [ { @@ -4342,20 +4366,20 @@ "type": "tidelift" } ], - "time": "2025-07-15T13:41:35+00:00" + "time": "2025-11-05T05:42:40+00:00" }, { "name": "symfony/options-resolver", - "version": "v7.3.3", + "version": "v7.4.0", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "0ff2f5c3df08a395232bbc3c2eb7e84912df911d" + "reference": "b38026df55197f9e39a44f3215788edf83187b80" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/0ff2f5c3df08a395232bbc3c2eb7e84912df911d", - "reference": "0ff2f5c3df08a395232bbc3c2eb7e84912df911d", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/b38026df55197f9e39a44f3215788edf83187b80", + "reference": "b38026df55197f9e39a44f3215788edf83187b80", "shasum": "" }, "require": { @@ -4393,7 +4417,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v7.3.3" + "source": "https://github.com/symfony/options-resolver/tree/v7.4.0" }, "funding": [ { @@ -4413,7 +4437,7 @@ "type": "tidelift" } ], - "time": "2025-08-05T10:16:07+00:00" + "time": "2025-11-12T15:39:26+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4667,20 +4691,19 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.33.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", - "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", "shasum": "" }, "require": { - "ext-iconv": "*", "php": ">=7.2" }, "provide": { @@ -4728,7 +4751,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" }, "funding": [ { @@ -4739,16 +4762,12 @@ "url": "https://github.com/fabpot", "type": "github" }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-12-23T08:48:59+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php80", @@ -4914,98 +4933,18 @@ ], "time": "2024-09-09T11:45:10+00:00" }, - { - "name": "symfony/polyfill-php84", - "version": "v1.33.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php84.git", - "reference": "d8ced4d875142b6a7426000426b8abc631d6b191" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php84/zipball/d8ced4d875142b6a7426000426b8abc631d6b191", - "reference": "d8ced4d875142b6a7426000426b8abc631d6b191", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php84\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.4+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php84/tree/v1.33.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-06-24T13:30:11+00:00" - }, { "name": "symfony/process", - "version": "v7.3.4", + "version": "v7.4.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "f24f8f316367b30810810d4eb30c543d7003ff3b" + "reference": "7ca8dc2d0dcf4882658313aba8be5d9fd01026c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/f24f8f316367b30810810d4eb30c543d7003ff3b", - "reference": "f24f8f316367b30810810d4eb30c543d7003ff3b", + "url": "https://api.github.com/repos/symfony/process/zipball/7ca8dc2d0dcf4882658313aba8be5d9fd01026c8", + "reference": "7ca8dc2d0dcf4882658313aba8be5d9fd01026c8", "shasum": "" }, "require": { @@ -5037,7 +4976,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.3.4" + "source": "https://github.com/symfony/process/tree/v7.4.0" }, "funding": [ { @@ -5057,20 +4996,20 @@ "type": "tidelift" } ], - "time": "2025-09-11T10:12:26+00:00" + "time": "2025-10-16T11:21:06+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.6.0", + "version": "v3.6.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4" + "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4", - "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/45112560a3ba2d715666a509a0bc9521d10b6c43", + "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43", "shasum": "" }, "require": { @@ -5124,7 +5063,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.6.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.6.1" }, "funding": [ { @@ -5135,25 +5074,29 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-04-25T09:37:31+00:00" + "time": "2025-07-15T11:30:57+00:00" }, { "name": "symfony/stopwatch", - "version": "v7.3.0", + "version": "v7.4.0", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "5a49289e2b308214c8b9c2fda4ea454d8b8ad7cd" + "reference": "8a24af0a2e8a872fb745047180649b8418303084" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5a49289e2b308214c8b9c2fda4ea454d8b8ad7cd", - "reference": "5a49289e2b308214c8b9c2fda4ea454d8b8ad7cd", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/8a24af0a2e8a872fb745047180649b8418303084", + "reference": "8a24af0a2e8a872fb745047180649b8418303084", "shasum": "" }, "require": { @@ -5186,7 +5129,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v7.3.0" + "source": "https://github.com/symfony/stopwatch/tree/v7.4.0" }, "funding": [ { @@ -5197,31 +5140,36 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2025-02-24T10:49:57+00:00" + "time": "2025-08-04T07:05:15+00:00" }, { "name": "symfony/string", - "version": "v7.3.4", + "version": "v7.4.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "f96476035142921000338bad71e5247fbc138872" + "reference": "d50e862cb0a0e0886f73ca1f31b865efbb795003" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/f96476035142921000338bad71e5247fbc138872", - "reference": "f96476035142921000338bad71e5247fbc138872", + "url": "https://api.github.com/repos/symfony/string/zipball/d50e862cb0a0e0886f73ca1f31b865efbb795003", + "reference": "d50e862cb0a0e0886f73ca1f31b865efbb795003", "shasum": "" }, "require": { "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3.0", "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-grapheme": "~1.33", "symfony/polyfill-intl-normalizer": "~1.0", "symfony/polyfill-mbstring": "~1.0" }, @@ -5229,11 +5177,11 @@ "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/emoji": "^7.1", - "symfony/http-client": "^6.4|^7.0", - "symfony/intl": "^6.4|^7.0", + "symfony/emoji": "^7.1|^8.0", + "symfony/http-client": "^6.4|^7.0|^8.0", + "symfony/intl": "^6.4|^7.0|^8.0", "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^6.4|^7.0" + "symfony/var-exporter": "^6.4|^7.0|^8.0" }, "type": "library", "autoload": { @@ -5272,7 +5220,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.3.4" + "source": "https://github.com/symfony/string/tree/v7.4.0" }, "funding": [ { @@ -5292,7 +5240,7 @@ "type": "tidelift" } ], - "time": "2025-09-11T14:36:48+00:00" + "time": "2025-11-27T13:27:24+00:00" }, { "name": "ta-tikoma/phpunit-architecture-test", @@ -5355,16 +5303,16 @@ }, { "name": "theseer/tokenizer", - "version": "1.2.3", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" + "reference": "b7489ce515e168639d17feec34b8847c326b0b3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", - "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b7489ce515e168639d17feec34b8847c326b0b3c", + "reference": "b7489ce515e168639d17feec34b8847c326b0b3c", "shasum": "" }, "require": { @@ -5393,7 +5341,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.3" + "source": "https://github.com/theseer/tokenizer/tree/1.3.1" }, "funding": [ { @@ -5401,32 +5349,32 @@ "type": "github" } ], - "time": "2024-03-03T12:36:25+00:00" + "time": "2025-11-17T20:03:58+00:00" }, { "name": "webmozart/assert", - "version": "1.11.0", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + "reference": "9be6926d8b485f55b9229203f962b51ed377ba68" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/9be6926d8b485f55b9229203f962b51ed377ba68", + "reference": "9be6926d8b485f55b9229203f962b51ed377ba68", "shasum": "" }, "require": { "ext-ctype": "*", + "ext-date": "*", + "ext-filter": "*", "php": "^7.2 || ^8.0" }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" + "suggest": { + "ext-intl": "", + "ext-simplexml": "", + "ext-spl": "" }, "type": "library", "extra": { @@ -5457,9 +5405,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.11.0" + "source": "https://github.com/webmozarts/assert/tree/1.12.1" }, - "time": "2022-06-03T18:03:27+00:00" + "time": "2025-10-29T15:56:20+00:00" } ], "aliases": [], @@ -5468,7 +5416,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=8.2" + "php": "^8.2 || ^8.3 || ^8.4" }, "platform-dev": {}, "plugin-api-version": "2.6.0" From c72d9938f16237cc9f0b251c0ec12fb8a5217e69 Mon Sep 17 00:00:00 2001 From: Marcello Duarte Date: Sun, 7 Dec 2025 16:44:16 +0000 Subject: [PATCH 02/18] Add Path() function and namespaced aliases for consistency with Effect pattern --- src/Functions/file.php | 12 +++++++++++ src/Functions/infinite.php | 43 +++++++++++++++++++++++++++++++++++++- 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/src/Functions/file.php b/src/Functions/file.php index fd0d591..446c01e 100644 --- a/src/Functions/file.php +++ b/src/Functions/file.php @@ -20,6 +20,18 @@ use Phunkie\Streams\IO\Read; use Phunkie\Streams\Type\Stream; + const Path = '\\Phunkie\\Streams\\IO\\File\\Path'; + /** + * Creates a Path from a string + * + * @param string $pathname The path string + * @return Path The Path object + */ + function Path(string $pathname): Path + { + return new Path($pathname); + } + function readAll($path, $chunk): Stream { return Read::readAll($path, $chunk); diff --git a/src/Functions/infinite.php b/src/Functions/infinite.php index aa4b3e8..2450175 100644 --- a/src/Functions/infinite.php +++ b/src/Functions/infinite.php @@ -19,7 +19,7 @@ use Phunkie\Streams\Infinite\Timer; use Phunkie\Streams\Infinite\Unfold; - function fromRange(int $start, int $end, int $step = 1): Infinite + function fromRange(int $start, int $end = PHP_INT_MAX, int $step = 1): Infinite { return new Range($start, $end, $step); } @@ -53,3 +53,44 @@ function awakeEvery(float $seconds, $stopAt = null): Infinite return new Timer($seconds, $stopAt); } } + +namespace Phunkie\Streams\Functions\infinite { + + use Phunkie\Streams\Infinite\Infinite; + + const fromRange = '\\Phunkie\\Streams\\Functions\\infinite\\fromRange'; + function fromRange(int $start, int $end = PHP_INT_MAX, int $step = 1): Infinite + { + return \fromRange($start, $end, $step); + } + + const iterate = '\\Phunkie\\Streams\\Functions\\infinite\\iterate'; + function iterate(int $start): callable + { + return \iterate($start); + } + + const unfold = '\\Phunkie\\Streams\\Functions\\infinite\\unfold'; + function unfold($seed): callable + { + return \unfold($seed); + } + + const fromConstant = '\\Phunkie\\Streams\\Functions\\infinite\\fromConstant'; + function fromConstant(mixed $pattern): Infinite + { + return \fromConstant($pattern); + } + + const repeat = '\\Phunkie\\Streams\\Functions\\infinite\\repeat'; + function repeat(...$values): Infinite + { + return \repeat(...$values); + } + + const awakeEvery = '\\Phunkie\\Streams\\Functions\\infinite\\awakeEvery'; + function awakeEvery(float $seconds, $stopAt = null): Infinite + { + return \awakeEvery($seconds, $stopAt); + } +} From 5c6fa9d16b5f86295800e63ecf8fee1e19ac1c49 Mon Sep 17 00:00:00 2001 From: Marcello Duarte Date: Sun, 7 Dec 2025 16:45:03 +0000 Subject: [PATCH 03/18] Update documentation to use Path() function and namespaced imports --- doc/working-with-streams.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/doc/working-with-streams.md b/doc/working-with-streams.md index 211b796..0175f85 100644 --- a/doc/working-with-streams.md +++ b/doc/working-with-streams.md @@ -63,8 +63,7 @@ Phunkie Streams provides functions for creating potentially infinite streams: ```php Date: Sun, 7 Dec 2025 16:53:18 +0000 Subject: [PATCH 04/18] Revert namespaced aliases - keep global namespace functions as intended --- doc/working-with-streams.md | 3 +-- src/Functions/infinite.php | 41 ------------------------------------- 2 files changed, 1 insertion(+), 43 deletions(-) diff --git a/doc/working-with-streams.md b/doc/working-with-streams.md index 0175f85..716ba67 100644 --- a/doc/working-with-streams.md +++ b/doc/working-with-streams.md @@ -63,8 +63,7 @@ Phunkie Streams provides functions for creating potentially infinite streams: ```php Date: Sun, 7 Dec 2025 17:04:22 +0000 Subject: [PATCH 05/18] Align file functions with Effect/Core pattern: Path() global, file functions in Phunkie\Streams\Functions\file --- src/Functions/file.php | 32 ++++++++++++++------- tests/Feature/Streams/BracketSpec.php | 14 ++++----- tests/Feature/Streams/CompositionSpec.php | 10 +++---- tests/Feature/Streams/ErrorHandlingSpec.php | 8 +++--- 4 files changed, 38 insertions(+), 26 deletions(-) diff --git a/src/Functions/file.php b/src/Functions/file.php index 446c01e..ba08352 100644 --- a/src/Functions/file.php +++ b/src/Functions/file.php @@ -9,7 +9,23 @@ * file that was distributed with this source code. */ -namespace Phunkie\Streams\IO\File { +namespace { + + use Phunkie\Streams\IO\File\Path as PathClass; + + /** + * Creates a Path from a string + * + * @param string $pathname The path string + * @return PathClass The Path object + */ + function Path(string $pathname): PathClass + { + return new PathClass($pathname); + } +} + +namespace Phunkie\Streams\Functions\file { use function Phunkie\Effect\Functions\io\io; @@ -17,21 +33,17 @@ use function Phunkie\Streams\Functions\resource\bracket; + use Phunkie\Streams\IO\File\Path; use Phunkie\Streams\IO\Read; use Phunkie\Streams\Type\Stream; - const Path = '\\Phunkie\\Streams\\IO\\File\\Path'; /** - * Creates a Path from a string + * Read all contents from a file as a Stream * - * @param string $pathname The path string - * @return Path The Path object + * @param Path $path The file path to read from + * @param int $chunk The chunk size in bytes for reading + * @return Stream A stream of file contents */ - function Path(string $pathname): Path - { - return new Path($pathname); - } - function readAll($path, $chunk): Stream { return Read::readAll($path, $chunk); diff --git a/tests/Feature/Streams/BracketSpec.php b/tests/Feature/Streams/BracketSpec.php index d8753ed..e08f5fa 100644 --- a/tests/Feature/Streams/BracketSpec.php +++ b/tests/Feature/Streams/BracketSpec.php @@ -2,16 +2,16 @@ use function Phunkie\Effect\Functions\io\io; use function Phunkie\Streams\Functions\resource\bracket; -use function Phunkie\Streams\IO\File\deleteFile; -use function Phunkie\Streams\IO\File\exists; +use function Phunkie\Streams\Functions\file\deleteFile; +use function Phunkie\Streams\Functions\file\exists; use Phunkie\Streams\IO\File\Path; -use function Phunkie\Streams\IO\File\readFileContents; -use function Phunkie\Streams\IO\File\readLines; -use function Phunkie\Streams\IO\File\writeFile; -use function Phunkie\Streams\IO\File\writeFileContents; -use function Phunkie\Streams\IO\File\writeLines; +use function Phunkie\Streams\Functions\file\readFileContents; +use function Phunkie\Streams\Functions\file\readLines; +use function Phunkie\Streams\Functions\file\writeFile; +use function Phunkie\Streams\Functions\file\writeFileContents; +use function Phunkie\Streams\Functions\file\writeLines; describe("Bracket Resource Management", function () { diff --git a/tests/Feature/Streams/CompositionSpec.php b/tests/Feature/Streams/CompositionSpec.php index f36acaf..cb83691 100644 --- a/tests/Feature/Streams/CompositionSpec.php +++ b/tests/Feature/Streams/CompositionSpec.php @@ -4,14 +4,14 @@ use Phunkie\Effect\IO\IO; -use function Phunkie\Streams\IO\File\exists; +use function Phunkie\Streams\Functions\file\exists; use Phunkie\Streams\IO\File\Path; -use function Phunkie\Streams\IO\File\readFileContents; -use function Phunkie\Streams\IO\File\readLines; -use function Phunkie\Streams\IO\File\writeFileContents; -use function Phunkie\Streams\IO\File\writeLines; +use function Phunkie\Streams\Functions\file\readFileContents; +use function Phunkie\Streams\Functions\file\readLines; +use function Phunkie\Streams\Functions\file\writeFileContents; +use function Phunkie\Streams\Functions\file\writeLines; describe("Stream Composition with flatMap", function () { diff --git a/tests/Feature/Streams/ErrorHandlingSpec.php b/tests/Feature/Streams/ErrorHandlingSpec.php index 9874573..d32102f 100644 --- a/tests/Feature/Streams/ErrorHandlingSpec.php +++ b/tests/Feature/Streams/ErrorHandlingSpec.php @@ -1,13 +1,13 @@ Date: Sun, 7 Dec 2025 17:12:38 +0000 Subject: [PATCH 06/18] Update examples to use Phunkie\Streams\Functions\file namespace --- examples/bracket.php | 12 ++++++------ examples/composition.php | 12 ++++++------ examples/error-handling.php | 8 ++++---- examples/file-pipes.php | 6 +++--- examples/file.php | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/examples/bracket.php b/examples/bracket.php index 223549c..9fc39c0 100644 --- a/examples/bracket.php +++ b/examples/bracket.php @@ -9,15 +9,15 @@ use function Phunkie\Effect\Functions\io\io; use function Phunkie\Streams\Functions\resource\bracket; -use function Phunkie\Streams\IO\File\deleteFile; -use function Phunkie\Streams\IO\File\exists; +use function Phunkie\Streams\Functions\file\deleteFile; +use function Phunkie\Streams\Functions\file\exists; use Phunkie\Streams\IO\File\Path; -use function Phunkie\Streams\IO\File\readFileContents; -use function Phunkie\Streams\IO\File\readLines; -use function Phunkie\Streams\IO\File\writeFileContents; -use function Phunkie\Streams\IO\File\writeLines; +use function Phunkie\Streams\Functions\file\readFileContents; +use function Phunkie\Streams\Functions\file\readLines; +use function Phunkie\Streams\Functions\file\writeFileContents; +use function Phunkie\Streams\Functions\file\writeLines; require_once dirname(__FILE__, 2) . '/vendor/autoload.php'; require_once dirname(__FILE__) . '/printLn.php'; diff --git a/examples/composition.php b/examples/composition.php index b452e8a..5e9fccc 100644 --- a/examples/composition.php +++ b/examples/composition.php @@ -12,15 +12,15 @@ use Phunkie\Effect\IO\IO; -use function Phunkie\Streams\IO\File\deleteFile; -use function Phunkie\Streams\IO\File\exists; +use function Phunkie\Streams\Functions\file\deleteFile; +use function Phunkie\Streams\Functions\file\exists; use Phunkie\Streams\IO\File\Path; -use function Phunkie\Streams\IO\File\readFileContents; -use function Phunkie\Streams\IO\File\readLines; -use function Phunkie\Streams\IO\File\writeFileContents; -use function Phunkie\Streams\IO\File\writeLines; +use function Phunkie\Streams\Functions\file\readFileContents; +use function Phunkie\Streams\Functions\file\readLines; +use function Phunkie\Streams\Functions\file\writeFileContents; +use function Phunkie\Streams\Functions\file\writeLines; require_once dirname(__FILE__, 2) . '/vendor/autoload.php'; require_once dirname(__FILE__) . '/printLn.php'; diff --git a/examples/error-handling.php b/examples/error-handling.php index 4b5ec38..5bc640e 100644 --- a/examples/error-handling.php +++ b/examples/error-handling.php @@ -9,13 +9,13 @@ */ use function Phunkie\Effect\Functions\io\io; -use function Phunkie\Streams\IO\File\exists; +use function Phunkie\Streams\Functions\file\exists; use Phunkie\Streams\IO\File\Path; -use function Phunkie\Streams\IO\File\readFileContents; -use function Phunkie\Streams\IO\File\readLines; -use function Phunkie\Streams\IO\File\writeFileContents; +use function Phunkie\Streams\Functions\file\readFileContents; +use function Phunkie\Streams\Functions\file\readLines; +use function Phunkie\Streams\Functions\file\writeFileContents; require_once dirname(__FILE__, 2) . '/vendor/autoload.php'; require_once dirname(__FILE__) . '/printLn.php'; diff --git a/examples/file-pipes.php b/examples/file-pipes.php index ebf3105..46001ea 100644 --- a/examples/file-pipes.php +++ b/examples/file-pipes.php @@ -7,12 +7,12 @@ * The writeFile() pipe allows you to write stream elements directly to files. */ -use function Phunkie\Streams\IO\File\deleteFile; +use function Phunkie\Streams\Functions\file\deleteFile; use Phunkie\Streams\IO\File\Path; -use function Phunkie\Streams\IO\File\readLines; -use function Phunkie\Streams\IO\File\writeFile; +use function Phunkie\Streams\Functions\file\readLines; +use function Phunkie\Streams\Functions\file\writeFile; use Phunkie\Streams\Type\Stream; diff --git a/examples/file.php b/examples/file.php index 8121cf4..756d5aa 100644 --- a/examples/file.php +++ b/examples/file.php @@ -1,6 +1,6 @@ Date: Sun, 7 Dec 2025 17:19:22 +0000 Subject: [PATCH 07/18] Add lint, test-all, check scripts and pre-commit hook --- composer.json | 11 ++++++++++- scripts/pre-commit | 30 ++++++++++++++++++++++++++++++ scripts/setup.sh | 32 ++++++++++++++++++++++++++++++++ scripts/test-all-versions.sh | 36 ++++++++++++++++++++++++++++++++++++ 4 files changed, 108 insertions(+), 1 deletion(-) create mode 100755 scripts/pre-commit create mode 100755 scripts/setup.sh create mode 100755 scripts/test-all-versions.sh diff --git a/composer.json b/composer.json index 4c26554..777214e 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,16 @@ "test": "pest", "phpstan": "phpstan analyse", "cs-fix": "php-cs-fixer fix --allow-risky=yes", - "cs-check": "php-cs-fixer fix --dry-run --diff --allow-risky=yes" + "cs-check": "php-cs-fixer fix --dry-run --diff --allow-risky=yes", + "lint": [ + "@cs-check", + "@phpstan" + ], + "test-all": "scripts/test-all-versions.sh", + "check": [ + "@lint", + "@test" + ] }, "config": { "bin-dir": "bin", diff --git a/scripts/pre-commit b/scripts/pre-commit new file mode 100755 index 0000000..3f8a882 --- /dev/null +++ b/scripts/pre-commit @@ -0,0 +1,30 @@ +#!/bin/bash + +# Pre-commit hook for Phunkie projects +# Runs lint and tests before allowing commit + +set -e + +echo "🔍 Running pre-commit checks..." + +# Run lint (cs-check + phpstan) +echo "" +echo "📋 Running lint checks..." +if ! composer lint; then + echo "" + echo "❌ Lint checks failed. Please fix the issues before committing." + echo " Run 'composer cs-fix' to auto-fix code style issues." + exit 1 +fi + +# Run tests +echo "" +echo "🧪 Running tests..." +if ! composer test; then + echo "" + echo "❌ Tests failed. Please fix the issues before committing." + exit 1 +fi + +echo "" +echo "✅ All pre-commit checks passed!" diff --git a/scripts/setup.sh b/scripts/setup.sh new file mode 100755 index 0000000..298d99c --- /dev/null +++ b/scripts/setup.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# Setup script for development environment +# Installs git hooks and dependencies + +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +PROJECT_ROOT="$(dirname "$SCRIPT_DIR")" + +echo "🔧 Setting up development environment..." + +# Install composer dependencies +echo "" +echo "📦 Installing dependencies..." +composer install + +# Install pre-commit hook +echo "" +echo "🪝 Installing git hooks..." +cp "$SCRIPT_DIR/pre-commit" "$PROJECT_ROOT/.git/hooks/pre-commit" +chmod +x "$PROJECT_ROOT/.git/hooks/pre-commit" + +echo "" +echo "✅ Development environment setup complete!" +echo "" +echo "Available commands:" +echo " composer test - Run tests" +echo " composer lint - Run code style and static analysis" +echo " composer cs-fix - Auto-fix code style issues" +echo " composer check - Run lint + tests" +echo " composer test-all - Run tests on all PHP versions (requires Docker)" diff --git a/scripts/test-all-versions.sh b/scripts/test-all-versions.sh new file mode 100755 index 0000000..eca53c9 --- /dev/null +++ b/scripts/test-all-versions.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# Test against all supported PHP versions using Docker +# Requires Docker to be installed and running + +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +PROJECT_ROOT="$(dirname "$SCRIPT_DIR")" + +PHP_VERSIONS=("8.2" "8.3" "8.4") + +echo "==========================================" +echo "Testing against PHP versions: ${PHP_VERSIONS[*]}" +echo "==========================================" + +for version in "${PHP_VERSIONS[@]}"; do + echo "" + echo "==========================================" + echo "Testing PHP $version" + echo "==========================================" + + docker run --rm -v "$PROJECT_ROOT:/app" -w /app \ + "php:${version}-cli" \ + sh -c "apt-get update && apt-get install -y git unzip && \ + curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \ + composer install --no-interaction --prefer-dist && \ + composer test" + + echo "✅ PHP $version tests passed" +done + +echo "" +echo "==========================================" +echo "✅ All PHP versions passed!" +echo "==========================================" From 89412b28c06f7bbee80ca677e3fe07b1a882c162 Mon Sep 17 00:00:00 2001 From: Marcello Duarte Date: Sun, 7 Dec 2025 17:28:24 +0000 Subject: [PATCH 08/18] Update test-all to include lint + static analysis --- scripts/test-all-versions.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/test-all-versions.sh b/scripts/test-all-versions.sh index eca53c9..e7faf68 100755 --- a/scripts/test-all-versions.sh +++ b/scripts/test-all-versions.sh @@ -11,26 +11,30 @@ PROJECT_ROOT="$(dirname "$SCRIPT_DIR")" PHP_VERSIONS=("8.2" "8.3" "8.4") echo "==========================================" -echo "Testing against PHP versions: ${PHP_VERSIONS[*]}" +echo "Running lint + tests on PHP versions: ${PHP_VERSIONS[*]}" echo "==========================================" for version in "${PHP_VERSIONS[@]}"; do echo "" echo "==========================================" - echo "Testing PHP $version" + echo "PHP $version - Installing dependencies..." echo "==========================================" docker run --rm -v "$PROJECT_ROOT:/app" -w /app \ "php:${version}-cli" \ - sh -c "apt-get update && apt-get install -y git unzip && \ - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \ - composer install --no-interaction --prefer-dist && \ + sh -c "apt-get update -qq && apt-get install -y -qq git unzip > /dev/null && \ + curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer > /dev/null && \ + composer install --no-interaction --prefer-dist --quiet && \ + echo '--- Running lint (cs-check + phpstan) ---' && \ + composer lint && \ + echo '--- Running tests ---' && \ composer test" - echo "✅ PHP $version tests passed" + echo "✅ PHP $version passed (lint + tests)" done echo "" echo "==========================================" echo "✅ All PHP versions passed!" echo "==========================================" + From 766b4d71f2753ebe54eadafa563964a59fce8918 Mon Sep 17 00:00:00 2001 From: Marcello Duarte Date: Sun, 7 Dec 2025 17:31:31 +0000 Subject: [PATCH 09/18] Increase PHPStan memory limit to 512M --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 777214e..ad1b80e 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,7 @@ }, "scripts": { "test": "pest", - "phpstan": "phpstan analyse", + "phpstan": "phpstan analyse --memory-limit=512M", "cs-fix": "php-cs-fixer fix --allow-risky=yes", "cs-check": "php-cs-fixer fix --dry-run --diff --allow-risky=yes", "lint": [ From 36111b779008a0161a584f385fe3ee8394761c6e Mon Sep 17 00:00:00 2001 From: Marcello Duarte Date: Sun, 7 Dec 2025 17:42:17 +0000 Subject: [PATCH 10/18] Upgrade php-cs-fixer to ^3.90 for PHP 8.4 support --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ad1b80e..a4ac841 100644 --- a/composer.json +++ b/composer.json @@ -35,7 +35,7 @@ "require-dev": { "pestphp/pest": "^2.35", "phpstan/phpstan": "^1.10", - "friendsofphp/php-cs-fixer": "^3.0" + "friendsofphp/php-cs-fixer": "^3.90" }, "scripts": { "test": "pest", From 4af8d6437a831bea69eb7258f768b83ecc2f12fe Mon Sep 17 00:00:00 2001 From: Marcello Duarte Date: Mon, 8 Dec 2025 11:16:09 +0000 Subject: [PATCH 11/18] Add phunkie/phpstan extension, upgrade phpstan to ^2.0 --- composer.json | 21 +++- composer.lock | 321 +++++++++++++++++++++++++++++++++++++++----------- phpstan.neon | 1 + 3 files changed, 268 insertions(+), 75 deletions(-) diff --git a/composer.json b/composer.json index a4ac841..6c2255c 100644 --- a/composer.json +++ b/composer.json @@ -3,10 +3,20 @@ "description": "Functional Streams for PHP", "type": "library", "license": "MIT", + "repositories": [ + { + "type": "path", + "url": "../phunkie" + }, + { + "type": "path", + "url": "../effect" + } + ], "require": { "php": "^8.2 || ^8.3 || ^8.4", - "phunkie/phunkie": "^1.0.0", - "phunkie/effect": "^1.0.0" + "phunkie/phunkie": "dev-developing-1.0.0 as 1.0.0", + "phunkie/effect": "dev-developing-1.0.0 as 1.0.0" }, "autoload": { "psr-4": { @@ -34,8 +44,9 @@ }, "require-dev": { "pestphp/pest": "^2.35", - "phpstan/phpstan": "^1.10", - "friendsofphp/php-cs-fixer": "^3.90" + "phpstan/phpstan": "^2.0", + "friendsofphp/php-cs-fixer": "^3.90", + "phunkie/phpstan": "@dev" }, "scripts": { "test": "pest", @@ -58,4 +69,4 @@ "pestphp/pest-plugin": true } } -} \ No newline at end of file +} diff --git a/composer.lock b/composer.lock index 2cdb819..4ec57c1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,25 +4,25 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5b3d528d97ffc97484049d1d94246db4", + "content-hash": "93efa6ee2737e443756780b9d5c0e25b", "packages": [ { "name": "phunkie/effect", - "version": "1.0.0", + "version": "dev-developing-1.0.0", "dist": { "type": "path", "url": "../effect", - "reference": "dd033e03edb4b02bbe2d36b6c503556d06308fc7" + "reference": "ea55dd81d9af4a202774e628168c698e10841d91" }, "require": { "php": "^8.2 || ^8.3 || ^8.4", - "phunkie/phunkie": "^1.0.0" + "phunkie/phunkie": "dev-developing-1.0.0 as 1.0.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.75", + "friendsofphp/php-cs-fixer": "^3.90", "phpstan/phpstan": "^2.1", "phpunit/phpunit": "^10.5", - "phunkie/console": "^1.0.0" + "phunkie/phpstan": "@dev" }, "suggest": { "ext-parallel": "Required for parallel execution using threads. PHP must be compiled with ZTS support." @@ -46,13 +46,24 @@ "phpunit" ], "phpstan": [ - "phpstan analyse" + "phpstan analyse --memory-limit=512M" ], "cs-fix": [ - "php-cs-fixer fix" + "php-cs-fixer fix --allow-risky=yes" ], "cs-check": [ - "php-cs-fixer fix --dry-run --diff" + "php-cs-fixer fix --dry-run --diff --allow-risky=yes" + ], + "lint": [ + "@cs-check", + "@phpstan" + ], + "test-all": [ + "scripts/test-all-versions.sh" + ], + "check": [ + "@lint", + "@test" ] }, "license": [ @@ -71,21 +82,22 @@ }, { "name": "phunkie/phunkie", - "version": "1.0.0", + "version": "dev-developing-1.0.0", "dist": { "type": "path", "url": "../phunkie", - "reference": "898fed43f1ef0eee9a82b0c0440a58a83e9f82d9" + "reference": "c15ee399a943f038bfa45c18a4d9a9ddc09c1f5b" }, "require": { "php": "^8.2 || ^8.3 || ^8.4" }, "require-dev": { "ergebnis/composer-normalize": "^2", - "friendsofphp/php-cs-fixer": "^3", + "friendsofphp/php-cs-fixer": "^3.90", "giorgiosironi/eris": "^0", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^9" + "phpstan/phpstan": "^2.0", + "phpunit/phpunit": "^9", + "phunkie/phpstan": "@dev" }, "type": "library", "autoload": { @@ -107,16 +119,30 @@ }, "scripts": { "cs-fix": [ - "bin/php-cs-fixer fix --config=.php-cs-fixer.php --diff --verbose" + "bin/php-cs-fixer fix --config=.php-cs-fixer.php --diff --verbose --allow-risky=yes" + ], + "cs-check": [ + "bin/php-cs-fixer fix --config=.php-cs-fixer.php --dry-run --diff --verbose --allow-risky=yes" ], "phpstan": [ - "bin/phpstan analyse src" + "phpstan analyse --memory-limit=512M src" + ], + "lint": [ + "@cs-check", + "@phpstan" ], "test": [ "bin/phpunit -c phpunit.xml.dist --do-not-cache-result" ], "test-debug": [ "bin/phpunit -c phpunit.xml.dist --debug" + ], + "test-all": [ + "scripts/test-all-versions.sh" + ], + "check": [ + "@lint", + "@test" ] }, "license": [ @@ -743,58 +769,57 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.75.0", + "version": "v3.91.3", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "399a128ff2fdaf4281e4e79b755693286cdf325c" + "reference": "9f10aa6390cea91da175ea608880e942d7c0226e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/399a128ff2fdaf4281e4e79b755693286cdf325c", - "reference": "399a128ff2fdaf4281e4e79b755693286cdf325c", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/9f10aa6390cea91da175ea608880e942d7c0226e", + "reference": "9f10aa6390cea91da175ea608880e942d7c0226e", "shasum": "" }, "require": { - "clue/ndjson-react": "^1.0", + "clue/ndjson-react": "^1.3", "composer/semver": "^3.4", - "composer/xdebug-handler": "^3.0.3", + "composer/xdebug-handler": "^3.0.5", "ext-filter": "*", "ext-hash": "*", "ext-json": "*", "ext-tokenizer": "*", - "fidry/cpu-core-counter": "^1.2", + "fidry/cpu-core-counter": "^1.3", "php": "^7.4 || ^8.0", - "react/child-process": "^0.6.5", - "react/event-loop": "^1.0", - "react/promise": "^2.0 || ^3.0", - "react/socket": "^1.0", - "react/stream": "^1.0", - "sebastian/diff": "^4.0 || ^5.1 || ^6.0 || ^7.0", - "symfony/console": "^5.4 || ^6.4 || ^7.0", - "symfony/event-dispatcher": "^5.4 || ^6.4 || ^7.0", - "symfony/filesystem": "^5.4 || ^6.4 || ^7.0", - "symfony/finder": "^5.4 || ^6.4 || ^7.0", - "symfony/options-resolver": "^5.4 || ^6.4 || ^7.0", - "symfony/polyfill-mbstring": "^1.31", - "symfony/polyfill-php80": "^1.31", - "symfony/polyfill-php81": "^1.31", - "symfony/process": "^5.4 || ^6.4 || ^7.2", - "symfony/stopwatch": "^5.4 || ^6.4 || ^7.0" + "react/child-process": "^0.6.6", + "react/event-loop": "^1.5", + "react/socket": "^1.16", + "react/stream": "^1.4", + "sebastian/diff": "^4.0.6 || ^5.1.1 || ^6.0.2 || ^7.0", + "symfony/console": "^5.4.47 || ^6.4.24 || ^7.0 || ^8.0", + "symfony/event-dispatcher": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", + "symfony/filesystem": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", + "symfony/finder": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", + "symfony/options-resolver": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", + "symfony/polyfill-mbstring": "^1.33", + "symfony/polyfill-php80": "^1.33", + "symfony/polyfill-php81": "^1.33", + "symfony/polyfill-php84": "^1.33", + "symfony/process": "^5.4.47 || ^6.4.24 || ^7.2 || ^8.0", + "symfony/stopwatch": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0" }, "require-dev": { - "facile-it/paraunit": "^1.3.1 || ^2.6", - "infection/infection": "^0.29.14", - "justinrainbow/json-schema": "^5.3 || ^6.2", - "keradus/cli-executor": "^2.1", + "facile-it/paraunit": "^1.3.1 || ^2.7", + "infection/infection": "^0.31.0", + "justinrainbow/json-schema": "^6.5", + "keradus/cli-executor": "^2.2", "mikey179/vfsstream": "^1.6.12", - "php-coveralls/php-coveralls": "^2.7", - "php-cs-fixer/accessible-object": "^1.1", + "php-coveralls/php-coveralls": "^2.9", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.6", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.6", - "phpunit/phpunit": "^9.6.22 || ^10.5.45 || ^11.5.12", - "symfony/var-dumper": "^5.4.48 || ^6.4.18 || ^7.2.3", - "symfony/yaml": "^5.4.45 || ^6.4.18 || ^7.2.3" + "phpunit/phpunit": "^9.6.25 || ^10.5.53 || ^11.5.34", + "symfony/var-dumper": "^5.4.48 || ^6.4.24 || ^7.3.2 || ^8.0", + "symfony/yaml": "^5.4.45 || ^6.4.24 || ^7.3.2 || ^8.0" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -809,7 +834,7 @@ "PhpCsFixer\\": "src/" }, "exclude-from-classmap": [ - "src/Fixer/Internal/*" + "src/**/Internal/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -835,7 +860,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.75.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.91.3" }, "funding": [ { @@ -843,7 +868,7 @@ "type": "github" } ], - "time": "2025-03-31T18:40:42+00:00" + "time": "2025-12-05T19:45:37+00:00" }, { "name": "jean85/pretty-package-versions", @@ -1799,15 +1824,15 @@ }, { "name": "phpstan/phpstan", - "version": "1.12.32", + "version": "2.1.33", "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/2770dcdf5078d0b0d53f94317e06affe88419aa8", - "reference": "2770dcdf5078d0b0d53f94317e06affe88419aa8", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9e800e6bee7d5bd02784d4c6069b48032d16224f", + "reference": "9e800e6bee7d5bd02784d4c6069b48032d16224f", "shasum": "" }, "require": { - "php": "^7.2|^8.0" + "php": "^7.4|^8.0" }, "conflict": { "phpstan/phpstan-shim": "*" @@ -1848,7 +1873,7 @@ "type": "github" } ], - "time": "2025-09-30T10:16:31+00:00" + "time": "2025-12-05T10:24:31+00:00" }, { "name": "phpunit/php-code-coverage", @@ -2272,6 +2297,60 @@ ], "time": "2024-10-08T15:36:51+00:00" }, + { + "name": "phunkie/phpstan", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/phunkie/phpstan.git", + "reference": "9e2e9386bef5fa35adcc306106172160c5e78fb3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phunkie/phpstan/zipball/9e2e9386bef5fa35adcc306106172160c5e78fb3", + "reference": "9e2e9386bef5fa35adcc306106172160c5e78fb3", + "shasum": "" + }, + "require": { + "php": "^8.2 || ^8.3 || ^8.4", + "phpstan/phpstan": "^2.0" + }, + "require-dev": { + "phpunit/phpunit": "^11", + "phunkie/effect": "dev-developing-1.0.0 as 1.0.0", + "phunkie/phunkie": "dev-developing-1.0.0 as 1.0.0" + }, + "default-branch": true, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "Phunkie\\PHPStan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "PHPStan extensions for Phunkie functional programming library", + "support": { + "issues": "https://github.com/phunkie/phpstan/issues", + "source": "https://github.com/phunkie/phpstan/tree/1.0.0" + }, + "time": "2025-12-08T11:09:04+00:00" + }, { "name": "psr/container", "version": "2.0.2", @@ -3906,16 +3985,16 @@ }, { "name": "symfony/console", - "version": "v7.4.0", + "version": "v7.4.1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "0bc0f45254b99c58d45a8fbf9fb955d46cbd1bb8" + "reference": "6d9f0fbf2ec2e9785880096e3abd0ca0c88b506e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0bc0f45254b99c58d45a8fbf9fb955d46cbd1bb8", - "reference": "0bc0f45254b99c58d45a8fbf9fb955d46cbd1bb8", + "url": "https://api.github.com/repos/symfony/console/zipball/6d9f0fbf2ec2e9785880096e3abd0ca0c88b506e", + "reference": "6d9f0fbf2ec2e9785880096e3abd0ca0c88b506e", "shasum": "" }, "require": { @@ -3980,7 +4059,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.4.0" + "source": "https://github.com/symfony/console/tree/v7.4.1" }, "funding": [ { @@ -4000,7 +4079,7 @@ "type": "tidelift" } ], - "time": "2025-11-27T13:27:24+00:00" + "time": "2025-12-05T15:23:39+00:00" }, { "name": "symfony/deprecation-contracts", @@ -4691,19 +4770,20 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.31.0", + "version": "v1.33.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": { @@ -4751,7 +4831,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0" }, "funding": [ { @@ -4762,12 +4842,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2024-12-23T08:48:59+00:00" }, { "name": "symfony/polyfill-php80", @@ -4933,6 +5017,86 @@ ], "time": "2024-09-09T11:45:10+00:00" }, + { + "name": "symfony/polyfill-php84", + "version": "v1.33.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php84.git", + "reference": "d8ced4d875142b6a7426000426b8abc631d6b191" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php84/zipball/d8ced4d875142b6a7426000426b8abc631d6b191", + "reference": "d8ced4d875142b6a7426000426b8abc631d6b191", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php84\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.4+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php84/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-06-24T13:30:11+00:00" + }, { "name": "symfony/process", "version": "v7.4.0", @@ -5410,9 +5574,26 @@ "time": "2025-10-29T15:56:20+00:00" } ], - "aliases": [], + "aliases": [ + { + "package": "phunkie/effect", + "version": "dev-developing-1.0.0", + "alias": "1.0.0", + "alias_normalized": "1.0.0.0" + }, + { + "package": "phunkie/phunkie", + "version": "dev-developing-1.0.0", + "alias": "1.0.0", + "alias_normalized": "1.0.0.0" + } + ], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": { + "phunkie/effect": 20, + "phunkie/phpstan": 20, + "phunkie/phunkie": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/phpstan.neon b/phpstan.neon index 7656fb6..b5a0cc0 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,5 +1,6 @@ includes: - phpstan-baseline.neon + - vendor/phunkie/phpstan/extension.neon parameters: level: 3 From 6f2edc44143810958e7f4c95e28c3de231057c1d Mon Sep 17 00:00:00 2001 From: Marcello Duarte Date: Mon, 8 Dec 2025 16:41:06 +0000 Subject: [PATCH 12/18] Fix CI --- examples/bracket.php | 7 +- examples/composition.php | 5 +- examples/error-handling.php | 5 +- examples/file-pipes.php | 4 +- phpstan-baseline.neon | 95 +++++-------------- src/Ops/Pull/EffectfulOps.php | 4 +- src/Ops/Pull/InfinitePull/FunctorOps.php | 4 +- src/Ops/Pull/InfinitePull/IteratorOps.php | 4 +- src/Ops/Pull/ResourcePull/FunctorOps.php | 4 +- .../Pull/ResourcePullConcat/CompileOps.php | 3 +- .../Pull/ResourcePullConcat/FunctorOps.php | 4 +- src/Ops/Pull/ResourcePullConcat/ShowOps.php | 6 +- src/Ops/Pull/TransformationOps.php | 3 +- src/Ops/Pull/ValuesPull/FunctorOps.php | 4 +- src/Ops/Pull/ValuesPull/MonadOps.php | 4 +- src/Ops/Stream/CompileOps.php | 3 +- src/Ops/Stream/ImmListOps.php | 3 +- src/Ops/Stream/ShowOps.php | 4 +- src/Type/Pull.php | 19 ++++ tests/Feature/Streams/BracketSpec.php | 7 +- tests/Feature/Streams/CompositionSpec.php | 5 +- tests/Feature/Streams/ErrorHandlingSpec.php | 5 +- 22 files changed, 96 insertions(+), 106 deletions(-) diff --git a/examples/bracket.php b/examples/bracket.php index 9fc39c0..cf60a19 100644 --- a/examples/bracket.php +++ b/examples/bracket.php @@ -8,16 +8,15 @@ */ use function Phunkie\Effect\Functions\io\io; -use function Phunkie\Streams\Functions\resource\bracket; use function Phunkie\Streams\Functions\file\deleteFile; use function Phunkie\Streams\Functions\file\exists; - -use Phunkie\Streams\IO\File\Path; - use function Phunkie\Streams\Functions\file\readFileContents; use function Phunkie\Streams\Functions\file\readLines; use function Phunkie\Streams\Functions\file\writeFileContents; use function Phunkie\Streams\Functions\file\writeLines; +use function Phunkie\Streams\Functions\resource\bracket; + +use Phunkie\Streams\IO\File\Path; require_once dirname(__FILE__, 2) . '/vendor/autoload.php'; require_once dirname(__FILE__) . '/printLn.php'; diff --git a/examples/composition.php b/examples/composition.php index 5e9fccc..de40534 100644 --- a/examples/composition.php +++ b/examples/composition.php @@ -14,14 +14,13 @@ use function Phunkie\Streams\Functions\file\deleteFile; use function Phunkie\Streams\Functions\file\exists; - -use Phunkie\Streams\IO\File\Path; - use function Phunkie\Streams\Functions\file\readFileContents; use function Phunkie\Streams\Functions\file\readLines; use function Phunkie\Streams\Functions\file\writeFileContents; use function Phunkie\Streams\Functions\file\writeLines; +use Phunkie\Streams\IO\File\Path; + require_once dirname(__FILE__, 2) . '/vendor/autoload.php'; require_once dirname(__FILE__) . '/printLn.php'; diff --git a/examples/error-handling.php b/examples/error-handling.php index 5bc640e..2750757 100644 --- a/examples/error-handling.php +++ b/examples/error-handling.php @@ -10,13 +10,12 @@ use function Phunkie\Effect\Functions\io\io; use function Phunkie\Streams\Functions\file\exists; - -use Phunkie\Streams\IO\File\Path; - use function Phunkie\Streams\Functions\file\readFileContents; use function Phunkie\Streams\Functions\file\readLines; use function Phunkie\Streams\Functions\file\writeFileContents; +use Phunkie\Streams\IO\File\Path; + require_once dirname(__FILE__, 2) . '/vendor/autoload.php'; require_once dirname(__FILE__) . '/printLn.php'; diff --git a/examples/file-pipes.php b/examples/file-pipes.php index 46001ea..9665ed4 100644 --- a/examples/file-pipes.php +++ b/examples/file-pipes.php @@ -8,12 +8,10 @@ */ use function Phunkie\Streams\Functions\file\deleteFile; - -use Phunkie\Streams\IO\File\Path; - use function Phunkie\Streams\Functions\file\readLines; use function Phunkie\Streams\Functions\file\writeFile; +use Phunkie\Streams\IO\File\Path; use Phunkie\Streams\Type\Stream; require_once dirname(__FILE__, 2) . '/vendor/autoload.php'; diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index c3d2464..170c2fa 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,116 +1,73 @@ parameters: ignoreErrors: - - message: "#^Property Phunkie\\\\Streams\\\\Infinite\\\\Timer\\:\\:\\$limit \\(int\\|null\\) does not accept float\\|null\\.$#" + message: '#^PHPDoc tag @return contains generic type Phunkie\\Streams\\Type\\Stream\ but class Phunkie\\Streams\\Type\\Stream is not generic\.$#' + identifier: generics.notGeneric count: 1 - path: src/Infinite/Timer.php - - - - message: "#^PHPDoc tag @method has invalid value \\(getScope\\)\\: Unexpected token \"\\\\n \", expected '\\(' at offset 23$#" - count: 1 - path: src/Ops/Pull/InfinitePull/FunctorOps.php - - - - message: "#^PHPDoc tag @method has invalid value \\(getInfinite\\)\\: Unexpected token \"\\\\n \", expected '\\(' at offset 26$#" - count: 1 - path: src/Ops/Pull/InfinitePull/IteratorOps.php - - - - message: "#^PHPDoc tag @method has invalid value \\(getScope\\)\\: Unexpected token \"\\\\n \", expected '\\(' at offset 23$#" - count: 1 - path: src/Ops/Pull/ResourcePull/FunctorOps.php + path: src/Functions/file.php - - message: "#^PHPDoc tag @method has invalid value \\(getScope\\)\\: Unexpected token \"\\\\n \", expected '\\(' at offset 23$#" + message: '#^Property Phunkie\\Streams\\Infinite\\Timer\:\:\$limit \(int\|null\) does not accept float\|null\.$#' + identifier: assign.propertyType count: 1 - path: src/Ops/Pull/ResourcePullConcat/FunctorOps.php - - - - message: "#^PHPDoc tag @method has invalid value \\(getPull1\\)\\: Unexpected token \"\\\\n \\* \", expected '\\(' at offset 23$#" - count: 1 - path: src/Ops/Pull/ResourcePullConcat/ShowOps.php - - - - message: "#^PHPDoc tag @method has invalid value \\(getPull2\\)\\: Unexpected token \"\\\\n \", expected '\\(' at offset 43$#" - count: 1 - path: src/Ops/Pull/ResourcePullConcat/ShowOps.php - - - - message: "#^PHPDoc tag @method has invalid value \\(\\(\\)\\: Phunkie\\\\Streams\\\\Type\\\\Scope\\)\\: Unexpected token \"\\\\n \", expected type at offset 53$#" - count: 1 - path: src/Ops/Pull/TransformationOps.php - - - - message: "#^PHPDoc tag @method has invalid value \\(getScope\\)\\: Unexpected token \"\\\\n \", expected '\\(' at offset 23$#" - count: 1 - path: src/Ops/Pull/ValuesPull/FunctorOps.php - - - - message: "#^PHPDoc tag @method has invalid value \\(getScope\\)\\: Unexpected token \"\\\\n \", expected '\\(' at offset 23$#" - count: 1 - path: src/Ops/Pull/ValuesPull/MonadOps.php - - - - message: "#^PHPDoc tag @method has invalid value \\(\\(\\)\\: Phunkie\\\\Streams\\\\Type\\\\Pull\\)\\: Unexpected token \"\\\\n \", expected type at offset 51$#" - count: 1 - path: src/Ops/Stream/CompileOps.php - - - - message: "#^PHPDoc tag @method has invalid value \\(\\(\\)\\: Pull\\)\\: Unexpected token \"\\\\n \", expected type at offset 30$#" - count: 1 - path: src/Ops/Stream/ImmListOps.php - - - - message: "#^PHPDoc tag @method has invalid value \\(\\(\\)\\: Phunkie\\\\Streams\\\\Pull\\)\\: Unexpected token \"\\\\n \", expected type at offset 46$#" - count: 1 - path: src/Ops/Stream/ShowOps.php + path: src/Infinite/Timer.php - - message: "#^Class Phunkie\\\\Streams\\\\Type\\\\Scope does not have a constructor and must be instantiated without any parameters\\.$#" + message: '#^Class Phunkie\\Streams\\Type\\Scope does not have a constructor and must be instantiated without any parameters\.$#' + identifier: new.noConstructor count: 1 path: src/Pull/InfinitePull.php - - message: "#^Method Phunkie\\\\Streams\\\\Pull\\\\InfinitePull\\:\\:toArray\\(\\) should return array but returns Generator\\.$#" + message: '#^Method Phunkie\\Streams\\Pull\\InfinitePull\:\:toArray\(\) should return array but returns Generator\.$#' + identifier: return.type count: 1 path: src/Pull/InfinitePull.php - - message: "#^Call to an undefined method Phunkie\\\\Streams\\\\IO\\\\Resource\\:\\:pull\\(\\)\\.$#" + message: '#^Call to an undefined method Phunkie\\Streams\\IO\\Resource\:\:pull\(\)\.$#' + identifier: method.notFound count: 1 path: src/Pull/ResourceObjectPull.php - - message: "#^Call to an undefined method Phunkie\\\\Streams\\\\Type\\\\Pull\\:\\:drain\\(\\)\\.$#" + message: '#^Call to an undefined method Phunkie\\Streams\\Type\\Pull\:\:drain\(\)\.$#' + identifier: method.notFound count: 1 path: src/Stream/Compiler.php - - message: "#^Call to an undefined method Phunkie\\\\Streams\\\\Type\\\\Pull\\:\\:runLog\\(\\)\\.$#" + message: '#^Call to an undefined method Phunkie\\Streams\\Type\\Pull\:\:runLog\(\)\.$#' + identifier: method.notFound count: 1 path: src/Stream/Compiler.php - - message: "#^Access to an undefined property Phunkie\\\\Streams\\\\Stream\\\\Compiler\\:\\:\\$drain\\.$#" + message: '#^Access to an undefined property Phunkie\\Streams\\Stream\\Compiler\:\:\$drain\.$#' + identifier: property.notFound count: 1 path: src/Type/Stream.php - - message: "#^Anonymous function has an unused use \\$bytes\\.$#" + message: '#^Anonymous function has an unused use \$bytes\.$#' + identifier: closure.unusedUse count: 1 path: src/Type/Stream.php - - message: "#^Call to an undefined method Phunkie\\\\Types\\\\Kind\\:\\:flatMap\\(\\)\\.$#" + message: '#^Call to an undefined method Phunkie\\Types\\Kind\:\:flatMap\(\)\.$#' + identifier: method.notFound count: 1 path: src/Type/Stream.php - - message: "#^PHPDoc tag @param references unknown parameter\\: \\$context$#" + message: '#^PHPDoc tag @param references unknown parameter\: \$context$#' + identifier: parameter.notFound count: 1 path: src/Type/Stream.php - - message: "#^PHPDoc tag @return contains generic type Phunkie\\\\Streams\\\\Type\\\\Stream\\ but class Phunkie\\\\Streams\\\\Type\\\\Stream is not generic\\.$#" + message: '#^PHPDoc tag @return contains generic type Phunkie\\Streams\\Type\\Stream\ but class Phunkie\\Streams\\Type\\Stream is not generic\.$#' + identifier: generics.notGeneric count: 1 path: src/Type/Stream.php diff --git a/src/Ops/Pull/EffectfulOps.php b/src/Ops/Pull/EffectfulOps.php index e2a3267..e2ef550 100644 --- a/src/Ops/Pull/EffectfulOps.php +++ b/src/Ops/Pull/EffectfulOps.php @@ -18,10 +18,12 @@ use function Phunkie\Streams\Functions\transformation\evalMap; use function Phunkie\Streams\Functions\transformation\evalTap; +use Phunkie\Streams\Type\Scope; + /** * This trait allows you to add operations with side effects to the scope of the stream. * - * @method getScope() + * @method Scope getScope() */ trait EffectfulOps { diff --git a/src/Ops/Pull/InfinitePull/FunctorOps.php b/src/Ops/Pull/InfinitePull/FunctorOps.php index 44c04f3..616d2e2 100644 --- a/src/Ops/Pull/InfinitePull/FunctorOps.php +++ b/src/Ops/Pull/InfinitePull/FunctorOps.php @@ -13,8 +13,10 @@ use function Phunkie\Streams\Functions\transformation\map; +use Phunkie\Streams\Type\Scope; + /** - * @method getScope + * @method Scope getScope() */ trait FunctorOps { diff --git a/src/Ops/Pull/InfinitePull/IteratorOps.php b/src/Ops/Pull/InfinitePull/IteratorOps.php index 0a0a0f6..57109c2 100644 --- a/src/Ops/Pull/InfinitePull/IteratorOps.php +++ b/src/Ops/Pull/InfinitePull/IteratorOps.php @@ -11,8 +11,10 @@ namespace Phunkie\Streams\Ops\Pull\InfinitePull; +use Phunkie\Streams\Infinite\Infinite; + /** - * @method getInfinite + * @method Infinite getInfinite() */ trait IteratorOps { diff --git a/src/Ops/Pull/ResourcePull/FunctorOps.php b/src/Ops/Pull/ResourcePull/FunctorOps.php index 083b36d..6469674 100644 --- a/src/Ops/Pull/ResourcePull/FunctorOps.php +++ b/src/Ops/Pull/ResourcePull/FunctorOps.php @@ -11,8 +11,10 @@ namespace Phunkie\Streams\Ops\Pull\ResourcePull; +use Phunkie\Streams\Type\Scope; + /** - * @method getScope + * @method Scope getScope() */ trait FunctorOps { diff --git a/src/Ops/Pull/ResourcePullConcat/CompileOps.php b/src/Ops/Pull/ResourcePullConcat/CompileOps.php index 8022548..5d7c1a2 100644 --- a/src/Ops/Pull/ResourcePullConcat/CompileOps.php +++ b/src/Ops/Pull/ResourcePullConcat/CompileOps.php @@ -13,10 +13,11 @@ use Phunkie\Effect\IO\IO; use Phunkie\Streams\IO\Resource; +use Phunkie\Streams\Type\Pull; use Phunkie\Types\ImmList; /** - * @method pull() + * @method Pull pull() */ trait CompileOps { diff --git a/src/Ops/Pull/ResourcePullConcat/FunctorOps.php b/src/Ops/Pull/ResourcePullConcat/FunctorOps.php index eaa8103..e608cc6 100644 --- a/src/Ops/Pull/ResourcePullConcat/FunctorOps.php +++ b/src/Ops/Pull/ResourcePullConcat/FunctorOps.php @@ -11,8 +11,10 @@ namespace Phunkie\Streams\Ops\Pull\ResourcePullConcat; +use Phunkie\Streams\Type\Scope; + /** - * @method getScope + * @method Scope getScope() */ trait FunctorOps { diff --git a/src/Ops/Pull/ResourcePullConcat/ShowOps.php b/src/Ops/Pull/ResourcePullConcat/ShowOps.php index b5a7fa2..e02cc25 100644 --- a/src/Ops/Pull/ResourcePullConcat/ShowOps.php +++ b/src/Ops/Pull/ResourcePullConcat/ShowOps.php @@ -11,9 +11,11 @@ namespace Phunkie\Streams\Ops\Pull\ResourcePullConcat; +use Phunkie\Streams\Type\Pull; + /** - * @method getPull1 - * @method getPull2 + * @method Pull getPull1() + * @method Pull getPull2() */ trait ShowOps { diff --git a/src/Ops/Pull/TransformationOps.php b/src/Ops/Pull/TransformationOps.php index d9176b8..9f5f73a 100644 --- a/src/Ops/Pull/TransformationOps.php +++ b/src/Ops/Pull/TransformationOps.php @@ -12,10 +12,11 @@ namespace Phunkie\Streams\Ops\Pull; use Phunkie\Effect\IO\IO; +use Phunkie\Streams\Type\Scope; use Phunkie\Streams\Type\Transformation; /** - * @method getScope(): Phunkie\Streams\Type\Scope + * @method Scope getScope() */ trait TransformationOps { diff --git a/src/Ops/Pull/ValuesPull/FunctorOps.php b/src/Ops/Pull/ValuesPull/FunctorOps.php index 0e97cd3..55a98cd 100644 --- a/src/Ops/Pull/ValuesPull/FunctorOps.php +++ b/src/Ops/Pull/ValuesPull/FunctorOps.php @@ -13,8 +13,10 @@ use function Phunkie\Streams\Functions\transformation\map; +use Phunkie\Streams\Type\Scope; + /** - * @method getScope + * @method Scope getScope() */ trait FunctorOps { diff --git a/src/Ops/Pull/ValuesPull/MonadOps.php b/src/Ops/Pull/ValuesPull/MonadOps.php index ea12967..c453b5e 100644 --- a/src/Ops/Pull/ValuesPull/MonadOps.php +++ b/src/Ops/Pull/ValuesPull/MonadOps.php @@ -14,8 +14,10 @@ use function Phunkie\Streams\Functions\transformation\flatMap; use function Phunkie\Streams\Functions\transformation\flatten; +use Phunkie\Streams\Type\Scope; + /** - * @method getScope + * @method Scope getScope() */ trait MonadOps { diff --git a/src/Ops/Stream/CompileOps.php b/src/Ops/Stream/CompileOps.php index 6093f42..fe7d25d 100644 --- a/src/Ops/Stream/CompileOps.php +++ b/src/Ops/Stream/CompileOps.php @@ -12,10 +12,11 @@ namespace Phunkie\Streams\Ops\Stream; use Phunkie\Effect\IO\IO; +use Phunkie\Streams\Type\Pull; use Phunkie\Types\ImmList; /** - * @method getPull(): Phunkie\Streams\Type\Pull + * @method Pull getPull() */ trait CompileOps { diff --git a/src/Ops/Stream/ImmListOps.php b/src/Ops/Stream/ImmListOps.php index 8175aa1..df75629 100644 --- a/src/Ops/Stream/ImmListOps.php +++ b/src/Ops/Stream/ImmListOps.php @@ -14,10 +14,11 @@ use Phunkie\Streams\Pull\ResourcePull; use Phunkie\Streams\Pull\ResourcePullConcat; use Phunkie\Streams\Pull\ValuesPull; +use Phunkie\Streams\Type\Pull; use Phunkie\Streams\Type\Stream; /** - * @method getPull(): Pull + * @method Pull getPull() */ trait ImmListOps { diff --git a/src/Ops/Stream/ShowOps.php b/src/Ops/Stream/ShowOps.php index c9b9094..567f288 100644 --- a/src/Ops/Stream/ShowOps.php +++ b/src/Ops/Stream/ShowOps.php @@ -11,8 +11,10 @@ namespace Phunkie\Streams\Ops\Stream; +use Phunkie\Streams\Type\Pull; + /** - * @method getPull(): Phunkie\Streams\Pull + * @method Pull getPull() */ trait ShowOps { diff --git a/src/Type/Pull.php b/src/Type/Pull.php index 3c224d7..963f195 100644 --- a/src/Type/Pull.php +++ b/src/Type/Pull.php @@ -14,6 +14,25 @@ use Phunkie\Streams\Compilable; use Phunkie\Streams\Showable; +/** + * Pull represents a pull-based stream that can be compiled to produce values. + * + * @method static map(callable $f) + * @method static flatMap(callable $f) + * @method static flatten() + * @method static evalMap(callable $f) + * @method static evalTap(callable $f) + * @method static evalFilter(callable $f) + * @method static evalFlatMap(callable $f) + * @method static interleave(Pull ...$pulls) + * @method static take(int $n) + * @method static filter(callable $f) + * @method static takeWhile(callable $predicate) + * @method static dropWhile(callable $predicate) + * @method static chunk(int $size) + * @method array getValues() + * @method void setScope(Scope $scope) + */ interface Pull extends Showable, Compilable, \Iterator { public function pull(); diff --git a/tests/Feature/Streams/BracketSpec.php b/tests/Feature/Streams/BracketSpec.php index e08f5fa..b29f283 100644 --- a/tests/Feature/Streams/BracketSpec.php +++ b/tests/Feature/Streams/BracketSpec.php @@ -1,17 +1,16 @@ Date: Mon, 8 Dec 2025 16:45:43 +0000 Subject: [PATCH 13/18] Fix CI --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e06ad74..c6f0ccf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,9 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Unset local path repositories + run: composer config --unset repositories + - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -45,9 +48,13 @@ jobs: run: composer test lint: - name: Code Style (PHP-CS-Fixer) + name: PHP ${{ matrix.php }} Code Style (PHP-CS-Fixer) runs-on: ubuntu-latest - + strategy: + fail-fast: false + matrix: + php: ['8.2', '8.3', '8.4'] + steps: - name: Checkout code uses: actions/checkout@v4 @@ -55,26 +62,33 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.3 + php-version: ${{ matrix.php }} extensions: mbstring, json coverage: none tools: php-cs-fixer - name: Run PHP-CS-Fixer - run: php-cs-fixer fix --dry-run --diff --verbose + run: php-cs-fixer fix --dry-run --diff --verbose --allow-risky=yes static-analysis: - name: Static Analysis (PHPStan) + name: PHP ${{ matrix.php }} Static Analysis (PHPStan) runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: ['8.2', '8.3', '8.4'] steps: - name: Checkout code uses: actions/checkout@v4 + - name: Unset local path repositories + run: composer config --unset repositories + - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.3 + php-version: ${{ matrix.php }} extensions: mbstring, json, pcntl, posix, zlib, sockets coverage: none @@ -83,9 +97,9 @@ jobs: uses: actions/cache@v4 with: path: vendor - key: ${{ runner.os }}-php-8.3-${{ hashFiles('**/composer.lock') }} + key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }} restore-keys: | - ${{ runner.os }}-php-8.3- + ${{ runner.os }}-php-${{ matrix.php }}- - name: Install dependencies run: composer install --prefer-dist --no-progress From 2670472d153db6330fa31c2e7d53d8a61e6465da Mon Sep 17 00:00:00 2001 From: Marcello Duarte Date: Mon, 8 Dec 2025 16:48:55 +0000 Subject: [PATCH 14/18] Fix composer lock --- composer.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.lock b/composer.lock index 4ec57c1..0e2f835 100644 --- a/composer.lock +++ b/composer.lock @@ -12,7 +12,7 @@ "dist": { "type": "path", "url": "../effect", - "reference": "ea55dd81d9af4a202774e628168c698e10841d91" + "reference": "7a357030252dfe938f8d4f08c9f81a01461745ed" }, "require": { "php": "^8.2 || ^8.3 || ^8.4", @@ -86,7 +86,7 @@ "dist": { "type": "path", "url": "../phunkie", - "reference": "c15ee399a943f038bfa45c18a4d9a9ddc09c1f5b" + "reference": "f3a07eca4d6262858b34f2e362f20876ae454b5c" }, "require": { "php": "^8.2 || ^8.3 || ^8.4" From 4536c0ad2383fda89f661af60f6933c69bd3c2c1 Mon Sep 17 00:00:00 2001 From: Marcello Duarte Date: Mon, 8 Dec 2025 16:56:53 +0000 Subject: [PATCH 15/18] Fix ci.yml --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6f0ccf..1ccb5af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,9 +19,6 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Unset local path repositories - run: composer config --unset repositories - - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -32,6 +29,9 @@ jobs: - name: Validate composer.json and composer.lock run: composer validate --strict + - name: Unset local path repositories + run: composer config --unset repositories + - name: Cache Composer packages id: composer-cache uses: actions/cache@v4 @@ -42,7 +42,7 @@ jobs: ${{ runner.os }}-php-${{ matrix.php }}- - name: Install dependencies - run: composer install --prefer-dist --no-progress + run: composer update --prefer-dist --no-progress - name: Run test suite run: composer test @@ -102,7 +102,7 @@ jobs: ${{ runner.os }}-php-${{ matrix.php }}- - name: Install dependencies - run: composer install --prefer-dist --no-progress + run: composer update --prefer-dist --no-progress - name: Run PHPStan run: composer phpstan From 99684bed5252529c47d53f30903bebef07131611 Mon Sep 17 00:00:00 2001 From: Marcello Duarte Date: Mon, 8 Dec 2025 17:11:01 +0000 Subject: [PATCH 16/18] Add some cool badges --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e7101d5..2dfae28 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # Phunkie Streams # +[![CI](https://github.com/phunkie/streams/actions/workflows/ci.yml/badge.svg)](https://github.com/phunkie/streams/actions) [![Latest Stable Version](https://poser.pugx.org/phunkie/streams/v/stable)](https://packagist.org/packages/phunkie/streams) [![Total Downloads](https://poser.pugx.org/phunkie/streams/downloads)](https://packagist.org/packages/phunkie/streams) [![License](https://poser.pugx.org/phunkie/streams/license)](https://packagist.org/packages/phunkie/streams) From 6948278a95530d0bf7be34eacfbe04be333148a5 Mon Sep 17 00:00:00 2001 From: Marcello Duarte Date: Mon, 8 Dec 2025 19:13:23 +0000 Subject: [PATCH 17/18] Preparing for release --- composer.json | 32 +++---- composer.lock | 259 +++++++++++++++++++------------------------------- 2 files changed, 109 insertions(+), 182 deletions(-) diff --git a/composer.json b/composer.json index 6c2255c..5f2004f 100644 --- a/composer.json +++ b/composer.json @@ -3,20 +3,22 @@ "description": "Functional Streams for PHP", "type": "library", "license": "MIT", - "repositories": [ - { - "type": "path", - "url": "../phunkie" - }, + "authors": [ { - "type": "path", - "url": "../effect" + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" } ], "require": { "php": "^8.2 || ^8.3 || ^8.4", - "phunkie/phunkie": "dev-developing-1.0.0 as 1.0.0", - "phunkie/effect": "dev-developing-1.0.0 as 1.0.0" + "phunkie/phunkie": "^1.0", + "phunkie/effect": "^1.0" + }, + "require-dev": { + "pestphp/pest": "^2.35", + "phpstan/phpstan": "^2.0", + "friendsofphp/php-cs-fixer": "^3.90", + "phunkie/phpstan": "@dev" }, "autoload": { "psr-4": { @@ -27,12 +29,6 @@ "src/Functions/common.php" ] }, - "authors": [ - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], "suggest": { "ext-parallel": "Required for parallel processing capabilities", "ext-mbstring": "Required for encoding and decoding text in various encodings", @@ -42,12 +38,6 @@ "ext-zlib": "Required for stream compression and decompression", "ext-sockets": "Required for socket communication in networking applications" }, - "require-dev": { - "pestphp/pest": "^2.35", - "phpstan/phpstan": "^2.0", - "friendsofphp/php-cs-fixer": "^3.90", - "phunkie/phpstan": "@dev" - }, "scripts": { "test": "pest", "phpstan": "phpstan analyse --memory-limit=512M", diff --git a/composer.lock b/composer.lock index 0e2f835..8acca15 100644 --- a/composer.lock +++ b/composer.lock @@ -4,68 +4,45 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "93efa6ee2737e443756780b9d5c0e25b", + "content-hash": "9e2c8a8335b03c305c0be71f32f5fa61", "packages": [ { "name": "phunkie/effect", - "version": "dev-developing-1.0.0", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/phunkie/effect.git", + "reference": "fd90513682eb3a5a76a4e9f43ec89d1a9785458e" + }, "dist": { - "type": "path", - "url": "../effect", - "reference": "7a357030252dfe938f8d4f08c9f81a01461745ed" + "type": "zip", + "url": "https://api.github.com/repos/phunkie/effect/zipball/fd90513682eb3a5a76a4e9f43ec89d1a9785458e", + "reference": "fd90513682eb3a5a76a4e9f43ec89d1a9785458e", + "shasum": "" }, "require": { "php": "^8.2 || ^8.3 || ^8.4", - "phunkie/phunkie": "dev-developing-1.0.0 as 1.0.0" + "phunkie/phunkie": "^1.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.90", "phpstan/phpstan": "^2.1", "phpunit/phpunit": "^10.5", - "phunkie/phpstan": "@dev" + "phunkie/phpstan": "^1.0" }, "suggest": { "ext-parallel": "Required for parallel execution using threads. PHP must be compiled with ZTS support." }, "type": "library", "autoload": { - "psr-4": { - "Phunkie\\Effect\\": "src/" - }, "files": [ "src/Functions/common.php" - ] - }, - "autoload-dev": { + ], "psr-4": { - "Tests\\Unit\\Phunkie\\Effect\\": "tests/Unit/" + "Phunkie\\Effect\\": "src/" } }, - "scripts": { - "test": [ - "phpunit" - ], - "phpstan": [ - "phpstan analyse --memory-limit=512M" - ], - "cs-fix": [ - "php-cs-fixer fix --allow-risky=yes" - ], - "cs-check": [ - "php-cs-fixer fix --dry-run --diff --allow-risky=yes" - ], - "lint": [ - "@cs-check", - "@phpstan" - ], - "test-all": [ - "scripts/test-all-versions.sh" - ], - "check": [ - "@lint", - "@test" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -76,17 +53,25 @@ } ], "description": "A functional effects library for PHP inspired by Scala's cats-effect", - "transport-options": { - "relative": true - } + "support": { + "issues": "https://github.com/phunkie/effect/issues", + "source": "https://github.com/phunkie/effect/tree/1.0.0" + }, + "time": "2025-12-08T19:02:35+00:00" }, { "name": "phunkie/phunkie", - "version": "dev-developing-1.0.0", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/phunkie/phunkie.git", + "reference": "edfe0c5e3b382d8827bdaef5c0ef027840eceaf5" + }, "dist": { - "type": "path", - "url": "../phunkie", - "reference": "f3a07eca4d6262858b34f2e362f20876ae454b5c" + "type": "zip", + "url": "https://api.github.com/repos/phunkie/phunkie/zipball/edfe0c5e3b382d8827bdaef5c0ef027840eceaf5", + "reference": "edfe0c5e3b382d8827bdaef5c0ef027840eceaf5", + "shasum": "" }, "require": { "php": "^8.2 || ^8.3 || ^8.4" @@ -101,50 +86,16 @@ }, "type": "library", "autoload": { + "files": [ + "src/Phunkie/Functions/common.php" + ], "psr-0": { "": [ "src/" ] - }, - "files": [ - "src/Phunkie/Functions/common.php" - ] - }, - "autoload-dev": { - "psr-4": { - "\\spec\\": [ - "spec/" - ] } }, - "scripts": { - "cs-fix": [ - "bin/php-cs-fixer fix --config=.php-cs-fixer.php --diff --verbose --allow-risky=yes" - ], - "cs-check": [ - "bin/php-cs-fixer fix --config=.php-cs-fixer.php --dry-run --diff --verbose --allow-risky=yes" - ], - "phpstan": [ - "phpstan analyse --memory-limit=512M src" - ], - "lint": [ - "@cs-check", - "@phpstan" - ], - "test": [ - "bin/phpunit -c phpunit.xml.dist --do-not-cache-result" - ], - "test-debug": [ - "bin/phpunit -c phpunit.xml.dist --debug" - ], - "test-all": [ - "scripts/test-all-versions.sh" - ], - "check": [ - "@lint", - "@test" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -155,9 +106,11 @@ } ], "description": "Functional structures library for PHP", - "transport-options": { - "relative": true - } + "support": { + "issues": "https://github.com/phunkie/phunkie/issues", + "source": "https://github.com/phunkie/phunkie/tree/1.0.0" + }, + "time": "2025-12-08T18:48:37+00:00" } ], "packages-dev": [ @@ -2303,12 +2256,12 @@ "source": { "type": "git", "url": "https://github.com/phunkie/phpstan.git", - "reference": "9e2e9386bef5fa35adcc306106172160c5e78fb3" + "reference": "91dd9931edc1fb81d5a5d5eb61179a87e77f8bc6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phunkie/phpstan/zipball/9e2e9386bef5fa35adcc306106172160c5e78fb3", - "reference": "9e2e9386bef5fa35adcc306106172160c5e78fb3", + "url": "https://api.github.com/repos/phunkie/phpstan/zipball/91dd9931edc1fb81d5a5d5eb61179a87e77f8bc6", + "reference": "91dd9931edc1fb81d5a5d5eb61179a87e77f8bc6", "shasum": "" }, "require": { @@ -2349,7 +2302,7 @@ "issues": "https://github.com/phunkie/phpstan/issues", "source": "https://github.com/phunkie/phpstan/tree/1.0.0" }, - "time": "2025-12-08T11:09:04+00:00" + "time": "2025-12-08T18:01:33+00:00" }, { "name": "psr/container", @@ -4150,24 +4103,24 @@ }, { "name": "symfony/event-dispatcher", - "version": "v7.4.0", + "version": "v8.0.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "9dddcddff1ef974ad87b3708e4b442dc38b2261d" + "reference": "573f95783a2ec6e38752979db139f09fec033f03" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9dddcddff1ef974ad87b3708e4b442dc38b2261d", - "reference": "9dddcddff1ef974ad87b3708e4b442dc38b2261d", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/573f95783a2ec6e38752979db139f09fec033f03", + "reference": "573f95783a2ec6e38752979db139f09fec033f03", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.4", "symfony/event-dispatcher-contracts": "^2.5|^3" }, "conflict": { - "symfony/dependency-injection": "<6.4", + "symfony/security-http": "<7.4", "symfony/service-contracts": "<2.5" }, "provide": { @@ -4176,14 +4129,14 @@ }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^6.4|^7.0|^8.0", - "symfony/dependency-injection": "^6.4|^7.0|^8.0", - "symfony/error-handler": "^6.4|^7.0|^8.0", - "symfony/expression-language": "^6.4|^7.0|^8.0", - "symfony/framework-bundle": "^6.4|^7.0|^8.0", - "symfony/http-foundation": "^6.4|^7.0|^8.0", + "symfony/config": "^7.4|^8.0", + "symfony/dependency-injection": "^7.4|^8.0", + "symfony/error-handler": "^7.4|^8.0", + "symfony/expression-language": "^7.4|^8.0", + "symfony/framework-bundle": "^7.4|^8.0", + "symfony/http-foundation": "^7.4|^8.0", "symfony/service-contracts": "^2.5|^3", - "symfony/stopwatch": "^6.4|^7.0|^8.0" + "symfony/stopwatch": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -4211,7 +4164,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v7.4.0" + "source": "https://github.com/symfony/event-dispatcher/tree/v8.0.0" }, "funding": [ { @@ -4231,7 +4184,7 @@ "type": "tidelift" } ], - "time": "2025-10-28T09:38:46+00:00" + "time": "2025-10-30T14:17:19+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -4311,25 +4264,25 @@ }, { "name": "symfony/filesystem", - "version": "v7.4.0", + "version": "v8.0.1", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "d551b38811096d0be9c4691d406991b47c0c630a" + "reference": "d937d400b980523dc9ee946bb69972b5e619058d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/d551b38811096d0be9c4691d406991b47c0c630a", - "reference": "d551b38811096d0be9c4691d406991b47c0c630a", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/d937d400b980523dc9ee946bb69972b5e619058d", + "reference": "d937d400b980523dc9ee946bb69972b5e619058d", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.4", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-mbstring": "~1.8" }, "require-dev": { - "symfony/process": "^6.4|^7.0|^8.0" + "symfony/process": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -4357,7 +4310,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.4.0" + "source": "https://github.com/symfony/filesystem/tree/v8.0.1" }, "funding": [ { @@ -4377,7 +4330,7 @@ "type": "tidelift" } ], - "time": "2025-11-27T13:27:24+00:00" + "time": "2025-12-01T09:13:36+00:00" }, { "name": "symfony/finder", @@ -4449,20 +4402,20 @@ }, { "name": "symfony/options-resolver", - "version": "v7.4.0", + "version": "v8.0.0", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "b38026df55197f9e39a44f3215788edf83187b80" + "reference": "d2b592535ffa6600c265a3893a7f7fd2bad82dd7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/b38026df55197f9e39a44f3215788edf83187b80", - "reference": "b38026df55197f9e39a44f3215788edf83187b80", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/d2b592535ffa6600c265a3893a7f7fd2bad82dd7", + "reference": "d2b592535ffa6600c265a3893a7f7fd2bad82dd7", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.4", "symfony/deprecation-contracts": "^2.5|^3" }, "type": "library", @@ -4496,7 +4449,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v7.4.0" + "source": "https://github.com/symfony/options-resolver/tree/v8.0.0" }, "funding": [ { @@ -4516,7 +4469,7 @@ "type": "tidelift" } ], - "time": "2025-11-12T15:39:26+00:00" + "time": "2025-11-12T15:55:31+00:00" }, { "name": "symfony/polyfill-ctype", @@ -5251,20 +5204,20 @@ }, { "name": "symfony/stopwatch", - "version": "v7.4.0", + "version": "v8.0.0", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "8a24af0a2e8a872fb745047180649b8418303084" + "reference": "67df1914c6ccd2d7b52f70d40cf2aea02159d942" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/8a24af0a2e8a872fb745047180649b8418303084", - "reference": "8a24af0a2e8a872fb745047180649b8418303084", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/67df1914c6ccd2d7b52f70d40cf2aea02159d942", + "reference": "67df1914c6ccd2d7b52f70d40cf2aea02159d942", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.4", "symfony/service-contracts": "^2.5|^3" }, "type": "library", @@ -5293,7 +5246,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v7.4.0" + "source": "https://github.com/symfony/stopwatch/tree/v8.0.0" }, "funding": [ { @@ -5313,39 +5266,38 @@ "type": "tidelift" } ], - "time": "2025-08-04T07:05:15+00:00" + "time": "2025-08-04T07:36:47+00:00" }, { "name": "symfony/string", - "version": "v7.4.0", + "version": "v8.0.1", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "d50e862cb0a0e0886f73ca1f31b865efbb795003" + "reference": "ba65a969ac918ce0cc3edfac6cdde847eba231dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/d50e862cb0a0e0886f73ca1f31b865efbb795003", - "reference": "d50e862cb0a0e0886f73ca1f31b865efbb795003", + "url": "https://api.github.com/repos/symfony/string/zipball/ba65a969ac918ce0cc3edfac6cdde847eba231dc", + "reference": "ba65a969ac918ce0cc3edfac6cdde847eba231dc", "shasum": "" }, "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3.0", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.33", - "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0" + "php": ">=8.4", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-intl-grapheme": "^1.33", + "symfony/polyfill-intl-normalizer": "^1.0", + "symfony/polyfill-mbstring": "^1.0" }, "conflict": { "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/emoji": "^7.1|^8.0", - "symfony/http-client": "^6.4|^7.0|^8.0", - "symfony/intl": "^6.4|^7.0|^8.0", + "symfony/emoji": "^7.4|^8.0", + "symfony/http-client": "^7.4|^8.0", + "symfony/intl": "^7.4|^8.0", "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^6.4|^7.0|^8.0" + "symfony/var-exporter": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -5384,7 +5336,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.4.0" + "source": "https://github.com/symfony/string/tree/v8.0.1" }, "funding": [ { @@ -5404,7 +5356,7 @@ "type": "tidelift" } ], - "time": "2025-11-27T13:27:24+00:00" + "time": "2025-12-01T09:13:36+00:00" }, { "name": "ta-tikoma/phpunit-architecture-test", @@ -5574,25 +5526,10 @@ "time": "2025-10-29T15:56:20+00:00" } ], - "aliases": [ - { - "package": "phunkie/effect", - "version": "dev-developing-1.0.0", - "alias": "1.0.0", - "alias_normalized": "1.0.0.0" - }, - { - "package": "phunkie/phunkie", - "version": "dev-developing-1.0.0", - "alias": "1.0.0", - "alias_normalized": "1.0.0.0" - } - ], + "aliases": [], "minimum-stability": "stable", "stability-flags": { - "phunkie/effect": 20, - "phunkie/phpstan": 20, - "phunkie/phunkie": 20 + "phunkie/phpstan": 20 }, "prefer-stable": false, "prefer-lowest": false, From f250c9b6829897ec079096c964e7936cbfcffa8a Mon Sep 17 00:00:00 2001 From: Marcello Duarte Date: Mon, 8 Dec 2025 19:15:30 +0000 Subject: [PATCH 18/18] Preparing for release --- composer.json | 2 +- composer.lock | 9 +++------ tests/Feature/Streams/ConcurrencySpec.php | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 5f2004f..0ec0010 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "pestphp/pest": "^2.35", "phpstan/phpstan": "^2.0", "friendsofphp/php-cs-fixer": "^3.90", - "phunkie/phpstan": "@dev" + "phunkie/phpstan": "^1.0" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 8acca15..19d7cf5 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": "9e2c8a8335b03c305c0be71f32f5fa61", + "content-hash": "b5d55d05f73a184a5d5338f7f7149610", "packages": [ { "name": "phunkie/effect", @@ -2252,7 +2252,7 @@ }, { "name": "phunkie/phpstan", - "version": "dev-main", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/phunkie/phpstan.git", @@ -2273,7 +2273,6 @@ "phunkie/effect": "dev-developing-1.0.0 as 1.0.0", "phunkie/phunkie": "dev-developing-1.0.0 as 1.0.0" }, - "default-branch": true, "type": "phpstan-extension", "extra": { "phpstan": { @@ -5528,9 +5527,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "phunkie/phpstan": 20 - }, + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/tests/Feature/Streams/ConcurrencySpec.php b/tests/Feature/Streams/ConcurrencySpec.php index db1eef7..005e774 100644 --- a/tests/Feature/Streams/ConcurrencySpec.php +++ b/tests/Feature/Streams/ConcurrencySpec.php @@ -32,7 +32,7 @@ expect($result)->toBe([2, 4, 6, 8]); // With concurrency of 2, should take ~200ms (2 batches of 100ms each) // Without concurrency, would take ~400ms (4 sequential operations) - expect($duration)->toBeLessThan(0.5); // Allow overhead for PHP Fibers + expect($duration)->toBeLessThan(0.7); // Allow overhead for PHP Fibers and CI }); it('auto-detects CPU cores when maxConcurrent is 0', function () {