Skip to content

[CI] Added code samples testing with Deptrac - #2562

Merged
mnocon merged 2 commits into
5.0from
add-deptrac
Feb 10, 2026
Merged

mnocon merged 2 commits into
5.0from
add-deptrac

Conversation

@mnocon

@mnocon mnocon commented Nov 30, 2024 •

Copy link
Copy Markdown
Contributor

Target: 5.0 only, for new code only.

Deptrac is a code testing tool for architecture.

I've added a very simple ruleset - code samples should not use classes outside of the Ibexa\Contracts namespace.

Together with @konradoboza we've also added a few additional exceptions - like SiteAccess configuration classes etc.

This tool should act as a:

  1. sanity check when adding code samples (as it's easy to miss the non-Contracts usage that can be replaced with their Contracts counterpart)
  2. point for discussion with developers (is there a Contracts-compliant way of writing the code sample)

But we will never get rid of all the errors, as they would require architecture changes on the DXP side - so we will have to keep expanding the baseline with new code samples.

Generated baseline:
https://github.com/ibexa/documentation-developer/blob/add-deptrac/deptrac.baseline.yaml

@mnocon
mnocon force-pushed the add-deptrac branch 2 times, most recently from a226602 to da0eced Compare November 30, 2024 10:20
@mnocon
mnocon marked this pull request as ready for review December 2, 2024 10:52
@mnocon mnocon changed the title [CI] Added code samples testing with Deptrac [CI] [POC] Added code samples testing with Deptrac Dec 2, 2024
@ibexa ibexa deleted a comment from github-actions Bot Feb 5, 2025
@mnocon
mnocon changed the base branch from master to 5.0 May 19, 2025 07:28
@github-actions

github-actions Bot commented Jul 31, 2025 •

Copy link
Copy Markdown

Preview of modified files

Preview of modified Markdown:

@konradoboza konradoboza left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great work! 💪

Just a few nitpicks:

Comment thread code_samples/back_office/limitation/src/Controller/CustomController.php Outdated
@mnocon mnocon changed the title [CI] [POC] Added code samples testing with Deptrac [CI] Added code samples testing with Deptrac Oct 1, 2025
@mnocon
mnocon requested review from a team and removed request for a team November 5, 2025 09:25
@mnocon
mnocon force-pushed the add-deptrac branch 3 times, most recently from d915fd4 to 4146d4e Compare February 5, 2026 12:25
@sonarqubecloud

Copy link
Copy Markdown

@mnocon
mnocon merged commit ddd5591 into 5.0 Feb 10, 2026
9 checks passed
@mnocon
mnocon deleted the add-deptrac branch February 10, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants