Project

General

Profile

Actions

Bug #100282

open

Enable _assets Symlinks (junctions) on Windows

Added by Steffen Mächtel about 1 year ago. Updated 8 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
composer
Target version:
-
Start date:
2023-03-24
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Windows, Composer, Symlink, Junction
Complexity:
easy
Is Regression:
Sprint Focus:

Description

Composer Install with TYPO3 12 do not create symlinks in Windows Operating System for public/_assets/[symlinks].

We hotfixed it with an Operating System check. Windows can use fileSystem->junction instead of fileSystem->relativeSymlink.

Could Windows Support be integrated in TYPO3 Core for Symlinks?

Class: \TYPO3\CMS\Core\Composer\PackageArtifactBuilder

Method: publishResources

Current code:

            if (!$fileSystem->isSymlinkedDirectory($publicResourcesPath)) {
                $fileSystem->relativeSymlink($fileSystemResourcesPath, $publicResourcesPath);
            }

Hotfix code:

            if (!$fileSystem->isSymlinkedDirectory($publicResourcesPath)) {
                if (Platform::isWindows()) {
                    $fileSystem->junction($fileSystemResourcesPath, $publicResourcesPath);
                } else {
                    $fileSystem->relativeSymlink($fileSystemResourcesPath, $publicResourcesPath);
                }
            }

Files

0001-hotfix-windows-symlink-support.patch (2.34 KB) 0001-hotfix-windows-symlink-support.patch Hotfix Patch File (use with GitBash on Windows) Steffen Mächtel, 2023-08-17 11:53

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #98434: Extension assets are not exported with Composer installers v4 on Windows platformResolved2022-09-26

Actions
Actions

Also available in: Atom PDF