Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix symlinks on Windows.#21887

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@david-garcia-garcia
Copy link

QA
Branch?master
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#...
LicenseMIT
Doc PRsymfony/symfony-docs#...

Php's symlink function on Windows is completely broken, see:

php/php-src#1243
https://bugs.php.net/bug.php?id=69473

Looks like there is little to no intention to fix this in core. An alternative way to achieve symlinks (properly) on Windows is to use the command line.

I submitted a similar PR for the composer/composer project, where they use symfony's filesystem + a manual junction based fallback for windows:

composer/composer#6213

This patch adds additional fallback to try and create the symlink on windows environments using exec()

@nicolas-grekas
Copy link
Member

See#18324 for some background on the topic.

$ok = @symlink($originDir,$targetDir);
}

if (!$ok &&strncasecmp(PHP_OS,'WIN',3) ==0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Minor comment: to detect if the OS is macOS, we use thePHP_OS constant as follows:'Darwin' === PHP_OS But for Windows, we always use this indirect detection:'\\' === DIRECTORY_SEPARATOR

@fabpot
Copy link
Member

Closing as it cannot be merged as is. Feel free to reopen if you think you can finish it by taking#18324 into consideration. Thanks.

@fabpotfabpot closed thisMar 22, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@javiereguiluzjaviereguiluzjaviereguiluz left review comments

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@david-garcia-garcia@nicolas-grekas@fabpot@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp