8000 Merge pull request #483 from symfony-cli/psh-tweaks · symfony-cli/symfony-cli@7412ef6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7412ef6

Browse files
authored
Merge pull request #483 from symfony-cli/psh-tweaks
Make Composer 2 the default Composer binary
2 parents 6e1eb0a + 18ef848 commit 7412ef6

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-< 10000 !-- -->5
lines changed

local/php/composer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func Composer(dir string, args, env []string, stdout, stderr, logger io.Writer,
7171
}
7272
composerBin := "composer1"
7373
if composerVersion() == 2 {
74-
composerBin = "composer2"
74+
composerBin = "composer"
7575
}
7676
path, err := e.findComposer(composerBin)
7777
if err != nil || !isPHPScript(path) {
@@ -139,7 +139,7 @@ func findComposer(extraBin string) (string, error) {
139139
// Special support for OS specific things. They need to run before the
140140
// PATH detection because most of them adds shell wrappers that we
141141
// can't run via PHP.
142-
if pharPath := findComposerSystemSpecific(extraBin); pharPath != "" {
142+
if pharPath := findComposerSystemSpecific(); pharPath != "" {
143143
return pharPath, nil
144144
}
145145
for _, file := range []string{extraBin, "composer", "composer.phar"} {

local/php/composer_unix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
"strings"
2929
)
3030

31-
func findComposerSystemSpecific(extraBin string) string {
31+
func findComposerSystemSpecific() string {
3232
// Special Support for NixOS
3333
for _, path := range strings.Split(os.Getenv("buildInputs"), " ") {
3434
nixPharPath := filepath.Join(path, "libexec/composer/composer.phar")

local/php/composer_windows.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@
2020
package php
2121

2222
import (
23-
"github.com/mitchellh/go-homedir"
2423
"os"
2524
"os/exec"
2625
"path/filepath"
26+
27+
"github.com/mitchellh/go-homedir"
2728
)
2829

29-
func findComposerSystemSpecific(extraBin string) string {
30+
func findComposerSystemSpecific() string {
3031
// Special Support for Scoop
3132
scoopPaths := []string{}
3233

0 commit comments

Comments
 (0)
0