Conversation
Ports the #[ImageFilter] attribute and normalizer from alabuga into the bundle. Generates avif/webp/src × 1x/2x/3x HMAC-signed URLs in API responses, mirroring the Twig image macro output structure. - ImageFilter attribute: filter, width, height, preset params - ImageFilterAttributeNormalizer: reflection-based, with per-class cache, null URI guard, setAccessible for private properties - Registered conditionally via class_exists(NormalizerInterface::class) - Serializer/ excluded from services glob to prevent unconditional load - symfony/serializer added to suggest + require-dev
…AttributeNormalizer
…ace_exists fix - Make #[ImageFilter] attribute repeatable with a `key` parameter (default: "default") so multiple filter configurations on a single property produce a keyed map - Remove original-format (src) output — normalizer now only generates avif and webp - Fix conditional registration: use interface_exists instead of class_exists for NormalizerInterface - Add view-bundle dev dependency for integration testing - Add unit tests for ImageFilter attribute and ImageFilterAttributeNormalizer - Add integration tests with TestKernel verifying full serializer chain Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…density Serializer: - Add ImageFilterMetadataFactory with 3-layer caching (in-memory, PSR-6, reflection) - Dev-mode cache keys fingerprinted from class/parent/trait file mtimes (recursive) - Refactor normalizer to use metadata factory instead of direct reflection - Respect IGNORED_ATTRIBUTES and ATTRIBUTES context (flat and nested/associative) - Nested ATTRIBUTES prune the output tree (e.g. coverArt.default.avif.1x) - Configurable output formats via chamber_orchestra_image.serializer.formats - Validate formats against ImageFormat enum at container build time - Default densities now [1, 2, 3, 4] Security: - StreamLoader: detect both scheme:// and compact scheme: URI forms - StreamLoader: bare paths treated as implicit "file" scheme, checked against allowlist - Density upper bound capped at 4.0x in AbstractResizeProcessor - Post-processor timeouts capped at 300s (pngquant, mozjpeg, cwebp, avifenc) - PngquantPostProcessor: clamp quality range values to 0-100 Bug fixes: - CacheManager: normalize signing config to processors+output only - RuntimeAction: include output in URL query params and signature verification - Remove deprecated setAccessible() call (no-op since PHP 8.1) - Fix PHPUnit with() without expects() deprecations Tests: 399 tests, 942 assertions, zero issues Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… type Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
wtorsi
approved these changes
Mar 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#[ImageFilter]attribute andImageFilterAttributeNormalizerfor automatic image URL generation in API responses (serializer counterpart to existing Twig macros)keyparameter — multiple attributes on one property produce a keyed map of avif/webp × 1x/2x/3x HMAC-signed URLsinterface_existscheck for conditional normalizer registrationchamber-orchestra/view-bundleas dev dependency for integration testingTest plan
ImageFilterattribute (defaults, custom values, repeatability, multiple keys)ImageFilterAttributeNormalizer(supports check, null/empty/non-image handling, delegation to fill/fit/optimize, leading slash stripping, preset passthrough, cache behavior)🤖 Generated with Claude Code