Skip to content

Support various PHP framework constellations#18

Merged
makomweb merged 39 commits intomasterfrom
next
Feb 24, 2026
Merged

Support various PHP framework constellations#18
makomweb merged 39 commits intomasterfrom
next

Conversation

@makomweb
Copy link
Copy Markdown
Owner

  • extract YAML configuration for the blacklist
  • support various framework constellations: Symfony, Laravel, standalone, CLI, tests

@makomweb makomweb changed the title Next Support various PHP framework constellations Feb 23, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 + BlacklistFactory and YAML-backed defaults.
  • Convert YieldViolations/Check to instance-based services that depend on an injected Blacklist.
  • 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.

Comment thread README.md
Comment thread README.md Outdated
Comment thread README.md
Comment thread Makefile Outdated
Comment thread src/DependencyInjection/TactixExtension.php Outdated
Comment thread src/Blacklist.php Outdated
Comment thread README.md
Comment thread phpunit.xml.dist Outdated
Comment thread src/YieldViolations.php
Comment thread src/BlacklistFactory.php Outdated
Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 24, 2026

@makomweb I've opened a new pull request, #19, to work on those changes. Once the pull request is ready, I'll request review from you.

makomweb and others added 2 commits February 24, 2026 09:01
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 24, 2026

@makomweb I've opened a new pull request, #20, to work on those changes. Once the pull request is ready, I'll request review from you.

makomweb and others added 3 commits February 24, 2026 09:01
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>
makomweb and others added 2 commits February 24, 2026 09:02
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 24, 2026

@makomweb I've opened a new pull request, #21, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 24, 2026

@makomweb I've opened a new pull request, #22, to work on those changes. Once the pull request is ready, I'll request review from you.

makomweb and others added 3 commits February 24, 2026 09:04
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: makomweb <1567373+makomweb@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 24, 2026

@makomweb I've opened a new pull request, #23, to work on those changes. Once the pull request is ready, I'll request review from you.

makomweb and others added 8 commits February 24, 2026 09:06
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
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread src/Blacklist.php Outdated
Comment thread README.md Outdated
Comment thread composer.json Outdated
Comment thread tests/Data/MyConsumesTrait.php
Comment thread resources/config/tactix.yaml Outdated
makomweb and others added 4 commits February 24, 2026 09:26
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>
@makomweb makomweb merged commit 22fa081 into master Feb 24, 2026
1 check passed
@makomweb makomweb deleted the next branch February 24, 2026 08:48
@makomweb makomweb restored the next branch February 24, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants