scrutinizer-ci / scrutinizer

Legacy repository - archives past feature requests/bug reports
https://scrutinizer-ci.com/docs
140 stars 36 forks source link

Update version of composer #399

Closed robbieaverill closed 6 years ago

robbieaverill commented 6 years ago

Hi team,

Would you mind updating the version of composer used for PHP packages?

We are starting to use the composer plugin API in more of our packages, and it seems that perhaps the version used on Scrutinizer isn't up-to-date to support it.

Example: https://scrutinizer-ci.com/g/silverstripe/silverstripe-elemental-blocks/inspections/67cd60f4-6e89-47db-b8db-065148488409/log

Installing vendors through composer ...
+===================================================================================+
| You can avoid this step by committing your composer.lock file to your repository. |
+===================================================================================+
Identity added: /home/scrutinizer/composer-install/../ssh-key0 (/home/scrutinizer/composer-install/../ssh-key0)
Identity added: /home/scrutinizer/composer-install/../ssh-key1 (/home/scrutinizer/composer-install/../ssh-key1)
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for silverstripe/vendor-plugin ^1.0 -> satisfiable by silverstripe/vendor-plugin[1.0.x-dev].
    - silverstripe/vendor-plugin 1.0.x-dev requires composer-plugin-api ^1.1 -> no matching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Not sure which version of composer is currently used in Scrutinizer (couldn't see any output in the inspection logs related to it), but perhaps it's a little old?

Similar issue: https://github.com/composer/composer/issues/5252

robbieaverill commented 6 years ago

After contacting support and receiving their helpful response, anyone experiencing this issue can update to use the new PHP Scrutinizer build system. Docs: https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/

Updating to the latest composer version is a default step using this.

Example basic configuration:

checks:
  php: true

build:
  nodes:
    analysis:
      tests:
        override: [php-scrutinizer-run]

filter:
  paths: ["src/*", "tests/*"]