Conversation
Owner
makomweb
commented
Feb 23, 2026
- extract YAML configuration for the blacklist
- support various framework constellations: Symfony, Laravel, standalone, CLI, tests
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors “forbidden relations” handling into a configurable Blacklist (including Symfony bundle configuration + Flex recipes) and updates the checking/reporting APIs to support multiple runtime environments (Symfony/Laravel/standalone/tests).
Changes:
- Replace hardcoded blacklist logic with
Blacklist+BlacklistFactoryand YAML-backed defaults. - Convert
YieldViolations/Checkto instance-based services that depend on an injectedBlacklist. - Add Symfony bundle config wiring + Flex recipes, update tests/docs, and bump toolchain dependencies.
Reviewed changes
Copilot reviewed 30 out of 31 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/bootstrap.php | Avoid undefined APP_DEBUG access in test bootstrap. |
| tests/Unit/TraitTest.php | New unit test to ensure traits are detected by analyzer. |
| tests/Unit/ReportCommandTest.php | Update ReportCommand tests for new Blacklist dependency. |
| tests/Unit/MissingTagTest.php | Update Check usage to instance-based API. |
| tests/Unit/InterfaceTest.php | Update YieldViolations usage to instance-based API. |
| tests/Unit/ForbiddenRelationsTest.php | Update Check usage to instance-based API for folder/class checks. |
| tests/Unit/ExceptionTest.php | Update YieldViolations usage to instance-based API. |
| tests/Data/MyTrait.php | New fixture trait for analyzer tests. |
| tests/Data/MyConsumesTrait.php | New fixture consuming a trait property. |
| symfony/recipes/makomweb/tactix/next/manifest.json | Add Flex recipe manifest for next version. |
| symfony/recipes/makomweb/tactix/next/config/packages/tactix.yaml | Provide default Symfony config for blacklist rules. |
| symfony/recipes/makomweb/tactix/0.1/manifest.json | Add Flex recipe manifest for 0.1. |
| symfony/recipes/makomweb/tactix/0.1/config/packages/tactix.yaml | Provide default Symfony config for blacklist rules. |
| src/YieldViolations.php | Inject Blacklist and use it to decide forbidden relations (now instance methods). |
| src/Forbidden.php | Remove old hardcoded blacklist implementation. |
| src/DependencyInjection/TactixExtension.php | Add DI parameter wiring for blacklist config. |
| src/DependencyInjection/Configuration.php | Define tactix.blacklist configuration tree with defaults. |
| src/Command/ReportCommand.php | Inject Blacklist and use it when producing forbidden-relations output. |
| src/Check.php | Convert to instance service depending on YieldViolations. |
| src/BlacklistFactory.php | Add helpers to build/load a Blacklist from YAML/defaults. |
| src/Blacklist.php | New blacklist model and relation-checking logic. |
| src/Analyzer/Relation.php | Remove Relation::isForbidden() (delegated to Blacklist). |
| src/Analyzer/Class/ClassNameAnalyzer.php | Treat traits as “class-like” declarations for naming analysis. |
| resources/config/tactix.yaml | Add default blacklist YAML shipped with the package. |
| resources/config/services.yaml | Register Blacklist service + wire ReportCommand. |
| phpunit.xml.dist | Update ini/server values and PHPUnit version constraints. |
| composer.lock | Dependency updates (Symfony components, PHPUnit, tooling). |
| composer.json | Set version, adjust PHPUnit constraint, add Symfony Flex metadata. |
| README.md | Document new integration patterns for Symfony/Laravel/standalone usage. |
| Makefile | Add maintenance targets for dependency updates. |
| .php-cs-fixer.dist.php | Update fixer rules (incl. phpdoc handling). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…README snippet Co-authored-by: makomweb <1567373+makomweb@users.noreply.github.com>
Co-authored-by: makomweb <1567373+makomweb@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
Contributor
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: makomweb <1567373+makomweb@users.noreply.github.com>
Contributor
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…conversion Co-authored-by: makomweb <1567373+makomweb@users.noreply.github.com>
fix: add missing `use` statements in README usage snippet
Co-authored-by: makomweb <1567373+makomweb@users.noreply.github.com>
Fix missing `BlacklistFactory` import in standalone usage example
Cache Blacklist enum conversion in constructor
Fix Laravel README example: wrong method and missing import
Fix deprecated non-static call to instance method in YieldViolations
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 30 out of 31 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.