0

I have a complicated Composer dependency challenge.

(1) Imagine a fictional library L, loaded from a Satis repo.

(2) Imagine project A, consisting of various PHP libraries, classes and "application" (primary web) php files.

One of the classes is using library L by require_once() + composer autoload.

Everything fine so far.

(3) Now imagine project B, using library L as well by composer and autoload, but also using parts of project A by require_once() single classes or function files.

Now I have a conflict of two composer autoload functionalities resulting in library L getting loaded two times (with errors, of course)

Do you see any chance for resolving that without having a "inclusion guard" in library L (which I could influence, but do not want to)?

1 Answer 1

1

The solution should be not to use require or include anymore, as this leads to the given problems. Why is there any reason to mix this with an autoloader anyways?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.