Skip to content

docs(copilot): align instructions with actual codebase structure#447

Closed
Copilot wants to merge 4 commits intomainfrom
copilot/update-copilot-instructions
Closed

docs(copilot): align instructions with actual codebase structure#447
Copilot wants to merge 4 commits intomainfrom
copilot/update-copilot-instructions

Conversation

Copy link
Contributor

Copilot AI commented Jan 25, 2026

Update Copilot Instructions to Match Reality

Updated .github/copilot-instructions.md to accurately reflect the current state of the project.

Changes completed:

  • Update database schema section - remove non-existent tables (domain_service, service), add correct tables (cookie, cookiegroup, cache_log, consent_log)
  • Update class naming - document namespace structure FriendsOfRedaxo\ConsentManager\* instead of old consent_manager_*
  • Fix setup file descriptions - correct text UID counts (minimal: 30, default: 35, not 27-30 as stated)
  • Update pages structure - use actual page names (cookie, cookiegroup, not "service")
  • Fix fragment paths - document ConsentManager/ subdirectory structure
  • Update API examples - use namespaced classes instead of deprecated names
  • Add important notes about namespace usage and location of key files
  • Update "Files to Always Check" section with more specific paths
  • Document JSON setup file structure (meta, cookiegroups, cookies, texts)
  • Clarify doConsent() usage pattern with proper import statement

Review feedback addressed:

  • Updated API examples to show InlineConsent::doConsent() as recommended pattern
  • Added explicit use function import statement for namespaced function usage
  • Reordered examples to show recommended pattern first, alternative second
Original prompt

This section details on the original issue you should resolve

<issue_title>copilot instructions an die Realität anpassen</issue_title>
<issue_description>github/copilot-instructions.md)</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: skerbis <791247+skerbis@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Copilot instructions to match reality docs(copilot): align instructions with actual codebase structure Jan 25, 2026
Copilot AI requested a review from skerbis January 25, 2026 03:08
@skerbis skerbis marked this pull request as ready for review January 25, 2026 11:34
Copilot AI review requested due to automatic review settings January 25, 2026 11:34
Copy link
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 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 current FriendsOfRedaxo\ConsentManager\* namespace
  • Documented actual directory structure including Api/, Cronjob/, and deprecated/ subdirectories and the ConsentManager/ fragments subdirectory

Comment on lines +184 to +185
// Inline consent with doConsent helper
echo doConsent('youtube', '<iframe src="..."></iframe>');
Copy link

Copilot AI Jan 25, 2026

Choose a reason for hiding this comment

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

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:

  1. Showing the import statement before this example, or
  2. Changing the example to use InlineConsent::doConsent() which is the pattern used throughout the actual codebase

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

Copy link
Member

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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>
@skerbis skerbis closed this Jan 25, 2026
@skerbis skerbis deleted the copilot/update-copilot-instructions branch January 28, 2026 08:43
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.

copilot instructions an die Realität anpassen

3 participants