Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid child dependency installs #26

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nilmerg
Copy link
Member

@nilmerg nilmerg commented Oct 27, 2023

@nilmerg nilmerg self-assigned this Oct 27, 2023
@cla-bot cla-bot bot added the cla/signed label Oct 27, 2023
@nilmerg
Copy link
Member Author

nilmerg commented Oct 27, 2023

Doesn't work yet. Autoloading is messed up. Composer usually takes care of dependency resolution during autoloading. But by faking them here using the repl/acer library, composer thinks they are available. This then leads to problems with e.g. ipl/scheduler which contains a file autoloader that expects a particular dependency being available while it runs. And it runs right away if Icinga Web requires the ipl's vendor/autoload.php. (Which might happen before icinga-php-thirdparty's autoloader is required)

We need our own dependency resolution for libraries. ipl could define the following in composer.json:

  "extra": {
    "icinga-load-order": {
      "after": ["icinga/icinga-php-thirdparty"]
    }
  },

Icinga Web parses this and makes sure ipl is only loaded after icinga-php-thirdparty. Or so.

@nilmerg
Copy link
Member Author

nilmerg commented Oct 27, 2023

And no, changing ipl/scheduler file autoloader doesn't help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant