Skip to content

[5.x] Autoload scopes from Query/Scopes and Query/Scopes/Filters #11601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 20, 2025

Conversation

duncanmcclean
Copy link
Member

This pull request adds the Query/Scopes and Query/Scopes/Filters directories to the paths Statamic uses to autoload query scopes in addons.

The php please make:scope command creates query scopes & filters in the src/Scopes directory.

However, if you're following the same directory structure of Statamic Core in your addon, your scopes/filters might live in different folders. Here's an example from my addon:

CleanShot 2025-03-20 at 12 26 05

@jasonvarga jasonvarga merged commit ba090e8 into 5.x Mar 20, 2025
26 checks passed
@jasonvarga jasonvarga deleted the scope-autoloading branch March 20, 2025 14:27
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.

2 participants