diff --git a/composer.lock b/composer.lock index d43718125..b6ee6ffe7 100644 --- a/composer.lock +++ b/composer.lock @@ -2589,16 +2589,16 @@ }, { "name": "neuron-core/neuron-ai", - "version": "3.0.10", + "version": "3.1.1", "source": { "type": "git", "url": "https://github.com/neuron-core/neuron-ai.git", - "reference": "4ce74d0a0f0b9e9f95a3875519fb600275f3561a" + "reference": "7aa71fadb7b9a4d57b2aa9deb4810e23daa7ebf0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/neuron-core/neuron-ai/zipball/4ce74d0a0f0b9e9f95a3875519fb600275f3561a", - "reference": "4ce74d0a0f0b9e9f95a3875519fb600275f3561a", + "url": "https://api.github.com/repos/neuron-core/neuron-ai/zipball/7aa71fadb7b9a4d57b2aa9deb4810e23daa7ebf0", + "reference": "7aa71fadb7b9a4d57b2aa9deb4810e23daa7ebf0", "shasum": "" }, "require": { @@ -2649,7 +2649,7 @@ "description": "The PHP Agentic Framework.", "support": { "issues": "https://github.com/neuron-core/neuron-ai/issues", - "source": "https://github.com/neuron-core/neuron-ai/tree/3.0.10" + "source": "https://github.com/neuron-core/neuron-ai/tree/3.1.1" }, "funding": [ { @@ -2657,7 +2657,7 @@ "type": "github" } ], - "time": "2026-03-03T17:34:35+00:00" + "time": "2026-03-06T14:46:45+00:00" }, { "name": "psr/cache", @@ -3963,16 +3963,16 @@ }, { "name": "symfony/cache", - "version": "v8.0.6", + "version": "v8.0.7", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "59184fa14658d7724cd9b8743d91c1b1aa618bff" + "reference": "b7b0f4ce5fb57a8dc061d494639e44e2cf7aa30f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/59184fa14658d7724cd9b8743d91c1b1aa618bff", - "reference": "59184fa14658d7724cd9b8743d91c1b1aa618bff", + "url": "https://api.github.com/repos/symfony/cache/zipball/b7b0f4ce5fb57a8dc061d494639e44e2cf7aa30f", + "reference": "b7b0f4ce5fb57a8dc061d494639e44e2cf7aa30f", "shasum": "" }, "require": { @@ -4039,7 +4039,7 @@ "psr6" ], "support": { - "source": "https://github.com/symfony/cache/tree/v8.0.6" + "source": "https://github.com/symfony/cache/tree/v8.0.7" }, "funding": [ { @@ -4059,7 +4059,7 @@ "type": "tidelift" } ], - "time": "2026-02-21T23:29:37+00:00" + "time": "2026-03-06T13:17:40+00:00" }, { "name": "symfony/cache-contracts", @@ -4216,16 +4216,16 @@ }, { "name": "symfony/config", - "version": "v8.0.6", + "version": "v8.0.7", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "94ea198de42f93dffa920a098cac3961a82e63b7" + "reference": "9a34c52187112503d02903ab35e6e3783f580c29" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/94ea198de42f93dffa920a098cac3961a82e63b7", - "reference": "94ea198de42f93dffa920a098cac3961a82e63b7", + "url": "https://api.github.com/repos/symfony/config/zipball/9a34c52187112503d02903ab35e6e3783f580c29", + "reference": "9a34c52187112503d02903ab35e6e3783f580c29", "shasum": "" }, "require": { @@ -4270,7 +4270,7 @@ "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/v8.0.6" + "source": "https://github.com/symfony/config/tree/v8.0.7" }, "funding": [ { @@ -4290,20 +4290,20 @@ "type": "tidelift" } ], - "time": "2026-02-25T16:59:43+00:00" + "time": "2026-03-06T13:17:40+00:00" }, { "name": "symfony/console", - "version": "v8.0.6", + "version": "v8.0.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "488285876e807a4777f074041d8bb508623419fa" + "reference": "15ed9008a4ebe2d6a78e4937f74e0c13ef2e618a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/488285876e807a4777f074041d8bb508623419fa", - "reference": "488285876e807a4777f074041d8bb508623419fa", + "url": "https://api.github.com/repos/symfony/console/zipball/15ed9008a4ebe2d6a78e4937f74e0c13ef2e618a", + "reference": "15ed9008a4ebe2d6a78e4937f74e0c13ef2e618a", "shasum": "" }, "require": { @@ -4360,7 +4360,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v8.0.6" + "source": "https://github.com/symfony/console/tree/v8.0.7" }, "funding": [ { @@ -4380,20 +4380,20 @@ "type": "tidelift" } ], - "time": "2026-02-25T16:59:43+00:00" + "time": "2026-03-06T14:06:22+00:00" }, { "name": "symfony/dependency-injection", - "version": "v8.0.6", + "version": "v8.0.7", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "edd98864a7b9eaaa10f389bd414e7d9e816bb59d" + "reference": "1faaac6dbfe069a92ab9e5c270fa43fc4e1761da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/edd98864a7b9eaaa10f389bd414e7d9e816bb59d", - "reference": "edd98864a7b9eaaa10f389bd414e7d9e816bb59d", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/1faaac6dbfe069a92ab9e5c270fa43fc4e1761da", + "reference": "1faaac6dbfe069a92ab9e5c270fa43fc4e1761da", "shasum": "" }, "require": { @@ -4441,7 +4441,7 @@ "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/v8.0.6" + "source": "https://github.com/symfony/dependency-injection/tree/v8.0.7" }, "funding": [ { @@ -4461,7 +4461,7 @@ "type": "tidelift" } ], - "time": "2026-02-25T16:59:43+00:00" + "time": "2026-03-03T07:49:33+00:00" }, { "name": "symfony/deprecation-contracts", @@ -4532,16 +4532,16 @@ }, { "name": "symfony/doctrine-bridge", - "version": "v8.0.6", + "version": "v8.0.7", "source": { "type": "git", "url": "https://github.com/symfony/doctrine-bridge.git", - "reference": "ba48ecfce3356d928cb3fe6975963c936a2648c3" + "reference": "649eec3f9cc806e42ee2e7928d05425ed66108d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/doctrine-bridge/zipball/ba48ecfce3356d928cb3fe6975963c936a2648c3", - "reference": "ba48ecfce3356d928cb3fe6975963c936a2648c3", + "url": "https://api.github.com/repos/symfony/doctrine-bridge/zipball/649eec3f9cc806e42ee2e7928d05425ed66108d4", + "reference": "649eec3f9cc806e42ee2e7928d05425ed66108d4", "shasum": "" }, "require": { @@ -4610,7 +4610,7 @@ "description": "Provides integration for Doctrine with various Symfony components", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/doctrine-bridge/tree/v8.0.6" + "source": "https://github.com/symfony/doctrine-bridge/tree/v8.0.7" }, "funding": [ { @@ -4630,20 +4630,20 @@ "type": "tidelift" } ], - "time": "2026-02-17T13:07:04+00:00" + "time": "2026-03-06T13:17:40+00:00" }, { "name": "symfony/dotenv", - "version": "v8.0.6", + "version": "v8.0.7", "source": { "type": "git", "url": "https://github.com/symfony/dotenv.git", - "reference": "94d59769b0ea491dd8b635089e766519d28773d6" + "reference": "23bd13cf3f6cca8b7661548ef958ff4f4aa7c458" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dotenv/zipball/94d59769b0ea491dd8b635089e766519d28773d6", - "reference": "94d59769b0ea491dd8b635089e766519d28773d6", + "url": "https://api.github.com/repos/symfony/dotenv/zipball/23bd13cf3f6cca8b7661548ef958ff4f4aa7c458", + "reference": "23bd13cf3f6cca8b7661548ef958ff4f4aa7c458", "shasum": "" }, "require": { @@ -4684,7 +4684,7 @@ "environment" ], "support": { - "source": "https://github.com/symfony/dotenv/tree/v8.0.6" + "source": "https://github.com/symfony/dotenv/tree/v8.0.7" }, "funding": [ { @@ -4704,7 +4704,7 @@ "type": "tidelift" } ], - "time": "2026-02-13T12:00:38+00:00" + "time": "2026-03-03T07:49:33+00:00" }, { "name": "symfony/error-handler", @@ -5228,16 +5228,16 @@ }, { "name": "symfony/form", - "version": "v8.0.6", + "version": "v8.0.7", "source": { "type": "git", "url": "https://github.com/symfony/form.git", - "reference": "104947c40b16aea6c7c45c0dc53f4c213940989d" + "reference": "954e17b053dad9fb227ebd90260752e3a46bb06a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/form/zipball/104947c40b16aea6c7c45c0dc53f4c213940989d", - "reference": "104947c40b16aea6c7c45c0dc53f4c213940989d", + "url": "https://api.github.com/repos/symfony/form/zipball/954e17b053dad9fb227ebd90260752e3a46bb06a", + "reference": "954e17b053dad9fb227ebd90260752e3a46bb06a", "shasum": "" }, "require": { @@ -5299,7 +5299,7 @@ "description": "Allows to easily create, process and reuse HTML forms", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/form/tree/v8.0.6" + "source": "https://github.com/symfony/form/tree/v8.0.7" }, "funding": [ { @@ -5319,20 +5319,20 @@ "type": "tidelift" } ], - "time": "2026-02-25T16:59:43+00:00" + "time": "2026-03-06T13:17:40+00:00" }, { "name": "symfony/framework-bundle", - "version": "v8.0.6", + "version": "v8.0.7", "source": { "type": "git", "url": "https://github.com/symfony/framework-bundle.git", - "reference": "86ebd86908edca06e3af5994bc46881575fbe813" + "reference": "6a43d76538d52d4b7660f07054a07f8346f73eae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/86ebd86908edca06e3af5994bc46881575fbe813", - "reference": "86ebd86908edca06e3af5994bc46881575fbe813", + "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/6a43d76538d52d4b7660f07054a07f8346f73eae", + "reference": "6a43d76538d52d4b7660f07054a07f8346f73eae", "shasum": "" }, "require": { @@ -5439,7 +5439,7 @@ "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/v8.0.6" + "source": "https://github.com/symfony/framework-bundle/tree/v8.0.7" }, "funding": [ { @@ -5459,20 +5459,20 @@ "type": "tidelift" } ], - "time": "2026-02-25T16:59:43+00:00" + "time": "2026-03-06T15:40:00+00:00" }, { "name": "symfony/http-foundation", - "version": "v8.0.6", + "version": "v8.0.7", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "7745ff1aad45d855fe25b08969269ef83b1ad8bc" + "reference": "c5ecf7b07408dbc4a87482634307654190954ae8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/7745ff1aad45d855fe25b08969269ef83b1ad8bc", - "reference": "7745ff1aad45d855fe25b08969269ef83b1ad8bc", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/c5ecf7b07408dbc4a87482634307654190954ae8", + "reference": "c5ecf7b07408dbc4a87482634307654190954ae8", "shasum": "" }, "require": { @@ -5519,7 +5519,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v8.0.6" + "source": "https://github.com/symfony/http-foundation/tree/v8.0.7" }, "funding": [ { @@ -5539,20 +5539,20 @@ "type": "tidelift" } ], - "time": "2026-02-21T16:28:39+00:00" + "time": "2026-03-06T13:17:40+00:00" }, { "name": "symfony/http-kernel", - "version": "v8.0.6", + "version": "v8.0.7", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "b567e571e74b5774b3d3cb4d35bdafa5f37e51a9" + "reference": "c04721f45723d8ce049fa3eee378b5a505272ac7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/b567e571e74b5774b3d3cb4d35bdafa5f37e51a9", - "reference": "b567e571e74b5774b3d3cb4d35bdafa5f37e51a9", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/c04721f45723d8ce049fa3eee378b5a505272ac7", + "reference": "c04721f45723d8ce049fa3eee378b5a505272ac7", "shasum": "" }, "require": { @@ -5623,7 +5623,7 @@ "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/v8.0.6" + "source": "https://github.com/symfony/http-kernel/tree/v8.0.7" }, "funding": [ { @@ -5643,7 +5643,7 @@ "type": "tidelift" } ], - "time": "2026-02-26T08:36:42+00:00" + "time": "2026-03-06T16:58:46+00:00" }, { "name": "symfony/intl", @@ -5818,16 +5818,16 @@ }, { "name": "symfony/messenger", - "version": "v8.0.6", + "version": "v8.0.7", "source": { "type": "git", "url": "https://github.com/symfony/messenger.git", - "reference": "4be925bf0155d6435d2cdfa63d5ffd277c44ac10" + "reference": "6ba5f08c156cfc95911dbb0da01a9bc390a70fd1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/messenger/zipball/4be925bf0155d6435d2cdfa63d5ffd277c44ac10", - "reference": "4be925bf0155d6435d2cdfa63d5ffd277c44ac10", + "url": "https://api.github.com/repos/symfony/messenger/zipball/6ba5f08c156cfc95911dbb0da01a9bc390a70fd1", + "reference": "6ba5f08c156cfc95911dbb0da01a9bc390a70fd1", "shasum": "" }, "require": { @@ -5884,7 +5884,7 @@ "description": "Helps applications send and receive messages to/from other applications or via message queues", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/messenger/tree/v8.0.6" + "source": "https://github.com/symfony/messenger/tree/v8.0.7" }, "funding": [ { @@ -5904,7 +5904,7 @@ "type": "tidelift" } ], - "time": "2026-02-25T16:59:43+00:00" + "time": "2026-03-04T13:55:34+00:00" }, { "name": "symfony/monolog-bridge", @@ -6781,22 +6781,22 @@ }, { "name": "symfony/property-info", - "version": "v8.0.6", + "version": "v8.0.7", "source": { "type": "git", "url": "https://github.com/symfony/property-info.git", - "reference": "97524d06a66ae87c59bf9f137420e843cbe4bea0" + "reference": "e1a6b5d10ee3455ae698c4a3f4ef580b78af27ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-info/zipball/97524d06a66ae87c59bf9f137420e843cbe4bea0", - "reference": "97524d06a66ae87c59bf9f137420e843cbe4bea0", + "url": "https://api.github.com/repos/symfony/property-info/zipball/e1a6b5d10ee3455ae698c4a3f4ef580b78af27ba", + "reference": "e1a6b5d10ee3455ae698c4a3f4ef580b78af27ba", "shasum": "" }, "require": { "php": ">=8.4", "symfony/string": "^7.4|^8.0", - "symfony/type-info": "^7.4.4|^8.0.4" + "symfony/type-info": "^7.4.7|^8.0.7" }, "conflict": { "phpdocumentor/reflection-docblock": "<5.2|>=7", @@ -6843,7 +6843,7 @@ "validator" ], "support": { - "source": "https://github.com/symfony/property-info/tree/v8.0.6" + "source": "https://github.com/symfony/property-info/tree/v8.0.7" }, "funding": [ { @@ -6863,7 +6863,7 @@ "type": "tidelift" } ], - "time": "2026-02-13T12:14:15+00:00" + "time": "2026-03-04T15:54:04+00:00" }, { "name": "symfony/routing", @@ -7448,16 +7448,16 @@ }, { "name": "symfony/twig-bridge", - "version": "v8.0.6", + "version": "v8.0.7", "source": { "type": "git", "url": "https://github.com/symfony/twig-bridge.git", - "reference": "a29b174218f6eb324bf24f60440ac81d17f6ee0d" + "reference": "e0539400f53d8305945c06eba7e8df007402f5e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/a29b174218f6eb324bf24f60440ac81d17f6ee0d", - "reference": "a29b174218f6eb324bf24f60440ac81d17f6ee0d", + "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/e0539400f53d8305945c06eba7e8df007402f5e2", + "reference": "e0539400f53d8305945c06eba7e8df007402f5e2", "shasum": "" }, "require": { @@ -7531,7 +7531,7 @@ "description": "Provides integration for Twig with various Symfony components", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/twig-bridge/tree/v8.0.6" + "source": "https://github.com/symfony/twig-bridge/tree/v8.0.7" }, "funding": [ { @@ -7551,7 +7551,7 @@ "type": "tidelift" } ], - "time": "2026-02-25T16:59:43+00:00" + "time": "2026-03-04T15:37:12+00:00" }, { "name": "symfony/twig-bundle", @@ -7639,16 +7639,16 @@ }, { "name": "symfony/type-info", - "version": "v8.0.6", + "version": "v8.0.7", "source": { "type": "git", "url": "https://github.com/symfony/type-info.git", - "reference": "785992c06d07306f963ded3439036f5da9b292fe" + "reference": "3c7de103dd6cb68be24e155838a64ef4a70ae195" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/type-info/zipball/785992c06d07306f963ded3439036f5da9b292fe", - "reference": "785992c06d07306f963ded3439036f5da9b292fe", + "url": "https://api.github.com/repos/symfony/type-info/zipball/3c7de103dd6cb68be24e155838a64ef4a70ae195", + "reference": "3c7de103dd6cb68be24e155838a64ef4a70ae195", "shasum": "" }, "require": { @@ -7697,7 +7697,7 @@ "type" ], "support": { - "source": "https://github.com/symfony/type-info/tree/v8.0.6" + "source": "https://github.com/symfony/type-info/tree/v8.0.7" }, "funding": [ { @@ -7717,7 +7717,7 @@ "type": "tidelift" } ], - "time": "2026-02-20T07:51:53+00:00" + "time": "2026-03-04T13:55:34+00:00" }, { "name": "symfony/var-dumper", @@ -11102,16 +11102,16 @@ }, { "name": "symfony/phpunit-bridge", - "version": "v8.0.3", + "version": "v8.0.7", "source": { "type": "git", "url": "https://github.com/symfony/phpunit-bridge.git", - "reference": "3c59b07980df5d4ae4a2620287016209802261ea" + "reference": "f95d88d54e34b13ee220a81133261a3c8a6a287a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/3c59b07980df5d4ae4a2620287016209802261ea", - "reference": "3c59b07980df5d4ae4a2620287016209802261ea", + "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/f95d88d54e34b13ee220a81133261a3c8a6a287a", + "reference": "f95d88d54e34b13ee220a81133261a3c8a6a287a", "shasum": "" }, "require": { @@ -11163,7 +11163,7 @@ "testing" ], "support": { - "source": "https://github.com/symfony/phpunit-bridge/tree/v8.0.3" + "source": "https://github.com/symfony/phpunit-bridge/tree/v8.0.7" }, "funding": [ { @@ -11183,20 +11183,20 @@ "type": "tidelift" } ], - "time": "2025-12-10T13:10:54+00:00" + "time": "2026-03-04T13:55:34+00:00" }, { "name": "symfony/serializer", - "version": "v8.0.6", + "version": "v8.0.7", "source": { "type": "git", "url": "https://github.com/symfony/serializer.git", - "reference": "b923bbb92f84213a927db6ad43576366b7b9ec2a" + "reference": "18bbaf7317e33e7e4bcd7ef281357ec4335fc900" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/b923bbb92f84213a927db6ad43576366b7b9ec2a", - "reference": "b923bbb92f84213a927db6ad43576366b7b9ec2a", + "url": "https://api.github.com/repos/symfony/serializer/zipball/18bbaf7317e33e7e4bcd7ef281357ec4335fc900", + "reference": "18bbaf7317e33e7e4bcd7ef281357ec4335fc900", "shasum": "" }, "require": { @@ -11260,7 +11260,7 @@ "description": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/serializer/tree/v8.0.6" + "source": "https://github.com/symfony/serializer/tree/v8.0.7" }, "funding": [ { @@ -11280,7 +11280,7 @@ "type": "tidelift" } ], - "time": "2026-02-25T16:59:43+00:00" + "time": "2026-03-06T13:17:40+00:00" }, { "name": "theseer/tokenizer", diff --git a/src/Console/AIAgentChatConsoleCommand.php b/src/Console/AIAgentChatConsoleCommand.php index 7734ea58c..32e843b2f 100644 --- a/src/Console/AIAgentChatConsoleCommand.php +++ b/src/Console/AIAgentChatConsoleCommand.php @@ -11,6 +11,7 @@ use NeuronAI\Chat\Messages\UserMessage; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Helper\QuestionHelper; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Question\Question; @@ -37,8 +38,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int return Command::SUCCESS; } - /** @var \Symfony\Component\Console\Helper\QuestionHelper $helper */ $helper = $this->getHelper('question'); + assert($helper instanceof QuestionHelper); $io->block( messages: [ diff --git a/src/Controller/AIChatRequestHandler.php b/src/Controller/AIChatRequestHandler.php index 5dce32efb..2c68b530f 100644 --- a/src/Controller/AIChatRequestHandler.php +++ b/src/Controller/AIChatRequestHandler.php @@ -80,8 +80,8 @@ public function clearChat(): Response public function chatSse(Request $request): EventStreamResponse { return new EventStreamResponse(function (EventStreamResponse $response) use ($request): void { - /** @var string $message */ $message = $request->query->get('message'); + assert(is_string($message)); $response->sendEvent(new ServerSentEvent( data: $this->twig->render('html/chat/message.html.twig', [ diff --git a/src/Domain/Athlete/Weight/AthleteWeightHistoryChart.php b/src/Domain/Athlete/Weight/AthleteWeightHistoryChart.php index 36c5febeb..ba58c3445 100644 --- a/src/Domain/Athlete/Weight/AthleteWeightHistoryChart.php +++ b/src/Domain/Athlete/Weight/AthleteWeightHistoryChart.php @@ -49,8 +49,8 @@ public function build(): array $athleteWeights, ); - /** @var AthleteWeight $firstAthleteWeight */ $firstAthleteWeight = reset($athleteWeights); + assert($firstAthleteWeight instanceof AthleteWeight); $zoomEndValue = $this->now->format('Y-m-d'); $zoomStartValue = $firstAthleteWeight->getOn()->format('Y-m-d'); diff --git a/src/Domain/Segment/SegmentEffort/SegmentEffortVsHeartRateChart.php b/src/Domain/Segment/SegmentEffort/SegmentEffortVsHeartRateChart.php index 334a67ddc..f93ffc314 100644 --- a/src/Domain/Segment/SegmentEffort/SegmentEffortVsHeartRateChart.php +++ b/src/Domain/Segment/SegmentEffort/SegmentEffortVsHeartRateChart.php @@ -42,13 +42,12 @@ public static function create( */ public function build(): array { - /** @var SegmentEffort[] $effortsWithHeartRate */ $effortsWithHeartRate = array_values(array_filter( $this->segmentEfforts->toArray(), fn (SegmentEffort $effort): bool => null !== $effort->getAverageHeartRate(), )); - if (empty($effortsWithHeartRate)) { + if ([] === $effortsWithHeartRate) { return []; } diff --git a/src/Infrastructure/DependencyInjection/Mutex/AutowireWithMutexPass.php b/src/Infrastructure/DependencyInjection/Mutex/AutowireWithMutexPass.php index 28830174e..cf56f3bac 100644 --- a/src/Infrastructure/DependencyInjection/Mutex/AutowireWithMutexPass.php +++ b/src/Infrastructure/DependencyInjection/Mutex/AutowireWithMutexPass.php @@ -33,8 +33,8 @@ public function process(ContainerBuilder $container): void [$prefix, $lockName] = explode('.', (string) $mutexDefinitionId); foreach ($constructorParams as $param) { - /** @var \ReflectionNamedType $type */ $type = $param->getType(); + assert($type instanceof \ReflectionNamedType); $definitionArguments[] = match ($param->getName()) { 'lockName' => LockName::from($lockName), default => new Reference($type->getName()), diff --git a/src/Infrastructure/Twig/SvgsTwigExtension.php b/src/Infrastructure/Twig/SvgsTwigExtension.php index 8e030d8ba..28692000e 100644 --- a/src/Infrastructure/Twig/SvgsTwigExtension.php +++ b/src/Infrastructure/Twig/SvgsTwigExtension.php @@ -24,7 +24,6 @@ public function svg(string $name, ?string $size = null, ?string $iconColor = nul $svg = $this->load('icons', $name); if ($size) { - /** @var non-empty-string $svg */ $svg = preg_replace_callback('/class="([^"]+)"/', function (array $matches) use ($size): string { $classes = explode(' ', $matches[1]); $classes = array_filter($classes, fn (string $class): bool => !preg_match('/^(w-|h-|size-)/', $class)); @@ -32,10 +31,10 @@ public function svg(string $name, ?string $size = null, ?string $iconColor = nul return 'class="'.implode(' ', $classes).'"'; }, $svg); + assert(is_string($svg) && '' !== $svg); } if (null !== $iconColor) { - /** @var non-empty-string $svg */ $svg = preg_replace_callback('/class="([^"]+)"/', function (array $matches) use ($iconColor): string { $classes = explode(' ', $matches[1]); $classes = array_filter($classes, fn (string $class): bool => !preg_match('/^(text-|hover:text|fill-|stroke-)/', $class)); @@ -43,6 +42,7 @@ public function svg(string $name, ?string $size = null, ?string $iconColor = nul return 'class="'.trim(implode(' ', $classes)).'"'; }, $svg); + assert(is_string($svg) && '' !== $svg); } return $svg; diff --git a/src/Kernel.php b/src/Kernel.php index 7815cd4c8..806ad6d51 100644 --- a/src/Kernel.php +++ b/src/Kernel.php @@ -38,14 +38,14 @@ public function build(ContainerBuilder $container): void protected function initializeContainer(): void { parent::initializeContainer(); - /** @var KeyValueStore $keyValueStore */ $keyValueStore = $this->getContainer()->get(KeyValueStore::class); + assert($keyValueStore instanceof KeyValueStore); Theme::setKeyValueStore($keyValueStore); - /** @var KernelProjectDir $kernelProjectDir */ $kernelProjectDir = $this->getContainer()->get(KernelProjectDir::class); - /** @var PlatformEnvironment $platformEnvironment */ + assert($kernelProjectDir instanceof KernelProjectDir); $platformEnvironment = $this->getContainer()->get(PlatformEnvironment::class); + assert($platformEnvironment instanceof PlatformEnvironment); AppConfig::init( kernelProjectDir: $kernelProjectDir, platformEnvironment: $platformEnvironment diff --git a/tests/Console/Daemon/__snapshots__/RunDaemonConsoleCommandTest__testExecute__1.txt b/tests/Console/Daemon/__snapshots__/RunDaemonConsoleCommandTest__testExecute__1.txt index ce812ed18..5467af4d7 100644 --- a/tests/Console/Daemon/__snapshots__/RunDaemonConsoleCommandTest__testExecute__1.txt +++ b/tests/Console/Daemon/__snapshots__/RunDaemonConsoleCommandTest__testExecute__1.txt @@ -5,7 +5,7 @@ Startedon0811202514:47:03 -Runtime:PHP8.5.x(cli)Symfony8.0.6Linux +Runtime:PHP8.5.x(cli)Symfony8.0.7Linux Configurationfiles: config.yaml diff --git a/tests/Console/__snapshots__/BuildAppConsoleCommandTest__testExecute__1.txt b/tests/Console/__snapshots__/BuildAppConsoleCommandTest__testExecute__1.txt index 44fd6c25c..f5d37ae5d 100644 --- a/tests/Console/__snapshots__/BuildAppConsoleCommandTest__testExecute__1.txt +++ b/tests/Console/__snapshots__/BuildAppConsoleCommandTest__testExecute__1.txt @@ -3,7 +3,7 @@ StatisticsforStravav4.7.0 -Runtime:PHP8.5.x(cli)Symfony8.0.6Linux +Runtime:PHP8.5.x(cli)Symfony8.0.7Linux Configurationfiles: config.yaml diff --git a/tests/Console/__snapshots__/DetectCorruptedActivitiesConsoleCommandTest__testExecuteWithoutCorruptedData__1.txt b/tests/Console/__snapshots__/DetectCorruptedActivitiesConsoleCommandTest__testExecuteWithoutCorruptedData__1.txt index 0380e71a8..e9c706dc3 100644 --- a/tests/Console/__snapshots__/DetectCorruptedActivitiesConsoleCommandTest__testExecuteWithoutCorruptedData__1.txt +++ b/tests/Console/__snapshots__/DetectCorruptedActivitiesConsoleCommandTest__testExecuteWithoutCorruptedData__1.txt @@ -3,7 +3,7 @@ StatisticsforStravav4.7.0 -Runtime:PHP8.5.x(cli)Symfony8.0.6Linux +Runtime:PHP8.5.x(cli)Symfony8.0.7Linux Configurationfiles: config.yaml diff --git a/tests/Console/__snapshots__/DetectCorruptedActivitiesConsoleCommandTest__testExecuteWithoutDataButNegativeConfirmation__1.txt b/tests/Console/__snapshots__/DetectCorruptedActivitiesConsoleCommandTest__testExecuteWithoutDataButNegativeConfirmation__1.txt index a7e13d5b4..94985bb7b 100644 --- a/tests/Console/__snapshots__/DetectCorruptedActivitiesConsoleCommandTest__testExecuteWithoutDataButNegativeConfirmation__1.txt +++ b/tests/Console/__snapshots__/DetectCorruptedActivitiesConsoleCommandTest__testExecuteWithoutDataButNegativeConfirmation__1.txt @@ -3,7 +3,7 @@ StatisticsforStravav4.7.0 -Runtime:PHP8.5.x(cli)Symfony8.0.6Linux +Runtime:PHP8.5.x(cli)Symfony8.0.7Linux Configurationfiles: config.yaml diff --git a/tests/Console/__snapshots__/DetectCorruptedActivitiesConsoleCommandTest__testExecuteWithoutDataButPositiveConfirmation__1.txt b/tests/Console/__snapshots__/DetectCorruptedActivitiesConsoleCommandTest__testExecuteWithoutDataButPositiveConfirmation__1.txt index a9185918e..85916bcfa 100644 --- a/tests/Console/__snapshots__/DetectCorruptedActivitiesConsoleCommandTest__testExecuteWithoutDataButPositiveConfirmation__1.txt +++ b/tests/Console/__snapshots__/DetectCorruptedActivitiesConsoleCommandTest__testExecuteWithoutDataButPositiveConfirmation__1.txt @@ -3,7 +3,7 @@ StatisticsforStravav4.7.0 -Runtime:PHP8.5.x(cli)Symfony8.0.6Linux +Runtime:PHP8.5.x(cli)Symfony8.0.7Linux Configurationfiles: config.yaml diff --git a/tests/Console/__snapshots__/ImportStravaDataConsoleCommandTest__testExecute__1.txt b/tests/Console/__snapshots__/ImportStravaDataConsoleCommandTest__testExecute__1.txt index 44fd6c25c..f5d37ae5d 100644 --- a/tests/Console/__snapshots__/ImportStravaDataConsoleCommandTest__testExecute__1.txt +++ b/tests/Console/__snapshots__/ImportStravaDataConsoleCommandTest__testExecute__1.txt @@ -3,7 +3,7 @@ StatisticsforStravav4.7.0 -Runtime:PHP8.5.x(cli)Symfony8.0.6Linux +Runtime:PHP8.5.x(cli)Symfony8.0.7Linux Configurationfiles: config.yaml