Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update zetacomponents/mail to 1.9.3 so can remove patches #24198

Merged
merged 1 commit into from
Aug 10, 2022

Conversation

demeritcowboy
Copy link
Contributor

Overview

The patches that were being applied started failing today on drupal 9 since zeta just included them in 1.9.3.

The only other included change seems to be zetacomponents/Mail@606a075 but I don't think it changes anything.

require-dev has changed to require phpunit9, but I don't think that changes how it gets installed on the test nodes. Let's find out.

@civibot
Copy link

civibot bot commented Aug 9, 2022

(Standard links)

@civibot civibot bot added the master label Aug 9, 2022
@seamuslee001
Copy link
Contributor

@demeritcowboy should we put this against 5.53?

@demeritcowboy demeritcowboy changed the base branch from master to 5.53 August 10, 2022 11:38
@civibot civibot bot added 5.53 and removed master labels Aug 10, 2022
@demeritcowboy demeritcowboy reopened this Aug 10, 2022
@demeritcowboy
Copy link
Contributor Author

Yes good point.

@demeritcowboy demeritcowboy mentioned this pull request Aug 10, 2022
@seamuslee001 seamuslee001 merged commit 464f1c1 into civicrm:5.53 Aug 10, 2022
@demeritcowboy demeritcowboy deleted the zetacompootens branch August 10, 2022 21:50
@totten
Copy link
Member

totten commented Aug 12, 2022

Strictly speaking... shouldn't the composer.json also be updated to ~1.9.3? I suppose it's not too big of a deal, but FWIW here are steps where it could to make a difference:

  • (Last week) Install D9 + Civi 5.52.0 + zeta mail 1.9.2
  • (Next week) Upgrade to 5.52.2. Note that this could be done a couple ways:
    1. Run composer upgrade (all, incl zetacomponents/mail)
    2. Run composer require civicrm/civicrm-{core,packages,drupal-8}:~5.52.2 (just Civi)

The first variant would incidentally upgrade zetacomponents/mail to 1.9.3 (new patches), but the second would leave the lock at 1.9.2 (but now without a list of patches).

Worst-case -- some deployments are missing 86.patch and 88.patch? Which isn't terrible, since these patches address uncommon scenarios (php81 and single-quote-emails) - and since you can recover with another composer upgrade. But it's worth considering with other patches.

@demeritcowboy
Copy link
Contributor Author

Fair point. I've posted PRs.

Anecdotally, I've noticed when people use the require variation they automatically add -W, I suspect because the command so often fails and at the bottom of the error message it suggests doing that (rightly or wrongly), so after a while they just do it every time at the start. But that's just an anecdote and the above scenario is of course a real scenario.

@totten
Copy link
Member

totten commented Aug 12, 2022

Oh, I'd never seen the -W option. That's a neat one.

@jensschuppe
Copy link
Contributor

Are the patches actively being checked for still being applicable regularly (e.g. just before every CiviCRM Core release) with the latest version of the affected packages? If so, why not lock their version to this specific one so that composer update will not update them and potentially cause patches not being applicable and CiviCRM not working correctly? Of course, people will lose intermediate updates of those packages that do not interfere with the patches, but CiviCRM would then upgrade to this version with its next release, so it would just be delayed for a month at most.

@demeritcowboy
Copy link
Contributor Author

I'd personally be fine with locking every package to a specific version, but then it raises the question of why even use composer, which I'd also be personally fine with getting rid of. But there's a more general discussion at https://lab.civicrm.org/dev/drupal/-/issues/164

@thomst
Copy link
Contributor

thomst commented Oct 12, 2022

Using composer or not is a big question. But this issue could be very easily fixed by setting those packages for which patches will be applied to a fixed version. Otherwise there is no guarantee that patches could be applied. And therefore the system might not work correctly as @jensschuppe said.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants