Update cv library. Respect CIVICRM_BOOT or CIVICRM_SETTINGS.#300
Update cv library. Respect CIVICRM_BOOT or CIVICRM_SETTINGS.#300
Conversation
|
Thanks, @totten, that's great work! Unfortunately, there's now a Composer dependency mismatch causing a
For civix: while the Drupal Composer project has Civix uses the older version due to its With civix not locking the PHP version via |
Yup. It matches the declarations on The (Key difference - PHARs must have packages that are compatible with the full range of environments, i.e. php73-php82. But when you locally run
I haven't yet reproduced the problem-scenario -- I tried a bit with D9. What's your UF? D10? In principle, the But parallel to that, |
|
I'm seeing that error with drupal 10. php is 8.1 (drupal 10 won't run with less). psr/log is 3.0.0. Happens during core:install.
Since it sounds like the problem is that cv is getting built with an older psr/log, and in my case it's a build of cv from git, I can probably just tell it to use 3.0. |
Drupal 10 with PHP 8.1. |
|
Dave mentioned some success after dropping I've been trying to port civicrm/cv#158 (but it's not working yet) |
|
If the port is related to symfony I did notice there was a symfony6 incompatibility when I tried to get cv to use log 3.0, since that set off a chain of requiring symfony6 and then ran into function signature difference for |
|
@demeritcowboy Yeah, I wasn't aware of that specific conflict, but that's the kind of thing that namespace-prefixing should address. (i.e. There's nothing innately broken with Symfony4, except that Symfony4 and Symfony6 don't naturally coexist.) Anyway, I made some progress - and this PR produces a PHAR that looks plausibly prefixed. I' can do some basic commands on my local D10+php81. (However, I'm not sure my local environment is hostile enough for testing it.) |
|
Well, those bits are merged (dropping the So then I tried to setup the test-matrix to include D9+D10. This is where it's a bit ucky.
I haven't really looked into the D9 one. I tried the D10 first since it sounded thematically similar to the issue @demeritcowboy had before (and I was hoping to show the test passing after the merges). But the test+failure seem a bit gnarly:
The first solution that comes to mind is to rearrange this test to use |
|
That first one I have come across before, and I remember just hacking it and then thinking I'd come back to it later. Let me see if I have any notes somewhere. |
|
What I came across was similar but different. I did come back to it and had a series of PRs, these being the closest, but are different:
So as you've noted for the drupal 10 part this might be specific to the e2e tests. |
This update aims to resolve an issue identified in the discussion of civicrm/cv#166 - i.e.
civixdoesn't support some of bootstrap (initialization) options thatcvdoes, which limits compatibility with some environments.Before
civixneeds to acces CiviCRM, it usescv'sBootstrap.php.Bootstrap.phpis included by way of a special/single-file download step.Bootstrap.phponly supports the traditional (Civi-first / CIVICRM_SETTINGS) protocol. It doesn't support the newer (CMS-first / CIVICRM_BOOT) protocol.After
civixneeds to acces CiviCRM, it usescv'sBootstrap.phporCmsBootstrap.php.cvhelper classes are included as a composer dependency (civicrm/cv-lib).civix's boot behavior should now matchcv's behavior, as described in https://github.com/civicrm/cv#bootstrap