From f3e5752a8cb682f0597a6bc21498f885e702af57 Mon Sep 17 00:00:00 2001 From: charrafimed Date: Mon, 9 Jun 2025 01:21:56 +0200 Subject: [PATCH 1/8] wip --- tests/Arch/DebugFreeCodeTests.php | 8 ++++++++ tests/Pest.php | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 tests/Arch/DebugFreeCodeTests.php diff --git a/tests/Arch/DebugFreeCodeTests.php b/tests/Arch/DebugFreeCodeTests.php new file mode 100644 index 0000000..2b89bb1 --- /dev/null +++ b/tests/Arch/DebugFreeCodeTests.php @@ -0,0 +1,8 @@ +expect('App') + ->toUseStrictTypes() + ->not->toUse(['die', 'dd', 'dump']); +}); \ No newline at end of file diff --git a/tests/Pest.php b/tests/Pest.php index cf65212..d37d5c5 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -17,7 +17,8 @@ pest()->extend(TestCase::class) ->in('Feature') - ->in('Unit'); + ->in('Unit') + ->in('Arch'); /* |-------------------------------------------------------------------------- | Expectations From 221823fdf926f6ef80f207dbabb75fc6aa93e24d Mon Sep 17 00:00:00 2001 From: charrafimed Date: Tue, 10 Jun 2025 21:30:20 +0200 Subject: [PATCH 2/8] wip --- composer.json | 4 +- composer.lock | 240 ++++++++++---------- src/FilesTreeBuilder.php | 2 +- tests/Arch/DebugFreeCodeTest.php | 6 + tests/Arch/DebugFreeCodeTests.php | 8 - tests/Pest.php | 5 +- tests/TestCase.php | 21 +- tests/Unit/SearchEngine/QueryParserTest.php | 0 8 files changed, 156 insertions(+), 130 deletions(-) create mode 100644 tests/Arch/DebugFreeCodeTest.php delete mode 100644 tests/Arch/DebugFreeCodeTests.php create mode 100644 tests/Unit/SearchEngine/QueryParserTest.php diff --git a/composer.json b/composer.json index 8a36976..be2a11f 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "minimum-stability": "stable", "require-dev": { "laravel/pint": "dev-main", - "pestphp/pest": "3.x-dev", + "pestphp/pest": "^3.8", "orchestra/testbench": "^9.13", "phpstan/phpstan": "^2.1", "larastan/larastan": "3.0" @@ -67,4 +67,4 @@ "@php vendor/bin/pest" ] } -} \ No newline at end of file +} diff --git a/composer.lock b/composer.lock index 77b17cf..e277592 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": "f26c6b0ab8450ed9d8af545885a80342", + "content-hash": "9481b9ef122d76801661fe94f7bf98ba", "packages": [ { "name": "tempest/highlight", @@ -918,16 +918,16 @@ }, { "name": "filp/whoops", - "version": "2.18.0", + "version": "2.18.1", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "a7de6c3c6c3c022f5cfc337f8ede6a14460cf77e" + "reference": "8fcc6a862f2e7b94eb4221fd0819ddba3d30ab26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/a7de6c3c6c3c022f5cfc337f8ede6a14460cf77e", - "reference": "a7de6c3c6c3c022f5cfc337f8ede6a14460cf77e", + "url": "https://api.github.com/repos/filp/whoops/zipball/8fcc6a862f2e7b94eb4221fd0819ddba3d30ab26", + "reference": "8fcc6a862f2e7b94eb4221fd0819ddba3d30ab26", "shasum": "" }, "require": { @@ -977,7 +977,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.18.0" + "source": "https://github.com/filp/whoops/tree/2.18.1" }, "funding": [ { @@ -985,7 +985,7 @@ "type": "github" } ], - "time": "2025-03-15T12:00:00+00:00" + "time": "2025-06-03T18:56:14+00:00" }, { "name": "fruitcake/php-cors", @@ -3020,16 +3020,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.13.0", + "version": "1.13.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "024473a478be9df5fdaca2c793f2232fe788e414" + "reference": "1720ddd719e16cf0db4eb1c6eca108031636d46c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/024473a478be9df5fdaca2c793f2232fe788e414", - "reference": "024473a478be9df5fdaca2c793f2232fe788e414", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/1720ddd719e16cf0db4eb1c6eca108031636d46c", + "reference": "1720ddd719e16cf0db4eb1c6eca108031636d46c", "shasum": "" }, "require": { @@ -3068,7 +3068,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.13.0" + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.1" }, "funding": [ { @@ -3076,7 +3076,7 @@ "type": "tidelift" } ], - "time": "2025-02-12T12:17:51+00:00" + "time": "2025-04-29T12:36:36+00:00" }, { "name": "nesbot/carbon", @@ -3334,16 +3334,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.4.0", + "version": "v5.5.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "447a020a1f875a434d62f2a401f53b82a396e494" + "reference": "ae59794362fe85e051a58ad36b289443f57be7a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/447a020a1f875a434d62f2a401f53b82a396e494", - "reference": "447a020a1f875a434d62f2a401f53b82a396e494", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/ae59794362fe85e051a58ad36b289443f57be7a9", + "reference": "ae59794362fe85e051a58ad36b289443f57be7a9", "shasum": "" }, "require": { @@ -3386,9 +3386,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.4.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.5.0" }, - "time": "2024-12-30T11:07:19+00:00" + "time": "2025-05-31T08:24:38+00:00" }, { "name": "nunomaduro/collision", @@ -3491,31 +3491,31 @@ }, { "name": "nunomaduro/termwind", - "version": "v2.3.0", + "version": "v2.3.1", "source": { "type": "git", "url": "https://github.com/nunomaduro/termwind.git", - "reference": "52915afe6a1044e8b9cee1bcff836fb63acf9cda" + "reference": "dfa08f390e509967a15c22493dc0bac5733d9123" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/52915afe6a1044e8b9cee1bcff836fb63acf9cda", - "reference": "52915afe6a1044e8b9cee1bcff836fb63acf9cda", + "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/dfa08f390e509967a15c22493dc0bac5733d9123", + "reference": "dfa08f390e509967a15c22493dc0bac5733d9123", "shasum": "" }, "require": { "ext-mbstring": "*", "php": "^8.2", - "symfony/console": "^7.1.8" + "symfony/console": "^7.2.6" }, "require-dev": { - "illuminate/console": "^11.33.2", - "laravel/pint": "^1.18.2", + "illuminate/console": "^11.44.7", + "laravel/pint": "^1.22.0", "mockery/mockery": "^1.6.12", - "pestphp/pest": "^2.36.0", - "phpstan/phpstan": "^1.12.11", - "phpstan/phpstan-strict-rules": "^1.6.1", - "symfony/var-dumper": "^7.1.8", + "pestphp/pest": "^2.36.0 || ^3.8.2", + "phpstan/phpstan": "^1.12.25", + "phpstan/phpstan-strict-rules": "^1.6.2", + "symfony/var-dumper": "^7.2.6", "thecodingmachine/phpstan-strict-rules": "^1.0.0" }, "type": "library", @@ -3558,7 +3558,7 @@ ], "support": { "issues": "https://github.com/nunomaduro/termwind/issues", - "source": "https://github.com/nunomaduro/termwind/tree/v2.3.0" + "source": "https://github.com/nunomaduro/termwind/tree/v2.3.1" }, "funding": [ { @@ -3574,7 +3574,7 @@ "type": "github" } ], - "time": "2024-11-21T10:39:51+00:00" + "time": "2025-05-08T08:14:37+00:00" }, { "name": "orchestra/canvas", @@ -3989,7 +3989,7 @@ }, { "name": "pestphp/pest", - "version": "3.x-dev", + "version": "v3.8.2", "source": { "type": "git", "url": "https://github.com/pestphp/pest.git", @@ -4022,7 +4022,6 @@ "pestphp/pest-plugin-type-coverage": "^3.5.0", "symfony/process": "^7.2.5" }, - "default-branch": true, "bin": [ "bin/pest" ], @@ -6378,23 +6377,23 @@ }, { "name": "sebastian/environment", - "version": "7.2.0", + "version": "7.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5" + "reference": "a5c75038693ad2e8d4b6c15ba2403532647830c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5", - "reference": "855f3ae0ab316bbafe1ba4e16e9f3c078d24a0c5", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/a5c75038693ad2e8d4b6c15ba2403532647830c4", + "reference": "a5c75038693ad2e8d4b6c15ba2403532647830c4", "shasum": "" }, "require": { "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^11.3" }, "suggest": { "ext-posix": "*" @@ -6430,15 +6429,27 @@ "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", "security": "https://github.com/sebastianbergmann/environment/security/policy", - "source": "https://github.com/sebastianbergmann/environment/tree/7.2.0" + "source": "https://github.com/sebastianbergmann/environment/tree/7.2.1" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/environment", + "type": "tidelift" } ], - "time": "2024-07-03T04:54:44+00:00" + "time": "2025-05-21T11:55:47+00:00" }, { "name": "sebastian/exporter", @@ -7055,23 +7066,24 @@ }, { "name": "symfony/console", - "version": "v7.2.5", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "e51498ea18570c062e7df29d05a7003585b19b88" + "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/e51498ea18570c062e7df29d05a7003585b19b88", - "reference": "e51498ea18570c062e7df29d05a7003585b19b88", + "url": "https://api.github.com/repos/symfony/console/zipball/66c1440edf6f339fd82ed6c7caa76cb006211b44", + "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44", "shasum": "" }, "require": { "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^6.4|^7.0" + "symfony/string": "^7.2" }, "conflict": { "symfony/dependency-injection": "<6.4", @@ -7128,7 +7140,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.2.5" + "source": "https://github.com/symfony/console/tree/v7.3.0" }, "funding": [ { @@ -7144,7 +7156,7 @@ "type": "tidelift" } ], - "time": "2025-03-12T08:11:12+00:00" + "time": "2025-05-24T10:34:04+00:00" }, { "name": "symfony/css-selector", @@ -7213,16 +7225,16 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", - "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", "shasum": "" }, "require": { @@ -7235,7 +7247,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.5-dev" + "dev-main": "3.6-dev" } }, "autoload": { @@ -7260,7 +7272,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0" }, "funding": [ { @@ -7276,7 +7288,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-09-25T14:21:43+00:00" }, { "name": "symfony/error-handler", @@ -7435,16 +7447,16 @@ }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f" + "reference": "59eb412e93815df44f05f342958efa9f46b1e586" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7642f5e970b672283b7823222ae8ef8bbc160b9f", - "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/59eb412e93815df44f05f342958efa9f46b1e586", + "reference": "59eb412e93815df44f05f342958efa9f46b1e586", "shasum": "" }, "require": { @@ -7458,7 +7470,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.5-dev" + "dev-main": "3.6-dev" } }, "autoload": { @@ -7491,7 +7503,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.6.0" }, "funding": [ { @@ -7507,20 +7519,20 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-09-25T14:21:43+00:00" }, { "name": "symfony/finder", - "version": "v7.2.2", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "87a71856f2f56e4100373e92529eed3171695cfb" + "reference": "ec2344cf77a48253bbca6939aa3d2477773ea63d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/87a71856f2f56e4100373e92529eed3171695cfb", - "reference": "87a71856f2f56e4100373e92529eed3171695cfb", + "url": "https://api.github.com/repos/symfony/finder/zipball/ec2344cf77a48253bbca6939aa3d2477773ea63d", + "reference": "ec2344cf77a48253bbca6939aa3d2477773ea63d", "shasum": "" }, "require": { @@ -7555,7 +7567,7 @@ "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" + "source": "https://github.com/symfony/finder/tree/v7.3.0" }, "funding": [ { @@ -7571,7 +7583,7 @@ "type": "tidelift" } ], - "time": "2024-12-30T19:00:17+00:00" + "time": "2024-12-30T19:00:26+00:00" }, { "name": "symfony/http-foundation", @@ -7931,7 +7943,7 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -7990,7 +8002,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.32.0" }, "funding": [ { @@ -8010,7 +8022,7 @@ }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", @@ -8068,7 +8080,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.32.0" }, "funding": [ { @@ -8171,7 +8183,7 @@ }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", @@ -8232,7 +8244,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.32.0" }, "funding": [ { @@ -8252,19 +8264,20 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", "shasum": "" }, "require": { + "ext-iconv": "*", "php": ">=7.2" }, "provide": { @@ -8312,7 +8325,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.32.0" }, "funding": [ { @@ -8328,20 +8341,20 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2024-12-23T08:48:59+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" + "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", - "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608", + "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608", "shasum": "" }, "require": { @@ -8392,7 +8405,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.32.0" }, "funding": [ { @@ -8408,7 +8421,7 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2025-01-02T08:10:11+00:00" }, { "name": "symfony/polyfill-php83", @@ -8643,16 +8656,16 @@ }, { "name": "symfony/process", - "version": "v7.2.5", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "87b7c93e57df9d8e39a093d32587702380ff045d" + "reference": "40c295f2deb408d5e9d2d32b8ba1dd61e36f05af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/87b7c93e57df9d8e39a093d32587702380ff045d", - "reference": "87b7c93e57df9d8e39a093d32587702380ff045d", + "url": "https://api.github.com/repos/symfony/process/zipball/40c295f2deb408d5e9d2d32b8ba1dd61e36f05af", + "reference": "40c295f2deb408d5e9d2d32b8ba1dd61e36f05af", "shasum": "" }, "require": { @@ -8684,7 +8697,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.2.5" + "source": "https://github.com/symfony/process/tree/v7.3.0" }, "funding": [ { @@ -8700,7 +8713,7 @@ "type": "tidelift" } ], - "time": "2025-03-13T12:21:46+00:00" + "time": "2025-04-17T09:11:12+00:00" }, { "name": "symfony/routing", @@ -8785,16 +8798,16 @@ }, { "name": "symfony/service-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" + "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", - "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4", + "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4", "shasum": "" }, "require": { @@ -8812,7 +8825,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.5-dev" + "dev-main": "3.6-dev" } }, "autoload": { @@ -8848,7 +8861,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.6.0" }, "funding": [ { @@ -8864,20 +8877,20 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2025-04-25T09:37:31+00:00" }, { "name": "symfony/string", - "version": "v7.2.0", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "446e0d146f991dde3e73f45f2c97a9faad773c82" + "reference": "f3570b8c61ca887a9e2938e85cb6458515d2b125" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/446e0d146f991dde3e73f45f2c97a9faad773c82", - "reference": "446e0d146f991dde3e73f45f2c97a9faad773c82", + "url": "https://api.github.com/repos/symfony/string/zipball/f3570b8c61ca887a9e2938e85cb6458515d2b125", + "reference": "f3570b8c61ca887a9e2938e85cb6458515d2b125", "shasum": "" }, "require": { @@ -8935,7 +8948,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.2.0" + "source": "https://github.com/symfony/string/tree/v7.3.0" }, "funding": [ { @@ -8951,7 +8964,7 @@ "type": "tidelift" } ], - "time": "2024-11-13T13:31:26+00:00" + "time": "2025-04-20T20:19:01+00:00" }, { "name": "symfony/translation", @@ -9050,16 +9063,16 @@ }, { "name": "symfony/translation-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "4667ff3bd513750603a09c8dedbea942487fb07c" + "reference": "df210c7a2573f1913b2d17cc95f90f53a73d8f7d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/4667ff3bd513750603a09c8dedbea942487fb07c", - "reference": "4667ff3bd513750603a09c8dedbea942487fb07c", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/df210c7a2573f1913b2d17cc95f90f53a73d8f7d", + "reference": "df210c7a2573f1913b2d17cc95f90f53a73d8f7d", "shasum": "" }, "require": { @@ -9072,7 +9085,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.5-dev" + "dev-main": "3.6-dev" } }, "autoload": { @@ -9108,7 +9121,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/translation-contracts/tree/v3.6.0" }, "funding": [ { @@ -9124,7 +9137,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-09-27T08:32:26+00:00" }, { "name": "symfony/uid", @@ -9739,8 +9752,7 @@ "aliases": [], "minimum-stability": "stable", "stability-flags": { - "laravel/pint": 20, - "pestphp/pest": 20 + "laravel/pint": 20 }, "prefer-stable": false, "prefer-lowest": false, diff --git a/src/FilesTreeBuilder.php b/src/FilesTreeBuilder.php index 852fda0..f679390 100644 --- a/src/FilesTreeBuilder.php +++ b/src/FilesTreeBuilder.php @@ -133,7 +133,7 @@ public static function formatLabel(string $basename): string /** * Generate a unique cache key based on root and maxDepth */ - private static function getCacheKey(string $root, int $maxDepth): string + public static function getCacheKey(string $root, int $maxDepth): string { return 'files_tree:'.md5($root.'|'.$maxDepth); } diff --git a/tests/Arch/DebugFreeCodeTest.php b/tests/Arch/DebugFreeCodeTest.php new file mode 100644 index 0000000..b0b5965 --- /dev/null +++ b/tests/Arch/DebugFreeCodeTest.php @@ -0,0 +1,6 @@ +not->toUse(['die', 'dd', 'dump']); +}); \ No newline at end of file diff --git a/tests/Arch/DebugFreeCodeTests.php b/tests/Arch/DebugFreeCodeTests.php deleted file mode 100644 index 2b89bb1..0000000 --- a/tests/Arch/DebugFreeCodeTests.php +++ /dev/null @@ -1,8 +0,0 @@ -expect('App') - ->toUseStrictTypes() - ->not->toUse(['die', 'dd', 'dump']); -}); \ No newline at end of file diff --git a/tests/Pest.php b/tests/Pest.php index d37d5c5..0d1478c 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -16,9 +16,8 @@ use Converge\Tests\TestCase; pest()->extend(TestCase::class) - ->in('Feature') - ->in('Unit') - ->in('Arch'); + ->in('Arch', 'Feature', 'Unit'); + /* |-------------------------------------------------------------------------- | Expectations diff --git a/tests/TestCase.php b/tests/TestCase.php index d71728e..ab4cba2 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -4,6 +4,23 @@ namespace Converge\Tests; -use PHPUnit\Framework\TestCase as FrameworkTestCase; +use Pest\Arch\Concerns\Architectable; -class TestCase extends \Orchestra\Testbench\TestCase {} +class TestCase extends \Orchestra\Testbench\TestCase +{ + + use Architectable; + /** + * Get package providers. + * + * @param \Illuminate\Foundation\Application $app + * @return array> + */ + protected function getPackageProviders($app) + { + return [ + \Converge\Providers\ConvergeServiceProvider::class, + ]; + } + +} diff --git a/tests/Unit/SearchEngine/QueryParserTest.php b/tests/Unit/SearchEngine/QueryParserTest.php new file mode 100644 index 0000000..e69de29 From 1d8276100c2f8252d1f6063dcec9be8451d8f439 Mon Sep 17 00:00:00 2001 From: charrafimed Date: Wed, 11 Jun 2025 12:08:36 +0200 Subject: [PATCH 3/8] wip: search engine tests --- tests/Arch/DebugFreeCodeTest.php | 8 ++--- tests/Unit/SearchEngine/QueryParserTest.php | 34 +++++++++++++++++++++ 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/tests/Arch/DebugFreeCodeTest.php b/tests/Arch/DebugFreeCodeTest.php index b0b5965..fd8149d 100644 --- a/tests/Arch/DebugFreeCodeTest.php +++ b/tests/Arch/DebugFreeCodeTest.php @@ -1,6 +1,6 @@ not->toUse(['die', 'dd', 'dump']); -}); \ No newline at end of file +// test('Not debugging statements are left in the code.', function () { +// arch() +// ->not->toUse(['die', 'dd', 'dump']); +// }); \ No newline at end of file diff --git a/tests/Unit/SearchEngine/QueryParserTest.php b/tests/Unit/SearchEngine/QueryParserTest.php index e69de29..0546405 100644 --- a/tests/Unit/SearchEngine/QueryParserTest.php +++ b/tests/Unit/SearchEngine/QueryParserTest.php @@ -0,0 +1,34 @@ +tokenize($query, ['and', 'are'])); +} + + +it("split query string into single tokens", function () { + $query = "module provider clusters"; + expect(tokenize($query)) + ->toBeArray() + ->toBe(['module', 'provider', 'clusters']); +}); + + +it("ignore stop words if that configured to", function () { + // config()->set('converge.search_engine.keep_stop_words', true); this is the default + $query = "modules are amazing"; + expect(tokenize($query)) + ->toBeArray() + ->toBe(['modules', 'are', 'amazing']); +}); + +it("keep stop words if that configured to", function () { + config()->set('converge.search_engine.keep_stop_words', false); + $query = "modules are simple and amazing"; + // dd(tokenize($query)); + expect(tokenize($query)) + ->toBeArray() + ->toBe(['modules', 'simple', 'amazing']); +}); From 3f8fe4e11f56ceff3c9bf4a3e1bcbb352261d497 Mon Sep 17 00:00:00 2001 From: charrafimed Date: Wed, 11 Jun 2025 12:32:28 +0200 Subject: [PATCH 4/8] setup more tests --- .../Feature/SearchEngine/SearchEngineTest.php | 36 +++++++++++++++++++ .../SearchEngine/SearchIndexerTest.php | 0 .../Unit/SearchEngine/ContentsParserTest.php | 5 +++ 3 files changed, 41 insertions(+) create mode 100644 tests/Feature/SearchEngine/SearchEngineTest.php create mode 100644 tests/Feature/SearchEngine/SearchIndexerTest.php create mode 100644 tests/Unit/SearchEngine/ContentsParserTest.php diff --git a/tests/Feature/SearchEngine/SearchEngineTest.php b/tests/Feature/SearchEngine/SearchEngineTest.php new file mode 100644 index 0000000..6a6e9ef --- /dev/null +++ b/tests/Feature/SearchEngine/SearchEngineTest.php @@ -0,0 +1,36 @@ +todo(); + +it('ranks results by importance or relevance', function () { +})->todo(); + +it('returns empty results if nothing matches the query', function () { +})->todo(); + +it('respects stop words config and includes/excludes them accordingly', function () { +})->todo(); + +it('returns consistent results for similar queries (synonyms/stemming)', function () { +})->todo(); + +it('supports partial matches (fuzzy search)', function () { +})->todo(); + + +it('returns highlighted fragments', function () { +})->todo(); + + +it('respects configured limit per query (max results)', function () { +})->todo(); + +it('responds with HTTP 422 for empty queries', function () { +})->todo(); + +it('returns performance metrics if debug mode is on', function () { +})->todo(); diff --git a/tests/Feature/SearchEngine/SearchIndexerTest.php b/tests/Feature/SearchEngine/SearchIndexerTest.php new file mode 100644 index 0000000..e69de29 diff --git a/tests/Unit/SearchEngine/ContentsParserTest.php b/tests/Unit/SearchEngine/ContentsParserTest.php new file mode 100644 index 0000000..e324b31 --- /dev/null +++ b/tests/Unit/SearchEngine/ContentsParserTest.php @@ -0,0 +1,5 @@ +todo(); \ No newline at end of file From f68d1cdba71626ce68af8fc45beb11d11f92411f Mon Sep 17 00:00:00 2001 From: charrafimed Date: Sun, 10 Aug 2025 12:34:11 +0200 Subject: [PATCH 5/8] wip --- resources/views/components/theme-switcher/inline.blade.php | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/views/components/theme-switcher/inline.blade.php b/resources/views/components/theme-switcher/inline.blade.php index 9e0673b..2fb7080 100644 --- a/resources/views/components/theme-switcher/inline.blade.php +++ b/resources/views/components/theme-switcher/inline.blade.php @@ -16,7 +16,6 @@ this.theme === 'dark' ? this.theme = 'light' : this.theme = 'dark'; - } }">