Skip to content

feat: support +LayerName syntax in ruleset to inherit a layer's allowed dependencies#124

Merged
samsonasik merged 1 commit into
mainfrom
allow-expands
Jun 3, 2026
Merged

feat: support +LayerName syntax in ruleset to inherit a layer's allowed dependencies#124
samsonasik merged 1 commit into
mainfrom
allow-expands

Conversation

@samsonasik

Copy link
Copy Markdown
Member

Adds support for the +LayerName shorthand in ruleset definition.

For example, given the following config:

->ruleset([
    'API'        => ['Format'],
    'Controller' => ['Validation'],
    'RESTful'    => ['+API', '+Controller'],
])

It nows merge 2 collection of layer and its allowed dependents, which replace the manual write:

-'RESTful'    => ['API', 'Format', 'Controller', 'Validation'],
+'RESTful'    => ['+API', '+Controller'],

removing the need to duplicate those entries by hand.

Per discussion on codeigniter4/CodeIgniter4#10198 (comment)

/cc @paulbalandan @michalsn

@codecov

codecov Bot commented Jun 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@samsonasik samsonasik merged commit a12b710 into main Jun 3, 2026
14 checks passed
@samsonasik samsonasik deleted the allow-expands branch June 3, 2026 09:39
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.

1 participant