framework icon indicating copy to clipboard operation
framework copied to clipboard

Install ice via composer instead of pecl

Open waghanza opened this issue 3 years ago • 3 comments

Hi,

Following https://github.com/dependabot/dependabot-core/issues/1990, you meqan @mruz that composer, with

{
  "require": {
    "iceframework/framework": "~1.8.0"
  }
}

could handle ice compilation

That's not what I have using composer install --no-dev --prefer-dist --classmap-authoritative (I'm using https://github.com/the-benchmarker/web-frameworks to try this).

Regards,

waghanza avatar Dec 13 '21 12:12 waghanza

Note: Only scripts defined in the root package's composer.json are executed. If a dependency of the root package specifies its own scripts, Composer does not execute those additional scripts. -https://getcomposer.org/doc/articles/scripts.md#what-is-a-script-

You would need to define a script which calls ice's script:

{
  "require": {
    "iceframework/framework": "~1.8.0"
  },
  "scripts": {
    "post-install-cmd": [
      "cd vendor/iceframework/framework && ./install"
    ]
  }
}

mruz avatar Dec 13 '21 16:12 mruz

could / should not it be defined by ice's composer.json ? @mruz

waghanza avatar Dec 13 '21 17:12 waghanza

It is defined, but composer does not execute those additional scripts from packages, only from root.

mruz avatar Dec 13 '21 17:12 mruz