Skip to content

!!! feat: Update for Neos 9#23

Open
paxuclus wants to merge 6 commits into
mainfrom
feat/neos9
Open

!!! feat: Update for Neos 9#23
paxuclus wants to merge 6 commits into
mainfrom
feat/neos9

Conversation

@paxuclus

Copy link
Copy Markdown
Member

This removes the old yaml based configuration so only node based error pages can be used from now on

This removes the old yaml based configuration so only
node based error pages can be used from now on
@paxuclus paxuclus self-assigned this Oct 31, 2024
paxuclus added 5 commits April 3, 2025 20:44
# Conflicts:
#	Classes/Configuration/ErrorHandlerConfiguration.php
#	Classes/Configuration/NodeBasedConfiguration.php
NodeBasedConfiguration::getSiteNodes() silently found no error page
configuration at all on installations with zero content dimensions
configured, which is a valid and fairly common setup (single-locale
sites). combineAllDimensionSpacePoints() only ever produced a result
by combining pairs of dimension values, so with no dimensions the
combination loop never ran and returned an empty set; the outer
lookup then never yielded a single site node, and getConfiguration()
came back completely empty with no error/warning of any kind (not
even the --verbose per-site output).

Also fixes two issues found while getting the zero-dimension case to
actually run end-to-end:
- VisibilityConstraints::frontend() doesn't exist on this
  neos/contentrepository-core version; replaced with the documented
  Neos-specific equivalent (NeosVisibilityConstraints::excludeRemoved()
  merged with ::excludeDisabled()).
- findChildNodes() against the shared "Neos.Neos:Sites" root returns
  every site's node, not just the current one being iterated in the
  outer loop, so with N sites this reprocessed (and re-fetched/re-saved
  the error page for) each site N times over. Filtered to the matching
  child node name.
…sion

NodeAggregate::getNodeByCoveredDimensionSpacePoint() doesn't exist on
this neos/contentrepository-core version, which made errorpage:generate
fail to resolve every configured error page's source URI. Per
NodeAggregate's own documented usage, look the node up by first
resolving the occupied origin for the covered dimension space point.
@paxuclus paxuclus marked this pull request as ready for review July 3, 2026 14:01

Copilot AI left a comment

Copy link
Copy Markdown

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 upgrades Netlogix.ErrorHandler for Neos 9, refactoring the error-page generation and resolution logic to use the Neos 9 Content Repository / FrontendRouting APIs and removing the legacy YAML-based error page configuration so that only node-based error pages are supported going forward.

Changes:

  • Removed YAML-based error page configuration paths (docs + settings + related PHP classes).
  • Refactored error page configuration discovery/resolution to Neos 9 APIs (ContentGraph, DimensionSpacePoint, FrontendRouting).
  • Updated package requirements (PHP/Neos/Flow/Guzzle) and introduced a new ActionRequestFactory to build backend routing contexts.

Reviewed changes

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

Show a summary per file
File Description
Resources/Private/Fusion/Root.fusion Adjusts Fusion case positioning for the error handler renderer.
README.md Removes documentation for YAML-based configuration (node-based only).
Configuration/Settings.yaml Removes the legacy pages setting scaffold.
composer.json Bumps requirements for Neos 9 / Flow 9 and updates dependency constraints.
Classes/Service/ErrorPageResolver.php Updates configuration lookup signature and logs throwables via ThrowableStorageInterface.
Classes/Service/DestinationResolver.php Adjusts destination context calculation (notably dimensions).
Classes/Service/ControllerContextFactory.php Removes legacy controller-context building for old routing/linking approach.
Classes/Service/ActionRequestFactory.php New helper to build ActionRequest from SiteDetectionResult (Neos 9 routing).
Classes/Handler/ProductionExceptionHandler.php Cleans up legacy compatibility comments and whitespace.
Classes/DataSource/ErrorPageView.php Migrates data source node type to the Neos 9 ContentGraph Node and adapts configuration lookup.
Classes/Configuration/SettingsBasedConfiguration.php Removes YAML/settings-based configuration implementation.
Classes/Configuration/NodeBasedConfiguration.php Reworks node-based configuration discovery to ContentGraph and dimension-space handling.
Classes/Configuration/ErrorHandlerConfiguration.php Refactors configuration matching to dimension-space resolution from the request.
Classes/Command/ErrorPageCommandController.php Updates error page generation to Neos 9 routing + ContentGraph node lookup and URL building.
Comments suppressed due to low confidence (1)

Classes/Configuration/ErrorHandlerConfiguration.php:72

  • The docblock for findConfigurationForSite() is malformed (nested "/**") and still references $uri and dimensionPathSegment, which are no longer part of the implementation. This makes IDE/static-analysis hints misleading.
    /**
     *
     * /**
     * Find error page configuration by Site, Dimension (parsed in $uri) and status code.
     * If no configuration is found that matches the parsed dimensionPathSegment, the first configuration
     * for the Site and statusCode is used.
     *

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

Comment on lines +184 to +188
foreach ($contentDimensions as $contentDimension) {
assert($contentDimension instanceof ContentDimension);

foreach ($contentDimension->values as $contentDimensionValue) {
foreach ($contentDimensions as $otherContentDimension) {
Comment on lines +40 to +41
#[Flow\Inject]
protected CompilingEvaluator $eelEvaluator;
Comment on lines +26 to +28
$site = $this->siteRepository->findOneByNodeName($siteDetectionResult->siteNodeName);
$baseUri = new Uri((string)$site->getPrimaryDomain());

Comment on lines +160 to +165
$nodeAggregate = $contentGraph->findNodeAggregateById(NodeAggregateId::fromString(substr($configuration['source'], 1)));
$dimensionSpacePoint = DimensionSpacePoint::fromJsonString(json_encode($configuration['dimensions']));

$source = $nodeAggregate->getNodeByOccupiedDimensionSpacePoint(
$nodeAggregate->getOccupationByCovered($dimensionSpacePoint)
);
@paxuclus paxuclus changed the title feat: Update for Neos 9 !!! feat: Update for Neos 9 Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants