From e3674d339886f85e8e1068808aca764b6a895aca Mon Sep 17 00:00:00 2001 From: Pratiksha Date: Tue, 11 Feb 2025 12:09:18 +0530 Subject: [PATCH 01/12] winp --- .github/workflows/psalm.yml | 33 + composer.json | 4 +- composer.lock | 2466 +++++++++++++++++--- psalm.xml | 5 + src/BasicAuthentication.php | 4 +- src/BearerAuthentication.php | 6 + src/Neo4jPhp.php | 108 - src/Neo4jQueryAPI.php | 11 +- src/Objects/Authentication.php | 10 +- src/Objects/ProfiledQueryPlan.php | 46 +- src/Objects/ProfiledQueryPlanArguments.php | 15 +- src/requestFactory.php | 67 - src/transaction_Script.php | 96 - 13 files changed, 2280 insertions(+), 591 deletions(-) create mode 100644 .github/workflows/psalm.yml delete mode 100644 src/Neo4jPhp.php delete mode 100644 src/requestFactory.php delete mode 100644 src/transaction_Script.php diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml new file mode 100644 index 00000000..2b5fc1e5 --- /dev/null +++ b/.github/workflows/psalm.yml @@ -0,0 +1,33 @@ +name: Psalm Static Analysis + +on: + push: + branches: + - main + paths: + - '**/*.php' + pull_request: + paths: + - '**/*.php' + workflow_dispatch: + +jobs: + psalm: + name: Run Psalm + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8.3 + tools: composer, psalm + + - name: Install dependencies + run: composer install --no-progress --prefer-dist + + - name: Run Psalm + run: vendor/bin/psalm --output-format=github diff --git a/composer.json b/composer.json index aea16885..0e8a1cb6 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,9 @@ }, "require-dev": { "phpunit/phpunit": "^11.0", - "friendsofphp/php-cs-fixer": "^3.68" + "friendsofphp/php-cs-fixer": "^3.68", + "vimeo/psalm": "^6.5" + }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 09363afc..25c67797 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": "61138d5fcabcefc4b2ce114e34230d1c", + "content-hash": "74901068a9501980eb2127e21e87cee0", "packages": [ { "name": "guzzlehttp/guzzle", @@ -683,31 +683,37 @@ ], "packages-dev": [ { - "name": "clue/ndjson-react", - "version": "v1.3.0", + "name": "amphp/amp", + "version": "v3.1.0", "source": { "type": "git", - "url": "https://github.com/clue/reactphp-ndjson.git", - "reference": "392dc165fce93b5bb5c637b67e59619223c931b0" + "url": "https://github.com/amphp/amp.git", + "reference": "7cf7fef3d667bfe4b2560bc87e67d5387a7bcde9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/clue/reactphp-ndjson/zipball/392dc165fce93b5bb5c637b67e59619223c931b0", - "reference": "392dc165fce93b5bb5c637b67e59619223c931b0", + "url": "https://api.github.com/repos/amphp/amp/zipball/7cf7fef3d667bfe4b2560bc87e67d5387a7bcde9", + "reference": "7cf7fef3d667bfe4b2560bc87e67d5387a7bcde9", "shasum": "" }, "require": { - "php": ">=5.3", - "react/stream": "^1.2" + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" }, "require-dev": { - "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35", - "react/event-loop": "^1.2" + "amphp/php-cs-fixer-config": "^2", + "phpunit/phpunit": "^9", + "psalm/phar": "5.23.1" }, "type": "library", "autoload": { + "files": [ + "src/functions.php", + "src/Future/functions.php", + "src/Internal/functions.php" + ], "psr-4": { - "Clue\\React\\NDJson\\": "src/" + "Amp\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -716,75 +722,84 @@ ], "authors": [ { - "name": "Christian Lück", - "email": "christian@clue.engineering" + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Bob Weinand", + "email": "bobwei9@hotmail.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" } ], - "description": "Streaming newline-delimited JSON (NDJSON) parser and encoder for ReactPHP.", - "homepage": "https://github.com/clue/reactphp-ndjson", + "description": "A non-blocking concurrency framework for PHP applications.", + "homepage": "https://amphp.org/amp", "keywords": [ - "NDJSON", - "json", - "jsonlines", - "newline", - "reactphp", - "streaming" + "async", + "asynchronous", + "awaitable", + "concurrency", + "event", + "event-loop", + "future", + "non-blocking", + "promise" ], "support": { - "issues": "https://github.com/clue/reactphp-ndjson/issues", - "source": "https://github.com/clue/reactphp-ndjson/tree/v1.3.0" + "issues": "https://github.com/amphp/amp/issues", + "source": "https://github.com/amphp/amp/tree/v3.1.0" }, "funding": [ { - "url": "https://clue.engineering/support", - "type": "custom" - }, - { - "url": "https://github.com/clue", + "url": "https://github.com/amphp", "type": "github" } ], - "time": "2022-12-23T10:58:28+00:00" + "time": "2025-01-26T16:07:39+00:00" }, { - "name": "composer/pcre", - "version": "3.3.2", + "name": "amphp/byte-stream", + "version": "v2.1.1", "source": { "type": "git", - "url": "https://github.com/composer/pcre.git", - "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e" + "url": "https://github.com/amphp/byte-stream.git", + "reference": "daa00f2efdbd71565bf64ffefa89e37542addf93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e", - "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/daa00f2efdbd71565bf64ffefa89e37542addf93", + "reference": "daa00f2efdbd71565bf64ffefa89e37542addf93", "shasum": "" }, "require": { - "php": "^7.4 || ^8.0" - }, - "conflict": { - "phpstan/phpstan": "<1.11.10" + "amphp/amp": "^3", + "amphp/parser": "^1.1", + "amphp/pipeline": "^1", + "amphp/serialization": "^1", + "amphp/sync": "^2", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2.3" }, "require-dev": { - "phpstan/phpstan": "^1.12 || ^2", - "phpstan/phpstan-strict-rules": "^1 || ^2", - "phpunit/phpunit": "^8 || ^9" + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "5.22.1" }, "type": "library", - "extra": { - "phpstan": { - "includes": [ - "extension.neon" - ] - }, - "branch-alias": { - "dev-main": "3.x-dev" - } - }, "autoload": { + "files": [ + "src/functions.php", + "src/Internal/functions.php" + ], "psr-4": { - "Composer\\Pcre\\": "src" + "Amp\\ByteStream\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -793,68 +808,67 @@ ], "authors": [ { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" } ], - "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "description": "A stream abstraction to make working with non-blocking I/O simple.", + "homepage": "https://amphp.org/byte-stream", "keywords": [ - "PCRE", - "preg", - "regex", - "regular expression" + "amp", + "amphp", + "async", + "io", + "non-blocking", + "stream" ], "support": { - "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.3.2" + "issues": "https://github.com/amphp/byte-stream/issues", + "source": "https://github.com/amphp/byte-stream/tree/v2.1.1" }, "funding": [ { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", + "url": "https://github.com/amphp", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" } ], - "time": "2024-11-12T16:29:46+00:00" + "time": "2024-02-17T04:49:38+00:00" }, { - "name": "composer/semver", - "version": "3.4.3", + "name": "amphp/cache", + "version": "v2.0.1", "source": { "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12" + "url": "https://github.com/amphp/cache.git", + "reference": "46912e387e6aa94933b61ea1ead9cf7540b7797c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", - "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", + "url": "https://api.github.com/repos/amphp/cache/zipball/46912e387e6aa94933b61ea1ead9cf7540b7797c", + "reference": "46912e387e6aa94933b61ea1ead9cf7540b7797c", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" + "amphp/amp": "^3", + "amphp/serialization": "^1", + "amphp/sync": "^2", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" }, "require-dev": { - "phpstan/phpstan": "^1.11", - "symfony/phpunit-bridge": "^3 || ^7" + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, "autoload": { "psr-4": { - "Composer\\Semver\\": "src" + "Amp\\Cache\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -863,77 +877,71 @@ ], "authors": [ { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" + "name": "Niklas Keller", + "email": "me@kelunik.com" }, { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" }, { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" } ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], + "description": "A fiber-aware cache API based on Amp and Revolt.", + "homepage": "https://amphp.org/cache", "support": { - "irc": "ircs://irc.libera.chat:6697/composer", - "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.4.3" + "issues": "https://github.com/amphp/cache/issues", + "source": "https://github.com/amphp/cache/tree/v2.0.1" }, "funding": [ { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", + "url": "https://github.com/amphp", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" } ], - "time": "2024-09-19T14:15:21+00:00" + "time": "2024-04-19T03:38:06+00:00" }, { - "name": "composer/xdebug-handler", - "version": "3.0.5", + "name": "amphp/dns", + "version": "v2.4.0", "source": { "type": "git", - "url": "https://github.com/composer/xdebug-handler.git", - "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" + "url": "https://github.com/amphp/dns.git", + "reference": "78eb3db5fc69bf2fc0cb503c4fcba667bc223c71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", - "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", + "url": "https://api.github.com/repos/amphp/dns/zipball/78eb3db5fc69bf2fc0cb503c4fcba667bc223c71", + "reference": "78eb3db5fc69bf2fc0cb503c4fcba667bc223c71", "shasum": "" }, "require": { - "composer/pcre": "^1 || ^2 || ^3", - "php": "^7.2.5 || ^8.0", - "psr/log": "^1 || ^2 || ^3" + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/cache": "^2", + "amphp/parser": "^1", + "amphp/process": "^2", + "daverandom/libdns": "^2.0.2", + "ext-filter": "*", + "ext-json": "*", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" }, "require-dev": { - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-strict-rules": "^1.1", - "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5" + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "5.20" }, "type": "library", "autoload": { + "files": [ + "src/functions.php" + ], "psr-4": { - "Composer\\XdebugHandler\\": "src" + "Amp\\Dns\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -942,60 +950,91 @@ ], "authors": [ { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" + "name": "Chris Wright", + "email": "addr@daverandom.com" + }, + { + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" + }, + { + "name": "Bob Weinand", + "email": "bobwei9@hotmail.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" } ], - "description": "Restarts a process without Xdebug.", + "description": "Async DNS resolution for Amp.", + "homepage": "https://github.com/amphp/dns", "keywords": [ - "Xdebug", - "performance" + "amp", + "amphp", + "async", + "client", + "dns", + "resolve" ], "support": { - "irc": "ircs://irc.libera.chat:6697/composer", - "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.5" + "issues": "https://github.com/amphp/dns/issues", + "source": "https://github.com/amphp/dns/tree/v2.4.0" }, "funding": [ { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", + "url": "https://github.com/amphp", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" } ], - "time": "2024-05-06T16:37:16+00:00" + "time": "2025-01-19T15:43:40+00:00" }, { - "name": "evenement/evenement", - "version": "v3.0.2", + "name": "amphp/parallel", + "version": "v2.3.1", "source": { "type": "git", - "url": "https://github.com/igorw/evenement.git", - "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc" + "url": "https://github.com/amphp/parallel.git", + "reference": "5113111de02796a782f5d90767455e7391cca190" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/igorw/evenement/zipball/0a16b0d71ab13284339abb99d9d2bd813640efbc", - "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc", + "url": "https://api.github.com/repos/amphp/parallel/zipball/5113111de02796a782f5d90767455e7391cca190", + "reference": "5113111de02796a782f5d90767455e7391cca190", "shasum": "" }, "require": { - "php": ">=7.0" + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/cache": "^2", + "amphp/parser": "^1", + "amphp/pipeline": "^1", + "amphp/process": "^2", + "amphp/serialization": "^1", + "amphp/socket": "^2", + "amphp/sync": "^2", + "php": ">=8.1", + "revolt/event-loop": "^1" }, "require-dev": { - "phpunit/phpunit": "^9 || ^6" + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.18" }, "type": "library", "autoload": { + "files": [ + "src/Context/functions.php", + "src/Context/Internal/functions.php", + "src/Ipc/functions.php", + "src/Worker/functions.php" + ], "psr-4": { - "Evenement\\": "src/" + "Amp\\Parallel\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1004,53 +1043,65 @@ ], "authors": [ { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Stephen Coakley", + "email": "me@stephencoakley.com" } ], - "description": "Événement is a very simple event dispatching library for PHP", + "description": "Parallel processing component for Amp.", + "homepage": "https://github.com/amphp/parallel", "keywords": [ - "event-dispatcher", - "event-emitter" + "async", + "asynchronous", + "concurrent", + "multi-processing", + "multi-threading" ], "support": { - "issues": "https://github.com/igorw/evenement/issues", - "source": "https://github.com/igorw/evenement/tree/v3.0.2" + "issues": "https://github.com/amphp/parallel/issues", + "source": "https://github.com/amphp/parallel/tree/v2.3.1" }, - "time": "2023-08-08T05:53:35+00:00" + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-12-21T01:56:09+00:00" }, { - "name": "fidry/cpu-core-counter", - "version": "1.2.0", + "name": "amphp/parser", + "version": "v1.1.1", "source": { "type": "git", - "url": "https://github.com/theofidry/cpu-core-counter.git", - "reference": "8520451a140d3f46ac33042715115e290cf5785f" + "url": "https://github.com/amphp/parser.git", + "reference": "3cf1f8b32a0171d4b1bed93d25617637a77cded7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/8520451a140d3f46ac33042715115e290cf5785f", - "reference": "8520451a140d3f46ac33042715115e290cf5785f", + "url": "https://api.github.com/repos/amphp/parser/zipball/3cf1f8b32a0171d4b1bed93d25617637a77cded7", + "reference": "3cf1f8b32a0171d4b1bed93d25617637a77cded7", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": ">=7.4" }, "require-dev": { - "fidry/makefile": "^0.2.0", - "fidry/php-cs-fixer-config": "^1.1.2", - "phpstan/extension-installer": "^1.2.0", - "phpstan/phpstan": "^1.9.2", - "phpstan/phpstan-deprecation-rules": "^1.0.0", - "phpstan/phpstan-phpunit": "^1.2.2", - "phpstan/phpstan-strict-rules": "^1.4.4", - "phpunit/phpunit": "^8.5.31 || ^9.5.26", - "webmozarts/strict-phpunit": "^7.5" + "amphp/php-cs-fixer-config": "^2", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" }, "type": "library", "autoload": { "psr-4": { - "Fidry\\CpuCoreCounter\\": "src/" + "Amp\\Parser\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1059,45 +1110,1029 @@ ], "authors": [ { - "name": "Théo FIDRY", - "email": "theo.fidry@gmail.com" + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" } ], - "description": "Tiny utility to get the number of CPU cores.", + "description": "A generator parser to make streaming parsers simple.", + "homepage": "https://github.com/amphp/parser", "keywords": [ - "CPU", - "core" + "async", + "non-blocking", + "parser", + "stream" ], "support": { - "issues": "https://github.com/theofidry/cpu-core-counter/issues", - "source": "https://github.com/theofidry/cpu-core-counter/tree/1.2.0" + "issues": "https://github.com/amphp/parser/issues", + "source": "https://github.com/amphp/parser/tree/v1.1.1" }, "funding": [ { - "url": "https://github.com/theofidry", + "url": "https://github.com/amphp", "type": "github" } ], - "time": "2024-08-06T10:04:20+00:00" + "time": "2024-03-21T19:16:53+00:00" }, { - "name": "friendsofphp/php-cs-fixer", - "version": "v3.68.0", + "name": "amphp/pipeline", + "version": "v1.2.2", "source": { "type": "git", - "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "73f78d8b2b34a0dd65fedb434a602ee4c2c8ad4c" + "url": "https://github.com/amphp/pipeline.git", + "reference": "97cbf289f4d8877acfe58dd90ed5a4370a43caa4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/73f78d8b2b34a0dd65fedb434a602ee4c2c8ad4c", - "reference": "73f78d8b2b34a0dd65fedb434a602ee4c2c8ad4c", + "url": "https://api.github.com/repos/amphp/pipeline/zipball/97cbf289f4d8877acfe58dd90ed5a4370a43caa4", + "reference": "97cbf289f4d8877acfe58dd90ed5a4370a43caa4", "shasum": "" }, "require": { - "clue/ndjson-react": "^1.0", - "composer/semver": "^3.4", - "composer/xdebug-handler": "^3.0.3", + "amphp/amp": "^3", + "php": ">=8.1", + "revolt/event-loop": "^1" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.18" + }, + "type": "library", + "autoload": { + "psr-4": { + "Amp\\Pipeline\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "Asynchronous iterators and operators.", + "homepage": "https://amphp.org/pipeline", + "keywords": [ + "amp", + "amphp", + "async", + "io", + "iterator", + "non-blocking" + ], + "support": { + "issues": "https://github.com/amphp/pipeline/issues", + "source": "https://github.com/amphp/pipeline/tree/v1.2.2" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2025-01-19T15:42:46+00:00" + }, + { + "name": "amphp/process", + "version": "v2.0.3", + "source": { + "type": "git", + "url": "https://github.com/amphp/process.git", + "reference": "52e08c09dec7511d5fbc1fb00d3e4e79fc77d58d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/process/zipball/52e08c09dec7511d5fbc1fb00d3e4e79fc77d58d", + "reference": "52e08c09dec7511d5fbc1fb00d3e4e79fc77d58d", + "shasum": "" + }, + "require": { + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/sync": "^2", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Amp\\Process\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bob Weinand", + "email": "bobwei9@hotmail.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "A fiber-aware process manager based on Amp and Revolt.", + "homepage": "https://amphp.org/process", + "support": { + "issues": "https://github.com/amphp/process/issues", + "source": "https://github.com/amphp/process/tree/v2.0.3" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-04-19T03:13:44+00:00" + }, + { + "name": "amphp/serialization", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/amphp/serialization.git", + "reference": "693e77b2fb0b266c3c7d622317f881de44ae94a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/serialization/zipball/693e77b2fb0b266c3c7d622317f881de44ae94a1", + "reference": "693e77b2fb0b266c3c7d622317f881de44ae94a1", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "dev-master", + "phpunit/phpunit": "^9 || ^8 || ^7" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Amp\\Serialization\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "Serialization tools for IPC and data storage in PHP.", + "homepage": "https://github.com/amphp/serialization", + "keywords": [ + "async", + "asynchronous", + "serialization", + "serialize" + ], + "support": { + "issues": "https://github.com/amphp/serialization/issues", + "source": "https://github.com/amphp/serialization/tree/master" + }, + "time": "2020-03-25T21:39:07+00:00" + }, + { + "name": "amphp/socket", + "version": "v2.3.1", + "source": { + "type": "git", + "url": "https://github.com/amphp/socket.git", + "reference": "58e0422221825b79681b72c50c47a930be7bf1e1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/socket/zipball/58e0422221825b79681b72c50c47a930be7bf1e1", + "reference": "58e0422221825b79681b72c50c47a930be7bf1e1", + "shasum": "" + }, + "require": { + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/dns": "^2", + "ext-openssl": "*", + "kelunik/certificate": "^1.1", + "league/uri": "^6.5 | ^7", + "league/uri-interfaces": "^2.3 | ^7", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "amphp/process": "^2", + "phpunit/phpunit": "^9", + "psalm/phar": "5.20" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php", + "src/Internal/functions.php", + "src/SocketAddress/functions.php" + ], + "psr-4": { + "Amp\\Socket\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel Lowrey", + "email": "rdlowrey@gmail.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "Non-blocking socket connection / server implementations based on Amp and Revolt.", + "homepage": "https://github.com/amphp/socket", + "keywords": [ + "amp", + "async", + "encryption", + "non-blocking", + "sockets", + "tcp", + "tls" + ], + "support": { + "issues": "https://github.com/amphp/socket/issues", + "source": "https://github.com/amphp/socket/tree/v2.3.1" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-04-21T14:33:03+00:00" + }, + { + "name": "amphp/sync", + "version": "v2.3.0", + "source": { + "type": "git", + "url": "https://github.com/amphp/sync.git", + "reference": "217097b785130d77cfcc58ff583cf26cd1770bf1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/sync/zipball/217097b785130d77cfcc58ff583cf26cd1770bf1", + "reference": "217097b785130d77cfcc58ff583cf26cd1770bf1", + "shasum": "" + }, + "require": { + "amphp/amp": "^3", + "amphp/pipeline": "^1", + "amphp/serialization": "^1", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "5.23" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Amp\\Sync\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Stephen Coakley", + "email": "me@stephencoakley.com" + } + ], + "description": "Non-blocking synchronization primitives for PHP based on Amp and Revolt.", + "homepage": "https://github.com/amphp/sync", + "keywords": [ + "async", + "asynchronous", + "mutex", + "semaphore", + "synchronization" + ], + "support": { + "issues": "https://github.com/amphp/sync/issues", + "source": "https://github.com/amphp/sync/tree/v2.3.0" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-08-03T19:31:26+00:00" + }, + { + "name": "clue/ndjson-react", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/clue/reactphp-ndjson.git", + "reference": "392dc165fce93b5bb5c637b67e59619223c931b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/clue/reactphp-ndjson/zipball/392dc165fce93b5bb5c637b67e59619223c931b0", + "reference": "392dc165fce93b5bb5c637b67e59619223c931b0", + "shasum": "" + }, + "require": { + "php": ">=5.3", + "react/stream": "^1.2" + }, + "require-dev": { + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35", + "react/event-loop": "^1.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Clue\\React\\NDJson\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@clue.engineering" + } + ], + "description": "Streaming newline-delimited JSON (NDJSON) parser and encoder for ReactPHP.", + "homepage": "https://github.com/clue/reactphp-ndjson", + "keywords": [ + "NDJSON", + "json", + "jsonlines", + "newline", + "reactphp", + "streaming" + ], + "support": { + "issues": "https://github.com/clue/reactphp-ndjson/issues", + "source": "https://github.com/clue/reactphp-ndjson/tree/v1.3.0" + }, + "funding": [ + { + "url": "https://clue.engineering/support", + "type": "custom" + }, + { + "url": "https://github.com/clue", + "type": "github" + } + ], + "time": "2022-12-23T10:58:28+00:00" + }, + { + "name": "composer/pcre", + "version": "3.3.2", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e", + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<1.11.10" + }, + "require-dev": { + "phpstan/phpstan": "^1.12 || ^2", + "phpstan/phpstan-strict-rules": "^1 || ^2", + "phpunit/phpunit": "^8 || ^9" + }, + "type": "library", + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + }, + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.3.2" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-11-12T16:29:46+00:00" + }, + { + "name": "composer/semver", + "version": "3.4.3", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", + "reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.11", + "symfony/phpunit-bridge": "^3 || ^7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.4.3" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-09-19T14:15:21+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "3.0.5", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", + "shasum": "" + }, + "require": { + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1 || ^2 || ^3" + }, + "require-dev": { + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/3.0.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-05-06T16:37:16+00:00" + }, + { + "name": "daverandom/libdns", + "version": "v2.1.0", + "source": { + "type": "git", + "url": "https://github.com/DaveRandom/LibDNS.git", + "reference": "b84c94e8fe6b7ee4aecfe121bfe3b6177d303c8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/DaveRandom/LibDNS/zipball/b84c94e8fe6b7ee4aecfe121bfe3b6177d303c8a", + "reference": "b84c94e8fe6b7ee4aecfe121bfe3b6177d303c8a", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "Required for IDN support" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "LibDNS\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "DNS protocol implementation written in pure PHP", + "keywords": [ + "dns" + ], + "support": { + "issues": "https://github.com/DaveRandom/LibDNS/issues", + "source": "https://github.com/DaveRandom/LibDNS/tree/v2.1.0" + }, + "time": "2024-04-12T12:12:48+00:00" + }, + { + "name": "dnoegel/php-xdg-base-dir", + "version": "v0.1.1", + "source": { + "type": "git", + "url": "https://github.com/dnoegel/php-xdg-base-dir.git", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35" + }, + "type": "library", + "autoload": { + "psr-4": { + "XdgBaseDir\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "implementation of xdg base directory specification for php", + "support": { + "issues": "https://github.com/dnoegel/php-xdg-base-dir/issues", + "source": "https://github.com/dnoegel/php-xdg-base-dir/tree/v0.1.1" + }, + "time": "2019-12-04T15:06:13+00:00" + }, + { + "name": "doctrine/deprecations", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "31610dbb31faa98e6b5447b62340826f54fbc4e9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/31610dbb31faa98e6b5447b62340826f54fbc4e9", + "reference": "31610dbb31faa98e6b5447b62340826f54fbc4e9", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9 || ^12", + "phpstan/phpstan": "1.4.10 || 2.0.3", + "phpstan/phpstan-phpunit": "^1.0 || ^2", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psr/log": "^1 || ^2 || ^3" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/1.1.4" + }, + "time": "2024-12-07T21:18:45+00:00" + }, + { + "name": "evenement/evenement", + "version": "v3.0.2", + "source": { + "type": "git", + "url": "https://github.com/igorw/evenement.git", + "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/igorw/evenement/zipball/0a16b0d71ab13284339abb99d9d2bd813640efbc", + "reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc", + "shasum": "" + }, + "require": { + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^9 || ^6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Evenement\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + } + ], + "description": "Événement is a very simple event dispatching library for PHP", + "keywords": [ + "event-dispatcher", + "event-emitter" + ], + "support": { + "issues": "https://github.com/igorw/evenement/issues", + "source": "https://github.com/igorw/evenement/tree/v3.0.2" + }, + "time": "2023-08-08T05:53:35+00:00" + }, + { + "name": "felixfbecker/advanced-json-rpc", + "version": "v3.2.1", + "source": { + "type": "git", + "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", + "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/b5f37dbff9a8ad360ca341f3240dc1c168b45447", + "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447", + "shasum": "" + }, + "require": { + "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", + "php": "^7.1 || ^8.0", + "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.0 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "AdvancedJsonRpc\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Felix Becker", + "email": "felix.b@outlook.com" + } + ], + "description": "A more advanced JSONRPC implementation", + "support": { + "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", + "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.1" + }, + "time": "2021-06-11T22:34:44+00:00" + }, + { + "name": "felixfbecker/language-server-protocol", + "version": "v1.5.3", + "source": { + "type": "git", + "url": "https://github.com/felixfbecker/php-language-server-protocol.git", + "reference": "a9e113dbc7d849e35b8776da39edaf4313b7b6c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/a9e113dbc7d849e35b8776da39edaf4313b7b6c9", + "reference": "a9e113dbc7d849e35b8776da39edaf4313b7b6c9", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpstan/phpstan": "*", + "squizlabs/php_codesniffer": "^3.1", + "vimeo/psalm": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "LanguageServerProtocol\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Felix Becker", + "email": "felix.b@outlook.com" + } + ], + "description": "PHP classes for the Language Server Protocol", + "keywords": [ + "language", + "microsoft", + "php", + "server" + ], + "support": { + "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", + "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/v1.5.3" + }, + "time": "2024-04-30T00:40:11+00:00" + }, + { + "name": "fidry/cpu-core-counter", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/theofidry/cpu-core-counter.git", + "reference": "8520451a140d3f46ac33042715115e290cf5785f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/8520451a140d3f46ac33042715115e290cf5785f", + "reference": "8520451a140d3f46ac33042715115e290cf5785f", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "fidry/makefile": "^0.2.0", + "fidry/php-cs-fixer-config": "^1.1.2", + "phpstan/extension-installer": "^1.2.0", + "phpstan/phpstan": "^1.9.2", + "phpstan/phpstan-deprecation-rules": "^1.0.0", + "phpstan/phpstan-phpunit": "^1.2.2", + "phpstan/phpstan-strict-rules": "^1.4.4", + "phpunit/phpunit": "^8.5.31 || ^9.5.26", + "webmozarts/strict-phpunit": "^7.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Fidry\\CpuCoreCounter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Théo FIDRY", + "email": "theo.fidry@gmail.com" + } + ], + "description": "Tiny utility to get the number of CPU cores.", + "keywords": [ + "CPU", + "core" + ], + "support": { + "issues": "https://github.com/theofidry/cpu-core-counter/issues", + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.2.0" + }, + "funding": [ + { + "url": "https://github.com/theofidry", + "type": "github" + } + ], + "time": "2024-08-06T10:04:20+00:00" + }, + { + "name": "friendsofphp/php-cs-fixer", + "version": "v3.68.5", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", + "reference": "7bedb718b633355272428c60736dc97fb96daf27" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/7bedb718b633355272428c60736dc97fb96daf27", + "reference": "7bedb718b633355272428c60736dc97fb96daf27", + "shasum": "" + }, + "require": { + "clue/ndjson-react": "^1.0", + "composer/semver": "^3.4", + "composer/xdebug-handler": "^3.0.3", "ext-filter": "*", "ext-json": "*", "ext-tokenizer": "*", @@ -1120,35 +2155,254 @@ "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.4", - "infection/infection": "^0.29.8", - "justinrainbow/json-schema": "^5.3 || ^6.0", - "keradus/cli-executor": "^2.1", - "mikey179/vfsstream": "^1.6.12", - "php-coveralls/php-coveralls": "^2.7", - "php-cs-fixer/accessible-object": "^1.1", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.5", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.5", - "phpunit/phpunit": "^9.6.22 || ^10.5.40 || ^11.5.2", - "symfony/var-dumper": "^5.4.48 || ^6.4.15 || ^7.2.0", - "symfony/yaml": "^5.4.45 || ^6.4.13 || ^7.2.0" + "require-dev": { + "facile-it/paraunit": "^1.3.1 || ^2.4", + "infection/infection": "^0.29.8", + "justinrainbow/json-schema": "^5.3 || ^6.0", + "keradus/cli-executor": "^2.1", + "mikey179/vfsstream": "^1.6.12", + "php-coveralls/php-coveralls": "^2.7", + "php-cs-fixer/accessible-object": "^1.1", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.5", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.5", + "phpunit/phpunit": "^9.6.22 || ^10.5.40 || ^11.5.2", + "symfony/var-dumper": "^5.4.48 || ^6.4.15 || ^7.2.0", + "symfony/yaml": "^5.4.45 || ^6.4.13 || ^7.2.0" + }, + "suggest": { + "ext-dom": "For handling output formats in XML", + "ext-mbstring": "For handling non-UTF8 characters." + }, + "bin": [ + "php-cs-fixer" + ], + "type": "application", + "autoload": { + "psr-4": { + "PhpCsFixer\\": "src/" + }, + "exclude-from-classmap": [ + "src/Fixer/Internal/*" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Dariusz Rumiński", + "email": "dariusz.ruminski@gmail.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "keywords": [ + "Static code analysis", + "fixer", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.68.5" + }, + "funding": [ + { + "url": "https://github.com/keradus", + "type": "github" + } + ], + "time": "2025-01-30T17:00:50+00:00" + }, + { + "name": "kelunik/certificate", + "version": "v1.1.3", + "source": { + "type": "git", + "url": "https://github.com/kelunik/certificate.git", + "reference": "7e00d498c264d5eb4f78c69f41c8bd6719c0199e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kelunik/certificate/zipball/7e00d498c264d5eb4f78c69f41c8bd6719c0199e", + "reference": "7e00d498c264d5eb4f78c69f41c8bd6719c0199e", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "php": ">=7.0" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "phpunit/phpunit": "^6 | 7 | ^8 | ^9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Kelunik\\Certificate\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "Access certificate details and transform between different formats.", + "keywords": [ + "DER", + "certificate", + "certificates", + "openssl", + "pem", + "x509" + ], + "support": { + "issues": "https://github.com/kelunik/certificate/issues", + "source": "https://github.com/kelunik/certificate/tree/v1.1.3" + }, + "time": "2023-02-03T21:26:53+00:00" + }, + { + "name": "league/uri", + "version": "7.5.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri.git", + "reference": "81fb5145d2644324614cc532b28efd0215bda430" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/81fb5145d2644324614cc532b28efd0215bda430", + "reference": "81fb5145d2644324614cc532b28efd0215bda430", + "shasum": "" + }, + "require": { + "league/uri-interfaces": "^7.5", + "php": "^8.1" + }, + "conflict": { + "league/uri-schemes": "^1.0" + }, + "suggest": { + "ext-bcmath": "to improve IPV4 host parsing", + "ext-fileinfo": "to create Data URI from file contennts", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "jeremykendall/php-domain-parser": "to resolve Public Suffix and Top Level Domain", + "league/uri-components": "Needed to easily manipulate URI objects components", + "php-64bit": "to improve IPV4 host parsing", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "URI manipulation library", + "homepage": "https://uri.thephpleague.com", + "keywords": [ + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "middleware", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc3986", + "rfc3987", + "rfc6570", + "uri", + "uri-template", + "url", + "ws" + ], + "support": { + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri/tree/7.5.1" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2024-12-08T08:40:02+00:00" + }, + { + "name": "league/uri-interfaces", + "version": "7.5.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri-interfaces.git", + "reference": "08cfc6c4f3d811584fb09c37e2849e6a7f9b0742" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/08cfc6c4f3d811584fb09c37e2849e6a7f9b0742", + "reference": "08cfc6c4f3d811584fb09c37e2849e6a7f9b0742", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^8.1", + "psr/http-factory": "^1", + "psr/http-message": "^1.1 || ^2.0" }, "suggest": { - "ext-dom": "For handling output formats in XML", - "ext-mbstring": "For handling non-UTF8 characters." + "ext-bcmath": "to improve IPV4 host parsing", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "php-64bit": "to improve IPV4 host parsing", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } }, - "bin": [ - "php-cs-fixer" - ], - "type": "application", "autoload": { "psr-4": { - "PhpCsFixer\\": "src/" - }, - "exclude-from-classmap": [ - "src/Fixer/Internal/*" - ] + "League\\Uri\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1156,32 +2410,45 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Dariusz Rumiński", - "email": "dariusz.ruminski@gmail.com" + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" } ], - "description": "A tool to automatically fix PHP code style", + "description": "Common interfaces and classes for URI representation and interaction", + "homepage": "https://uri.thephpleague.com", "keywords": [ - "Static code analysis", - "fixer", - "standards", - "static analysis" + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc3986", + "rfc3987", + "rfc6570", + "uri", + "url", + "ws" ], "support": { - "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.68.0" + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri-interfaces/tree/7.5.0" }, "funding": [ { - "url": "https://github.com/keradus", + "url": "https://github.com/sponsors/nyamsprod", "type": "github" } ], - "time": "2025-01-13T17:01:01+00:00" + "time": "2024-12-08T08:18:47+00:00" }, { "name": "myclabs/deep-copy", @@ -1243,6 +2510,57 @@ ], "time": "2024-11-08T17:47:46+00:00" }, + { + "name": "netresearch/jsonmapper", + "version": "v4.5.0", + "source": { + "type": "git", + "url": "https://github.com/cweiske/jsonmapper.git", + "reference": "8e76efb98ee8b6afc54687045e1b8dba55ac76e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8e76efb98ee8b6afc54687045e1b8dba55ac76e5", + "reference": "8e76efb98ee8b6afc54687045e1b8dba55ac76e5", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0 || ~10.0", + "squizlabs/php_codesniffer": "~3.5" + }, + "type": "library", + "autoload": { + "psr-0": { + "JsonMapper": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "OSL-3.0" + ], + "authors": [ + { + "name": "Christian Weiske", + "email": "cweiske@cweiske.de", + "homepage": "http://github.com/cweiske/jsonmapper/", + "role": "Developer" + } + ], + "description": "Map nested JSON structures onto PHP classes", + "support": { + "email": "cweiske@cweiske.de", + "issues": "https://github.com/cweiske/jsonmapper/issues", + "source": "https://github.com/cweiske/jsonmapper/tree/v4.5.0" + }, + "time": "2024-09-08T10:13:13+00:00" + }, { "name": "nikic/php-parser", "version": "v5.4.0", @@ -1326,98 +2644,320 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.6.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "e5e784149a09bd69d9a5e3b01c5cbd2e2bd653d8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/e5e784149a09bd69d9a5e3b01c5cbd2e2bd653d8", + "reference": "e5e784149a09bd69d9a5e3b01c5cbd2e2bd653d8", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^1.1", + "ext-filter": "*", + "php": "^7.4 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.7", + "phpstan/phpdoc-parser": "^1.7|^2.0", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.5 || ~1.6.0", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-webmozart-assert": "^1.2", + "phpunit/phpunit": "^9.5", + "psalm/phar": "^5.26" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "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.1" + }, + "time": "2024-12-07T09:39:29+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.10.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/679e3ce485b99e84c775d28e2e96fade9a7fb50a", + "reference": "679e3ce485b99e84c775d28e2e96fade9a7fb50a", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^1.0", + "php": "^7.3 || ^8.0", + "phpdocumentor/reflection-common": "^2.0", + "phpstan/phpdoc-parser": "^1.18|^2.0" + }, + "require-dev": { + "ext-tokenizer": "*", + "phpbench/phpbench": "^1.2", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.13.9", + "vimeo/psalm": "^4.25" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" + "name": "Mike van Riel", + "email": "me@mikevanriel.com" } ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.4" + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.10.0" }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2024-03-03T12:33:53+00:00" + "time": "2024-11-09T15:12:26+00:00" }, { - "name": "phar-io/version", - "version": "3.2.1", + "name": "phpstan/phpdoc-parser", + "version": "2.0.0", "source": { "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "c00d78fb6b29658347f9d37ebe104bffadf36299" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/c00d78fb6b29658347f9d37ebe104bffadf36299", + "reference": "c00d78fb6b29658347f9d37ebe104bffadf36299", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "doctrine/annotations": "^2.0", + "nikic/php-parser": "^5.3.0", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", + "phpunit/phpunit": "^9.6", + "symfony/process": "^5.2" }, "type": "library", "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } + "MIT" ], - "description": "Library for handling version information and constraints", + "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.2.1" + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/2.0.0" }, - "time": "2022-02-21T01:04:05+00:00" + "time": "2024-10-13T11:29:49+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1744,16 +3284,16 @@ }, { "name": "phpunit/phpunit", - "version": "11.5.3", + "version": "11.5.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "30e319e578a7b5da3543073e30002bf82042f701" + "reference": "e1cb706f019e2547039ca2c839898cd5f557ee5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/30e319e578a7b5da3543073e30002bf82042f701", - "reference": "30e319e578a7b5da3543073e30002bf82042f701", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e1cb706f019e2547039ca2c839898cd5f557ee5d", + "reference": "e1cb706f019e2547039ca2c839898cd5f557ee5d", "shasum": "" }, "require": { @@ -1825,7 +3365,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.3" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.7" }, "funding": [ { @@ -1841,7 +3381,7 @@ "type": "tidelift" } ], - "time": "2025-01-13T09:36:00+00:00" + "time": "2025-02-06T16:10:05+00:00" }, { "name": "psr/container", @@ -2522,6 +4062,78 @@ ], "time": "2024-06-11T12:45:25+00:00" }, + { + "name": "revolt/event-loop", + "version": "v1.0.6", + "source": { + "type": "git", + "url": "https://github.com/revoltphp/event-loop.git", + "reference": "25de49af7223ba039f64da4ae9a28ec2d10d0254" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/25de49af7223ba039f64da4ae9a28ec2d10d0254", + "reference": "25de49af7223ba039f64da4ae9a28ec2d10d0254", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "ext-json": "*", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.15" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Revolt\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + }, + { + "name": "Christian Lück", + "email": "christian@clue.engineering" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "Rock-solid event loop for concurrent PHP applications.", + "keywords": [ + "async", + "asynchronous", + "concurrency", + "event", + "event-loop", + "non-blocking", + "scheduler" + ], + "support": { + "issues": "https://github.com/revoltphp/event-loop/issues", + "source": "https://github.com/revoltphp/event-loop/tree/v1.0.6" + }, + "time": "2023-11-30T05:34:44+00:00" + }, { "name": "sebastian/cli-parser", "version": "3.0.2", @@ -3448,6 +5060,74 @@ ], "time": "2024-10-09T05:16:32+00:00" }, + { + "name": "spatie/array-to-xml", + "version": "3.4.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/array-to-xml.git", + "reference": "7dcfc67d60b0272926dabad1ec01f6b8a5fb5e67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/7dcfc67d60b0272926dabad1ec01f6b8a5fb5e67", + "reference": "7dcfc67d60b0272926dabad1ec01f6b8a5fb5e67", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "php": "^8.0" + }, + "require-dev": { + "mockery/mockery": "^1.2", + "pestphp/pest": "^1.21", + "spatie/pest-plugin-snapshots": "^1.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Spatie\\ArrayToXml\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://freek.dev", + "role": "Developer" + } + ], + "description": "Convert an array to xml", + "homepage": "https://github.com/spatie/array-to-xml", + "keywords": [ + "array", + "convert", + "xml" + ], + "support": { + "source": "https://github.com/spatie/array-to-xml/tree/3.4.0" + }, + "funding": [ + { + "url": "https://spatie.be/open-source/support-us", + "type": "custom" + }, + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2024-12-16T12:45:15+00:00" + }, { "name": "staabm/side-effects-detector", "version": "1.0.5", @@ -4762,6 +6442,180 @@ } ], "time": "2024-03-03T12:36:25+00:00" + }, + { + "name": "vimeo/psalm", + "version": "6.5.0", + "source": { + "type": "git", + "url": "https://github.com/vimeo/psalm.git", + "reference": "38fc8444edf0cebc9205296ee6e30e906ade783b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/38fc8444edf0cebc9205296ee6e30e906ade783b", + "reference": "38fc8444edf0cebc9205296ee6e30e906ade783b", + "shasum": "" + }, + "require": { + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/parallel": "^2.3", + "composer-runtime-api": "^2", + "composer/semver": "^1.4 || ^2.0 || ^3.0", + "composer/xdebug-handler": "^2.0 || ^3.0", + "dnoegel/php-xdg-base-dir": "^0.1.1", + "ext-ctype": "*", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-tokenizer": "*", + "felixfbecker/advanced-json-rpc": "^3.1", + "felixfbecker/language-server-protocol": "^1.5.3", + "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1 || ^1.0.0", + "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", + "nikic/php-parser": "^5.0.0", + "php": "~8.1.17 || ~8.2.4 || ~8.3.0 || ~8.4.0", + "sebastian/diff": "^4.0 || ^5.0 || ^6.0 || ^7.0", + "spatie/array-to-xml": "^2.17.0 || ^3.0", + "symfony/console": "^6.0 || ^7.0", + "symfony/filesystem": "^6.0 || ^7.0" + }, + "provide": { + "psalm/psalm": "self.version" + }, + "require-dev": { + "amphp/phpunit-util": "^3", + "bamarni/composer-bin-plugin": "^1.4", + "brianium/paratest": "^6.9", + "dg/bypass-finals": "^1.5", + "ext-curl": "*", + "mockery/mockery": "^1.5", + "nunomaduro/mock-final-classes": "^1.1", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpdoc-parser": "^1.6", + "phpunit/phpunit": "^9.6", + "psalm/plugin-mockery": "^1.1", + "psalm/plugin-phpunit": "^0.19", + "slevomat/coding-standard": "^8.4", + "squizlabs/php_codesniffer": "^3.6", + "symfony/process": "^6.0 || ^7.0" + }, + "suggest": { + "ext-curl": "In order to send data to shepherd", + "ext-igbinary": "^2.0.5 is required, used to serialize caching data" + }, + "bin": [ + "psalm", + "psalm-language-server", + "psalm-plugin", + "psalm-refactor", + "psalm-review", + "psalter" + ], + "type": "project", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev", + "dev-2.x": "2.x-dev", + "dev-3.x": "3.x-dev", + "dev-4.x": "4.x-dev", + "dev-5.x": "5.x-dev", + "dev-6.x": "6.x-dev", + "dev-master": "7.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psalm\\": "src/Psalm/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matthew Brown" + }, + { + "name": "Daniil Gentili", + "email": "daniil@daniil.it" + } + ], + "description": "A static analysis tool for finding errors in PHP applications", + "keywords": [ + "code", + "inspection", + "php", + "static analysis" + ], + "support": { + "docs": "https://psalm.dev/docs", + "issues": "https://github.com/vimeo/psalm/issues", + "source": "https://github.com/vimeo/psalm" + }, + "time": "2025-02-07T20:42:25+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "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" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" + }, + "time": "2022-06-03T18:03:27+00:00" } ], "aliases": [], diff --git a/psalm.xml b/psalm.xml index 75966d3e..0d922c5c 100644 --- a/psalm.xml +++ b/psalm.xml @@ -14,4 +14,9 @@ + + + + + diff --git a/src/BasicAuthentication.php b/src/BasicAuthentication.php index d8b0430c..564a2960 100644 --- a/src/BasicAuthentication.php +++ b/src/BasicAuthentication.php @@ -26,7 +26,9 @@ public function getHeader(): string { return 'Basic ' . base64_encode($this->username . ':' . $this->password); } - + /** + * @psalm-suppress UnusedMethod + */ public function getType(): string { return 'Basic'; diff --git a/src/BearerAuthentication.php b/src/BearerAuthentication.php index 83dd2de1..6320539d 100644 --- a/src/BearerAuthentication.php +++ b/src/BearerAuthentication.php @@ -16,11 +16,17 @@ public function authenticate(RequestInterface $request): RequestInterface return $request->withHeader('Authorization', $authHeader); } + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getHeader(): string { return 'Bearer ' . $this->token; } + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getType(): string { return 'Bearer'; diff --git a/src/Neo4jPhp.php b/src/Neo4jPhp.php deleted file mode 100644 index 6a1892d3..00000000 --- a/src/Neo4jPhp.php +++ /dev/null @@ -1,108 +0,0 @@ - 'Basic ' . $credentials, - 'Content-Type' => 'application/json', - ]; - - // Initialize the client with the authorization header - $client = new \GuzzleHttp\Client([ - 'base_uri' => rtrim($neo4jAddress, '/'), - 'timeout' => 10.0, - 'headers' => $headers, - ]); - - // Step 2: Create the Cypher query - $cypherQuery = 'MATCH (n) RETURN n LIMIT 10'; - $parameters = []; // No parameters in this query - $database = 'neo4j'; // Default Neo4j database - - echo "Running Cypher Query: $cypherQuery\n"; - - // Prepare the payload for the Cypher query - $payload = [ - 'statement' => $cypherQuery, - 'parameters' => new stdClass(), // No parameters - 'includeCounters' => true, - ]; - - // Step 3: Send the request to Neo4j - $response = $client->post("/db/{$database}/query/v2", [ - 'json' => $payload, - ]); - - // Parse the response body as JSON - $responseData = json_decode($response->getBody()->getContents(), true); - - // Check for errors in the response - if (isset($responseData['errors']) && count($responseData['errors']) > 0) { - echo "Error: " . $responseData['errors'][0]['message'] . "\n"; - } else { - // Step 4: Output the result of the query - echo "Query Results:\n"; - foreach ($responseData['data'] as $row) { - print_r($row); // Print each row's data - } - } - - // Step 5: Begin a new transaction - $transactionResponse = $client->post("/db/neo4j/query/v2/tx"); - $transactionData = json_decode($transactionResponse->getBody()->getContents(), true); - $transactionId = $transactionData['transaction']['id']; // Retrieve the transaction ID - - echo "Transaction started successfully.\n"; - echo "Transaction ID: $transactionId\n"; - - // You can also fetch additional transaction details if available in the response - // Example: transaction metadata or counters - if (isset($transactionData['transaction']['metadata'])) { - echo "Transaction Metadata: \n"; - print_r($transactionData['transaction']['metadata']); - } - - // Step 6: Execute a query within the transaction - $cypherTransactionQuery = 'MATCH (n) SET n.modified = true RETURN n LIMIT 5'; - $transactionPayload = [ - 'statement' => $cypherTransactionQuery, - 'parameters' => new stdClass(), // No parameters - ]; - - // Execute the transaction query - $transactionQueryResponse = $client->post("/db/neo4j/query/v2/tx/{$transactionId}/commit", [ - 'json' => $transactionPayload, - ]); - - $transactionQueryData = json_decode($transactionQueryResponse->getBody()->getContents(), true); - - // Check for any errors in the transaction query - if (isset($transactionQueryData['errors']) && count($transactionQueryData['errors']) > 0) { - echo "Transaction Error: " . $transactionQueryData['errors'][0]['message'] . "\n"; - } else { - echo "Transaction Query Results:\n"; - print_r($transactionQueryData['data']); // Print transaction results - } - -} catch (RequestException $e) { - echo "Request Error: " . $e->getMessage() . "\n"; -} catch (Exception $e) { - echo "Error: " . $e->getMessage() . "\n"; -} diff --git a/src/Neo4jQueryAPI.php b/src/Neo4jQueryAPI.php index 77512eb2..078eadf1 100644 --- a/src/Neo4jQueryAPI.php +++ b/src/Neo4jQueryAPI.php @@ -43,7 +43,7 @@ public static function login(string $address, AuthenticateInterface $auth = null ], ]); - return new self($client, $auth ?? Authentication::basic()); + return new self($client, $auth ?? Authentication::fromEnvironment()); } /** @@ -52,6 +52,10 @@ public static function login(string $address, AuthenticateInterface $auth = null * @throws Neo4jException * @throws RequestExceptionInterface */ + + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function run(string $cypher, array $parameters = [], string $database = 'neo4j', Bookmarks $bookmark = null): ResultSet { try { @@ -156,9 +160,12 @@ private function handleException(RequestExceptionInterface $e): void throw $e; } + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function beginTransaction(string $database = 'neo4j'): Transaction { - $request = new Request('POST', '/db/neo4j/query/v2/tx'); + $request = new Request('POST', '/db/{$database}/query/v2/tx'); $request = $this->auth->authenticate($request); $request = $request->withHeader('Content-Type', 'application/json'); diff --git a/src/Objects/Authentication.php b/src/Objects/Authentication.php index e62d885c..95aadeee 100644 --- a/src/Objects/Authentication.php +++ b/src/Objects/Authentication.php @@ -15,6 +15,9 @@ public static function basic(string $username, string $password): AuthenticateIn return new BasicAuthentication($username, $password); } + /** + * @psalm-suppress PossiblyUnusedMethod + */ public static function fromEnvironment(): AuthenticateInterface { // Fetch credentials from environment variables @@ -25,12 +28,17 @@ public static function fromEnvironment(): AuthenticateInterface } - + /** + * @psalm-suppress PossiblyUnusedMethod + */ public static function noAuth(): AuthenticateInterface { return new NoAuth(); } + /** + * @psalm-suppress PossiblyUnusedMethod + */ public static function bearer(string $token): AuthenticateInterface { return new BearerAuthentication($token); diff --git a/src/Objects/ProfiledQueryPlan.php b/src/Objects/ProfiledQueryPlan.php index a32d314f..237e2aae 100644 --- a/src/Objects/ProfiledQueryPlan.php +++ b/src/Objects/ProfiledQueryPlan.php @@ -49,47 +49,68 @@ public function __construct( $this->children = $children ?? []; $this->identifiers = $identifiers; } - + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getDbHits(): int { return $this->dbHits; } - + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getRecords(): int { return $this->records; } + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function hasPageCacheStats(): bool { return $this->hasPageCacheStats; } - + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getPageCacheHits(): int { return $this->pageCacheHits; } + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getPageCacheMisses(): int { return $this->pageCacheMisses; } - + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getPageCacheHitRatio(): float { return $this->pageCacheHitRatio; } + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getTime(): int { return $this->time; } - + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getOperatorType(): string { return $this->operatorType; } - + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getArguments(): ProfiledQueryPlanArguments { return $this->arguments; @@ -98,6 +119,10 @@ public function getArguments(): ProfiledQueryPlanArguments /** * @return list */ + + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getChildren(): array { return $this->children; @@ -111,6 +136,9 @@ public function addChild(ProfiledQueryPlan|ProfiledQueryPlanArguments $child): v /** * @return string[] */ + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getIdentifiers(): array { return $this->identifiers; @@ -119,11 +147,17 @@ public function getIdentifiers(): array /** * @param string[] $identifiers */ + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function setIdentifiers(array $identifiers): void { $this->identifiers = $identifiers; } + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function addIdentifier(string $identifier): void { $this->identifiers[] = $identifier; diff --git a/src/Objects/ProfiledQueryPlanArguments.php b/src/Objects/ProfiledQueryPlanArguments.php index 6943116c..d3573f29 100644 --- a/src/Objects/ProfiledQueryPlanArguments.php +++ b/src/Objects/ProfiledQueryPlanArguments.php @@ -32,22 +32,31 @@ public function getGlobalMemory(): ?int { return $this->globalMemory; } - + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getPlannerImpl(): ?string { return $this->plannerImpl; } + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getMemory(): ?int { return $this->memory; } - + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getStringRepresentation(): ?string { return $this->stringRepresentation; } - + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getRuntime(): ?string { return $this->runtime; diff --git a/src/requestFactory.php b/src/requestFactory.php deleted file mode 100644 index 60d51d43..00000000 --- a/src/requestFactory.php +++ /dev/null @@ -1,67 +0,0 @@ -buildBeginTransactionRequest($database); - $beginTxResponse = $client->sendRequest($beginTxRequest); - $beginTxData = json_decode($beginTxResponse->getBody()->getContents(), true); - - // Extract the transaction ID - $transactionId = $beginTxData['transaction']['id'] ?? null; - if (!$transactionId) { - throw new RuntimeException("Transaction ID not found in response."); - } - - echo "Transaction ID: {$transactionId}" . PHP_EOL; - - $runQueryRequest = $requestFactory->buildRunQueryRequest($database, $cypher, $parameters); - $runQueryResponse = $client->sendRequest($runQueryRequest); - - $queryResults = json_decode($runQueryResponse->getBody()->getContents(), true); - echo "Query Results: " . json_encode($queryResults, JSON_PRETTY_PRINT) . PHP_EOL; - - // Step 3: Commit the transaction - $commitRequest = $requestFactory->buildCommitRequest($database, $transactionId); - $commitResponse = $client->sendRequest($commitRequest); - - echo "Transaction committed successfully!" . PHP_EOL; - - // Optional: Output commit response - echo "Commit Response: " . $commitResponse->getBody()->getContents() . PHP_EOL; - -} catch (Exception $e) { - echo "Error: " . $e->getMessage() . PHP_EOL; - - // Rollback the transaction in case of failure - if (isset($transactionId)) { - $rollbackRequest = $requestFactory->buildRollbackRequest($database, $transactionId); - $rollbackResponse = $client->sendRequest($rollbackRequest); - - echo "Transaction rolled back." . PHP_EOL; - echo "Rollback Response: " . $rollbackResponse->getBody()->getContents() . PHP_EOL; - } -} diff --git a/src/transaction_Script.php b/src/transaction_Script.php deleted file mode 100644 index b6b6b422..00000000 --- a/src/transaction_Script.php +++ /dev/null @@ -1,96 +0,0 @@ -post("{$neo4jAddress}/db/neo4j/tx", [ - 'headers' => [ - 'Authorization' => 'Basic ' . $credentials, - 'Content-Type' => 'application/json', - ] - ]); - - // Extract the transaction ID and cluster affinity from the response - $data = json_decode($response->getBody()->getContents(), true); - - // Check if the transaction was created and extract necessary values - if (isset($data['tx'])) { - $transactionId = $data['tx']['id']; - $clusterAffinity = $data['neo4j-cluster-affinity']; // Usually returned as part of response headers - - return [$transactionId, $clusterAffinity]; - } - - throw new Exception("Failed to start transaction or missing transaction ID in the response."); -} - -// Start the transaction and extract transactionId and clusterAffinity -list($transactionId, $clusterAffinity) = startTransaction($client, $neo4jAddress, $username, $password); - -// Create a new Transaction instance with the extracted values -$transaction = new Transaction($client, $clusterAffinity, $transactionId); - -// Function to run a Cypher query -function runQuery($transaction, $query, $parameters = []) -{ - try { - $results = $transaction->run($query, $parameters); - echo "Query Results:\n"; - foreach ($results->getRows() as $row) { - print_r($row->getData()); - } - } catch (Exception $e) { - echo "Error running query: " . $e->getMessage() . "\n"; - } -} - -// Function to commit the transaction -function commitTransaction($transaction) -{ - try { - $transaction->commit(); - echo "Transaction committed successfully.\n"; - } catch (Exception $e) { - echo "Error committing transaction: " . $e->getMessage() . "\n"; - } -} - -// Function to rollback the transaction -function rollbackTransaction($transaction) -{ - try { - $transaction->rollback(); - echo "Transaction rolled back successfully.\n"; - } catch (Exception $e) { - echo "Error rolling back transaction: " . $e->getMessage() . "\n"; - } -} - -// Example usage: running a query within the transaction -$query = "CREATE (n:Person {name: 'John Doe'}) RETURN n"; -runQuery($transaction, $query); - -// Now, let's commit the transaction -commitTransaction($transaction); - -// Running another query after commit to verify changes -$query = "MATCH (n:Person {name: 'John Doe'}) RETURN n"; -runQuery($transaction, $query); From 3819e23b6faf0dce3da47a4a80944a1df0a4cab6 Mon Sep 17 00:00:00 2001 From: Pratiksha Date: Tue, 11 Feb 2025 12:13:47 +0530 Subject: [PATCH 02/12] winp --- .github/workflows/psalm.yml | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 .github/workflows/psalm.yml diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml deleted file mode 100644 index 2b5fc1e5..00000000 --- a/.github/workflows/psalm.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Psalm Static Analysis - -on: - push: - branches: - - main - paths: - - '**/*.php' - pull_request: - paths: - - '**/*.php' - workflow_dispatch: - -jobs: - psalm: - name: Run Psalm - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.3 - tools: composer, psalm - - - name: Install dependencies - run: composer install --no-progress --prefer-dist - - - name: Run Psalm - run: vendor/bin/psalm --output-format=github From 9cfa4f5f8f965290cab341d967cf350347134510 Mon Sep 17 00:00:00 2001 From: Pratiksha Date: Tue, 11 Feb 2025 14:04:16 +0530 Subject: [PATCH 03/12] debug --- src/Neo4jQueryAPI.php | 7 +- src/Objects/ProfiledQueryPlanArguments.php | 79 ++++++++++++++++++---- src/Objects/ResultSet.php | 28 +++++--- 3 files changed, 88 insertions(+), 26 deletions(-) diff --git a/src/Neo4jQueryAPI.php b/src/Neo4jQueryAPI.php index 078eadf1..e267eacd 100644 --- a/src/Neo4jQueryAPI.php +++ b/src/Neo4jQueryAPI.php @@ -32,6 +32,9 @@ public function __construct(ClientInterface $client, AuthenticateInterface $auth /** * @throws \Exception */ + /** + * @psalm-suppress PossiblyUnusedMethod + */ public static function login(string $address, AuthenticateInterface $auth = null): self { $client = new Client([ @@ -163,9 +166,9 @@ private function handleException(RequestExceptionInterface $e): void /** * @psalm-suppress PossiblyUnusedMethod */ - public function beginTransaction(string $database = 'neo4j'): Transaction + public function beginTransaction(): Transaction { - $request = new Request('POST', '/db/{$database}/query/v2/tx'); + $request = new Request('POST', '/db/neo4j/query/v2/tx'); $request = $this->auth->authenticate($request); $request = $request->withHeader('Content-Type', 'application/json'); diff --git a/src/Objects/ProfiledQueryPlanArguments.php b/src/Objects/ProfiledQueryPlanArguments.php index d3573f29..08e1782f 100644 --- a/src/Objects/ProfiledQueryPlanArguments.php +++ b/src/Objects/ProfiledQueryPlanArguments.php @@ -5,33 +5,37 @@ class ProfiledQueryPlanArguments { public function __construct( - private readonly ?int $globalMemory = null, + private readonly ?int $globalMemory = null, private readonly ?string $plannerImpl = null, - private readonly ?int $memory = null, + private readonly ?int $memory = null, private readonly ?string $stringRepresentation = null, private readonly ?string $runtime = null, - private readonly ?int $time = null, - private readonly ?int $pageCacheMisses = null, - private readonly ?int $pageCacheHits = null, + private readonly ?int $time = null, + private readonly ?int $pageCacheMisses = null, + // private readonly ?int $pageCacheHits = null, private readonly ?string $runtimeImpl = null, - private readonly ?int $version = null, - private readonly ?int $dbHits = null, - private readonly ?int $batchSize = null, + private readonly ?int $version = null, + private readonly ?int $dbHits = null, + private readonly ?int $batchSize = null, private readonly ?string $details = null, private readonly ?string $plannerVersion = null, private readonly ?string $pipelineInfo = null, private readonly ?string $runtimeVersion = null, - private readonly ?int $id = null, - private readonly ?float $estimatedRows = null, + private readonly ?int $id = null, + private readonly ?float $estimatedRows = null, private readonly ?string $planner = null, - private readonly ?int $rows = null + private readonly ?int $rows = null ) { } + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getGlobalMemory(): ?int { return $this->globalMemory; } + /** * @psalm-suppress PossiblyUnusedMethod */ @@ -47,6 +51,7 @@ public function getMemory(): ?int { return $this->memory; } + /** * @psalm-suppress PossiblyUnusedMethod */ @@ -54,6 +59,7 @@ public function getStringRepresentation(): ?string { return $this->stringRepresentation; } + /** * @psalm-suppress PossiblyUnusedMethod */ @@ -62,76 +68,123 @@ public function getRuntime(): ?string return $this->runtime; } + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getTime(): ?int { return $this->time; } + /** + * @psalm-suppress PossiblyUnusedMethod + */ + public function getPageCacheMisses(): ?int { return $this->pageCacheMisses; } - private function getPageCacheHits(): ?int + /** + * @psalm-suppress PossiblyUnusedMethod + */ + /*private function getPageCacheHits(): ?int { return $this->pageCacheHits; - } + }*/ + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getRuntimeImpl(): ?string { return $this->runtimeImpl; } + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getVersion(): ?int { return $this->version; } + /** + * @psalm-suppress PossiblyUnusedMethod + */ + public function getDbHits(): ?int { return $this->dbHits; } + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getBatchSize(): ?int { return $this->batchSize; } + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getDetails(): ?string { return $this->details; } + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getPlannerVersion(): ?string { return $this->plannerVersion; } + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getPipelineInfo(): ?string { return $this->pipelineInfo; } + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getRuntimeVersion(): ?string { return $this->runtimeVersion; } + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getId(): ?int { return $this->id; } + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getEstimatedRows(): ?float { return $this->estimatedRows; } + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getPlanner(): ?string { return $this->planner; } + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getRows(): ?int { return $this->rows; diff --git a/src/Objects/ResultSet.php b/src/Objects/ResultSet.php index a511dd74..0f9e14cd 100644 --- a/src/Objects/ResultSet.php +++ b/src/Objects/ResultSet.php @@ -6,10 +6,12 @@ use Countable; use IteratorAggregate; use Neo4j\QueryAPI\Results\ResultRow; +use phpDocumentor\Reflection\DocBlock\Tags\Template; use Traversable; -// Make sure to include the Bookmarks class - +/** + * @template-implements IteratorAggregate + */ class ResultSet implements IteratorAggregate, Countable { /** @@ -20,7 +22,7 @@ public function __construct( private ResultCounters $counters, private Bookmarks $bookmarks, private ?ProfiledQueryPlan $profiledQueryPlan = null, - private ?ProfiledQueryPlanArguments $profiledQueryPlanArguments = null + // private ?ProfiledQueryPlanArguments $profiledQueryPlanArguments = null ) { } @@ -28,26 +30,30 @@ public function getIterator(): Traversable { return new ArrayIterator($this->rows); } + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getQueryCounters(): ?ResultCounters { return $this->counters; } - + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getProfiledQueryPlan(): ?ProfiledQueryPlan { return $this->profiledQueryPlan; } - - public function getChildQueryPlan(): ?ChildQueryPlan - { - return $this->childQueryPlan; - } - + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function count(): int { return count($this->rows); } - + /** + * @psalm-suppress PossiblyUnusedMethod + */ public function getBookmarks(): ?Bookmarks { return $this->bookmarks; From e8da25c63f83fd7cf1166a8531c46b464cd1c42f Mon Sep 17 00:00:00 2001 From: Pratiksha Date: Tue, 11 Feb 2025 17:27:59 +0530 Subject: [PATCH 04/12] DEBUG --- .github/workflows/psalm.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/psalm.yml diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml new file mode 100644 index 00000000..2b5fc1e5 --- /dev/null +++ b/.github/workflows/psalm.yml @@ -0,0 +1,33 @@ +name: Psalm Static Analysis + +on: + push: + branches: + - main + paths: + - '**/*.php' + pull_request: + paths: + - '**/*.php' + workflow_dispatch: + +jobs: + psalm: + name: Run Psalm + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8.3 + tools: composer, psalm + + - name: Install dependencies + run: composer install --no-progress --prefer-dist + + - name: Run Psalm + run: vendor/bin/psalm --output-format=github From b214ede5c1b306bafa683dca67eea3ab907b209f Mon Sep 17 00:00:00 2001 From: Pratiksha Date: Wed, 12 Feb 2025 10:40:07 +0530 Subject: [PATCH 05/12] DEBUG --- .github/workflows/psalm.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index 2b5fc1e5..277e6c4b 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -2,10 +2,6 @@ name: Psalm Static Analysis on: push: - branches: - - main - paths: - - '**/*.php' pull_request: paths: - '**/*.php' From 49299f811611f294d577b1e94585ba68b8dfca24 Mon Sep 17 00:00:00 2001 From: Pratiksha Date: Wed, 12 Feb 2025 11:28:55 +0530 Subject: [PATCH 06/12] DEBUG --- src/Neo4jRequestFactory.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Neo4jRequestFactory.php b/src/Neo4jRequestFactory.php index 7423f788..1d47b178 100644 --- a/src/Neo4jRequestFactory.php +++ b/src/Neo4jRequestFactory.php @@ -6,6 +6,7 @@ use Psr\Http\Message\StreamFactoryInterface; use Psr\Http\Message\RequestInterface; +/** @psalm-suppress UnusedClass */ class Neo4jRequestFactory { private string $baseUri; From bbef0cdf8c9b480134763f9a88ef4ecbf719fcd7 Mon Sep 17 00:00:00 2001 From: Pratiksha Date: Wed, 12 Feb 2025 11:31:40 +0530 Subject: [PATCH 07/12] DEBUG --- psalm.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/psalm.xml b/psalm.xml index 0d922c5c..75966d3e 100644 --- a/psalm.xml +++ b/psalm.xml @@ -14,9 +14,4 @@ - - - - - From cee188716222b30b71416c3dbfd1b5f0416c9b3e Mon Sep 17 00:00:00 2001 From: Pratiksha Date: Wed, 12 Feb 2025 11:47:20 +0530 Subject: [PATCH 08/12] DEBUG --- psalm.xml | 1 + tests/Integration/Neo4jOGMTest.php | 10 +++++----- tests/Integration/Neo4jQueryAPIIntegrationTest.php | 2 +- tests/Integration/Neo4jTransactionIntegrationTest.php | 2 +- tests/Unit/AuthenticationTest.php | 2 +- tests/Unit/Neo4jExceptionUnitTest.php | 2 +- tests/Unit/Neo4jQueryAPIUnitTest.php | 2 +- tests/Unit/Neo4jRequestFactoryTest.php | 2 +- tests/Unit/ResultRowTest.php | 4 ++-- 9 files changed, 14 insertions(+), 13 deletions(-) diff --git a/psalm.xml b/psalm.xml index 75966d3e..3060179f 100644 --- a/psalm.xml +++ b/psalm.xml @@ -10,6 +10,7 @@ > + diff --git a/tests/Integration/Neo4jOGMTest.php b/tests/Integration/Neo4jOGMTest.php index b8500a61..27604862 100644 --- a/tests/Integration/Neo4jOGMTest.php +++ b/tests/Integration/Neo4jOGMTest.php @@ -10,7 +10,7 @@ use Neo4j\QueryAPI\OGM; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; - +/** @psalm-suppress UnusedClass */ class Neo4jOGMTest extends TestCase { private OGM $ogm; @@ -374,7 +374,7 @@ public function testWithPath() $this->assertEquals('A', $path->getNodes()[0]->getProperties()['name']['_value']); $this->assertEquals('B', $path->getNodes()[1]->getProperties()['name']['_value']); } - + /** @psalm-suppress PossiblyUnusedParam */ #[DataProvider('integerDataProvider')] public function testWithInteger(string $query, array $parameters, int $expectedResult): void { $actual = $this->ogm->map([ @@ -387,7 +387,7 @@ public function testWithPath() - + /** @psalm-suppress PossiblyUnusedParam */ #[DataProvider('nullDataProvider')] public function testWithNull(string $query, array $parameters, ?string $expectedResult): void @@ -398,7 +398,7 @@ public function testWithNull(string $query, array $parameters, ?string $expected ]); $this->assertEquals($expectedResult, $actual); } - + /** @psalm-suppress PossiblyUnusedParam */ #[DataProvider('booleanDataProvider')] public function testWithBoolean(string $query, array $parameters, ?bool $expectedResult): void { @@ -408,7 +408,7 @@ public function testWithBoolean(string $query, array $parameters, ?bool $expecte ]); $this->assertEquals($expectedResult, $actual); } - + /** @psalm-suppress PossiblyUnusedParam */ #[DataProvider('stringDataProvider')] public function testWithString(string $query, array $parameters, ?string $expectedResult): void { diff --git a/tests/Integration/Neo4jQueryAPIIntegrationTest.php b/tests/Integration/Neo4jQueryAPIIntegrationTest.php index 88f49466..175d8130 100644 --- a/tests/Integration/Neo4jQueryAPIIntegrationTest.php +++ b/tests/Integration/Neo4jQueryAPIIntegrationTest.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestCase; use Neo4j\QueryAPI\Transaction; use Psr\Http\Client\RequestExceptionInterface; - +/** @psalm-suppress UnusedClass */ class Neo4jQueryAPIIntegrationTest extends TestCase { private Neo4jQueryAPI $api; diff --git a/tests/Integration/Neo4jTransactionIntegrationTest.php b/tests/Integration/Neo4jTransactionIntegrationTest.php index bc1f338f..26b3bbe7 100644 --- a/tests/Integration/Neo4jTransactionIntegrationTest.php +++ b/tests/Integration/Neo4jTransactionIntegrationTest.php @@ -7,7 +7,7 @@ use GuzzleHttp\Exception\GuzzleException; use Neo4j\QueryAPI\Neo4jQueryAPI; use PHPUnit\Framework\TestCase; - +/** @psalm-suppress UnusedClass */ class Neo4jTransactionIntegrationTest extends TestCase { private Neo4jQueryAPI $api; diff --git a/tests/Unit/AuthenticationTest.php b/tests/Unit/AuthenticationTest.php index acfa46bc..ef988117 100644 --- a/tests/Unit/AuthenticationTest.php +++ b/tests/Unit/AuthenticationTest.php @@ -4,7 +4,7 @@ use Neo4j\QueryAPI\Objects\Authentication; use PHPUnit\Framework\TestCase; - +/** @psalm-suppress UnusedClass */ class AuthenticationTest extends TestCase { public function testBearerToken(): void diff --git a/tests/Unit/Neo4jExceptionUnitTest.php b/tests/Unit/Neo4jExceptionUnitTest.php index 62d729ec..f6f2da3c 100644 --- a/tests/Unit/Neo4jExceptionUnitTest.php +++ b/tests/Unit/Neo4jExceptionUnitTest.php @@ -5,7 +5,7 @@ use Exception; use PHPUnit\Framework\TestCase; use Neo4j\QueryAPI\Exception\Neo4jException; - +/** @psalm-suppress UnusedClass */ class Neo4jExceptionUnitTest extends TestCase { /** diff --git a/tests/Unit/Neo4jQueryAPIUnitTest.php b/tests/Unit/Neo4jQueryAPIUnitTest.php index 8195a525..5b626f09 100644 --- a/tests/Unit/Neo4jQueryAPIUnitTest.php +++ b/tests/Unit/Neo4jQueryAPIUnitTest.php @@ -16,7 +16,7 @@ use Neo4j\QueryAPI\Results\ResultRow; use Neo4j\QueryAPI\AuthenticateInterface; use PHPUnit\Framework\TestCase; - +/** @psalm-suppress UnusedClass */ class Neo4jQueryAPIUnitTest extends TestCase { protected string $address; diff --git a/tests/Unit/Neo4jRequestFactoryTest.php b/tests/Unit/Neo4jRequestFactoryTest.php index f5a11e55..57072a5c 100644 --- a/tests/Unit/Neo4jRequestFactoryTest.php +++ b/tests/Unit/Neo4jRequestFactoryTest.php @@ -10,7 +10,7 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\Psr7\Utils; use Neo4j\QueryAPI\Neo4jRequestFactory; - +/** @psalm-suppress UnusedClass */ class Neo4jRequestFactoryTest extends TestCase { private $psr17Factory; diff --git a/tests/Unit/ResultRowTest.php b/tests/Unit/ResultRowTest.php index b3591eff..b245c3c7 100644 --- a/tests/Unit/ResultRowTest.php +++ b/tests/Unit/ResultRowTest.php @@ -6,7 +6,7 @@ use OutOfBoundsException; use BadMethodCallException; use PHPUnit\Framework\TestCase; - +/** @psalm-suppress UnusedClass */ class ResultRowTest extends TestCase { public function testArrayAccessGet(): void @@ -20,7 +20,7 @@ public function testArrayAccessGet(): void $this->assertEquals('Bob', $row['name']); $this->assertEquals(20, $row['age']); } - + /** @psalm-suppress UnusedVariable */ public function testArrayAccessInvalidKey(): void { $row = new ResultRow([ From 1bd5f8e79a5d8bf8ecb8539ea209f83327f04512 Mon Sep 17 00:00:00 2001 From: Pratiksha Date: Wed, 12 Feb 2025 12:22:58 +0530 Subject: [PATCH 09/12] DEBUG --- src/AuthenticateInterface.php | 4 +- src/BasicAuthentication.php | 4 +- src/BearerAuthentication.php | 12 ++- src/Neo4jQueryAPI.php | 16 ++-- src/Neo4jRequestFactory.php | 5 +- src/NoAuth.php | 15 +--- src/OGM.php | 4 +- src/Objects/Authentication.php | 17 ++-- src/Objects/Node.php | 4 + src/Objects/Path.php | 4 + src/Objects/Person.php | 3 + src/Objects/Point.php | 4 + src/Objects/ProfiledQueryPlan.php | 56 ++++-------- src/Objects/ProfiledQueryPlanArguments.php | 90 ++++++------------- src/Objects/Relationship.php | 4 + src/Objects/ResultSet.php | 23 ++--- src/Transaction.php | 4 +- tests/Integration/Neo4jOGMTest.php | 4 +- .../Neo4jQueryAPIIntegrationTest.php | 9 +- .../Neo4jTransactionIntegrationTest.php | 4 +- tests/Unit/AuthenticationTest.php | 4 +- tests/Unit/Neo4jExceptionUnitTest.php | 4 +- tests/Unit/Neo4jQueryAPIUnitTest.php | 4 +- tests/Unit/Neo4jRequestFactoryTest.php | 4 +- tests/Unit/ResultRowTest.php | 4 +- 25 files changed, 139 insertions(+), 167 deletions(-) diff --git a/src/AuthenticateInterface.php b/src/AuthenticateInterface.php index e036489d..22b17f36 100644 --- a/src/AuthenticateInterface.php +++ b/src/AuthenticateInterface.php @@ -3,7 +3,9 @@ namespace Neo4j\QueryAPI; use Psr\Http\Message\RequestInterface; - +/** + * @api + */ interface AuthenticateInterface { /** diff --git a/src/BasicAuthentication.php b/src/BasicAuthentication.php index 564a2960..d5cfd9bd 100644 --- a/src/BasicAuthentication.php +++ b/src/BasicAuthentication.php @@ -3,7 +3,9 @@ namespace Neo4j\QueryAPI; use Psr\Http\Message\RequestInterface; - +/** + * @api + */ class BasicAuthentication implements AuthenticateInterface { private string $username; diff --git a/src/BearerAuthentication.php b/src/BearerAuthentication.php index 6320539d..0ceebf19 100644 --- a/src/BearerAuthentication.php +++ b/src/BearerAuthentication.php @@ -3,7 +3,9 @@ namespace Neo4j\QueryAPI; use Psr\Http\Message\RequestInterface; - +/** + * @api + */ class BearerAuthentication implements AuthenticateInterface { public function __construct(private string $token) @@ -16,17 +18,13 @@ public function authenticate(RequestInterface $request): RequestInterface return $request->withHeader('Authorization', $authHeader); } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getHeader(): string { return 'Bearer ' . $this->token; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getType(): string { return 'Bearer'; diff --git a/src/Neo4jQueryAPI.php b/src/Neo4jQueryAPI.php index e267eacd..57c6684c 100644 --- a/src/Neo4jQueryAPI.php +++ b/src/Neo4jQueryAPI.php @@ -2,6 +2,7 @@ namespace Neo4j\QueryAPI; +use Exception; use GuzzleHttp\Client; use GuzzleHttp\Psr7\Request; use GuzzleHttp\Psr7\Utils; @@ -18,6 +19,9 @@ use RuntimeException; use stdClass; +/** + * @api + */ class Neo4jQueryAPI { private ClientInterface $client; @@ -30,10 +34,10 @@ public function __construct(ClientInterface $client, AuthenticateInterface $auth } /** - * @throws \Exception + * @throws Exception */ /** - * @psalm-suppress PossiblyUnusedMethod + * @api */ public static function login(string $address, AuthenticateInterface $auth = null): self { @@ -55,10 +59,6 @@ public static function login(string $address, AuthenticateInterface $auth = null * @throws Neo4jException * @throws RequestExceptionInterface */ - - /** - * @psalm-suppress PossiblyUnusedMethod - */ public function run(string $cypher, array $parameters = [], string $database = 'neo4j', Bookmarks $bookmark = null): ResultSet { try { @@ -163,9 +163,7 @@ private function handleException(RequestExceptionInterface $e): void throw $e; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function beginTransaction(): Transaction { $request = new Request('POST', '/db/neo4j/query/v2/tx'); diff --git a/src/Neo4jRequestFactory.php b/src/Neo4jRequestFactory.php index 1d47b178..f359c57a 100644 --- a/src/Neo4jRequestFactory.php +++ b/src/Neo4jRequestFactory.php @@ -5,8 +5,9 @@ use Psr\Http\Message\RequestFactoryInterface; use Psr\Http\Message\StreamFactoryInterface; use Psr\Http\Message\RequestInterface; - -/** @psalm-suppress UnusedClass */ +/** + * @api + */ class Neo4jRequestFactory { private string $baseUri; diff --git a/src/NoAuth.php b/src/NoAuth.php index 0444ef49..280089f9 100644 --- a/src/NoAuth.php +++ b/src/NoAuth.php @@ -4,6 +4,9 @@ use Psr\Http\Message\RequestInterface; +/** + * @api + */ class NoAuth implements AuthenticateInterface { public function authenticate(RequestInterface $request): RequestInterface @@ -12,15 +15,3 @@ public function authenticate(RequestInterface $request): RequestInterface } } -/* -namespace Neo4j\QueryAPI; - -use Psr\Http\Message\RequestInterface; - -class NoAuth implements AuthenticateInterface -{ - public function authenticate(RequestInterface $request): RequestInterface - { - return $request; - } -}*/ diff --git a/src/OGM.php b/src/OGM.php index 0e2afc7c..ed50d724 100644 --- a/src/OGM.php +++ b/src/OGM.php @@ -6,7 +6,9 @@ use Neo4j\QueryAPI\Objects\Node; use Neo4j\QueryAPI\Objects\Relationship; use Neo4j\QueryAPI\Objects\Path; - +/** + * @api + */ class OGM { /** diff --git a/src/Objects/Authentication.php b/src/Objects/Authentication.php index 95aadeee..65943f0c 100644 --- a/src/Objects/Authentication.php +++ b/src/Objects/Authentication.php @@ -7,7 +7,9 @@ use Neo4j\QueryAPI\BasicAuthentication; use Neo4j\QueryAPI\BearerAuthentication; use Neo4j\QueryAPI\NoAuth; - +/** + * @api + */ class Authentication { public static function basic(string $username, string $password): AuthenticateInterface @@ -15,12 +17,9 @@ public static function basic(string $username, string $password): AuthenticateIn return new BasicAuthentication($username, $password); } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public static function fromEnvironment(): AuthenticateInterface { - // Fetch credentials from environment variables $username = getenv("NEO4J_USERNAME") ?: ''; $password = getenv("NEO4J_PASSWORD") ?: ''; @@ -28,17 +27,13 @@ public static function fromEnvironment(): AuthenticateInterface } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public static function noAuth(): AuthenticateInterface { return new NoAuth(); } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public static function bearer(string $token): AuthenticateInterface { return new BearerAuthentication($token); diff --git a/src/Objects/Node.php b/src/Objects/Node.php index 690b51d2..4fe6e844 100644 --- a/src/Objects/Node.php +++ b/src/Objects/Node.php @@ -5,6 +5,10 @@ /** * Represents a Neo4j Node with labels and properties. */ + +/** + * @api + */ class Node { /** diff --git a/src/Objects/Path.php b/src/Objects/Path.php index 8fd71265..2d15c2af 100644 --- a/src/Objects/Path.php +++ b/src/Objects/Path.php @@ -5,6 +5,10 @@ /** * Represents a path in a Neo4j graph, consisting of nodes and relationships. */ + +/** + * @api + */ class Path { /** diff --git a/src/Objects/Person.php b/src/Objects/Person.php index 3776e646..55d6444f 100644 --- a/src/Objects/Person.php +++ b/src/Objects/Person.php @@ -6,6 +6,9 @@ * @psalm-suppress UnusedClass * Represents a Person node in the Neo4j graph. */ +/** + * @api + */ class Person extends Node { /** diff --git a/src/Objects/Point.php b/src/Objects/Point.php index 9e4b2018..847f28d0 100644 --- a/src/Objects/Point.php +++ b/src/Objects/Point.php @@ -5,6 +5,10 @@ /** * Represents a point with x, y, z coordinates, and SRID (Spatial Reference System Identifier). */ +/** + * @api + */ + class Point { /** diff --git a/src/Objects/ProfiledQueryPlan.php b/src/Objects/ProfiledQueryPlan.php index 237e2aae..5092fe9b 100644 --- a/src/Objects/ProfiledQueryPlan.php +++ b/src/Objects/ProfiledQueryPlan.php @@ -1,7 +1,9 @@ children = $children ?? []; $this->identifiers = $identifiers; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getDbHits(): int { return $this->dbHits; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getRecords(): int { return $this->records; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function hasPageCacheStats(): bool { return $this->hasPageCacheStats; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getPageCacheHits(): int { return $this->pageCacheHits; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getPageCacheMisses(): int { return $this->pageCacheMisses; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getPageCacheHitRatio(): float { return $this->pageCacheHitRatio; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getTime(): int { return $this->time; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getOperatorType(): string { return $this->operatorType; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getArguments(): ProfiledQueryPlanArguments { return $this->arguments; @@ -120,9 +104,7 @@ public function getArguments(): ProfiledQueryPlanArguments * @return list */ - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getChildren(): array { return $this->children; @@ -136,9 +118,7 @@ public function addChild(ProfiledQueryPlan|ProfiledQueryPlanArguments $child): v /** * @return string[] */ - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getIdentifiers(): array { return $this->identifiers; @@ -147,17 +127,13 @@ public function getIdentifiers(): array /** * @param string[] $identifiers */ - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function setIdentifiers(array $identifiers): void { $this->identifiers = $identifiers; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function addIdentifier(string $identifier): void { $this->identifiers[] = $identifier; diff --git a/src/Objects/ProfiledQueryPlanArguments.php b/src/Objects/ProfiledQueryPlanArguments.php index 08e1782f..238668e1 100644 --- a/src/Objects/ProfiledQueryPlanArguments.php +++ b/src/Objects/ProfiledQueryPlanArguments.php @@ -1,7 +1,9 @@ globalMemory; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getPlannerImpl(): ?string { return $this->plannerImpl; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getMemory(): ?int { return $this->memory; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getStringRepresentation(): ?string { return $this->stringRepresentation; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getRuntime(): ?string { return $this->runtime; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getTime(): ?int { return $this->time; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getPageCacheMisses(): ?int { return $this->pageCacheMisses; } - /** - * @psalm-suppress PossiblyUnusedMethod + * @api */ - /*private function getPageCacheHits(): ?int + + private function getPageCacheHits(): ?int { return $this->pageCacheHits; - }*/ + } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getRuntimeImpl(): ?string { return $this->runtimeImpl; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getVersion(): ?int { return $this->version; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getDbHits(): ?int { return $this->dbHits; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getBatchSize(): ?int { return $this->batchSize; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getDetails(): ?string { return $this->details; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getPlannerVersion(): ?string { return $this->plannerVersion; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getPipelineInfo(): ?string { return $this->pipelineInfo; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getRuntimeVersion(): ?string { return $this->runtimeVersion; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getId(): ?int { return $this->id; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getEstimatedRows(): ?float { return $this->estimatedRows; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getPlanner(): ?string { return $this->planner; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getRows(): ?int { return $this->rows; diff --git a/src/Objects/Relationship.php b/src/Objects/Relationship.php index ead33d7f..156e3116 100644 --- a/src/Objects/Relationship.php +++ b/src/Objects/Relationship.php @@ -5,6 +5,10 @@ /** * Represents a relationship in a Neo4j graph, with a type and associated properties. */ + +/** + * @api + */ class Relationship { /** diff --git a/src/Objects/ResultSet.php b/src/Objects/ResultSet.php index 0f9e14cd..9bd43d8e 100644 --- a/src/Objects/ResultSet.php +++ b/src/Objects/ResultSet.php @@ -12,6 +12,15 @@ /** * @template-implements IteratorAggregate */ + +/** + * @api + */ +/** + * @template TKey + * @template TValue + * @implements IteratorAggregate + */ class ResultSet implements IteratorAggregate, Countable { /** @@ -30,30 +39,24 @@ public function getIterator(): Traversable { return new ArrayIterator($this->rows); } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getQueryCounters(): ?ResultCounters { return $this->counters; } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getProfiledQueryPlan(): ?ProfiledQueryPlan { return $this->profiledQueryPlan; } /** - * @psalm-suppress PossiblyUnusedMethod + * @api */ public function count(): int { return count($this->rows); } - /** - * @psalm-suppress PossiblyUnusedMethod - */ + public function getBookmarks(): ?Bookmarks { return $this->bookmarks; diff --git a/src/Transaction.php b/src/Transaction.php index 46af85be..7d66b662 100644 --- a/src/Transaction.php +++ b/src/Transaction.php @@ -10,7 +10,9 @@ use Neo4j\QueryAPI\Results\ResultRow; use Psr\Http\Client\ClientInterface; use stdClass; - +/** + * @api + */ class Transaction { public function __construct( diff --git a/tests/Integration/Neo4jOGMTest.php b/tests/Integration/Neo4jOGMTest.php index 27604862..c8a6f282 100644 --- a/tests/Integration/Neo4jOGMTest.php +++ b/tests/Integration/Neo4jOGMTest.php @@ -10,7 +10,9 @@ use Neo4j\QueryAPI\OGM; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; -/** @psalm-suppress UnusedClass */ +/** + * @api + */ class Neo4jOGMTest extends TestCase { private OGM $ogm; diff --git a/tests/Integration/Neo4jQueryAPIIntegrationTest.php b/tests/Integration/Neo4jQueryAPIIntegrationTest.php index 175d8130..37b2080d 100644 --- a/tests/Integration/Neo4jQueryAPIIntegrationTest.php +++ b/tests/Integration/Neo4jQueryAPIIntegrationTest.php @@ -20,11 +20,16 @@ use PHPUnit\Framework\TestCase; use Neo4j\QueryAPI\Transaction; use Psr\Http\Client\RequestExceptionInterface; -/** @psalm-suppress UnusedClass */ +/** + * @api + */ class Neo4jQueryAPIIntegrationTest extends TestCase { private Neo4jQueryAPI $api; - + /** + * @api + */ + /** @psalm-suppress UnusedProperty */ private Neo4jRequestFactory $request ; /** * @throws GuzzleException diff --git a/tests/Integration/Neo4jTransactionIntegrationTest.php b/tests/Integration/Neo4jTransactionIntegrationTest.php index 26b3bbe7..4c423b29 100644 --- a/tests/Integration/Neo4jTransactionIntegrationTest.php +++ b/tests/Integration/Neo4jTransactionIntegrationTest.php @@ -7,7 +7,9 @@ use GuzzleHttp\Exception\GuzzleException; use Neo4j\QueryAPI\Neo4jQueryAPI; use PHPUnit\Framework\TestCase; -/** @psalm-suppress UnusedClass */ +/** + * @api + */ class Neo4jTransactionIntegrationTest extends TestCase { private Neo4jQueryAPI $api; diff --git a/tests/Unit/AuthenticationTest.php b/tests/Unit/AuthenticationTest.php index ef988117..a12081f8 100644 --- a/tests/Unit/AuthenticationTest.php +++ b/tests/Unit/AuthenticationTest.php @@ -4,7 +4,9 @@ use Neo4j\QueryAPI\Objects\Authentication; use PHPUnit\Framework\TestCase; -/** @psalm-suppress UnusedClass */ +/** + * @api + */ class AuthenticationTest extends TestCase { public function testBearerToken(): void diff --git a/tests/Unit/Neo4jExceptionUnitTest.php b/tests/Unit/Neo4jExceptionUnitTest.php index f6f2da3c..48e51813 100644 --- a/tests/Unit/Neo4jExceptionUnitTest.php +++ b/tests/Unit/Neo4jExceptionUnitTest.php @@ -5,7 +5,9 @@ use Exception; use PHPUnit\Framework\TestCase; use Neo4j\QueryAPI\Exception\Neo4jException; -/** @psalm-suppress UnusedClass */ +/** + * @api + */ class Neo4jExceptionUnitTest extends TestCase { /** diff --git a/tests/Unit/Neo4jQueryAPIUnitTest.php b/tests/Unit/Neo4jQueryAPIUnitTest.php index 5b626f09..90b8a22c 100644 --- a/tests/Unit/Neo4jQueryAPIUnitTest.php +++ b/tests/Unit/Neo4jQueryAPIUnitTest.php @@ -16,7 +16,9 @@ use Neo4j\QueryAPI\Results\ResultRow; use Neo4j\QueryAPI\AuthenticateInterface; use PHPUnit\Framework\TestCase; -/** @psalm-suppress UnusedClass */ +/** + * @api + */ class Neo4jQueryAPIUnitTest extends TestCase { protected string $address; diff --git a/tests/Unit/Neo4jRequestFactoryTest.php b/tests/Unit/Neo4jRequestFactoryTest.php index 57072a5c..c0b658af 100644 --- a/tests/Unit/Neo4jRequestFactoryTest.php +++ b/tests/Unit/Neo4jRequestFactoryTest.php @@ -10,7 +10,9 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\Psr7\Utils; use Neo4j\QueryAPI\Neo4jRequestFactory; -/** @psalm-suppress UnusedClass */ +/** + * @api + */ class Neo4jRequestFactoryTest extends TestCase { private $psr17Factory; diff --git a/tests/Unit/ResultRowTest.php b/tests/Unit/ResultRowTest.php index b245c3c7..c2fceb58 100644 --- a/tests/Unit/ResultRowTest.php +++ b/tests/Unit/ResultRowTest.php @@ -6,7 +6,9 @@ use OutOfBoundsException; use BadMethodCallException; use PHPUnit\Framework\TestCase; -/** @psalm-suppress UnusedClass */ +/** + * @api + */ class ResultRowTest extends TestCase { public function testArrayAccessGet(): void From 1af67bafec782b0322c8b9be63bfd353ef171219 Mon Sep 17 00:00:00 2001 From: Pratiksha Date: Wed, 12 Feb 2025 12:37:22 +0530 Subject: [PATCH 10/12] DEBUG --- src/AuthenticateInterface.php | 1 + src/BasicAuthentication.php | 2 +- src/BearerAuthentication.php | 5 ++- src/Neo4jQueryAPI.php | 2 +- src/Neo4jRequestFactory.php | 1 + src/NoAuth.php | 1 - src/OGM.php | 5 ++- src/Objects/Authentication.php | 7 ++-- src/Objects/Person.php | 1 - src/Objects/ProfiledQueryPlan.php | 29 +++++++------- src/Objects/ProfiledQueryPlanArguments.php | 39 ++++++++++--------- src/Objects/ResultSet.php | 9 +++-- src/Transaction.php | 1 + tests/Integration/Neo4jOGMTest.php | 1 + .../Neo4jQueryAPIIntegrationTest.php | 12 +----- .../Neo4jTransactionIntegrationTest.php | 8 +--- tests/Unit/AuthenticationTest.php | 5 +-- tests/Unit/Neo4jExceptionUnitTest.php | 3 +- tests/Unit/Neo4jQueryAPIUnitTest.php | 1 + tests/Unit/Neo4jRequestFactoryTest.php | 7 +--- tests/Unit/ResultRowTest.php | 1 + 21 files changed, 66 insertions(+), 75 deletions(-) diff --git a/src/AuthenticateInterface.php b/src/AuthenticateInterface.php index 22b17f36..54595181 100644 --- a/src/AuthenticateInterface.php +++ b/src/AuthenticateInterface.php @@ -3,6 +3,7 @@ namespace Neo4j\QueryAPI; use Psr\Http\Message\RequestInterface; + /** * @api */ diff --git a/src/BasicAuthentication.php b/src/BasicAuthentication.php index d5cfd9bd..77fbea89 100644 --- a/src/BasicAuthentication.php +++ b/src/BasicAuthentication.php @@ -3,6 +3,7 @@ namespace Neo4j\QueryAPI; use Psr\Http\Message\RequestInterface; + /** * @api */ @@ -13,7 +14,6 @@ class BasicAuthentication implements AuthenticateInterface public function __construct(?string $username = null, ?string $password = null) { - // Use provided values or fallback to environment variables $this->username = $username ?? getenv("NEO4J_USERNAME") ?: ''; $this->password = $password ?? getenv("NEO4J_PASSWORD") ?: ''; } diff --git a/src/BearerAuthentication.php b/src/BearerAuthentication.php index 0ceebf19..d92e46d0 100644 --- a/src/BearerAuthentication.php +++ b/src/BearerAuthentication.php @@ -3,6 +3,7 @@ namespace Neo4j\QueryAPI; use Psr\Http\Message\RequestInterface; + /** * @api */ @@ -18,13 +19,13 @@ public function authenticate(RequestInterface $request): RequestInterface return $request->withHeader('Authorization', $authHeader); } - + public function getHeader(): string { return 'Bearer ' . $this->token; } - + public function getType(): string { return 'Bearer'; diff --git a/src/Neo4jQueryAPI.php b/src/Neo4jQueryAPI.php index 57c6684c..20c480b3 100644 --- a/src/Neo4jQueryAPI.php +++ b/src/Neo4jQueryAPI.php @@ -163,7 +163,7 @@ private function handleException(RequestExceptionInterface $e): void throw $e; } - + public function beginTransaction(): Transaction { $request = new Request('POST', '/db/neo4j/query/v2/tx'); diff --git a/src/Neo4jRequestFactory.php b/src/Neo4jRequestFactory.php index f359c57a..38938439 100644 --- a/src/Neo4jRequestFactory.php +++ b/src/Neo4jRequestFactory.php @@ -5,6 +5,7 @@ use Psr\Http\Message\RequestFactoryInterface; use Psr\Http\Message\StreamFactoryInterface; use Psr\Http\Message\RequestInterface; + /** * @api */ diff --git a/src/NoAuth.php b/src/NoAuth.php index 280089f9..3cf59d50 100644 --- a/src/NoAuth.php +++ b/src/NoAuth.php @@ -14,4 +14,3 @@ public function authenticate(RequestInterface $request): RequestInterface return $request; } } - diff --git a/src/OGM.php b/src/OGM.php index ed50d724..bcc05b95 100644 --- a/src/OGM.php +++ b/src/OGM.php @@ -6,6 +6,7 @@ use Neo4j\QueryAPI\Objects\Node; use Neo4j\QueryAPI\Objects\Relationship; use Neo4j\QueryAPI\Objects\Path; + /** * @api */ @@ -23,8 +24,8 @@ public function map(array $object): mixed 'String' => $object['_value'], 'Boolean' => $object['_value'], 'Null' => $object['_value'], - 'Array' => $object['_value'], // Handle generic arrays - 'List' => array_map([$this, 'map'], $object['_value']), // Recursively map lists + 'Array' => $object['_value'], + 'List' => array_map([$this, 'map'], $object['_value']), 'Duration' => $object['_value'], 'OffsetDateTime' => $object['_value'], 'Node' => $this->mapNode($object['_value']), diff --git a/src/Objects/Authentication.php b/src/Objects/Authentication.php index 65943f0c..e9347ceb 100644 --- a/src/Objects/Authentication.php +++ b/src/Objects/Authentication.php @@ -7,6 +7,7 @@ use Neo4j\QueryAPI\BasicAuthentication; use Neo4j\QueryAPI\BearerAuthentication; use Neo4j\QueryAPI\NoAuth; + /** * @api */ @@ -17,7 +18,7 @@ public static function basic(string $username, string $password): AuthenticateIn return new BasicAuthentication($username, $password); } - + public static function fromEnvironment(): AuthenticateInterface { $username = getenv("NEO4J_USERNAME") ?: ''; @@ -27,13 +28,13 @@ public static function fromEnvironment(): AuthenticateInterface } - + public static function noAuth(): AuthenticateInterface { return new NoAuth(); } - + public static function bearer(string $token): AuthenticateInterface { return new BearerAuthentication($token); diff --git a/src/Objects/Person.php b/src/Objects/Person.php index 55d6444f..b1f04313 100644 --- a/src/Objects/Person.php +++ b/src/Objects/Person.php @@ -18,7 +18,6 @@ class Person extends Node */ public function __construct(array $properties) { - // Pass the label 'Person' along with the properties to the parent Node constructor. parent::__construct(['Person'], $properties); } } diff --git a/src/Objects/ProfiledQueryPlan.php b/src/Objects/ProfiledQueryPlan.php index 5092fe9b..c2d018e1 100644 --- a/src/Objects/ProfiledQueryPlan.php +++ b/src/Objects/ProfiledQueryPlan.php @@ -1,6 +1,7 @@ dbHits = $dbHits ?? 0; $this->records = $records ?? 0; @@ -51,50 +52,50 @@ public function __construct( $this->children = $children ?? []; $this->identifiers = $identifiers; } - + public function getDbHits(): int { return $this->dbHits; } - + public function getRecords(): int { return $this->records; } - + public function hasPageCacheStats(): bool { return $this->hasPageCacheStats; } - + public function getPageCacheHits(): int { return $this->pageCacheHits; } - + public function getPageCacheMisses(): int { return $this->pageCacheMisses; } - + public function getPageCacheHitRatio(): float { return $this->pageCacheHitRatio; } - + public function getTime(): int { return $this->time; } - + public function getOperatorType(): string { return $this->operatorType; } - + public function getArguments(): ProfiledQueryPlanArguments { return $this->arguments; @@ -104,7 +105,7 @@ public function getArguments(): ProfiledQueryPlanArguments * @return list */ - + public function getChildren(): array { return $this->children; @@ -118,7 +119,7 @@ public function addChild(ProfiledQueryPlan|ProfiledQueryPlanArguments $child): v /** * @return string[] */ - + public function getIdentifiers(): array { return $this->identifiers; @@ -127,13 +128,13 @@ public function getIdentifiers(): array /** * @param string[] $identifiers */ - + public function setIdentifiers(array $identifiers): void { $this->identifiers = $identifiers; } - + public function addIdentifier(string $identifier): void { $this->identifiers[] = $identifier; diff --git a/src/Objects/ProfiledQueryPlanArguments.php b/src/Objects/ProfiledQueryPlanArguments.php index 238668e1..10c05dc6 100644 --- a/src/Objects/ProfiledQueryPlanArguments.php +++ b/src/Objects/ProfiledQueryPlanArguments.php @@ -1,6 +1,7 @@ globalMemory; } - + public function getPlannerImpl(): ?string { return $this->plannerImpl; } - + public function getMemory(): ?int { return $this->memory; } - + public function getStringRepresentation(): ?string { return $this->stringRepresentation; } - + public function getRuntime(): ?string { return $this->runtime; } - + public function getTime(): ?int { return $this->time; } - + public function getPageCacheMisses(): ?int { @@ -75,80 +76,80 @@ public function getPageCacheMisses(): ?int /** * @api */ - + private function getPageCacheHits(): ?int { return $this->pageCacheHits; } - + public function getRuntimeImpl(): ?string { return $this->runtimeImpl; } - + public function getVersion(): ?int { return $this->version; } - + public function getDbHits(): ?int { return $this->dbHits; } - + public function getBatchSize(): ?int { return $this->batchSize; } - + public function getDetails(): ?string { return $this->details; } - + public function getPlannerVersion(): ?string { return $this->plannerVersion; } - + public function getPipelineInfo(): ?string { return $this->pipelineInfo; } - + public function getRuntimeVersion(): ?string { return $this->runtimeVersion; } - + public function getId(): ?int { return $this->id; } - + public function getEstimatedRows(): ?float { return $this->estimatedRows; } - + public function getPlanner(): ?string { return $this->planner; } - + public function getRows(): ?int { return $this->rows; diff --git a/src/Objects/ResultSet.php b/src/Objects/ResultSet.php index 9bd43d8e..51ef298a 100644 --- a/src/Objects/ResultSet.php +++ b/src/Objects/ResultSet.php @@ -26,12 +26,13 @@ class ResultSet implements IteratorAggregate, Countable /** * @param list $rows */ + public function __construct( private readonly array $rows, private ResultCounters $counters, private Bookmarks $bookmarks, private ?ProfiledQueryPlan $profiledQueryPlan = null, - // private ?ProfiledQueryPlanArguments $profiledQueryPlanArguments = null + // private ?ProfiledQueryPlanArguments $profiledQueryPlanArguments = null ) { } @@ -39,12 +40,12 @@ public function getIterator(): Traversable { return new ArrayIterator($this->rows); } - + public function getQueryCounters(): ?ResultCounters { return $this->counters; } - + public function getProfiledQueryPlan(): ?ProfiledQueryPlan { return $this->profiledQueryPlan; @@ -56,7 +57,7 @@ public function count(): int { return count($this->rows); } - + public function getBookmarks(): ?Bookmarks { return $this->bookmarks; diff --git a/src/Transaction.php b/src/Transaction.php index 7d66b662..bc13b3c9 100644 --- a/src/Transaction.php +++ b/src/Transaction.php @@ -10,6 +10,7 @@ use Neo4j\QueryAPI\Results\ResultRow; use Psr\Http\Client\ClientInterface; use stdClass; + /** * @api */ diff --git a/tests/Integration/Neo4jOGMTest.php b/tests/Integration/Neo4jOGMTest.php index c8a6f282..a1ff0dc2 100644 --- a/tests/Integration/Neo4jOGMTest.php +++ b/tests/Integration/Neo4jOGMTest.php @@ -10,6 +10,7 @@ use Neo4j\QueryAPI\OGM; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; + /** * @api */ diff --git a/tests/Integration/Neo4jQueryAPIIntegrationTest.php b/tests/Integration/Neo4jQueryAPIIntegrationTest.php index 37b2080d..1056947d 100644 --- a/tests/Integration/Neo4jQueryAPIIntegrationTest.php +++ b/tests/Integration/Neo4jQueryAPIIntegrationTest.php @@ -20,6 +20,7 @@ use PHPUnit\Framework\TestCase; use Neo4j\QueryAPI\Transaction; use Psr\Http\Client\RequestExceptionInterface; + /** * @api */ @@ -38,7 +39,6 @@ public function setUp(): void { $this->api = $this->initializeApi(); - // Clear database and populate test data $this->clearDatabase(); $this->populateTestData(); } @@ -87,7 +87,6 @@ public function testProfileExistence(): void public function testProfileCreateQueryExistence(): void { - // Define the CREATE query $query = " PROFILE UNWIND range(1, 100) AS i CREATE (:Person { @@ -190,22 +189,13 @@ public function testProfileCreateKnowsBidirectionalRelationshipsMock(): void $handler = HandlerStack::create($mockSack); $client = new Client(['handler' => $handler]); - // Use environment variables for authentication $auth = Authentication::basic(getenv("NEO4J_USERNAME"), getenv("NEO4J_PASSWORD")); - - // Pass both client and authentication to Neo4jQueryAPI $api = new Neo4jQueryAPI($client, $auth); - - // Execute the query $result = $api->run($query); $plan = $result->getProfiledQueryPlan(); $this->assertNotNull($plan, "The result of the query should not be null."); - - // Load expected data $expected = require __DIR__ . '/../resources/expected/complex-query-profile.php'; - - // Assert the profiled query plan matches the expected result $this->assertEquals($expected->getProfiledQueryPlan(), $plan, "Profiled query plan does not match the expected value."); } diff --git a/tests/Integration/Neo4jTransactionIntegrationTest.php b/tests/Integration/Neo4jTransactionIntegrationTest.php index 4c423b29..ea59afcd 100644 --- a/tests/Integration/Neo4jTransactionIntegrationTest.php +++ b/tests/Integration/Neo4jTransactionIntegrationTest.php @@ -7,6 +7,7 @@ use GuzzleHttp\Exception\GuzzleException; use Neo4j\QueryAPI\Neo4jQueryAPI; use PHPUnit\Framework\TestCase; + /** * @api */ @@ -55,27 +56,20 @@ private function populateTestData(): void } public function testTransactionCommit(): void { - // Begin a new transaction $tsx = $this->api->beginTransaction(); - // Generate a random name for the node $name = (string)mt_rand(1, 100000); - // Create a node within the transaction $tsx->run("CREATE (x:Human {name: \$name})", ['name' => $name]); - // Validate that the node does not exist in the database before the transaction is committed $results = $this->api->run("MATCH (x:Human {name: \$name}) RETURN x", ['name' => $name]); $this->assertCount(0, $results); - // Validate that the node exists within the transaction $results = $tsx->run("MATCH (x:Human {name: \$name}) RETURN x", ['name' => $name]); $this->assertCount(1, $results); - // Commit the transaction $tsx->commit(); - // Validate that the node now exists in the database $results = $this->api->run("MATCH (x:Human {name: \$name}) RETURN x", ['name' => $name]); $this->assertCount(1, $results); // Updated to expect 1 result } diff --git a/tests/Unit/AuthenticationTest.php b/tests/Unit/AuthenticationTest.php index a12081f8..6151cd85 100644 --- a/tests/Unit/AuthenticationTest.php +++ b/tests/Unit/AuthenticationTest.php @@ -4,6 +4,7 @@ use Neo4j\QueryAPI\Objects\Authentication; use PHPUnit\Framework\TestCase; + /** * @api */ @@ -11,13 +12,11 @@ class AuthenticationTest extends TestCase { public function testBearerToken(): void { - // Mock Bearer token $mockToken = 'mocked_bearer_token'; - // Use the Authentication::bearer method to get the Bearer authentication instance + $auth = Authentication::bearer($mockToken); - // Assert: Ensure correct header and type for Bearer token $this->assertEquals("Bearer $mockToken", $auth->getHeader(), 'Bearer token mismatch.'); $this->assertEquals('Bearer', $auth->getType(), 'Type should be Bearer.'); } diff --git a/tests/Unit/Neo4jExceptionUnitTest.php b/tests/Unit/Neo4jExceptionUnitTest.php index 48e51813..01969b02 100644 --- a/tests/Unit/Neo4jExceptionUnitTest.php +++ b/tests/Unit/Neo4jExceptionUnitTest.php @@ -5,6 +5,7 @@ use Exception; use PHPUnit\Framework\TestCase; use Neo4j\QueryAPI\Exception\Neo4jException; + /** * @api */ @@ -28,7 +29,7 @@ public function testConstructor(): void $this->assertSame('Statement', $exception->getSubType()); $this->assertSame('SyntaxError', $exception->getName()); $this->assertSame('Invalid syntax near ...', $exception->getMessage()); - $this->assertSame(0, $exception->getCode()); // Default statusCode to 0 + $this->assertSame(0, $exception->getCode()); } /** diff --git a/tests/Unit/Neo4jQueryAPIUnitTest.php b/tests/Unit/Neo4jQueryAPIUnitTest.php index 90b8a22c..f0b5e310 100644 --- a/tests/Unit/Neo4jQueryAPIUnitTest.php +++ b/tests/Unit/Neo4jQueryAPIUnitTest.php @@ -16,6 +16,7 @@ use Neo4j\QueryAPI\Results\ResultRow; use Neo4j\QueryAPI\AuthenticateInterface; use PHPUnit\Framework\TestCase; + /** * @api */ diff --git a/tests/Unit/Neo4jRequestFactoryTest.php b/tests/Unit/Neo4jRequestFactoryTest.php index c0b658af..83ab4b8e 100644 --- a/tests/Unit/Neo4jRequestFactoryTest.php +++ b/tests/Unit/Neo4jRequestFactoryTest.php @@ -10,6 +10,7 @@ use GuzzleHttp\Psr7\Request; use GuzzleHttp\Psr7\Utils; use Neo4j\QueryAPI\Neo4jRequestFactory; + /** * @api */ @@ -95,8 +96,6 @@ public function testBuildBeginTransactionRequest() $this->baseUri ); $request = $factory->buildBeginTransactionRequest($database); - - // Assertions $this->assertEquals('POST', $request->getMethod()); $this->assertEquals($uri, (string) $request->getUri()); } @@ -194,8 +193,6 @@ public function testCreateRequestWithHeadersAndBody() $this->assertEquals('application/json', $request->getHeaderLine('Content-Type')); $this->assertEquals('application/json', $request->getHeaderLine('Accept')); $this->assertEquals($this->authHeader, $request->getHeaderLine('Authorization')); - - // Assertions for body $this->assertJsonStringEqualsJsonString($payload, (string) $request->getBody()); } @@ -230,7 +227,7 @@ public function testCreateRequestWithoutAuthorizationHeader() $this->assertEquals('application/json', $request->getHeaderLine('Content-Type')); $this->assertEquals('application/json', $request->getHeaderLine('Accept')); - $this->assertEmpty($request->getHeaderLine('Authorization')); // No Authorization header + $this->assertEmpty($request->getHeaderLine('Authorization')); $this->assertJsonStringEqualsJsonString($payload, (string) $request->getBody()); } diff --git a/tests/Unit/ResultRowTest.php b/tests/Unit/ResultRowTest.php index c2fceb58..0fc9ade5 100644 --- a/tests/Unit/ResultRowTest.php +++ b/tests/Unit/ResultRowTest.php @@ -6,6 +6,7 @@ use OutOfBoundsException; use BadMethodCallException; use PHPUnit\Framework\TestCase; + /** * @api */ From 8dbb6504a1daf4d57a309e99c4f1f66133ac30f6 Mon Sep 17 00:00:00 2001 From: Pratiksha Date: Wed, 12 Feb 2025 13:01:31 +0530 Subject: [PATCH 11/12] enable workflows --- .github/workflows/cs-fixer.yml | 4 ---- .github/workflows/test.yml | 2 -- 2 files changed, 6 deletions(-) diff --git a/.github/workflows/cs-fixer.yml b/.github/workflows/cs-fixer.yml index 856d1909..a25f4139 100644 --- a/.github/workflows/cs-fixer.yml +++ b/.github/workflows/cs-fixer.yml @@ -2,10 +2,6 @@ name: PHP CS Fixer on: push: - branches: - - main - paths: - - '**/*.php' pull_request: paths: - '**/*.php' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 402b09cd..2b485b29 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,8 +2,6 @@ name: CI Pipeline on: push: - branches: - - main pull_request: workflow_dispatch: From d973060b39a6ab37f7725d423ebaec282db84efc Mon Sep 17 00:00:00 2001 From: Pratiksha Date: Wed, 12 Feb 2025 13:05:39 +0530 Subject: [PATCH 12/12] winp --- src/Objects/ResultSet.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Objects/ResultSet.php b/src/Objects/ResultSet.php index 51ef298a..0414260d 100644 --- a/src/Objects/ResultSet.php +++ b/src/Objects/ResultSet.php @@ -32,7 +32,7 @@ public function __construct( private ResultCounters $counters, private Bookmarks $bookmarks, private ?ProfiledQueryPlan $profiledQueryPlan = null, - // private ?ProfiledQueryPlanArguments $profiledQueryPlanArguments = null + // private ?ProfiledQueryPlanArguments $profiledQueryPlanArguments = null ) { }