On Wednesday, 13 January 2021 9:36:37 AM AEDT David Prévot wrote:
> > 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).

So there must be a missing dependency - that's why composer is needed...
I see... Thank you very much for the hint. I'll try to comment composer
and include what's missing to phpab template. However this is a difficult
path - as I've mentioned, different errors are thrown here and there
depending on which CiviCRM feature is used and even though we use CiviCRM,
I can't check all the features especially in deactivated modules/plugins.

This situation feels fragile due to manual fiddling with phpab template
as merely forgetting a library breaks some functionality. Re-testing
everything on every new release makes maintenance slow and tedious.
Even then how can I be sure that nothing is missed? Perhaps some form of
translation of composer dependencies could be a solution, as you've said.


> 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…

Understood, thanks. I Will attempt that and I reckon this will help to
stabilise phpab template but I have a feeling that run-time dependency
discover is not a good way to populate list of dependencies...


> 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.

Noted, thanks.


> 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.

If you are familiar with Wordpress then running CiviCRM should not be
too difficult. But leave the matters with me for now please. I'll
experiment, learn and maybe ask you for advise or review. 
I'll definitely need your help with autoload.php template generator
if we can use it with CiviCRM.

Thank you.

-- 
Kind regards,
 Dmitry Smirnov
 GPG key : 4096R/52B6BBD953968D1B

---

The strongest argument for socialism is that it sounds good. The strongest
argument against socialism is that it doesn't work. But those who live by
words will always have a soft spot in their hearts for socialism because it
sounds so good.
    -- Thomas Sowell

---

"Increased Risk of Noninfluenza Respiratory Virus Infections Associated
With Receipt of Inactivated Influenza Vaccine".
    -- https://pubmed.ncbi.nlm.nih.gov/22423139/

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to