Merge branch '2.2' into main
commit
0be1e5a279
|
@ -39,7 +39,7 @@ requirements:
|
||||||
The required version of the `composer-plugin-api` follows the same [rules][7]
|
The required version of the `composer-plugin-api` follows the same [rules][7]
|
||||||
as a normal package's rules.
|
as a normal package's rules.
|
||||||
|
|
||||||
The current Composer plugin API version is `2.1.0`.
|
The current Composer plugin API version is `2.2.0`.
|
||||||
|
|
||||||
An example of a valid plugin `composer.json` file (with the autoloading
|
An example of a valid plugin `composer.json` file (with the autoloading
|
||||||
part omitted and an optional require-dev dependency on `composer/composer` for IDE auto completion):
|
part omitted and an optional require-dev dependency on `composer/composer` for IDE auto completion):
|
||||||
|
|
|
@ -158,6 +158,10 @@ class BinaryInstaller
|
||||||
return trim($match[1]);
|
return trim($match[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (substr($bin, -4) === '.jar') {
|
||||||
|
return 'java -jar ';
|
||||||
|
}
|
||||||
|
|
||||||
return 'php';
|
return 'php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,7 +228,7 @@ class BinaryInstaller
|
||||||
$binPath = $this->filesystem->findShortestPath($link, $bin);
|
$binPath = $this->filesystem->findShortestPath($link, $bin);
|
||||||
$caller = self::determineBinaryCaller($bin);
|
$caller = self::determineBinaryCaller($bin);
|
||||||
|
|
||||||
// if the target is a php file, we run the unixy proxy file
|
// if the target is a php file, we run the unixy proxy file (a php script in this case)
|
||||||
// to ensure that _composer_autoload_path gets defined, instead
|
// to ensure that _composer_autoload_path gets defined, instead
|
||||||
// of running the binary directly
|
// of running the binary directly
|
||||||
if ($caller === 'php') {
|
if ($caller === 'php') {
|
||||||
|
@ -394,6 +398,11 @@ include $binPathExported;
|
||||||
PROXY;
|
PROXY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$caller = '';
|
||||||
|
if (substr($bin, -4) === '.jar') {
|
||||||
|
$caller = 'java -jar ';
|
||||||
|
}
|
||||||
|
|
||||||
return <<<PROXY
|
return <<<PROXY
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
@ -415,7 +424,7 @@ fi
|
||||||
|
|
||||||
export COMPOSER_BIN_DIR=\$(cd "\${self%[/\\\\]*}" > /dev/null; pwd)
|
export COMPOSER_BIN_DIR=\$(cd "\${self%[/\\\\]*}" > /dev/null; pwd)
|
||||||
|
|
||||||
"\${dir}/$binFile" "\$@"
|
$caller"\${dir}/$binFile" "\$@"
|
||||||
|
|
||||||
PROXY;
|
PROXY;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue