Skip to content

[6.x] Image transforms#18480

Open
riasvdv wants to merge 12 commits intofeature/port-assets-servicefrom
feature/port-image-transforms
Open

[6.x] Image transforms#18480
riasvdv wants to merge 12 commits intofeature/port-assets-servicefrom
feature/port-image-transforms

Conversation

@riasvdv
Copy link
Contributor

@riasvdv riasvdv commented Feb 26, 2026

Description

This is a straight backwards compatible port of the current functionality. Any improvements we want to do to the image transforms can follow in subsequent PRs

@riasvdv riasvdv force-pushed the feature/port-image-transforms branch from 8d9f2df to eaff55f Compare February 26, 2026 08:43
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

This PR ports the image transforms functionality from the legacy Craft CMS architecture to the new Laravel-based architecture in version 6.x. It's a backwards-compatible implementation that maintains existing functionality while modernizing the codebase structure.

Changes:

  • Introduces new ImageTransforms service, ImageTransformer, and ImageTransformHelper classes in the modern architecture
  • Creates Data classes (ImageTransform, ImageTransformIndex) with proper validation
  • Implements event system migration from Yii2 events to Laravel events with backwards-compatible bridges
  • Adds comprehensive test coverage with unit and feature tests
  • Updates legacy adapter code to delegate to new implementations via class aliases and facades

Reviewed changes

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

Show a summary per file
File Description
src/Image/ImageTransforms.php New singleton service managing image transforms with ProjectConfig integration
src/Image/ImageTransformer.php Core transformer implementation handling transform generation and eager-loading
src/Image/ImageTransformHelper.php Static helper methods for transform string parsing and manipulation
src/Image/Data/ImageTransform.php Data class representing a transform with validation rules
src/Image/Data/ImageTransformIndex.php Data class representing a transform index entry
src/Http/Controllers/Settings/ImageTransformsController.php New controller for image transform CRUD operations
yii2-adapter/legacy/services/ImageTransforms.php Legacy service wrapper delegating to new implementation
yii2-adapter/legacy/models/ImageTransform.php Class alias to new Data class
tests/Unit/Image/* Comprehensive unit tests for helper and data classes
tests/Feature/Image/* Feature tests for service and transformer

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

@riasvdv riasvdv marked this pull request as ready for review February 26, 2026 10:00
@riasvdv riasvdv requested a review from brandonkelly February 26, 2026 10:00
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.

2 participants