docs(copilot): align instructions with actual codebase structure#447
docs(copilot): align instructions with actual codebase structure#447
Conversation
Co-authored-by: skerbis <791247+skerbis@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the .github/copilot-instructions.md file to accurately reflect the current v5.x codebase structure, addressing outdated information about database schema, namespace usage, and file organization.
Changes:
- Corrected database schema documentation from old table names (domain_service, service, log) to actual tables (cookie, cookiegroup, cache_log, consent_log)
- Updated class references from deprecated
consent_manager_*classes to currentFriendsOfRedaxo\ConsentManager\*namespace - Documented actual directory structure including Api/, Cronjob/, and deprecated/ subdirectories and the ConsentManager/ fragments subdirectory
.github/copilot-instructions.md
Outdated
| // Inline consent with doConsent helper | ||
| echo doConsent('youtube', '<iframe src="..."></iframe>'); |
There was a problem hiding this comment.
The example usage echo doConsent('youtube', '<iframe src="..."></iframe>'); shown here is inconsistent with how the function is actually used throughout the codebase. All examples in examples/modules/ and in inline.md use InlineConsent::doConsent() instead of the standalone function.
To make this example work as shown, users would need to explicitly import the namespaced function with use function FriendsOfRedaxo\ConsentManager\doConsent; first, or they would need to use the fully qualified name \FriendsOfRedaxo\ConsentManager\doConsent().
Consider either:
- Showing the import statement before this example, or
- Changing the example to use
InlineConsent::doConsent()which is the pattern used throughout the actual codebase
There was a problem hiding this comment.
Updated the API examples to show InlineConsent::doConsent() as the recommended pattern (consistent with all examples in the codebase), and added the explicit use function import statement for the alternative namespaced function usage.
Changes in commit 531e7cb.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: skerbis <791247+skerbis@users.noreply.github.com>
Update Copilot Instructions to Match Reality
Updated
.github/copilot-instructions.mdto accurately reflect the current state of the project.Changes completed:
FriendsOfRedaxo\ConsentManager\*instead of oldconsent_manager_*ConsentManager/subdirectory structureReview feedback addressed:
InlineConsent::doConsent()as recommended patternuse functionimport statement for namespaced function usageOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.