Problem/Motivation

#2568595: Upgrade PHPUnit to latest 4.8.x changed vendor/bin/phpunit from a symlink to shell script. The change was introduces because composer different results of different platforms. https://github.com/kocsismate/composer/blob/feature-bin-compat/src/Compo...

Proposed resolution

Revert the change.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 2580527.patch507 byteswebflo
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

webflo created an issue. See original summary.

webflo’s picture

webflo’s picture

Issue summary: View changes
webflo’s picture

Issue summary: View changes
neclimdul’s picture

Priority: Normal » Major
Status: Needs review » Reviewed & tested by the community

because windows...
https://github.com/kocsismate/composer/blob/feature-bin-compat/src/Compo...

Locally applied and all is well.

dawehner’s picture

hussainweb’s picture

FWIW, I ran this on a Ubuntu VM running on Windows host. I have never had problems with symlinks earlier but maybe recent updates to composer changed something.

Also, the link you gave is some other repository. The link in the actual repo would be https://github.com/composer/composer/blob/master/src/Composer/Installer/.... I am curious as to why this happened.

hussainweb’s picture

Okay, I see why this happened. I am only posting here for reference in case it happens to someone else (or if I forget).

                $cwd = getcwd();
                try {
                    // under linux symlinks are not always supported for example
                    // when using it in smbfs mounted folder
                    $relativeBin = $this->filesystem->findShortestPath($link, $binPath);
                    chdir(dirname($link));
                    if (false === @symlink($relativeBin, $link)) {
                        throw new \ErrorException();
                    }
                } catch (\ErrorException $e) {
                    file_put_contents($link, $this->generateUnixyProxyCode($binPath, $link));
                }

It basically falls back to generating the proxy code if the symlink creation failed for some reason. I think it's functionally the same, but yes, let's keep things simple in core.

And yes, waiting on #1475510: Remove external dependencies from the core repo and let Composer manage the dependencies instead...

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.0.x. Thanks a lot for the fast turnaround on this!

  • webchick committed 05fd020 on 8.0.x
    Issue #2580527 by webflo, hussainweb, neclimdul: Revert vendor/bin/...

Status: Fixed » Needs work

The last submitted patch, 2: 2580527.patch, failed testing.

dawehner’s picture

Status: Needs work » Fixed

Stupid old bot.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.