Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 85 additions & 15 deletions deptrac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,105 @@ deptrac:
paths:
- ./src
exclude_files:
- '#.*test.*#'
- '#.*test.*#i'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original pattern #.test.# only matches lowercase "test", but the test files in this codebase are in directories named Tests (capital T), like:
src/agent/src/Bridge/SimilaritySearch/Tests/SimilaritySearchTest.php

Without the i flag, deptrac was analyzing test files and reporting violations for test-only dependencies (like the test using Symfony\AI\Platform\Vector\Vector).

With #.test.#i, it matches both test and Tests, properly excluding all test files from analysis.

- '#.*vendor.*#'
layers:
- name: Agent
- name: AgentComponent
collectors:
- type: classLike
value: Symfony\\AI\\Agent.*
- name: Chat
value: ^Symfony\\AI\\Agent\\(?!Bridge\\).*
- name: BraveTool
collectors:
- type: classLike
value: Symfony\\AI\\Agent\\Bridge\\Brave\\.*
- name: ClockTool
collectors:
- type: classLike
value: Symfony\\AI\\Agent\\Bridge\\Clock\\.*
- name: FirecrawlTool
collectors:
- type: classLike
value: Symfony\\AI\\Agent\\Bridge\\Firecrawl\\.*
- name: MapboxTool
collectors:
- type: classLike
value: Symfony\\AI\\Agent\\Bridge\\Mapbox\\.*
- name: OpenMeteoTool
collectors:
- type: classLike
value: Symfony\\AI\\Agent\\Bridge\\OpenMeteo\\.*
- name: ScraperTool
collectors:
- type: classLike
value: Symfony\\AI\\Agent\\Bridge\\Scraper\\.*
- name: SerpApiTool
collectors:
- type: classLike
value: Symfony\\AI\\Agent\\Bridge\\SerpApi\\.*
- name: SimilaritySearchTool
collectors:
- type: classLike
value: Symfony\\AI\\Agent\\Bridge\\SimilaritySearch\\.*
- name: TavilyTool
collectors:
- type: classLike
value: Symfony\\AI\\Agent\\Bridge\\Tavily\\.*
- name: WikipediaTool
collectors:
- type: classLike
value: Symfony\\AI\\Agent\\Bridge\\Wikipedia\\.*
- name: YoutubeTool
collectors:
- type: classLike
value: Symfony\\AI\\Agent\\Bridge\\Youtube\\.*
- name: ChatComponent
collectors:
- type: classLike
value: Symfony\\AI\\Chat.*
- name: Platform
- name: PlatformComponent
collectors:
- type: classLike
value: Symfony\\AI\\Platform.*
- name: Store
- name: StoreComponent
collectors:
- type: classLike
value: Symfony\\AI\\Store.*
ruleset:
Agent:
- Platform
- Store
Chat:
- Agent
- Platform
Platform: ~
Store:
- Platform
AgentComponent:
- PlatformComponent
- StoreComponent
BraveTool:
- AgentComponent
- PlatformComponent
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is needed for example, as the #[With] is used from the Platform component

ClockTool:
- AgentComponent
FirecrawlTool:
- AgentComponent
MapboxTool:
- AgentComponent
- PlatformComponent
OpenMeteoTool:
- AgentComponent
- PlatformComponent
ScraperTool:
- AgentComponent
SerpApiTool:
- AgentComponent
SimilaritySearchTool:
- AgentComponent
- StoreComponent
TavilyTool:
- AgentComponent
WikipediaTool:
- AgentComponent
YoutubeTool:
- AgentComponent
ChatComponent:
- AgentComponent
- PlatformComponent
PlatformComponent: ~
StoreComponent:
- PlatformComponent
# Baseline of known violations to be skipped for now
skip_violations:
Symfony\AI\Platform\Bridge\Anthropic\TokenOutputProcessor: [Symfony\AI\Agent\OutputProcessorInterface, Symfony\AI\Agent\Output]
Expand Down