From 6ac1ba2c6c568d3c6203a4cbaa3fde274537a3d2 Mon Sep 17 00:00:00 2001 From: Hamdi LAADHARI Date: Mon, 31 Mar 2025 21:36:08 +0200 Subject: [PATCH 1/7] adds ci --- .github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..5a99247 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,53 @@ +name: PHP CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + php-version: ['8.1', '8.2', '8.3'] + + steps: + - uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + extensions: mbstring, xml, ctype, iconv, pcntl # Add extensions required by the bundle or composer dependencies if known, pcntl is listed in composer.json + coverage: none # Set to none, xdebug, or pcov if needed later + tools: composer:v2 + env: + COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Validate composer.json and composer.lock + run: composer validate --strict + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v4 + with: + path: vendor + key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php-${{ matrix.php-version }}- + + - name: Install Dependencies + run: composer install --prefer-dist --no-progress + + - name: Run PHP CS Fixer (Docker) + uses: docker://ghcr.io/php-cs-fixer/php-cs-fixer:3-php8.3 + with: + args: fix --dry-run --diff + + - name: Run PHPStan + run: vendor/bin/phpstan analyse --memory-limit=2G # Added memory limit as PHPStan can be memory intensive + + - name: Run PHPUnit + run: vendor/bin/phpunit \ No newline at end of file From a3f5ebcef1b216d12865055ec2ee6fe0855549b4 Mon Sep 17 00:00:00 2001 From: Hamdi LAADHARI Date: Mon, 31 Mar 2025 21:50:57 +0200 Subject: [PATCH 2/7] remove lock --- composer.lock | 2271 ------------------------------------------------- 1 file changed, 2271 deletions(-) delete mode 100644 composer.lock diff --git a/composer.lock b/composer.lock deleted file mode 100644 index b5fd047..0000000 --- a/composer.lock +++ /dev/null @@ -1,2271 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "894c1edae4aaf8096c2b5c03c69f8ab3", - "packages": [ - { - "name": "james2037/mcp-php-server", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/james2037/mcp-php-server.git", - "reference": "a856118097ceab3a6f52bf4b6ea7abc82f3d6d4b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/james2037/mcp-php-server/zipball/a856118097ceab3a6f52bf4b6ea7abc82f3d6d4b", - "reference": "a856118097ceab3a6f52bf4b6ea7abc82f3d6d4b", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "require-dev": { - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^10.0", - "squizlabs/php_codesniffer": "^3.11" - }, - "default-branch": true, - "type": "library", - "autoload": { - "psr-4": { - "MCP\\Server\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "james2037", - "role": "Developer" - } - ], - "description": "Model Context Protocol server framework in PHP", - "homepage": "https://github.com/james2037/mcp-php-server", - "keywords": [ - "mcp" - ], - "support": { - "issues": "https://github.com/james2037/mcp-php-server/issues", - "source": "https://github.com/james2037/mcp-php-server/tree/master" - }, - "time": "2025-01-13T03:08:11+00:00" - }, - { - "name": "psr/cache", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "support": { - "source": "https://github.com/php-fig/cache/tree/3.0.0" - }, - "time": "2021-02-03T23:26:27+00:00" - }, - { - "name": "psr/container", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "shasum": "" - }, - "require": { - "php": ">=7.4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/2.0.2" - }, - "time": "2021-11-05T16:47:00+00:00" - }, - { - "name": "psr/event-dispatcher", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\EventDispatcher\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Standard interfaces for event handling.", - "keywords": [ - "events", - "psr", - "psr-14" - ], - "support": { - "issues": "https://github.com/php-fig/event-dispatcher/issues", - "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" - }, - "time": "2019-01-08T18:20:26+00:00" - }, - { - "name": "psr/log", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", - "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/3.0.2" - }, - "time": "2024-09-11T13:17:53+00:00" - }, - { - "name": "symfony/cache", - "version": "v7.2.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/cache.git", - "reference": "d33cd9e14326e14a4145c21e600602eaf17cc9e7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/d33cd9e14326e14a4145c21e600602eaf17cc9e7", - "reference": "d33cd9e14326e14a4145c21e600602eaf17cc9e7", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "psr/cache": "^2.0|^3.0", - "psr/log": "^1.1|^2|^3", - "symfony/cache-contracts": "^2.5|^3", - "symfony/deprecation-contracts": "^2.5|^3.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/var-exporter": "^6.4|^7.0" - }, - "conflict": { - "doctrine/dbal": "<3.6", - "symfony/dependency-injection": "<6.4", - "symfony/http-kernel": "<6.4", - "symfony/var-dumper": "<6.4" - }, - "provide": { - "psr/cache-implementation": "2.0|3.0", - "psr/simple-cache-implementation": "1.0|2.0|3.0", - "symfony/cache-implementation": "1.1|2.0|3.0" - }, - "require-dev": { - "cache/integration-tests": "dev-master", - "doctrine/dbal": "^3.6|^4", - "predis/predis": "^1.1|^2.0", - "psr/simple-cache": "^1.0|^2.0|^3.0", - "symfony/clock": "^6.4|^7.0", - "symfony/config": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/filesystem": "^6.4|^7.0", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/messenger": "^6.4|^7.0", - "symfony/var-dumper": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Cache\\": "" - }, - "classmap": [ - "Traits/ValueWrapper.php" - ], - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides extended PSR-6, PSR-16 (and tags) implementations", - "homepage": "https://symfony.com", - "keywords": [ - "caching", - "psr6" - ], - "support": { - "source": "https://github.com/symfony/cache/tree/v7.2.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-02-26T09:57:54+00:00" - }, - { - "name": "symfony/cache-contracts", - "version": "v3.5.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/cache-contracts.git", - "reference": "15a4f8e5cd3bce9aeafc882b1acab39ec8de2c1b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/15a4f8e5cd3bce9aeafc882b1acab39ec8de2c1b", - "reference": "15a4f8e5cd3bce9aeafc882b1acab39ec8de2c1b", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/cache": "^3.0" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/contracts", - "name": "symfony/contracts" - }, - "branch-alias": { - "dev-main": "3.5-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Cache\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to caching", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/cache-contracts/tree/v3.5.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-25T14:20:29+00:00" - }, - { - "name": "symfony/config", - "version": "v7.2.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/config.git", - "reference": "7716594aaae91d9141be080240172a92ecca4d44" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/7716594aaae91d9141be080240172a92ecca4d44", - "reference": "7716594aaae91d9141be080240172a92ecca4d44", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/filesystem": "^7.1", - "symfony/polyfill-ctype": "~1.8" - }, - "conflict": { - "symfony/finder": "<6.4", - "symfony/service-contracts": "<2.5" - }, - "require-dev": { - "symfony/event-dispatcher": "^6.4|^7.0", - "symfony/finder": "^6.4|^7.0", - "symfony/messenger": "^6.4|^7.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/yaml": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Config\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/config/tree/v7.2.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-01-22T12:07:01+00:00" - }, - { - "name": "symfony/console", - "version": "v7.2.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "fefcc18c0f5d0efe3ab3152f15857298868dc2c3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/fefcc18c0f5d0efe3ab3152f15857298868dc2c3", - "reference": "fefcc18c0f5d0efe3ab3152f15857298868dc2c3", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/polyfill-mbstring": "~1.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^6.4|^7.0" - }, - "conflict": { - "symfony/dependency-injection": "<6.4", - "symfony/dotenv": "<6.4", - "symfony/event-dispatcher": "<6.4", - "symfony/lock": "<6.4", - "symfony/process": "<6.4" - }, - "provide": { - "psr/log-implementation": "1.0|2.0|3.0" - }, - "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/event-dispatcher": "^6.4|^7.0", - "symfony/http-foundation": "^6.4|^7.0", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/lock": "^6.4|^7.0", - "symfony/messenger": "^6.4|^7.0", - "symfony/process": "^6.4|^7.0", - "symfony/stopwatch": "^6.4|^7.0", - "symfony/var-dumper": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Eases the creation of beautiful and testable command line interfaces", - "homepage": "https://symfony.com", - "keywords": [ - "cli", - "command-line", - "console", - "terminal" - ], - "support": { - "source": "https://github.com/symfony/console/tree/v7.2.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-12-11T03:49:26+00:00" - }, - { - "name": "symfony/dependency-injection", - "version": "v7.2.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/dependency-injection.git", - "reference": "f0a1614cccb4b8431a97076f9debc08ddca321ca" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/f0a1614cccb4b8431a97076f9debc08ddca321ca", - "reference": "f0a1614cccb4b8431a97076f9debc08ddca321ca", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "psr/container": "^1.1|^2.0", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/service-contracts": "^3.5", - "symfony/var-exporter": "^6.4|^7.0" - }, - "conflict": { - "ext-psr": "<1.1|>=2", - "symfony/config": "<6.4", - "symfony/finder": "<6.4", - "symfony/yaml": "<6.4" - }, - "provide": { - "psr/container-implementation": "1.1|2.0", - "symfony/service-implementation": "1.1|2.0|3.0" - }, - "require-dev": { - "symfony/config": "^6.4|^7.0", - "symfony/expression-language": "^6.4|^7.0", - "symfony/yaml": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\DependencyInjection\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Allows you to standardize and centralize the way objects are constructed in your application", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v7.2.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-02-21T09:47:16+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v3.5.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", - "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/contracts", - "name": "symfony/contracts" - }, - "branch-alias": { - "dev-main": "3.5-dev" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-25T14:20:29+00:00" - }, - { - "name": "symfony/error-handler", - "version": "v7.2.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/error-handler.git", - "reference": "aabf79938aa795350c07ce6464dd1985607d95d5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/aabf79938aa795350c07ce6464dd1985607d95d5", - "reference": "aabf79938aa795350c07ce6464dd1985607d95d5", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "psr/log": "^1|^2|^3", - "symfony/var-dumper": "^6.4|^7.0" - }, - "conflict": { - "symfony/deprecation-contracts": "<2.5", - "symfony/http-kernel": "<6.4" - }, - "require-dev": { - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/serializer": "^6.4|^7.0" - }, - "bin": [ - "Resources/bin/patch-type-declarations" - ], - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\ErrorHandler\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides tools to manage errors and ease debugging PHP code", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/error-handler/tree/v7.2.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-02-02T20:27:07+00:00" - }, - { - "name": "symfony/event-dispatcher", - "version": "v7.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "910c5db85a5356d0fea57680defec4e99eb9c8c1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/910c5db85a5356d0fea57680defec4e99eb9c8c1", - "reference": "910c5db85a5356d0fea57680defec4e99eb9c8c1", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/event-dispatcher-contracts": "^2.5|^3" - }, - "conflict": { - "symfony/dependency-injection": "<6.4", - "symfony/service-contracts": "<2.5" - }, - "provide": { - "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0|3.0" - }, - "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/error-handler": "^6.4|^7.0", - "symfony/expression-language": "^6.4|^7.0", - "symfony/http-foundation": "^6.4|^7.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/stopwatch": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v7.2.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-25T14:21:43+00:00" - }, - { - "name": "symfony/event-dispatcher-contracts", - "version": "v3.5.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7642f5e970b672283b7823222ae8ef8bbc160b9f", - "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/event-dispatcher": "^1" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/contracts", - "name": "symfony/contracts" - }, - "branch-alias": { - "dev-main": "3.5-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\EventDispatcher\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to dispatching event", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.5.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-25T14:20:29+00:00" - }, - { - "name": "symfony/filesystem", - "version": "v7.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/b8dce482de9d7c9fe2891155035a7248ab5c7fdb", - "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8" - }, - "require-dev": { - "symfony/process": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides basic utilities for the filesystem", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.2.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-10-25T15:15:23+00:00" - }, - { - "name": "symfony/finder", - "version": "v7.2.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "87a71856f2f56e4100373e92529eed3171695cfb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/87a71856f2f56e4100373e92529eed3171695cfb", - "reference": "87a71856f2f56e4100373e92529eed3171695cfb", - "shasum": "" - }, - "require": { - "php": ">=8.2" - }, - "require-dev": { - "symfony/filesystem": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Finds files and directories via an intuitive fluent interface", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/finder/tree/v7.2.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-12-30T19:00:17+00:00" - }, - { - "name": "symfony/framework-bundle", - "version": "v7.2.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/framework-bundle.git", - "reference": "6d6614378cd8128eed0a037ce6ac51a26c5aaed5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/6d6614378cd8128eed0a037ce6ac51a26c5aaed5", - "reference": "6d6614378cd8128eed0a037ce6ac51a26c5aaed5", - "shasum": "" - }, - "require": { - "composer-runtime-api": ">=2.1", - "ext-xml": "*", - "php": ">=8.2", - "symfony/cache": "^6.4|^7.0", - "symfony/config": "^6.4|^7.0", - "symfony/dependency-injection": "^7.2", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/error-handler": "^6.4|^7.0", - "symfony/event-dispatcher": "^6.4|^7.0", - "symfony/filesystem": "^7.1", - "symfony/finder": "^6.4|^7.0", - "symfony/http-foundation": "^6.4|^7.0", - "symfony/http-kernel": "^7.2", - "symfony/polyfill-mbstring": "~1.0", - "symfony/routing": "^6.4|^7.0" - }, - "conflict": { - "doctrine/persistence": "<1.3", - "phpdocumentor/reflection-docblock": "<3.2.2", - "phpdocumentor/type-resolver": "<1.4.0", - "symfony/asset": "<6.4", - "symfony/asset-mapper": "<6.4", - "symfony/clock": "<6.4", - "symfony/console": "<6.4", - "symfony/dom-crawler": "<6.4", - "symfony/dotenv": "<6.4", - "symfony/form": "<6.4", - "symfony/http-client": "<6.4", - "symfony/lock": "<6.4", - "symfony/mailer": "<6.4", - "symfony/messenger": "<6.4", - "symfony/mime": "<6.4", - "symfony/property-access": "<6.4", - "symfony/property-info": "<6.4", - "symfony/runtime": "<6.4.13|>=7.0,<7.1.6", - "symfony/scheduler": "<6.4.4|>=7.0.0,<7.0.4", - "symfony/security-core": "<6.4", - "symfony/security-csrf": "<7.2", - "symfony/serializer": "<7.1", - "symfony/stopwatch": "<6.4", - "symfony/translation": "<6.4", - "symfony/twig-bridge": "<6.4", - "symfony/twig-bundle": "<6.4", - "symfony/validator": "<6.4", - "symfony/web-profiler-bundle": "<6.4", - "symfony/webhook": "<7.2", - "symfony/workflow": "<6.4" - }, - "require-dev": { - "doctrine/persistence": "^1.3|^2|^3", - "dragonmantank/cron-expression": "^3.1", - "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "seld/jsonlint": "^1.10", - "symfony/asset": "^6.4|^7.0", - "symfony/asset-mapper": "^6.4|^7.0", - "symfony/browser-kit": "^6.4|^7.0", - "symfony/clock": "^6.4|^7.0", - "symfony/console": "^6.4|^7.0", - "symfony/css-selector": "^6.4|^7.0", - "symfony/dom-crawler": "^6.4|^7.0", - "symfony/dotenv": "^6.4|^7.0", - "symfony/expression-language": "^6.4|^7.0", - "symfony/form": "^6.4|^7.0", - "symfony/html-sanitizer": "^6.4|^7.0", - "symfony/http-client": "^6.4|^7.0", - "symfony/lock": "^6.4|^7.0", - "symfony/mailer": "^6.4|^7.0", - "symfony/messenger": "^6.4|^7.0", - "symfony/mime": "^6.4|^7.0", - "symfony/notifier": "^6.4|^7.0", - "symfony/polyfill-intl-icu": "~1.0", - "symfony/process": "^6.4|^7.0", - "symfony/property-info": "^6.4|^7.0", - "symfony/rate-limiter": "^6.4|^7.0", - "symfony/scheduler": "^6.4.4|^7.0.4", - "symfony/security-bundle": "^6.4|^7.0", - "symfony/semaphore": "^6.4|^7.0", - "symfony/serializer": "^7.1", - "symfony/stopwatch": "^6.4|^7.0", - "symfony/string": "^6.4|^7.0", - "symfony/translation": "^6.4|^7.0", - "symfony/twig-bundle": "^6.4|^7.0", - "symfony/type-info": "^7.1", - "symfony/uid": "^6.4|^7.0", - "symfony/validator": "^6.4|^7.0", - "symfony/web-link": "^6.4|^7.0", - "symfony/webhook": "^7.2", - "symfony/workflow": "^6.4|^7.0", - "symfony/yaml": "^6.4|^7.0", - "twig/twig": "^3.12" - }, - "type": "symfony-bundle", - "autoload": { - "psr-4": { - "Symfony\\Bundle\\FrameworkBundle\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides a tight integration between Symfony components and the Symfony full-stack framework", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/framework-bundle/tree/v7.2.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-02-26T08:19:39+00:00" - }, - { - "name": "symfony/http-foundation", - "version": "v7.2.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-foundation.git", - "reference": "ee1b504b8926198be89d05e5b6fc4c3810c090f0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/ee1b504b8926198be89d05e5b6fc4c3810c090f0", - "reference": "ee1b504b8926198be89d05e5b6fc4c3810c090f0", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3.0", - "symfony/polyfill-mbstring": "~1.1", - "symfony/polyfill-php83": "^1.27" - }, - "conflict": { - "doctrine/dbal": "<3.6", - "symfony/cache": "<6.4.12|>=7.0,<7.1.5" - }, - "require-dev": { - "doctrine/dbal": "^3.6|^4", - "predis/predis": "^1.1|^2.0", - "symfony/cache": "^6.4.12|^7.1.5", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/expression-language": "^6.4|^7.0", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/mime": "^6.4|^7.0", - "symfony/rate-limiter": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Defines an object-oriented layer for the HTTP specification", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/http-foundation/tree/v7.2.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-01-17T10:56:55+00:00" - }, - { - "name": "symfony/http-kernel", - "version": "v7.2.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-kernel.git", - "reference": "9f1103734c5789798fefb90e91de4586039003ed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/9f1103734c5789798fefb90e91de4586039003ed", - "reference": "9f1103734c5789798fefb90e91de4586039003ed", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "psr/log": "^1|^2|^3", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/error-handler": "^6.4|^7.0", - "symfony/event-dispatcher": "^6.4|^7.0", - "symfony/http-foundation": "^6.4|^7.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "symfony/browser-kit": "<6.4", - "symfony/cache": "<6.4", - "symfony/config": "<6.4", - "symfony/console": "<6.4", - "symfony/dependency-injection": "<6.4", - "symfony/doctrine-bridge": "<6.4", - "symfony/form": "<6.4", - "symfony/http-client": "<6.4", - "symfony/http-client-contracts": "<2.5", - "symfony/mailer": "<6.4", - "symfony/messenger": "<6.4", - "symfony/translation": "<6.4", - "symfony/translation-contracts": "<2.5", - "symfony/twig-bridge": "<6.4", - "symfony/validator": "<6.4", - "symfony/var-dumper": "<6.4", - "twig/twig": "<3.12" - }, - "provide": { - "psr/log-implementation": "1.0|2.0|3.0" - }, - "require-dev": { - "psr/cache": "^1.0|^2.0|^3.0", - "symfony/browser-kit": "^6.4|^7.0", - "symfony/clock": "^6.4|^7.0", - "symfony/config": "^6.4|^7.0", - "symfony/console": "^6.4|^7.0", - "symfony/css-selector": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/dom-crawler": "^6.4|^7.0", - "symfony/expression-language": "^6.4|^7.0", - "symfony/finder": "^6.4|^7.0", - "symfony/http-client-contracts": "^2.5|^3", - "symfony/process": "^6.4|^7.0", - "symfony/property-access": "^7.1", - "symfony/routing": "^6.4|^7.0", - "symfony/serializer": "^7.1", - "symfony/stopwatch": "^6.4|^7.0", - "symfony/translation": "^6.4|^7.0", - "symfony/translation-contracts": "^2.5|^3", - "symfony/uid": "^6.4|^7.0", - "symfony/validator": "^6.4|^7.0", - "symfony/var-dumper": "^6.4|^7.0", - "symfony/var-exporter": "^6.4|^7.0", - "twig/twig": "^3.12" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpKernel\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides a structured process for converting a Request into a Response", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/http-kernel/tree/v7.2.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-02-26T11:01:22+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.31.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", - "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-09T11:45:10+00:00" - }, - { - "name": "symfony/polyfill-intl-grapheme", - "version": "v1.31.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", - "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Grapheme\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's grapheme_* functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "grapheme", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-09T11:45:10+00:00" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.31.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "3833d7255cc303546435cb650316bff708a1c75c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", - "reference": "3833d7255cc303546435cb650316bff708a1c75c", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-09T11:45:10+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.31.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-09T11:45:10+00:00" - }, - { - "name": "symfony/polyfill-php83", - "version": "v1.31.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php83.git", - "reference": "2fb86d65e2d424369ad2905e83b236a8805ba491" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/2fb86d65e2d424369ad2905e83b236a8805ba491", - "reference": "2fb86d65e2d424369ad2905e83b236a8805ba491", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php83\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php83/tree/v1.31.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-09T11:45:10+00:00" - }, - { - "name": "symfony/routing", - "version": "v7.2.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/routing.git", - "reference": "ee9a67edc6baa33e5fae662f94f91fd262930996" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/ee9a67edc6baa33e5fae662f94f91fd262930996", - "reference": "ee9a67edc6baa33e5fae662f94f91fd262930996", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3" - }, - "conflict": { - "symfony/config": "<6.4", - "symfony/dependency-injection": "<6.4", - "symfony/yaml": "<6.4" - }, - "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/expression-language": "^6.4|^7.0", - "symfony/http-foundation": "^6.4|^7.0", - "symfony/yaml": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Routing\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Maps an HTTP request to a set of configuration variables", - "homepage": "https://symfony.com", - "keywords": [ - "router", - "routing", - "uri", - "url" - ], - "support": { - "source": "https://github.com/symfony/routing/tree/v7.2.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-01-17T10:56:55+00:00" - }, - { - "name": "symfony/service-contracts", - "version": "v3.5.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", - "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/container": "^1.1|^2.0", - "symfony/deprecation-contracts": "^2.5|^3" - }, - "conflict": { - "ext-psr": "<1.1|>=2" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/contracts", - "name": "symfony/contracts" - }, - "branch-alias": { - "dev-main": "3.5-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Service\\": "" - }, - "exclude-from-classmap": [ - "/Test/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to writing services", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.5.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-25T14:20:29+00:00" - }, - { - "name": "symfony/string", - "version": "v7.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/string.git", - "reference": "446e0d146f991dde3e73f45f2c97a9faad773c82" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/446e0d146f991dde3e73f45f2c97a9faad773c82", - "reference": "446e0d146f991dde3e73f45f2c97a9faad773c82", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-grapheme": "~1.0", - "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/translation-contracts": "<2.5" - }, - "require-dev": { - "symfony/emoji": "^7.1", - "symfony/error-handler": "^6.4|^7.0", - "symfony/http-client": "^6.4|^7.0", - "symfony/intl": "^6.4|^7.0", - "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "files": [ - "Resources/functions.php" - ], - "psr-4": { - "Symfony\\Component\\String\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", - "homepage": "https://symfony.com", - "keywords": [ - "grapheme", - "i18n", - "string", - "unicode", - "utf-8", - "utf8" - ], - "support": { - "source": "https://github.com/symfony/string/tree/v7.2.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-11-13T13:31:26+00:00" - }, - { - "name": "symfony/var-dumper", - "version": "v7.2.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/var-dumper.git", - "reference": "82b478c69745d8878eb60f9a049a4d584996f73a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/82b478c69745d8878eb60f9a049a4d584996f73a", - "reference": "82b478c69745d8878eb60f9a049a4d584996f73a", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/console": "<6.4" - }, - "require-dev": { - "ext-iconv": "*", - "symfony/console": "^6.4|^7.0", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/process": "^6.4|^7.0", - "symfony/uid": "^6.4|^7.0", - "twig/twig": "^3.12" - }, - "bin": [ - "Resources/bin/var-dump-server" - ], - "type": "library", - "autoload": { - "files": [ - "Resources/functions/dump.php" - ], - "psr-4": { - "Symfony\\Component\\VarDumper\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides mechanisms for walking through any arbitrary PHP variable", - "homepage": "https://symfony.com", - "keywords": [ - "debug", - "dump" - ], - "support": { - "source": "https://github.com/symfony/var-dumper/tree/v7.2.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-01-17T11:39:41+00:00" - }, - { - "name": "symfony/var-exporter", - "version": "v7.2.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/var-exporter.git", - "reference": "4ede73aa7a73d81506002d2caadbbdad1ef5b69a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/4ede73aa7a73d81506002d2caadbbdad1ef5b69a", - "reference": "4ede73aa7a73d81506002d2caadbbdad1ef5b69a", - "shasum": "" - }, - "require": { - "php": ">=8.2" - }, - "require-dev": { - "symfony/property-access": "^6.4|^7.0", - "symfony/serializer": "^6.4|^7.0", - "symfony/var-dumper": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\VarExporter\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Allows exporting any serializable PHP data structure to plain PHP code", - "homepage": "https://symfony.com", - "keywords": [ - "clone", - "construct", - "export", - "hydrate", - "instantiate", - "lazy-loading", - "proxy", - "serialize" - ], - "support": { - "source": "https://github.com/symfony/var-exporter/tree/v7.2.4" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2025-02-13T10:27:23+00:00" - } - ], - "packages-dev": [], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": { - "james2037/mcp-php-server": 20 - }, - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=8.1" - }, - "platform-dev": {}, - "plugin-api-version": "2.6.0" -} From d23f74fc6a49df56e21eff4e4e6332504002ce2f Mon Sep 17 00:00:00 2001 From: Hamdi LAADHARI Date: Mon, 31 Mar 2025 21:59:00 +0200 Subject: [PATCH 3/7] fix cs-fixer --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a99247..90cd290 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: - name: Run PHP CS Fixer (Docker) uses: docker://ghcr.io/php-cs-fixer/php-cs-fixer:3-php8.3 with: - args: fix --dry-run --diff + args: fix . --dry-run --diff - name: Run PHPStan run: vendor/bin/phpstan analyse --memory-limit=2G # Added memory limit as PHPStan can be memory intensive From f1d284d64d64278f0669fdf6256ca68e96ca95d4 Mon Sep 17 00:00:00 2001 From: Hamdi LAADHARI Date: Mon, 31 Mar 2025 22:34:25 +0200 Subject: [PATCH 4/7] cs-fix --- .gitignore | 1 + Command/ProfilerCommand.php | 47 +++++++++--------- Command/RunMCPServerCommand.php | 12 +++-- DependencyInjection/Configuration.php | 2 +- DependencyInjection/MCPProfilerExtension.php | 2 +- MCPProfilerBundle.php | 8 +-- Tools/ProfilerGetAllCollectorByToken.php | 12 ++--- Tools/ProfilerGetByTokenTool.php | 51 ++++++++++---------- Tools/ProfilerGetOneCollectorByToken.php | 48 +++++++++--------- Tools/ProfilerList.php | 7 +-- composer.json | 3 ++ 11 files changed, 101 insertions(+), 92 deletions(-) diff --git a/.gitignore b/.gitignore index 31e3ac6..c5952fc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ vendor/ .idea +.php-cs-fixer.cache diff --git a/Command/ProfilerCommand.php b/Command/ProfilerCommand.php index d04b536..b051137 100644 --- a/Command/ProfilerCommand.php +++ b/Command/ProfilerCommand.php @@ -30,7 +30,8 @@ protected function configure(): void ->addArgument('token', InputArgument::OPTIONAL, 'Profiler token (required for show action)') ->addOption('limit', 'l', InputOption::VALUE_OPTIONAL, 'Number of profiles to show when listing', 20) ->addOption('collector', 'c', InputOption::VALUE_OPTIONAL, 'Specific collector to display for show action') - ->setHelp(<<setHelp( + <<%command.name% command provides basic interaction with the Symfony profiler. Available actions: @@ -51,7 +52,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); $action = $input->getArgument('action'); - + try { switch ($action) { case 'list': @@ -69,22 +70,22 @@ protected function execute(InputInterface $input, OutputInterface $output): int return Command::FAILURE; } } - + private function executeList(InputInterface $input, OutputInterface $output, SymfonyStyle $io): int { $limit = (int) $input->getOption('limit'); $io->title(sprintf('Listing the %d most recent profiles', $limit)); - + $tokens = $this->profiler->find(null, null, $limit, null, null, null); - + if (count($tokens) === 0) { $io->warning('No profiles found'); return Command::SUCCESS; } - + $table = new Table($output); $table->setHeaders(['Token', 'IP', 'Method', 'URL', 'Time', 'Status']); - + foreach ($tokens as $token) { $profile = $this->profiler->loadProfile($token['token']); if ($profile) { @@ -98,11 +99,11 @@ private function executeList(InputInterface $input, OutputInterface $output, Sym ]); } } - + $table->render(); return Command::SUCCESS; } - + private function executeShow(InputInterface $input, OutputInterface $output, SymfonyStyle $io): int { $token = $input->getArgument('token'); @@ -110,15 +111,15 @@ private function executeShow(InputInterface $input, OutputInterface $output, Sym $io->error('Token argument is required for show action'); return Command::INVALID; } - + $profile = $this->profiler->loadProfile($token); if (!$profile) { $io->error(sprintf('No profile found for token "%s"', $token)); return Command::FAILURE; } - + $io->title(sprintf('Profile for "%s"', $token)); - + $io->section('Profile Information'); $io->definitionList( ['Token' => $profile->getToken()], @@ -128,7 +129,7 @@ private function executeShow(InputInterface $input, OutputInterface $output, Sym ['Time' => date('Y-m-d H:i:s', $profile->getTime())], ['Status' => $profile->getStatusCode()] ); - + $collectorName = $input->getOption('collector'); if ($collectorName) { // Display specific collector @@ -137,7 +138,7 @@ private function executeShow(InputInterface $input, OutputInterface $output, Sym $io->error(sprintf('No collector named "%s" found', $collectorName)); return Command::FAILURE; } - + $io->section(sprintf('Collector: %s', $collectorName)); if (method_exists($collector, 'getData')) { $data = $collector->getData(); @@ -154,36 +155,36 @@ private function executeShow(InputInterface $input, OutputInterface $output, Sym // List available collectors $io->section('Available Collectors'); $collectors = $profile->getCollectors(); - + $table = new Table($output); $table->setHeaders(['Collector', 'Data']); - + foreach ($collectors as $collector) { $table->addRow([ $collector->getName(), sprintf('Use --collector=%s to view details', $collector->getName()) ]); } - + $table->render(); } - + return Command::SUCCESS; } - + private function executePurge(InputInterface $input, OutputInterface $output, SymfonyStyle $io): int { if (!$io->confirm('Are you sure you want to purge all profiler data?', false)) { $io->note('Operation cancelled'); return Command::SUCCESS; } - + $this->profiler->purge(); $io->success('All profiler data has been purged'); - + return Command::SUCCESS; } - + private function displayArrayData(array $data, OutputInterface $output, SymfonyStyle $io, int $level = 0): void { foreach ($data as $key => $value) { @@ -195,4 +196,4 @@ private function displayArrayData(array $data, OutputInterface $output, SymfonyS } } } -} \ No newline at end of file +} diff --git a/Command/RunMCPServerCommand.php b/Command/RunMCPServerCommand.php index 8d7eeb4..4e93e4b 100644 --- a/Command/RunMCPServerCommand.php +++ b/Command/RunMCPServerCommand.php @@ -46,7 +46,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int $lines = explode("\n", $buffer); $buffer = array_pop($lines); foreach ($lines as $line) { - if (empty(trim($line))) continue; // Skip empty lines + if (empty(trim($line))) { + continue; + } // Skip empty lines $this->processLine($output, $line); } } @@ -152,7 +154,7 @@ private function callTool(array $params): array $arguments = $params['arguments'] ?? []; if (!$this->profiler && $name !== 'example:hello') { - return $this->sendApplicationError(new \LogicException('Profiler service is not available.')); + return $this->sendApplicationError(new \LogicException('Profiler service is not available.')); } try { @@ -167,14 +169,14 @@ private function callTool(array $params): array $arguments['token'] ?? '', $arguments['collector'] ?? '' ), - 'profiler:get_by_token' => (new ProfilerGetByTokenTool($this->profiler, null, $this->parameterBag))->execute( + 'profiler:get_by_token' => (new ProfilerGetByTokenTool($this->profiler, null, $this->parameterBag))->execute( $arguments['token'] ?? '' ), default => null, // Will be handled below }; if ($result === null && $name !== null) { - return $this->sendProtocolError(\sprintf('Tool "%s" not found', $name)); + return $this->sendProtocolError(\sprintf('Tool "%s" not found', $name)); } // Format successful result @@ -215,4 +217,4 @@ private function sendApplicationError(\Throwable $e): array ], ]; } -} \ No newline at end of file +} diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index d53be45..c4cd268 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -26,4 +26,4 @@ public function getConfigTreeBuilder(): TreeBuilder return $treeBuilder; } -} \ No newline at end of file +} diff --git a/DependencyInjection/MCPProfilerExtension.php b/DependencyInjection/MCPProfilerExtension.php index fa197aa..672d85d 100644 --- a/DependencyInjection/MCPProfilerExtension.php +++ b/DependencyInjection/MCPProfilerExtension.php @@ -43,4 +43,4 @@ public function getAlias(): string { return 'killerwolf_mcp_profiler'; } -} \ No newline at end of file +} diff --git a/MCPProfilerBundle.php b/MCPProfilerBundle.php index 3528b52..3cf234f 100644 --- a/MCPProfilerBundle.php +++ b/MCPProfilerBundle.php @@ -11,10 +11,10 @@ class MCPProfilerBundle extends Bundle public function build(ContainerBuilder $container): void { parent::build($container); - + // Compiler pass removed as tools are now injected via !tagged_iterator in services.yaml } - + /** * Returns the bundle's container extension */ @@ -23,7 +23,7 @@ public function getContainerExtension(): ?\Symfony\Component\DependencyInjection if (null === $this->extension) { $this->extension = new MCPProfilerExtension(); } - + return $this->extension; } -} \ No newline at end of file +} diff --git a/Tools/ProfilerGetAllCollectorByToken.php b/Tools/ProfilerGetAllCollectorByToken.php index 1cd6f44..2ff22f9 100644 --- a/Tools/ProfilerGetAllCollectorByToken.php +++ b/Tools/ProfilerGetAllCollectorByToken.php @@ -4,8 +4,8 @@ use Symfony\Component\HttpKernel\Profiler\Profiler; - -class ProfilerGetAllCollectorByToken { // Remove implements ToolInterface +class ProfilerGetAllCollectorByToken +{ private ?Profiler $profiler = null; // Inject the Profiler service @@ -18,14 +18,14 @@ public function __construct(?Profiler $profiler) public function execute(string $token): string { if (!$this->profiler) { - return json_encode(['error' => 'Profiler service not available.']); + return json_encode(['error' => 'Profiler service not available.']); } // Load the profile for the given token try { $profile = $this->profiler->loadProfile($token); } catch (\Exception $e) { - return json_encode(['error' => "Error loading profile for token {$token}: " . $e->getMessage()]); + return json_encode(['error' => "Error loading profile for token {$token}: " . $e->getMessage()]); } if (!$profile) { @@ -37,7 +37,7 @@ public function execute(string $token): string $collectorNames = array_keys($profile->getCollectors()); return json_encode($collectorNames, JSON_PRETTY_PRINT); } catch (\Exception $e) { - return json_encode(['error' => "Error getting collector names for token {$token}: " . $e->getMessage()]); + return json_encode(['error' => "Error getting collector names for token {$token}: " . $e->getMessage()]); } } -} \ No newline at end of file +} diff --git a/Tools/ProfilerGetByTokenTool.php b/Tools/ProfilerGetByTokenTool.php index afa12c1..2319c1a 100644 --- a/Tools/ProfilerGetByTokenTool.php +++ b/Tools/ProfilerGetByTokenTool.php @@ -6,7 +6,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; -class ProfilerGetByTokenTool { // Remove implements ToolInterface +class ProfilerGetByTokenTool +{ private ?Profiler $profiler = null; private ?ParameterBagInterface $parameterBag = null; @@ -23,19 +24,19 @@ public function execute(string $token): string // Ensure profiler is available if (!$this->profiler) { return json_encode(['error' => 'Profiler service not available.']); - } + } // Load the profile for the given token try { $profile = $this->profiler->loadProfile($token); } catch (\Exception $e) { - return json_encode(['error' => "Error loading profile for token {$token}: " . $e->getMessage()]); + return json_encode(['error' => "Error loading profile for token {$token}: " . $e->getMessage()]); } - + if (!$profile) { return json_encode(['error' => "No profile found for token: {$token}"]); } - + // Prepare the response data $data = [ 'token' => $profile->getToken(), @@ -46,24 +47,24 @@ public function execute(string $token): string 'status_code' => $profile->getStatusCode(), 'collectors' => [] ]; - + // Get all collectors from the profile $collectors = $profile->getCollectors(); // Add collector data (Keep the existing complex logic for handling different collectors) foreach ($collectors as $collector) { $collectorName = $collector->getName(); - + if (method_exists($collector, 'getData')) { try { $collectorData = $collector->getData(); - json_encode($collectorData); + json_encode($collectorData); $data['collectors'][$collectorName] = $collectorData; } catch (\Exception $e) { - $data['collectors'][$collectorName] = ['error' => 'Could not serialize data: ' . $e->getMessage()]; + $data['collectors'][$collectorName] = ['error' => 'Could not serialize data: ' . $e->getMessage()]; } } elseif ($collector instanceof \Symfony\Component\HttpKernel\DataCollector\RequestDataCollector) { - try { + try { $requestData = [ 'method' => $collector->getMethod(), 'request_headers' => $collector->getRequestHeaders()->all(), @@ -77,11 +78,11 @@ public function execute(string $token): string 'status_code' => $collector->getStatusCode(), 'status_text' => $collector->getStatusText(), ]; - json_encode($requestData); + json_encode($requestData); $data['collectors'][$collectorName] = $requestData; - } catch (\Exception $e) { - $data['collectors'][$collectorName] = ['error' => 'Could not serialize RequestDataCollector: ' . $e->getMessage()]; - } + } catch (\Exception $e) { + $data['collectors'][$collectorName] = ['error' => 'Could not serialize RequestDataCollector: ' . $e->getMessage()]; + } } else { try { $reflectionClass = new \ReflectionClass($collector); @@ -90,7 +91,7 @@ public function execute(string $token): string if (!$property->isStatic()) { $propertyName = $property->getName(); $value = $property->getValue($collector); - json_encode($value); + json_encode($value); $collectorData[$propertyName] = $value; } } @@ -100,12 +101,12 @@ public function execute(string $token): string if ($dataValue instanceof \Symfony\Component\VarDumper\Cloner\Data) { $collectorData['data_object'] = 'Symfony VarDumper Data object (not directly serializable)'; } else { - json_encode($dataValue); - if (is_array($dataValue)) { - $collectorData = array_merge($collectorData, $dataValue); - } elseif ($dataValue !== null) { - $collectorData['data_value'] = $dataValue; - } + json_encode($dataValue); + if (is_array($dataValue)) { + $collectorData = array_merge($collectorData, $dataValue); + } elseif ($dataValue !== null) { + $collectorData['data_value'] = $dataValue; + } } } $data['collectors'][$collectorName] = $collectorData; @@ -114,13 +115,13 @@ public function execute(string $token): string } } } - + // Return JSON string try { - return json_encode($data, JSON_PRETTY_PRINT | JSON_INVALID_UTF8_SUBSTITUTE); + return json_encode($data, JSON_PRETTY_PRINT | JSON_INVALID_UTF8_SUBSTITUTE); } catch (\Exception $e) { - return json_encode(['error' => 'Failed to encode final data: ' . $e->getMessage()]); + return json_encode(['error' => 'Failed to encode final data: ' . $e->getMessage()]); } } -} \ No newline at end of file +} diff --git a/Tools/ProfilerGetOneCollectorByToken.php b/Tools/ProfilerGetOneCollectorByToken.php index 10027c1..2218deb 100644 --- a/Tools/ProfilerGetOneCollectorByToken.php +++ b/Tools/ProfilerGetOneCollectorByToken.php @@ -7,8 +7,8 @@ use Symfony\Component\VarDumper\Cloner\VarCloner; use Symfony\Component\VarDumper\Dumper\CliDumper; - -class ProfilerGetOneCollectorByToken { // Remove implements ToolInterface +class ProfilerGetOneCollectorByToken +{ private ?Profiler $profiler = null; // Inject the Profiler service @@ -21,14 +21,14 @@ public function __construct(Profiler $profiler) public function execute(string $token, string $collectorName): string { if (!$this->profiler) { - return json_encode(['error' => 'Profiler service not available.']); + return json_encode(['error' => 'Profiler service not available.']); } - + // Load the profile for the given token try { $profile = $this->profiler->loadProfile($token); } catch (\Exception $e) { - return json_encode(['error' => "Error loading profile for token {$token}: " . $e->getMessage()]); + return json_encode(['error' => "Error loading profile for token {$token}: " . $e->getMessage()]); } if (!$profile) { @@ -37,14 +37,14 @@ public function execute(string $token, string $collectorName): string // Check if the collector exists in this profile if (!$profile->hasCollector($collectorName)) { - return json_encode(['error' => "Collector '{$collectorName}' not found for token: {$token}"]); + return json_encode(['error' => "Collector '{$collectorName}' not found for token: {$token}"]); } // Get the specific collector try { $collector = $profile->getCollector($collectorName); } catch (\Exception $e) { - return json_encode(['error' => "Error getting collector '{$collectorName}': " . $e->getMessage()]); + return json_encode(['error' => "Error getting collector '{$collectorName}': " . $e->getMessage()]); } // Retrieve collector data (Keep existing logic) @@ -57,24 +57,24 @@ public function execute(string $token, string $collectorName): string json_encode($data); } catch (\Exception $e) { $dumpedData = $this->dumpData($collector); - $data = null; + $data = null; } - } else { - $dumpedData = $this->dumpData($collector); - } + } else { + $dumpedData = $this->dumpData($collector); + } - if ($data !== null) { - try { - return json_encode($data, JSON_PRETTY_PRINT | JSON_INVALID_UTF8_SUBSTITUTE); - } catch (\Exception $e) { - $dumpedData = $this->dumpData($data); - return "Collector '{$collectorName}' data (JSON failed, dumped):\n" . $dumpedData; - } - } elseif ($dumpedData !== null) { - return "Collector '{$collectorName}' data (dumped):\n" . $dumpedData; - } else { - return json_encode(['error' => "Could not retrieve or represent data for collector '{$collectorName}'."]); - } + if ($data !== null) { + try { + return json_encode($data, JSON_PRETTY_PRINT | JSON_INVALID_UTF8_SUBSTITUTE); + } catch (\Exception $e) { + $dumpedData = $this->dumpData($data); + return "Collector '{$collectorName}' data (JSON failed, dumped):\n" . $dumpedData; + } + } elseif ($dumpedData !== null) { + return "Collector '{$collectorName}' data (dumped):\n" . $dumpedData; + } else { + return json_encode(['error' => "Could not retrieve or represent data for collector '{$collectorName}'."]); + } } /** @@ -95,4 +95,4 @@ private function dumpData($variable): ?string return "Error during data dumping: " . $e->getMessage(); } } -} \ No newline at end of file +} diff --git a/Tools/ProfilerList.php b/Tools/ProfilerList.php index b6bc802..94a8d8a 100644 --- a/Tools/ProfilerList.php +++ b/Tools/ProfilerList.php @@ -5,7 +5,8 @@ use Symfony\Component\HttpKernel\Profiler\Profiler; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; -class ProfilerList { // Remove implements ToolInterface +class ProfilerList +{ private ?Profiler $profiler = null; private ?ParameterBagInterface $parameterBag = null; @@ -27,7 +28,7 @@ public function execute( ): string { if (!$this->profiler) { return json_encode(['error' => 'Profiler service not available.']); - } + } try { // Use the profiler to find profiles matching the criteria $tokens = $this->profiler->find($ip, $url, $limit, $method, null, null, $statusCode); @@ -67,4 +68,4 @@ public function execute( } -} \ No newline at end of file +} diff --git a/composer.json b/composer.json index 2109c4d..c358336 100644 --- a/composer.json +++ b/composer.json @@ -20,6 +20,9 @@ "Killerwolf\\MCPProfilerBundle\\": "" } }, + "scripts": { + "cs-fix": "docker run --rm -v $(pwd):/app -w /app ghcr.io/php-cs-fixer/php-cs-fixer:3-php8.3 fix ." + }, "bin": [ "bin/run-mcp.sh" ] From 1868c6e945b46c1b90825c69aab922bb1cca2807 Mon Sep 17 00:00:00 2001 From: Hamdi LAADHARI Date: Mon, 31 Mar 2025 23:36:06 +0200 Subject: [PATCH 5/7] fixes CI --- .github/workflows/ci.yml | 7 +++++-- .gitignore | 1 + composer.json | 4 +++- phpstan.neon | 8 ++++++++ 4 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 phpstan.neon diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 90cd290..9c22f80 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,8 +46,11 @@ jobs: with: args: fix . --dry-run --diff - - name: Run PHPStan - run: vendor/bin/phpstan analyse --memory-limit=2G # Added memory limit as PHPStan can be memory intensive + - name: Run PHPStan (Docker) + uses: docker://ghcr.io/phpstan/phpstan:2 + with: + args: analyse . -c phpstan.neon --memory-limit=2G + continue-on-error: true # Allow the workflow to continue even if PHPStan finds errors - name: Run PHPUnit run: vendor/bin/phpunit \ No newline at end of file diff --git a/.gitignore b/.gitignore index c5952fc..91943ed 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ vendor/ .idea .php-cs-fixer.cache +composer.lock diff --git a/composer.json b/composer.json index c358336..d8142ba 100644 --- a/composer.json +++ b/composer.json @@ -13,6 +13,7 @@ "php": ">=8.1", "symfony/framework-bundle": "^6.4|^7.0", "symfony/console": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", "ext-pcntl": "*" }, "autoload": { @@ -21,7 +22,8 @@ } }, "scripts": { - "cs-fix": "docker run --rm -v $(pwd):/app -w /app ghcr.io/php-cs-fixer/php-cs-fixer:3-php8.3 fix ." + "cs-fix": "docker run --rm -v $(pwd):/app -w /app ghcr.io/php-cs-fixer/php-cs-fixer:3-php8.3 fix .", + "phpstan": "docker run --rm -v $(pwd):/app -w /app ghcr.io/phpstan/phpstan:2 analyse -c phpstan.neon" }, "bin": [ "bin/run-mcp.sh" diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000..4bc6327 --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,8 @@ +parameters: + level: 6 # Start with a reasonable level, can be adjusted later + paths: + - . + excludePaths: + - vendor/* + bootstrapFiles: + - vendor/autoload.php \ No newline at end of file From 7376740aca941188d41978f091a9c079deafde01 Mon Sep 17 00:00:00 2001 From: Hamdi LAADHARI Date: Mon, 31 Mar 2025 23:44:34 +0200 Subject: [PATCH 6/7] WIP PHPunit --- .gitignore | 1 + composer.json | 13 +++++++++++-- phpunit.xml.dist | 22 ++++++++++++++++++++++ tests/MCPProfilerBundleTest.php | 21 +++++++++++++++++++++ 4 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 phpunit.xml.dist create mode 100644 tests/MCPProfilerBundleTest.php diff --git a/.gitignore b/.gitignore index 91943ed..ad4287d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ vendor/ .idea .php-cs-fixer.cache composer.lock +.phpunit.cache diff --git a/composer.json b/composer.json index d8142ba..2ca6320 100644 --- a/composer.json +++ b/composer.json @@ -21,11 +21,20 @@ "Killerwolf\\MCPProfilerBundle\\": "" } }, + "autoload-dev": { + "psr-4": { + "Killerwolf\\MCPProfilerBundle\\Tests\\": "tests/" + } + }, "scripts": { "cs-fix": "docker run --rm -v $(pwd):/app -w /app ghcr.io/php-cs-fixer/php-cs-fixer:3-php8.3 fix .", - "phpstan": "docker run --rm -v $(pwd):/app -w /app ghcr.io/phpstan/phpstan:2 analyse -c phpstan.neon" + "phpstan": "docker run --rm -v $(pwd):/app -w /app ghcr.io/phpstan/phpstan:2 analyse -c phpstan.neon", + "test": "vendor/bin/phpunit" }, "bin": [ "bin/run-mcp.sh" - ] + ], + "require-dev": { + "phpunit/phpunit": "^10.0 || ^11.0" + } } \ No newline at end of file diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 0000000..e2210ed --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,22 @@ + + + + + tests + + + + + + . + + + vendor + tests + + + \ No newline at end of file diff --git a/tests/MCPProfilerBundleTest.php b/tests/MCPProfilerBundleTest.php new file mode 100644 index 0000000..d368130 --- /dev/null +++ b/tests/MCPProfilerBundleTest.php @@ -0,0 +1,21 @@ +assertInstanceOf(Bundle::class, $bundle); + $this->assertInstanceOf(MCPProfilerBundle::class, $bundle); + } + + // Add more tests here later +} From 698a48f8ac3cbdef32c59a6e11e20ade11900072 Mon Sep 17 00:00:00 2001 From: Hamdi LAADHARI Date: Mon, 31 Mar 2025 23:52:04 +0200 Subject: [PATCH 7/7] adds php 8.4 ci checks --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c22f80..aed9892 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-version: ['8.1', '8.2', '8.3'] + php-version: ['8.1', '8.2', '8.3', '8.4'] steps: - uses: actions/checkout@v4