Hi Dmitry,

Le 12/01/2021 à 17:26, Dmitry Smirnov a écrit :

On Wednesday, 13 January 2021 3:05:37 AM AEDT David Prévot wrote:
civicrm-common depends on composer, it seems like it is used as a
dynamic autoloader:

https://salsa.debian.org/debian/civicrm/-/blob/master/debian/autoload-vendo
r.php.tpl#L11

Please, do drop the dependency on composer

Thank you for your suggestion. Unfortunately, at the moment I can not do that
as CiviCRM just does not work without it (or I don't know _how_ to do it).

I’d need more information on the actual errors (or some time to dig it myself).

and use proper static autoloader(s) instead.

What would that be? I've thought that using phpab is the way to go.

Yes, it is! That’s why I’m surprised you need also 'Composer/Autoload/ClassLoader.php' on top of the other require (my guess is that some dependencies are not yet part of your current template).

My trial and errors first take at the issue would be to keep an eye on the webserver errors (e.g., “tail -f /var/log/apache2/error.log”) and take the following actions:
- comment out the Composer autoload.php (l11);
- hopefully get a meaningful error identifying a missing class;
- try and include the missing classes, e.g. via
        require_once 'Psr/Http/Client/autoload.php';
  if it can’t find some Psr\\Http\\Client\\… class;
- go back to step 2 if it’s not enough…

Optional dependencies should be loadable via @include_once or with
something like:
        if (stream_resolve_include_path('<stuff>/autoload.php'))
                include_once '<stuff>/autoload.php';
as we currently usually do.

I’ve no idea how to run civicrm right now (it doesn’t seem like a straight out of the box kind of thing at first sight), so I’m not proposing a patch, but will try harder if you need a hand for that.

Regards

David

Reply via email to