8000 Problems running composer --version on windows · Issue #1480 · box-project/box · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Problems running composer --version on windows #1480
Open
@zobo

Description

@zobo

Bug report

Question Answer
Box version 4.6.5@0964604
PHP version 8.2.8
Platform with version Windows 11
Github Repo https://github.com/phpactor/phpactor

I was trying to box the application on Windows and got the error Could not determine the Composer version from the following output:

The last version that worked was 4.5.0.

Running the command with --debug I saw that in 4.5.0 the composer command used was:

? Checking Composer compatibility
    > c:\...\zobo\tools\php\composer.BAT --version --no-ansi
    > Version detected: 2.4.4 (Box requires ^2.2.0)
    > Supported version detected

The output of 4.6.5 was:

? Checking Composer compatibility
    > c:\...\zobo\tools\php\composer.phar --version --no-ansi

Naturally windows cannot run a .phar (at least on on my system) so overriding with cli options does work:

php box.phar compile -c ../box.json --debug --composer-bin=c:\...\zobo\tools\php\composer.BAT
...
? Checking Composer compatibility
    > c:/.../zobo/tools/php/composer.BAT --version --no-ansi
    > Version detected: 2.4.4 (Box requires ^2.2.0)
    > Supported version detected

Is there anything that can be done about fixing this detection?

box.json.dist
{
 "compression": "GZ",
 "directories": [
   "templates"
 ],
 "files": [
   "LICENSE"
 ],
 "finder": [
   {
     "exclude": [
       "Tests"
     ],
     "in": "lib"
   },
   {
     "name": "{\\.(php|bash|fish|zsh)}",
     "exclude": [
       "tests",
       "test"
     ],
     "in": "vendor"
   }
 ],
 "git-tag": "git_tag",
 "intercept": true,
 "output": "build/phpactor.phar"
} ```
</details>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0