Skip to content

Added prebuild event for extending possibilities to hook into graphql queries#982

Open
valantic-cx-alps wants to merge 3 commits intopimcore:2.xfrom
valantic-cx-alps:enhancement/pre-build-event
Open

Added prebuild event for extending possibilities to hook into graphql queries#982
valantic-cx-alps wants to merge 3 commits intopimcore:2.xfrom
valantic-cx-alps:enhancement/pre-build-event

Conversation

@valantic-cx-alps
Copy link

No description provided.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 6, 2025

Copy link

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

Adds a new GraphQL listing “pre-build” event hook intended to allow extensions to intervene before a listing is constructed and loaded.

Changes:

  • Dispatches a new ListingEvents::PRE_BUILD event at the start of QueryType::resolveListing().
  • Introduces ListingEvents::PRE_BUILD event constant for subscribers.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/GraphQL/Resolver/QueryType.php Dispatches the new pre-build event before creating and configuring the object listing.
src/Event/GraphQL/ListingEvents.php Defines the new PRE_BUILD event name/annotation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +373 to +375
$event = new GenericEvent(
arguments: $args,
);
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

GenericEvent is referenced without an import or a fully-qualified class name, which will cause a runtime error (Class "...\GenericEvent" not found). Add use Symfony\Component\EventDispatcher\GenericEvent; at the top of the file (or reference it via the full namespace).

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

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

@valantic-cx-alps Could you please add use Symfony\Component\EventDispatcher\GenericEvent;? Thanks

robertSt7 and others added 2 commits January 23, 2026 09:46
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants