On Wednesday, 13 January 2021 9:36:37 AM AEDT David Prévot wrote: > I’d need more information on the actual errors (or some time to dig it > myself).
Interestingly, commenting require_once 'Composer/Autoload/ClassLoader.php'; in "/usr/share/civicrm/vendor/autoload.php" produces the following error that specifically mention Composer: ~~~~ Fatal error: CRM_Extension_ClassLoader::register(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "Composer\Autoload\ClassLoader" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide an autoloader to load the class definition in /usr/share/ civicrm/CRM/Extension/ClassLoader.php on line 74 ~~~~ So it looks like phpab needs to scan "CRM" directory but that yields the following error: ~~~~ Multiple declarations of trait(s), interface(s) or class(es). Could not generate autoload map. Unit 'crm_pledge_export_form_map' defined in: - /build/civicrm-5.33.1+dfsg1/CRM/Grant/Export/Form/Map.php - /build/civicrm-5.33.1+dfsg1/CRM/Pledge/Export/Form/Map.php ~~~~ Just for the purpose of experiment I invoked phpab with "--blacklist crm_pledge_export_form_map" and added the following: ~~~~ require_once 'CRM/Extension/ClassLoader.php'; ~~~~ but "CRM/Core/ClassLoader.php" and "CRM/Extension/ClassLoader.php" both explicitly call Composer so the following error was thrown: ~~~~ Fatal error: CRM_Extension_ClassLoader::register(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "Composer\Autoload\ClassLoader" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide an autoloader to load the class definition in /usr/share/civicrm/CRM/Extension/ClassLoader.php on line 74 ~~~~ Looks like ripping out Composer might not be worthy of effort... Why do we even want to get rid of it? As I've mentioned, I _want_ to expose system libraries to minimise vendoring. -- Regards, Dmitry Smirnov GPG key : 4096R/52B6BBD953968D1B --- We occasionally stumble over the truth but most of us pick ourselves up and hurry off as if nothing had happened. -- Winston Churchill --- And how long a lockdown is enough? If we open now, will lockdown recur in autumn? Next year? Whenever authoritarianism so wishes? No dictatorship could imagine a better precedent for absolute control. -- https://www.bmj.com/content/369/bmj.m1924.long :: BMJ 2020;369:m1924 "Should governments continue lockdown to slow the spread of covid-19?"
signature.asc
Description: This is a digitally signed message part.