Skip to content

Commit 7c27199

Browse files
committed
minor #647 [AI Bundle][Agent][Demo][Platform][Store] Remove Test Coverage Attributes (chr-hertel)
This PR was merged into the main branch. Discussion ---------- [AI Bundle][Agent][Demo][Platform][Store] Remove Test Coverage Attributes | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Docs? | no | Issues | | License | MIT We're not using it, and Symfony usually also skips those information. And coverage is outdated and nearly impossible to review. Commits ------- 3421070 Remove Test Coverage Attributes
2 parents b639efd + 3421070 commit 7c27199

File tree

228 files changed

+0
-1413
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

228 files changed

+0
-1413
lines changed

demo/phpunit.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
bootstrap="tests/bootstrap.php"
66
cacheDirectory=".phpunit.cache"
77
colors="true"
8-
requireCoverageMetadata="true"
9-
beStrictAboutCoverageMetadata="true"
108
beStrictAboutOutputDuringTests="true"
119
failOnRisky="true"
1210
failOnWarning="true">

demo/tests/Blog/ChatTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@
1212
namespace App\Tests\Blog;
1313

1414
use App\Blog\Chat;
15-
use PHPUnit\Framework\Attributes\CoversClass;
1615
use PHPUnit\Framework\TestCase;
1716
use Symfony\AI\Agent\MockAgent;
1817
use Symfony\AI\Platform\Message\AssistantMessage;
19-
use Symfony\AI\Platform\Message\Message;
2018
use Symfony\AI\Platform\Message\MessageBag;
2119
use Symfony\AI\Platform\Message\SystemMessage;
2220
use Symfony\AI\Platform\Message\UserMessage;
@@ -25,7 +23,6 @@
2523
use Symfony\Component\HttpFoundation\Session\Session;
2624
use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
2725

28-
#[CoversClass(Chat::class)]
2926
final class ChatTest extends TestCase
3027
{
3128
public function testLoadMessagesReturnsDefaultSystemMessage()

demo/tests/Blog/PostTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@
1212
namespace App\Tests\Blog;
1313

1414
use App\Blog\Post;
15-
use PHPUnit\Framework\Attributes\CoversClass;
1615
use PHPUnit\Framework\TestCase;
1716
use Symfony\Component\Uid\Uuid;
1817

19-
#[CoversClass(Post::class)]
2018
final class PostTest extends TestCase
2119
{
2220
public function testPostToString()

src/agent/phpunit.xml.dist

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
cacheDirectory=".phpunit.cache"
66
colors="true"
77
executionOrder="depends,defects"
8-
requireCoverageMetadata="true"
9-
beStrictAboutCoverageMetadata="true"
108
beStrictAboutOutputDuringTests="true"
119
failOnRisky="true"
1210
failOnWarning="true">

src/agent/tests/AgentTest.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111

1212
namespace Symfony\AI\Agent\Tests;
1313

14-
use PHPUnit\Framework\Attributes\CoversClass;
15-
use PHPUnit\Framework\Attributes\Small;
16-
use PHPUnit\Framework\Attributes\UsesClass;
1714
use PHPUnit\Framework\TestCase;
1815
use Psr\Log\LoggerInterface;
1916
use Symfony\AI\Agent\Agent;
@@ -41,15 +38,6 @@
4138
use Symfony\Contracts\HttpClient\Exception\HttpExceptionInterface;
4239
use Symfony\Contracts\HttpClient\ResponseInterface as HttpResponseInterface;
4340

44-
#[CoversClass(Agent::class)]
45-
#[UsesClass(Input::class)]
46-
#[UsesClass(Output::class)]
47-
#[UsesClass(MessageBag::class)]
48-
#[UsesClass(UserMessage::class)]
49-
#[UsesClass(Text::class)]
50-
#[UsesClass(Audio::class)]
51-
#[UsesClass(Image::class)]
52-
#[Small]
5341
final class AgentTest extends TestCase
5442
{
5543
public function testConstructorInitializesWithDefaults()

src/agent/tests/ChatTest.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111

1212
namespace Symfony\AI\Agent\Tests;
1313

14-
use PHPUnit\Framework\Attributes\CoversClass;
15-
use PHPUnit\Framework\Attributes\Small;
16-
use PHPUnit\Framework\Attributes\UsesClass;
1714
use PHPUnit\Framework\MockObject\MockObject;
1815
use PHPUnit\Framework\TestCase;
1916
use Symfony\AI\Agent\AgentInterface;
@@ -24,11 +21,6 @@
2421
use Symfony\AI\Platform\Message\MessageBag;
2522
use Symfony\AI\Platform\Result\TextResult;
2623

27-
#[CoversClass(Chat::class)]
28-
#[UsesClass(Message::class)]
29-
#[UsesClass(MessageBag::class)]
30-
#[UsesClass(TextResult::class)]
31-
#[Small]
3224
final class ChatTest extends TestCase
3325
{
3426
private AgentInterface&MockObject $agent;

src/agent/tests/InputProcessor/ModelOverrideInputProcessorTest.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,15 @@
1111

1212
namespace Symfony\AI\Agent\Tests\InputProcessor;
1313

14-
use PHPUnit\Framework\Attributes\CoversClass;
15-
use PHPUnit\Framework\Attributes\Small;
16-
use PHPUnit\Framework\Attributes\UsesClass;
1714
use PHPUnit\Framework\TestCase;
1815
use Symfony\AI\Agent\Exception\InvalidArgumentException;
1916
use Symfony\AI\Agent\Input;
2017
use Symfony\AI\Agent\InputProcessor\ModelOverrideInputProcessor;
2118
use Symfony\AI\Platform\Bridge\Anthropic\Claude;
22-
use Symfony\AI\Platform\Bridge\OpenAi\Embeddings;
2319
use Symfony\AI\Platform\Bridge\OpenAi\Gpt;
2420
use Symfony\AI\Platform\Message\MessageBag;
2521
use Symfony\AI\Platform\Model;
2622

27-
#[CoversClass(ModelOverrideInputProcessor::class)]
28-
#[UsesClass(Gpt::class)]
29-
#[UsesClass(Claude::class)]
30-
#[UsesClass(Input::class)]
31-
#[UsesClass(MessageBag::class)]
32-
#[UsesClass(Embeddings::class)]
33-
#[Small]
3423
final class ModelOverrideInputProcessorTest extends TestCase
3524
{
3625
public function testProcessInputWithValidModelOption()

src/agent/tests/InputProcessor/SystemPromptInputProcessorTest.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,13 @@
1111

1212
namespace Symfony\AI\Agent\Tests\InputProcessor;
1313

14-
use PHPUnit\Framework\Attributes\CoversClass;
15-
use PHPUnit\Framework\Attributes\Small;
16-
use PHPUnit\Framework\Attributes\UsesClass;
1714
use PHPUnit\Framework\TestCase;
1815
use Symfony\AI\Agent\Input;
1916
use Symfony\AI\Agent\InputProcessor\SystemPromptInputProcessor;
2017
use Symfony\AI\Agent\Toolbox\ToolboxInterface;
2118
use Symfony\AI\Fixtures\Tool\ToolNoParams;
2219
use Symfony\AI\Fixtures\Tool\ToolRequiredParams;
2320
use Symfony\AI\Platform\Bridge\OpenAi\Gpt;
24-
use Symfony\AI\Platform\Message\Content\Text;
2521
use Symfony\AI\Platform\Message\Message;
2622
use Symfony\AI\Platform\Message\MessageBag;
2723
use Symfony\AI\Platform\Message\SystemMessage;
@@ -31,17 +27,6 @@
3127
use Symfony\AI\Platform\Tool\Tool;
3228
use Symfony\Contracts\Translation\TranslatorInterface;
3329

34-
#[CoversClass(SystemPromptInputProcessor::class)]
35-
#[UsesClass(Gpt::class)]
36-
#[UsesClass(Message::class)]
37-
#[UsesClass(MessageBag::class)]
38-
#[UsesClass(Input::class)]
39-
#[UsesClass(SystemMessage::class)]
40-
#[UsesClass(UserMessage::class)]
41-
#[UsesClass(Text::class)]
42-
#[UsesClass(Tool::class)]
43-
#[UsesClass(ExecutionReference::class)]
44-
#[Small]
4530
final class SystemPromptInputProcessorTest extends TestCase
4631
{
4732
public function testProcessInputAddsSystemMessageWhenNoneExists()

src/agent/tests/Memory/EmbeddingProviderTest.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111

1212
namespace Symfony\AI\Agent\Tests\Memory;
1313

14-
use PHPUnit\Framework\Attributes\CoversClass;
15-
use PHPUnit\Framework\Attributes\Small;
16-
use PHPUnit\Framework\Attributes\UsesClass;
1714
use PHPUnit\Framework\TestCase;
1815
use Symfony\AI\Agent\Input;
1916
use Symfony\AI\Agent\Memory\EmbeddingProvider;
@@ -29,16 +26,6 @@
2926
use Symfony\AI\Platform\Vector\Vector;
3027
use Symfony\AI\Store\StoreInterface;
3128

32-
#[UsesClass(Text::class)]
33-
#[UsesClass(ImageUrl::class)]
34-
#[UsesClass(Message::class)]
35-
#[UsesClass(Input::class)]
36-
#[UsesClass(MessageBag::class)]
37-
#[UsesClass(StoreInterface::class)]
38-
#[UsesClass(Model::class)]
39-
#[UsesClass(PlatformInterface::class)]
40-
#[CoversClass(EmbeddingProvider::class)]
41-
#[Small]
4229
final class EmbeddingProviderTest extends TestCase
4330
{
4431
public function testItIsDoingNothingWithEmptyMessageBag()

src/agent/tests/Memory/MemoryInputProcessorTest.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111

1212
namespace Symfony\AI\Agent\Tests\Memory;
1313

14-
use PHPUnit\Framework\Attributes\CoversClass;
15-
use PHPUnit\Framework\Attributes\Small;
16-
use PHPUnit\Framework\Attributes\UsesClass;
1714
use PHPUnit\Framework\TestCase;
1815
use Symfony\AI\Agent\Input;
1916
use Symfony\AI\Agent\Memory\Memory;
@@ -23,14 +20,6 @@
2320
use Symfony\AI\Platform\Message\MessageBag;
2421
use Symfony\AI\Platform\Model;
2522

26-
#[CoversClass(MemoryInputProcessor::class)]
27-
#[UsesClass(MemoryProviderInterface::class)]
28-
#[UsesClass(Input::class)]
29-
#[UsesClass(MessageBag::class)]
30-
#[UsesClass(Model::class)]
31-
#[UsesClass(Memory::class)]
32-
#[UsesClass(Message::class)]
33-
#[Small]
3423
final class MemoryInputProcessorTest extends TestCase
3524
{
3625
public function testItIsDoingNothingOnInactiveMemory()

0 commit comments

Comments
 (0)