From 91b38e10a6318770824a6a49e29c5288aeb2a358 Mon Sep 17 00:00:00 2001 From: Christopher Hertel Date: Sun, 15 Mar 2026 22:47:06 +0100 Subject: [PATCH] Consistently use symfony/event-dispatcher-contracts --- src/platform/src/Bridge/AiMlApi/PlatformFactory.php | 2 +- src/platform/src/Bridge/Albert/PlatformFactory.php | 2 +- src/platform/src/Bridge/AmazeeAi/PlatformFactory.php | 2 +- src/platform/src/Bridge/Anthropic/PlatformFactory.php | 2 +- src/platform/src/Bridge/Azure/Meta/PlatformFactory.php | 2 +- src/platform/src/Bridge/Azure/OpenAi/PlatformFactory.php | 2 +- src/platform/src/Bridge/Bedrock/PlatformFactory.php | 2 +- src/platform/src/Bridge/Cartesia/PlatformFactory.php | 2 +- src/platform/src/Bridge/Cerebras/PlatformFactory.php | 2 +- src/platform/src/Bridge/ClaudeCode/PlatformFactory.php | 2 +- src/platform/src/Bridge/Decart/PlatformFactory.php | 2 +- src/platform/src/Bridge/DeepSeek/PlatformFactory.php | 2 +- src/platform/src/Bridge/DockerModelRunner/PlatformFactory.php | 2 +- src/platform/src/Bridge/ElevenLabs/PlatformFactory.php | 2 +- src/platform/src/Bridge/Gemini/PlatformFactory.php | 2 +- src/platform/src/Bridge/Generic/PlatformFactory.php | 2 +- src/platform/src/Bridge/HuggingFace/PlatformFactory.php | 2 +- src/platform/src/Bridge/LmStudio/PlatformFactory.php | 2 +- src/platform/src/Bridge/Mistral/PlatformFactory.php | 2 +- src/platform/src/Bridge/ModelsDev/PlatformFactory.php | 2 +- src/platform/src/Bridge/Ollama/PlatformFactory.php | 2 +- src/platform/src/Bridge/OpenAi/PlatformFactory.php | 2 +- src/platform/src/Bridge/OpenResponses/PlatformFactory.php | 2 +- src/platform/src/Bridge/OpenRouter/PlatformFactory.php | 2 +- src/platform/src/Bridge/Ovh/PlatformFactory.php | 2 +- src/platform/src/Bridge/Perplexity/PlatformFactory.php | 2 +- src/platform/src/Bridge/Replicate/PlatformFactory.php | 2 +- src/platform/src/Bridge/Scaleway/PlatformFactory.php | 2 +- src/platform/src/Bridge/TransformersPhp/PlatformFactory.php | 2 +- src/platform/src/Bridge/VertexAi/PlatformFactory.php | 2 +- src/platform/src/Bridge/Voyage/PlatformFactory.php | 2 +- src/platform/src/Platform.php | 2 +- src/store/composer.json | 1 - src/store/src/Retriever.php | 2 +- src/store/tests/RetrieverTest.php | 2 +- 35 files changed, 34 insertions(+), 35 deletions(-) diff --git a/src/platform/src/Bridge/AiMlApi/PlatformFactory.php b/src/platform/src/Bridge/AiMlApi/PlatformFactory.php index 7a9a1e4a..58bde578 100644 --- a/src/platform/src/Bridge/AiMlApi/PlatformFactory.php +++ b/src/platform/src/Bridge/AiMlApi/PlatformFactory.php @@ -11,10 +11,10 @@ namespace Symfony\AI\Platform\Bridge\AiMlApi; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Bridge\Generic\PlatformFactory as GenericPlatformFactory; use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\Platform; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** diff --git a/src/platform/src/Bridge/Albert/PlatformFactory.php b/src/platform/src/Bridge/Albert/PlatformFactory.php index ae8becb1..833edb83 100644 --- a/src/platform/src/Bridge/Albert/PlatformFactory.php +++ b/src/platform/src/Bridge/Albert/PlatformFactory.php @@ -11,12 +11,12 @@ namespace Symfony\AI\Platform\Bridge\Albert; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Bridge\Generic\PlatformFactory as GenericPlatformFactory; use Symfony\AI\Platform\Exception\InvalidArgumentException; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; use Symfony\Component\HttpClient\EventSourceHttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** diff --git a/src/platform/src/Bridge/AmazeeAi/PlatformFactory.php b/src/platform/src/Bridge/AmazeeAi/PlatformFactory.php index 2abdcf86..eb7cf5d0 100644 --- a/src/platform/src/Bridge/AmazeeAi/PlatformFactory.php +++ b/src/platform/src/Bridge/AmazeeAi/PlatformFactory.php @@ -11,7 +11,6 @@ namespace Symfony\AI\Platform\Bridge\AmazeeAi; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Bridge\Generic\Completions\ModelClient; use Symfony\AI\Platform\Bridge\Generic\Embeddings; use Symfony\AI\Platform\Bridge\Generic\FallbackModelCatalog; @@ -19,6 +18,7 @@ use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; use Symfony\Component\HttpClient\EventSourceHttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; final class PlatformFactory diff --git a/src/platform/src/Bridge/Anthropic/PlatformFactory.php b/src/platform/src/Bridge/Anthropic/PlatformFactory.php index 2467fbd9..04f2e989 100644 --- a/src/platform/src/Bridge/Anthropic/PlatformFactory.php +++ b/src/platform/src/Bridge/Anthropic/PlatformFactory.php @@ -11,12 +11,12 @@ namespace Symfony\AI\Platform\Bridge\Anthropic; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Bridge\Anthropic\Contract\AnthropicContract; use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; use Symfony\Component\HttpClient\EventSourceHttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** diff --git a/src/platform/src/Bridge/Azure/Meta/PlatformFactory.php b/src/platform/src/Bridge/Azure/Meta/PlatformFactory.php index cbb52865..a2a150dc 100644 --- a/src/platform/src/Bridge/Azure/Meta/PlatformFactory.php +++ b/src/platform/src/Bridge/Azure/Meta/PlatformFactory.php @@ -11,12 +11,12 @@ namespace Symfony\AI\Platform\Bridge\Azure\Meta; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Bridge\Meta\ModelCatalog; use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; use Symfony\Component\HttpClient\HttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** diff --git a/src/platform/src/Bridge/Azure/OpenAi/PlatformFactory.php b/src/platform/src/Bridge/Azure/OpenAi/PlatformFactory.php index 483de4f8..e25866d8 100644 --- a/src/platform/src/Bridge/Azure/OpenAi/PlatformFactory.php +++ b/src/platform/src/Bridge/Azure/OpenAi/PlatformFactory.php @@ -11,7 +11,6 @@ namespace Symfony\AI\Platform\Bridge\Azure\OpenAi; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Bridge\Azure\Responses\ModelClient as ResponsesModelClient; use Symfony\AI\Platform\Bridge\Generic\Embeddings; use Symfony\AI\Platform\Bridge\OpenAi\Contract\OpenAiContract; @@ -21,6 +20,7 @@ use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; use Symfony\Component\HttpClient\EventSourceHttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** diff --git a/src/platform/src/Bridge/Bedrock/PlatformFactory.php b/src/platform/src/Bridge/Bedrock/PlatformFactory.php index be2af848..4a83ce86 100644 --- a/src/platform/src/Bridge/Bedrock/PlatformFactory.php +++ b/src/platform/src/Bridge/Bedrock/PlatformFactory.php @@ -12,7 +12,6 @@ namespace Symfony\AI\Platform\Bridge\Bedrock; use AsyncAws\BedrockRuntime\BedrockRuntimeClient; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Bridge\Anthropic\Contract as AnthropicContract; use Symfony\AI\Platform\Bridge\Bedrock\Anthropic\ClaudeModelClient; use Symfony\AI\Platform\Bridge\Bedrock\Anthropic\ClaudeResultConverter; @@ -26,6 +25,7 @@ use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\Exception\RuntimeException; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; /** * @author Björn Altmann diff --git a/src/platform/src/Bridge/Cartesia/PlatformFactory.php b/src/platform/src/Bridge/Cartesia/PlatformFactory.php index 8bb80aab..ae924571 100644 --- a/src/platform/src/Bridge/Cartesia/PlatformFactory.php +++ b/src/platform/src/Bridge/Cartesia/PlatformFactory.php @@ -11,12 +11,12 @@ namespace Symfony\AI\Platform\Bridge\Cartesia; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Bridge\Cartesia\Contract\CartesiaContract; use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; use Symfony\Component\HttpClient\EventSourceHttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** diff --git a/src/platform/src/Bridge/Cerebras/PlatformFactory.php b/src/platform/src/Bridge/Cerebras/PlatformFactory.php index b9e38905..610a2f26 100644 --- a/src/platform/src/Bridge/Cerebras/PlatformFactory.php +++ b/src/platform/src/Bridge/Cerebras/PlatformFactory.php @@ -11,12 +11,12 @@ namespace Symfony\AI\Platform\Bridge\Cerebras; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Bridge\Cerebras\Contract\ToolNormalizer; use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; use Symfony\Component\HttpClient\EventSourceHttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** diff --git a/src/platform/src/Bridge/ClaudeCode/PlatformFactory.php b/src/platform/src/Bridge/ClaudeCode/PlatformFactory.php index db5c8cb3..68de2cf0 100644 --- a/src/platform/src/Bridge/ClaudeCode/PlatformFactory.php +++ b/src/platform/src/Bridge/ClaudeCode/PlatformFactory.php @@ -11,13 +11,13 @@ namespace Symfony\AI\Platform\Bridge\ClaudeCode; -use Psr\EventDispatcher\EventDispatcherInterface; use Psr\Log\LoggerInterface; use Psr\Log\NullLogger; use Symfony\AI\Platform\Bridge\ClaudeCode\Contract\ClaudeCodeContract; use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; /** * @author Christopher Hertel diff --git a/src/platform/src/Bridge/Decart/PlatformFactory.php b/src/platform/src/Bridge/Decart/PlatformFactory.php index 324cb4c4..65138274 100644 --- a/src/platform/src/Bridge/Decart/PlatformFactory.php +++ b/src/platform/src/Bridge/Decart/PlatformFactory.php @@ -15,8 +15,8 @@ use Symfony\AI\Platform\Bridge\Decart\Contract\DecartContract; use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\HttpClient\EventSourceHttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** diff --git a/src/platform/src/Bridge/DeepSeek/PlatformFactory.php b/src/platform/src/Bridge/DeepSeek/PlatformFactory.php index ce1d1334..f4b60437 100644 --- a/src/platform/src/Bridge/DeepSeek/PlatformFactory.php +++ b/src/platform/src/Bridge/DeepSeek/PlatformFactory.php @@ -11,11 +11,11 @@ namespace Symfony\AI\Platform\Bridge\DeepSeek; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; use Symfony\Component\HttpClient\EventSourceHttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; final class PlatformFactory diff --git a/src/platform/src/Bridge/DockerModelRunner/PlatformFactory.php b/src/platform/src/Bridge/DockerModelRunner/PlatformFactory.php index 30fb2c86..7cac57cf 100644 --- a/src/platform/src/Bridge/DockerModelRunner/PlatformFactory.php +++ b/src/platform/src/Bridge/DockerModelRunner/PlatformFactory.php @@ -11,11 +11,11 @@ namespace Symfony\AI\Platform\Bridge\DockerModelRunner; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; use Symfony\Component\HttpClient\EventSourceHttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** diff --git a/src/platform/src/Bridge/ElevenLabs/PlatformFactory.php b/src/platform/src/Bridge/ElevenLabs/PlatformFactory.php index dc38e179..f2e516ab 100644 --- a/src/platform/src/Bridge/ElevenLabs/PlatformFactory.php +++ b/src/platform/src/Bridge/ElevenLabs/PlatformFactory.php @@ -11,13 +11,13 @@ namespace Symfony\AI\Platform\Bridge\ElevenLabs; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Bridge\ElevenLabs\Contract\ElevenLabsContract; use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; use Symfony\Component\HttpClient\EventSourceHttpClient; use Symfony\Component\HttpClient\ScopingHttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** diff --git a/src/platform/src/Bridge/Gemini/PlatformFactory.php b/src/platform/src/Bridge/Gemini/PlatformFactory.php index 584b8ab8..83d9dc7f 100644 --- a/src/platform/src/Bridge/Gemini/PlatformFactory.php +++ b/src/platform/src/Bridge/Gemini/PlatformFactory.php @@ -11,7 +11,6 @@ namespace Symfony\AI\Platform\Bridge\Gemini; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Bridge\Gemini\Contract\GeminiContract; use Symfony\AI\Platform\Bridge\Gemini\Embeddings\ModelClient as EmbeddingsModelClient; use Symfony\AI\Platform\Bridge\Gemini\Embeddings\ResultConverter as EmbeddingsResultConverter; @@ -21,6 +20,7 @@ use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; use Symfony\Component\HttpClient\EventSourceHttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** diff --git a/src/platform/src/Bridge/Generic/PlatformFactory.php b/src/platform/src/Bridge/Generic/PlatformFactory.php index c2bc4363..52adbab5 100644 --- a/src/platform/src/Bridge/Generic/PlatformFactory.php +++ b/src/platform/src/Bridge/Generic/PlatformFactory.php @@ -11,11 +11,11 @@ namespace Symfony\AI\Platform\Bridge\Generic; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; use Symfony\Component\HttpClient\EventSourceHttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** diff --git a/src/platform/src/Bridge/HuggingFace/PlatformFactory.php b/src/platform/src/Bridge/HuggingFace/PlatformFactory.php index 52c2b0aa..fb57c2bc 100644 --- a/src/platform/src/Bridge/HuggingFace/PlatformFactory.php +++ b/src/platform/src/Bridge/HuggingFace/PlatformFactory.php @@ -11,12 +11,12 @@ namespace Symfony\AI\Platform\Bridge\HuggingFace; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Bridge\HuggingFace\Contract\HuggingFaceContract; use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; use Symfony\Component\HttpClient\EventSourceHttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** diff --git a/src/platform/src/Bridge/LmStudio/PlatformFactory.php b/src/platform/src/Bridge/LmStudio/PlatformFactory.php index 92d8e7cc..d0665863 100644 --- a/src/platform/src/Bridge/LmStudio/PlatformFactory.php +++ b/src/platform/src/Bridge/LmStudio/PlatformFactory.php @@ -11,12 +11,12 @@ namespace Symfony\AI\Platform\Bridge\LmStudio; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Bridge\Generic\PlatformFactory as GenericPlatformFactory; use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; use Symfony\Component\HttpClient\EventSourceHttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** diff --git a/src/platform/src/Bridge/Mistral/PlatformFactory.php b/src/platform/src/Bridge/Mistral/PlatformFactory.php index 65ddeb5d..e2db875b 100644 --- a/src/platform/src/Bridge/Mistral/PlatformFactory.php +++ b/src/platform/src/Bridge/Mistral/PlatformFactory.php @@ -11,7 +11,6 @@ namespace Symfony\AI\Platform\Bridge\Mistral; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Bridge\Mistral\Contract\DocumentNormalizer; use Symfony\AI\Platform\Bridge\Mistral\Contract\DocumentUrlNormalizer; use Symfony\AI\Platform\Bridge\Mistral\Contract\ImageUrlNormalizer; @@ -20,6 +19,7 @@ use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; use Symfony\Component\HttpClient\EventSourceHttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** diff --git a/src/platform/src/Bridge/ModelsDev/PlatformFactory.php b/src/platform/src/Bridge/ModelsDev/PlatformFactory.php index 8a069e21..004a9d26 100644 --- a/src/platform/src/Bridge/ModelsDev/PlatformFactory.php +++ b/src/platform/src/Bridge/ModelsDev/PlatformFactory.php @@ -11,7 +11,6 @@ namespace Symfony\AI\Platform\Bridge\ModelsDev; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Bridge\Generic\CompletionsModel; use Symfony\AI\Platform\Bridge\Generic\EmbeddingsModel; use Symfony\AI\Platform\Bridge\Generic\PlatformFactory as GenericPlatformFactory; @@ -19,6 +18,7 @@ use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\Exception\InvalidArgumentException; use Symfony\AI\Platform\Platform; use Symfony\Component\HttpClient\EventSourceHttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** diff --git a/src/platform/src/Bridge/Ollama/PlatformFactory.php b/src/platform/src/Bridge/Ollama/PlatformFactory.php index f31861d1..6d0a409a 100644 --- a/src/platform/src/Bridge/Ollama/PlatformFactory.php +++ b/src/platform/src/Bridge/Ollama/PlatformFactory.php @@ -11,13 +11,13 @@ namespace Symfony\AI\Platform\Bridge\Ollama; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Bridge\Ollama\Contract\OllamaContract; use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; use Symfony\Component\HttpClient\EventSourceHttpClient; use Symfony\Component\HttpClient\ScopingHttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** diff --git a/src/platform/src/Bridge/OpenAi/PlatformFactory.php b/src/platform/src/Bridge/OpenAi/PlatformFactory.php index b5283761..76b8c9de 100644 --- a/src/platform/src/Bridge/OpenAi/PlatformFactory.php +++ b/src/platform/src/Bridge/OpenAi/PlatformFactory.php @@ -11,12 +11,12 @@ namespace Symfony\AI\Platform\Bridge\OpenAi; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Bridge\OpenAi\Contract\OpenAiContract; use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; use Symfony\Component\HttpClient\EventSourceHttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** diff --git a/src/platform/src/Bridge/OpenResponses/PlatformFactory.php b/src/platform/src/Bridge/OpenResponses/PlatformFactory.php index b0e860f6..c933c3f1 100644 --- a/src/platform/src/Bridge/OpenResponses/PlatformFactory.php +++ b/src/platform/src/Bridge/OpenResponses/PlatformFactory.php @@ -11,12 +11,12 @@ namespace Symfony\AI\Platform\Bridge\OpenResponses; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Bridge\OpenResponses\Contract\OpenResponsesContract; use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; use Symfony\Component\HttpClient\EventSourceHttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** diff --git a/src/platform/src/Bridge/OpenRouter/PlatformFactory.php b/src/platform/src/Bridge/OpenRouter/PlatformFactory.php index 1779f817..23ca1cb9 100644 --- a/src/platform/src/Bridge/OpenRouter/PlatformFactory.php +++ b/src/platform/src/Bridge/OpenRouter/PlatformFactory.php @@ -11,12 +11,12 @@ namespace Symfony\AI\Platform\Bridge\OpenRouter; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Bridge\Generic\PlatformFactory as GenericPlatformFactory; use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; use Symfony\Component\HttpClient\EventSourceHttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** diff --git a/src/platform/src/Bridge/Ovh/PlatformFactory.php b/src/platform/src/Bridge/Ovh/PlatformFactory.php index e1171705..c3f6e01e 100644 --- a/src/platform/src/Bridge/Ovh/PlatformFactory.php +++ b/src/platform/src/Bridge/Ovh/PlatformFactory.php @@ -11,12 +11,12 @@ namespace Symfony\AI\Platform\Bridge\Ovh; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Bridge\Generic\PlatformFactory as GenericPlatformFactory; use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; use Symfony\Component\HttpClient\EventSourceHttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** diff --git a/src/platform/src/Bridge/Perplexity/PlatformFactory.php b/src/platform/src/Bridge/Perplexity/PlatformFactory.php index a30ced9e..8594b8c5 100644 --- a/src/platform/src/Bridge/Perplexity/PlatformFactory.php +++ b/src/platform/src/Bridge/Perplexity/PlatformFactory.php @@ -11,12 +11,12 @@ namespace Symfony\AI\Platform\Bridge\Perplexity; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Bridge\Perplexity\Contract\PerplexityContract; use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; use Symfony\Component\HttpClient\EventSourceHttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** diff --git a/src/platform/src/Bridge/Replicate/PlatformFactory.php b/src/platform/src/Bridge/Replicate/PlatformFactory.php index 9cddcfd9..66b4a48f 100644 --- a/src/platform/src/Bridge/Replicate/PlatformFactory.php +++ b/src/platform/src/Bridge/Replicate/PlatformFactory.php @@ -11,13 +11,13 @@ namespace Symfony\AI\Platform\Bridge\Replicate; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Bridge\Replicate\Contract\LlamaMessageBagNormalizer; use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; use Symfony\Component\Clock\Clock; use Symfony\Component\HttpClient\HttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** diff --git a/src/platform/src/Bridge/Scaleway/PlatformFactory.php b/src/platform/src/Bridge/Scaleway/PlatformFactory.php index 4acd5e31..b66acf57 100644 --- a/src/platform/src/Bridge/Scaleway/PlatformFactory.php +++ b/src/platform/src/Bridge/Scaleway/PlatformFactory.php @@ -11,7 +11,6 @@ namespace Symfony\AI\Platform\Bridge\Scaleway; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Bridge\Scaleway\Embeddings\ModelClient as ScalewayEmbeddingsModelClient; use Symfony\AI\Platform\Bridge\Scaleway\Embeddings\ResultConverter as ScalewayEmbeddingsResponseConverter; use Symfony\AI\Platform\Bridge\Scaleway\Llm\ModelClient as ScalewayModelClient; @@ -20,6 +19,7 @@ use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; use Symfony\Component\HttpClient\EventSourceHttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** diff --git a/src/platform/src/Bridge/TransformersPhp/PlatformFactory.php b/src/platform/src/Bridge/TransformersPhp/PlatformFactory.php index 348533af..cf225adc 100644 --- a/src/platform/src/Bridge/TransformersPhp/PlatformFactory.php +++ b/src/platform/src/Bridge/TransformersPhp/PlatformFactory.php @@ -12,10 +12,10 @@ namespace Symfony\AI\Platform\Bridge\TransformersPhp; use Codewithkyrian\Transformers\Transformers; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Exception\RuntimeException; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; /** * @author Christopher Hertel diff --git a/src/platform/src/Bridge/VertexAi/PlatformFactory.php b/src/platform/src/Bridge/VertexAi/PlatformFactory.php index 3f7508b3..616b5dd3 100644 --- a/src/platform/src/Bridge/VertexAi/PlatformFactory.php +++ b/src/platform/src/Bridge/VertexAi/PlatformFactory.php @@ -12,7 +12,6 @@ namespace Symfony\AI\Platform\Bridge\VertexAi; use Google\Auth\ApplicationDefaultCredentials; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Bridge\VertexAi\Contract\GeminiContract; use Symfony\AI\Platform\Bridge\VertexAi\Embeddings\ModelClient as EmbeddingsModelClient; use Symfony\AI\Platform\Bridge\VertexAi\Embeddings\ResultConverter as EmbeddingsResultConverter; @@ -24,6 +23,7 @@ use Symfony\AI\Platform\Exception\RuntimeException; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; use Symfony\Component\HttpClient\EventSourceHttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** diff --git a/src/platform/src/Bridge/Voyage/PlatformFactory.php b/src/platform/src/Bridge/Voyage/PlatformFactory.php index 4e65b58e..d8a745e0 100644 --- a/src/platform/src/Bridge/Voyage/PlatformFactory.php +++ b/src/platform/src/Bridge/Voyage/PlatformFactory.php @@ -11,12 +11,12 @@ namespace Symfony\AI\Platform\Bridge\Voyage; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Bridge\Voyage\Contract\VoyageContract; use Symfony\AI\Platform\Contract; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Platform; use Symfony\Component\HttpClient\EventSourceHttpClient; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; /** diff --git a/src/platform/src/Platform.php b/src/platform/src/Platform.php index 5297ef42..43252aa1 100644 --- a/src/platform/src/Platform.php +++ b/src/platform/src/Platform.php @@ -11,13 +11,13 @@ namespace Symfony\AI\Platform; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Event\InvocationEvent; use Symfony\AI\Platform\Event\ResultEvent; use Symfony\AI\Platform\Exception\RuntimeException; use Symfony\AI\Platform\ModelCatalog\ModelCatalogInterface; use Symfony\AI\Platform\Result\DeferredResult; use Symfony\AI\Platform\Result\RawResultInterface; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; /** * @author Christopher Hertel diff --git a/src/store/composer.json b/src/store/composer.json index 13cdb3ae..3263988a 100644 --- a/src/store/composer.json +++ b/src/store/composer.json @@ -41,7 +41,6 @@ "require": { "php": ">=8.2", "ext-fileinfo": "*", - "psr/event-dispatcher": "^1.0", "psr/log": "^3.0", "symfony/ai-platform": "^0.6", "symfony/clock": "^7.3|^8.0", diff --git a/src/store/src/Retriever.php b/src/store/src/Retriever.php index 7374f511..680a9bc3 100644 --- a/src/store/src/Retriever.php +++ b/src/store/src/Retriever.php @@ -11,7 +11,6 @@ namespace Symfony\AI\Store; -use Psr\EventDispatcher\EventDispatcherInterface; use Psr\Log\LoggerInterface; use Psr\Log\NullLogger; use Symfony\AI\Store\Document\VectorDocument; @@ -22,6 +21,7 @@ use Symfony\AI\Store\Query\HybridQuery; use Symfony\AI\Store\Query\QueryInterface; use Symfony\AI\Store\Query\TextQuery; use Symfony\AI\Store\Query\VectorQuery; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; /** * @author Oskar Stark diff --git a/src/store/tests/RetrieverTest.php b/src/store/tests/RetrieverTest.php index 75d0a8d0..4bf31a8b 100644 --- a/src/store/tests/RetrieverTest.php +++ b/src/store/tests/RetrieverTest.php @@ -12,7 +12,6 @@ namespace Symfony\AI\Store\Tests; use PHPUnit\Framework\TestCase; -use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\AI\Platform\Result\VectorResult; use Symfony\AI\Platform\Vector\Vector; use Symfony\AI\Store\Document\Metadata; @@ -28,6 +27,7 @@ use Symfony\AI\Store\StoreInterface; use Symfony\AI\Store\Tests\Double\PlatformTestHandler; use Symfony\AI\Store\Tests\Double\TestStore; use Symfony\Component\Uid\Uuid; +use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; /** * @author Oskar Stark