Open
Conversation
There was a problem hiding this comment.
Pull request overview
Introduces a new Laravel-native Path service (and facade) for resolving Craft’s key filesystem paths, and migrates existing code away from the legacy Yii craft\services\Path APIs.
Changes:
- Added
CraftCms\Cms\Support\Path(singleton) andCraftCms\Cms\Support\Facades\Path. - Updated multiple subsystems (Twig, updates, assets, project config, utilities) to use the new Path APIs.
- Deprecated
craft\services\Pathand implemented it as a thin delegator to the new service; added feature tests covering the new behavior.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| yii2-adapter/legacy/test/Craft.php | Resets the new Path singleton/facade between tests to avoid cached-path leakage. |
| yii2-adapter/legacy/services/Path.php | Deprecates legacy Yii Path service and forwards calls to the new Laravel Path service. |
| tests/Feature/Support/PathTest.php | Adds test coverage for path resolution, directory creation side effects, and facade parity. |
| src/View/TemplateMode.php | Switches template root resolution to the new Path facade. |
| src/Utility/Utilities/SystemReport.php | Uses Path facade to locate Composer’s InstalledVersions file. |
| src/Utility/Utilities/ClearCaches.php | Uses the new Path service for cache directory targets. |
| src/Updates/Updates.php | Uses Path facade for compiled template cleanup during migrations. |
| src/Updates/Commands/UpdateCommand.php | Uses Path facade + join_paths() for composer backup file locations. |
| src/Twig/Twig.php | Points Twig cache directory to Path::compiledTemplates(). |
| src/Twig/TemplateResolver.php | Uses join_paths() for safer cross-platform path construction. |
| src/Support/Security.php | Uses Path::system() to determine system directories. |
| src/Support/Path.php | Adds the new Path service implementation. |
| src/Support/Facades/Path.php | Adds the Path facade for convenient static access. |
| src/Support/Composer.php | Uses Path facade for runtime and backup directories; improves path joining. |
| src/Providers/AppServiceProvider.php | Configures the rebrand filesystem disk root via the Path facade. |
| src/ProjectConfig/ProjectConfigHelper.php | Uses Path facade to locate the project config file. |
| src/ProjectConfig/ProjectConfig.php | Uses Path facade and join_paths() for project config IO. |
| src/ProjectConfig/Commands/ExportCommand.php | Uses join_paths() and improves export filename construction. |
| src/Image/ImageTransforms.php | Uses Path facade for asset source/image editor directories. |
| src/Image/ImageTransformHelper.php | Uses Path facade for temp paths. |
| src/Http/Middleware/CheckForUpdates.php | Uses Path facade for compiled template cleanup. |
| src/Http/Controllers/Dashboard/Widgets/CraftSupportController.php | Uses Path facade for temp zip/log/template/config-backup paths. |
| src/Http/Controllers/Assets/TransformController.php | Uses Path facade + join_paths() for transform output paths. |
| src/Http/Controllers/Assets/ActionController.php | Uses Path facade for temp zip path. |
| src/Filesystem/Filesystems/Temp.php | Uses Path facade for default temp upload path. |
| src/Cp/Rebrand.php | Removes legacy Path injection (no longer needed). |
| src/Asset/Elements/Asset.php | Uses Path facade/service for temp and asset-source paths and system dir list. |
| src/Asset/Assets.php | Uses Path facade for temp upload disk root. |
| CHANGELOG-WIP.md | Documents the new Path service/facade and deprecation of legacy Path service. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.