From 275671a5b8a43e1c47c323a84a05e344a79e1ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Nowak?= Date: Mon, 10 Aug 2026 11:47:03 +0200 Subject: [PATCH 1/5] IBX-12229: Added unified deptrac layers configuration Co-Authored-By: Claude Fable 5 --- .github/workflows/backend-ci.yaml | 23 +++++++++++ .gitignore | 1 + composer.json | 8 +++- deptrac.yaml | 46 +++++++++++++++++++++ src/internal-contracts/InternalContract.php | 14 +++++++ 5 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 deptrac.yaml create mode 100644 src/internal-contracts/InternalContract.php diff --git a/.github/workflows/backend-ci.yaml b/.github/workflows/backend-ci.yaml index 2c0af0183c..97d5b9592b 100644 --- a/.github/workflows/backend-ci.yaml +++ b/.github/workflows/backend-ci.yaml @@ -67,6 +67,29 @@ jobs: - name: Run rector run: vendor/bin/rector process --dry-run --ansi + deptrac: + name: Deptrac + runs-on: "ubuntu-24.04" + strategy: + fail-fast: false + matrix: + php: + - '8.3' + steps: + - uses: actions/checkout@v6 + + - uses: ibexa/gh-workflows/actions/setup-composer-root-version@main + + - uses: ibexa/gh-workflows/actions/composer-install@main + with: + gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }} + gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }} + satis-network-key: ${{ secrets.SATIS_NETWORK_KEY }} + satis-network-token: ${{ secrets.SATIS_NETWORK_TOKEN }} + + - name: Run deptrac + run: composer run-script deptrac + tests: name: Tests runs-on: "ubuntu-24.04" diff --git a/.gitignore b/.gitignore index 7026e200fd..ae2b60b4ef 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ yarn-error.log /vendor /.php_cs.cache /.php-cs-fixer.cache +/.deptrac.cache package-lock.json .DS_Store .phpunit.result.cache diff --git a/composer.json b/composer.json index 6e647b8019..ab0f7ce160 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,8 @@ "psr-4": { "Ibexa\\AdminUi\\": "src/lib/", "Ibexa\\Bundle\\AdminUi\\": "src/bundle/", - "Ibexa\\Contracts\\AdminUi\\": "src/contracts/" + "Ibexa\\Contracts\\AdminUi\\": "src/contracts/", + "Ibexa\\InternalContracts\\AdminUi\\": "src/internal-contracts/" } }, "autoload-dev": { @@ -62,6 +63,7 @@ "require-dev": { "ext-zip": "*", "dama/doctrine-test-bundle": "^8.2", + "deptrac/deptrac": "^4.7", "ibexa/behat": "~6.0.x-dev", "ibexa/code-style": "~2.0.0", "ibexa/doctrine-schema": "~6.0.x-dev", @@ -87,6 +89,7 @@ "scripts": { "fix-cs": "php-cs-fixer fix --config=.php-cs-fixer.php -v --show-progress=dots", "check-cs": "@fix-cs --dry-run", + "deptrac": "php vendor/bin/deptrac analyse", "phpstan": "phpstan analyse", "test-unit": "phpunit -c phpunit.xml", "test-integration": "phpunit -c phpunit.integration.xml", @@ -95,6 +98,9 @@ "@test-integration" ] }, + "scripts-descriptions": { + "deptrac": "Run Deptrac architecture testing" + }, "extra": { "branch-alias": { "dev-main": "6.0.x-dev" diff --git a/deptrac.yaml b/deptrac.yaml new file mode 100644 index 0000000000..581cb23bff --- /dev/null +++ b/deptrac.yaml @@ -0,0 +1,46 @@ +deptrac: + paths: + - ./src + - ./tests + layers: + - name: Bundle + collectors: + - type: bool + must: + - type: directory + value: src/bundle/.* + must_not: + - type: layer + value: InternalContracts + - type: bool + must: + - type: directory + value: src/lib/.* + must_not: + - type: layer + value: InternalContracts + - name: Contracts + collectors: + - type: directory + value: src/contracts/.* + - name: InternalContracts + collectors: + - type: directory + value: src/internal-contracts/.* + - type: attribute + value: InternalContract + - name: Test + collectors: + - type: directory + value: tests/.* + ruleset: + Bundle: + - Contracts + - InternalContracts + Contracts: ~ + InternalContracts: + - Contracts + Test: + - Bundle + - Contracts + - InternalContracts diff --git a/src/internal-contracts/InternalContract.php b/src/internal-contracts/InternalContract.php new file mode 100644 index 0000000000..9f2218ef31 --- /dev/null +++ b/src/internal-contracts/InternalContract.php @@ -0,0 +1,14 @@ + Date: Tue, 11 Aug 2026 08:37:17 +0200 Subject: [PATCH 2/5] IBX-12229: Aligned CI jobs to ubuntu-26.04, PHP 8.4 and actions/checkout v7 Co-Authored-By: Claude Fable 5 --- .github/workflows/backend-ci.yaml | 39 +++++++++++++----------------- .github/workflows/frontend-ci.yaml | 4 +-- 2 files changed, 19 insertions(+), 24 deletions(-) diff --git a/.github/workflows/backend-ci.yaml b/.github/workflows/backend-ci.yaml index 97d5b9592b..b425043acb 100644 --- a/.github/workflows/backend-ci.yaml +++ b/.github/workflows/backend-ci.yaml @@ -17,13 +17,13 @@ on: jobs: cs-fix: name: Run code style check - runs-on: "ubuntu-24.04" + runs-on: "ubuntu-26.04" strategy: matrix: php: - - '8.3' + - '8.4' steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: ibexa/gh-workflows/actions/setup-composer-root-version@main @@ -39,13 +39,13 @@ jobs: rector: name: Run rector - runs-on: "ubuntu-22.04" + runs-on: "ubuntu-26.04" strategy: matrix: php: - - '8.3' + - '8.4' steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Setup PHP Action uses: shivammathur/setup-php@v2 @@ -55,7 +55,7 @@ jobs: extensions: 'pdo_sqlite, gd' tools: cs2pr - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: ibexa/gh-workflows/actions/composer-install@main with: @@ -69,16 +69,14 @@ jobs: deptrac: name: Deptrac - runs-on: "ubuntu-24.04" + runs-on: "ubuntu-26.04" strategy: fail-fast: false matrix: php: - - '8.3' + - '8.4' steps: - - uses: actions/checkout@v6 - - - uses: ibexa/gh-workflows/actions/setup-composer-root-version@main + - uses: actions/checkout@v7 - uses: ibexa/gh-workflows/actions/composer-install@main with: @@ -92,18 +90,17 @@ jobs: tests: name: Tests - runs-on: "ubuntu-24.04" + runs-on: "ubuntu-26.04" timeout-minutes: 10 strategy: fail-fast: false matrix: php: - - '8.3' - '8.4' steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: ibexa/gh-workflows/actions/setup-composer-root-version@main @@ -142,17 +139,16 @@ jobs: --health-timeout 5s --health-retries 5 --tmpfs /var/lib/postgresql/data - runs-on: "ubuntu-24.04" + runs-on: "ubuntu-26.04" timeout-minutes: 20 strategy: matrix: php: - - '8.3' - '8.4' steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: ibexa/gh-workflows/actions/setup-composer-root-version@main @@ -194,18 +190,17 @@ jobs: --health-timeout=5s --health-retries=5 --tmpfs=/var/lib/mysql - runs-on: "ubuntu-24.04" + runs-on: "ubuntu-26.04" timeout-minutes: 20 strategy: fail-fast: false matrix: php: - - '8.3' - '8.4' steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: ibexa/gh-workflows/actions/setup-composer-root-version@main @@ -231,7 +226,7 @@ jobs: name: Notify Slack needs: [cs-fix, tests, integration-tests-postgres, integration-tests-mysql] if: always() && github.event_name == 'workflow_dispatch' - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 steps: - name: Determine overall result id: result diff --git a/.github/workflows/frontend-ci.yaml b/.github/workflows/frontend-ci.yaml index e2af25a3fb..30455c8a90 100644 --- a/.github/workflows/frontend-ci.yaml +++ b/.github/workflows/frontend-ci.yaml @@ -26,11 +26,11 @@ on: jobs: frontend-test: name: Frontend build test - runs-on: 'ubuntu-24.04' + runs-on: 'ubuntu-26.04' timeout-minutes: 5 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - uses: actions/setup-node@v4 with: node-version: '20' From 29c15d94988969b0435cfd1bd762620af3fcf8ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Nowak?= Date: Tue, 11 Aug 2026 08:45:12 +0200 Subject: [PATCH 3/5] IBX-12229: Reverted php to 8.3 in code style CI job --- .github/workflows/backend-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/backend-ci.yaml b/.github/workflows/backend-ci.yaml index b425043acb..55881998a0 100644 --- a/.github/workflows/backend-ci.yaml +++ b/.github/workflows/backend-ci.yaml @@ -21,7 +21,7 @@ jobs: strategy: matrix: php: - - '8.4' + - '8.3' steps: - uses: actions/checkout@v7 From 58babce4cc28c44247b501ec30a8eaf89c809618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Nowak?= Date: Tue, 11 Aug 2026 11:19:23 +0200 Subject: [PATCH 4/5] IBX-12229: Removed InternalContract attribute Team decision: the attribute-based collection mechanism will not be used. The InternalContracts layer remains, collected from the dedicated src/internal-contracts/ directory (kept via .gitkeep); Bundle collectors simplified back to plain directory collectors. Co-Authored-By: Claude Fable 5 --- deptrac.yaml | 20 ++++---------------- src/internal-contracts/.gitkeep | 0 src/internal-contracts/InternalContract.php | 14 -------------- 3 files changed, 4 insertions(+), 30 deletions(-) create mode 100644 src/internal-contracts/.gitkeep delete mode 100644 src/internal-contracts/InternalContract.php diff --git a/deptrac.yaml b/deptrac.yaml index 581cb23bff..35a4bc3a31 100644 --- a/deptrac.yaml +++ b/deptrac.yaml @@ -5,20 +5,10 @@ deptrac: layers: - name: Bundle collectors: - - type: bool - must: - - type: directory - value: src/bundle/.* - must_not: - - type: layer - value: InternalContracts - - type: bool - must: - - type: directory - value: src/lib/.* - must_not: - - type: layer - value: InternalContracts + - type: directory + value: src/bundle/.* + - type: directory + value: src/lib/.* - name: Contracts collectors: - type: directory @@ -27,8 +17,6 @@ deptrac: collectors: - type: directory value: src/internal-contracts/.* - - type: attribute - value: InternalContract - name: Test collectors: - type: directory diff --git a/src/internal-contracts/.gitkeep b/src/internal-contracts/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/internal-contracts/InternalContract.php b/src/internal-contracts/InternalContract.php deleted file mode 100644 index 9f2218ef31..0000000000 --- a/src/internal-contracts/InternalContract.php +++ /dev/null @@ -1,14 +0,0 @@ - Date: Thu, 13 Aug 2026 11:47:23 +0200 Subject: [PATCH 5/5] IBX-12229: Added deptrac baseline suppressing current violations --- deptrac.baseline.yaml | 28 ++++++++++++++++++++++++++++ deptrac.yaml | 3 +++ 2 files changed, 31 insertions(+) create mode 100644 deptrac.baseline.yaml diff --git a/deptrac.baseline.yaml b/deptrac.baseline.yaml new file mode 100644 index 0000000000..2c45c13175 --- /dev/null +++ b/deptrac.baseline.yaml @@ -0,0 +1,28 @@ +deptrac: + skip_violations: + Ibexa\Contracts\AdminUi\ContentType\ContentTypeFieldsByExpressionServiceInterface: + - Ibexa\AdminUi\Exception\FieldTypeExpressionParserException + Ibexa\Contracts\AdminUi\Event\ContentProxyCreateEvent: + - Ibexa\AdminUi\Event\Options + Ibexa\Contracts\AdminUi\Event\ContentProxyTranslateEvent: + - Ibexa\AdminUi\Event\Options + Ibexa\Contracts\AdminUi\Event\FieldDefinitionMappingEvent: + - Ibexa\AdminUi\Form\Data\FieldDefinitionData + Ibexa\Contracts\AdminUi\Menu\AbstractActionBuilder: + - Ibexa\AdminUi\Menu\Event\ConfigureMenuEvent + - Ibexa\AdminUi\Specification\ContentIsUser + Ibexa\Contracts\AdminUi\Menu\AbstractBuilder: + - Ibexa\AdminUi\Menu\Event\ConfigureMenuEvent + Ibexa\Contracts\AdminUi\Menu\AbstractFormContextMenuBuilder: + - Ibexa\AdminUi\Menu\Event\ConfigureMenuEvent + Ibexa\Contracts\AdminUi\Menu\CopyFormContextMenuBuilder: + - Ibexa\AdminUi\Menu\Event\ConfigureMenuEvent + Ibexa\Contracts\AdminUi\Menu\CreateFormContextMenuBuilder: + - Ibexa\AdminUi\Menu\Event\ConfigureMenuEvent + Ibexa\Contracts\AdminUi\Menu\UpdateFormContextMenuBuilder: + - Ibexa\AdminUi\Menu\Event\ConfigureMenuEvent + Ibexa\Contracts\AdminUi\Tab\AbstractEventDispatchingTab: + - Ibexa\AdminUi\Tab\Event\TabEvents + - Ibexa\AdminUi\Tab\Event\TabViewRenderEvent + Ibexa\Contracts\AdminUi\UI\Action\FormUiActionMapperInterface: + - Ibexa\AdminUi\UI\Action\UiActionEvent diff --git a/deptrac.yaml b/deptrac.yaml index 35a4bc3a31..75bc12dc23 100644 --- a/deptrac.yaml +++ b/deptrac.yaml @@ -1,3 +1,6 @@ +imports: + - deptrac.baseline.yaml + deptrac: paths: - ./src