microsoft / microsoft/Oryx

PHP composer installed but "composer install" not called

Open
#2,268 2 comments 0 reactions 1 assignee View on GitHub

@pauld-msft is already working on this.

Since Nov 25, 2023.

enhancement
Dominant language
C#
Stars
881
Forks
195
Avg merge
20h 13m
Merged PRs (30d)
13

Description

I have Laravel 10 project where everything seems to get correctly detected:

Oryx Version: 0.2.20231027.1, Commit: 22314309551107182cffca9fc39d97480466c11c, ReleaseTagName: 20231027.1

Build Operation ID: 6f3d4a6a82b0749a
OS Type           : bullseye
Image Type        : jamstack

Detecting platforms...
Detected following platforms:
  nodejs: 16.20.2
  php: 8.2.9
Version '16.20.2' of platform 'nodejs' is not installed. Generating script to install it...
Version '8.2.9' of platform 'php' is not installed. Generating script to install it...

PHP, its dependencies and Composer are then installed but, after Composer is installed, the "composer install" command never gets run. Instead it just moves on to running the Node build command instead:

Downloading and extracting 'php-composer' version '2.0.8' to '/opt/php-composer/2.0.8'...
Detected image debian flavor: bullseye.
Downloaded in 0 sec(s).
Verifying checksum...
Extracting contents...
performing sha512 checksum for: php-composer...
Done in 0 sec(s).

Removing existing manifest file
Creating directory for command manifest file if it does not exist
Creating a manifest file...
Node Build Command Manifest file created.

Using Node version:
v16.20.2

Using Npm version:
8.19.4

Running 'npm install'...

As a result, my application won't work because it's dependencies haven't been installed.

Looking at examples from other people, I believe I am correct in expecting the "composer install" command to be run:

PHP executable: /tmp/oryx/platforms/php/7.4.28/bin/php
Composer archive: /opt/php-composer/2.0.8/composer.phar
Running 'composer install --ignore-platform-reqs --no-interaction'...

For the sake of brevity, I've not posted the full log or the contents of my composer.json but I'm happy to do so if you think they'll help. I can confirm the application builds correctly locally, and there no errors reported in the rest of Oryx's output.

Is there something simple I'm missing? Or is this a known problem? I couldn't find reference to this precise issue online.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.