Tags: sulu/sulu
Tags
Fix handling of null in Resolvers (#8299) * Handle nullable link items and teasers in property resolvers Add null checks and nullable type hints to handle cases where external links or teasers might not resolve to a resource. This prevents type errors when resolvers receive null values. * Ensure integer type for pagination limit in PageSmartContentProvider Add explicit integer cast for filters['limit'] parameter to ensure type safety when passing to pagination method. * Move null resource handling to ResolvableResourceReplacer Move null handling from individual property resolvers to the central ResolvableResourceReplacer. This prevents executeResourceCallback from being called with null resources, eliminating the need for null checks in individual resolver closures. * Refactor FormMetadata to use keyed field metadata array Change getFlatFieldMetadata() to return an associative array with field names as keys instead of an indexed array. Update consumers to use the new getFlatFieldMetadata() method for direct field access by name. * Add property filtering to NavigationRepository resolution Change resolvePageContent visibility to protected for extensibility and add properties parameter to contentResolver->resolve() to enable selective field resolution in navigation contexts. * Add phpcr-cleanup and route table migration steps to upgrade guide Add pre-update cleanup step for phpcr-repository and instructions to rename the old ro_routes table before creating the new structure during the upgrade process. * Fix various issues * Fix tests * Remove LinkProvider getter * Revert Navigation adjustments --------- Co-authored-by: Prokyonn <[email protected]>
PreviousNext