ice / framework

Source code of Ice framework
https://www.iceframework.org
BSD 3-Clause "New" or "Revised" License
341 stars 45 forks source link

Install ice via composer instead of pecl #300

Closed waghanza closed 1 year ago

waghanza commented 2 years ago

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,

mruz commented 2 years ago

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"
    ]
  }
}
waghanza commented 2 years ago

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

mruz commented 2 years ago

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