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

Upgrade core extensions to civix v25.01.1 #31885

Merged
merged 2 commits into from
Feb 6, 2025

Conversation

colemanw
Copy link
Member

Overview

Ran civix upgrade on all core extensions except for "oauth-client" which needs converting to EFv2.

It all went fine except for a civilint error, fixed with totten/civix#389

Copy link

civibot bot commented Jan 27, 2025

🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷

Introduction for new contributors...
  • If this is your first PR, an admin will greenlight automated testing with the command ok to test or add to whitelist.
  • A series of tests will automatically run. You can see the results at the bottom of this page (if there are any problems, it will include a link to see what went wrong).
  • A demo site will be built where anyone can try out a version of CiviCRM that includes your changes.
  • If this process needs to be repeated, an admin will issue the command test this please to rerun tests and build a new demo site.
  • Before this PR can be merged, it needs to be reviewed. Please keep in mind that reviewers are volunteers, and their response time can vary from a few hours to a few weeks depending on their availability and their knowledge of this particular part of CiviCRM.
  • A great way to speed up this process is to "trade reviews" with someone - find an open PR that you feel able to review, and leave a comment like "I'm reviewing this now, could you please review mine?" (include a link to yours). You don't have to wait for a response to get started (and you don't have to stop at one!) the more you review, the faster this process goes for everyone 😄
  • To ensure that you are credited properly in the final release notes, please add yourself to contributor-key.yml
  • For more information about contributing, see CONTRIBUTING.md.
Quick links for reviewers...

➡️ Online demo of this PR 🔗

ext/civi_campaign/info.xml Outdated Show resolved Hide resolved
/**
* Collection of upgrade steps.
*/
class CRM_Campaign_Upgrader extends \CRM_Extension_Upgrader_Component {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@totten the AutomaticUpgrader points here to CRM_Campaign_Upgrader and I just added this stub and extended CRM_Extension_Upgrader_Component which is basically the same as putting it in the xml file.

Note the comment on the class:

* Can be used directly from the extensions' info.xml or can be extended for
* additional install/uninstall/upgrade functionality in the extension.

And I do think that at some point we will start adding upgrade logic & schema stuff to these extensions so it's not a bad direction to move in.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, for that reason, I assume it's functionally equivalent (as-written) to status-quo.

The difference is that it invites modifications via CRM/{$Component}/Upgrader.php. Which begs the question: Are we prepared to add install(), upgrade_NNN(), etc to that file? Is the ext-upgrade subsystem actually a plausible replacement for core-upgrade subsystem?

On a gut-level, I worry that an unorganized move from CRM/Upgrade/Incremental/php/XXX.php to ext/civi_xxx/CRM/{$Component}/Upgrader.php will consign us to a process that is... easy-to-start, hard-to-finish.

On an ideological level, I do appreciate that module-extensions have sharper boundaries which are reinforced by ext-upgrader. And a more consistent API would sound nice. But OTOH, I'm not sure the Components actually have problems with upgrading. And in the past, we've had troubles whenever we've conjured new ways to splice the core-upgrade and ext-lifecycle.

I started writing laundry list of more specific subtopics, but... that's a lot of text... and this isn't a civix upgrade thing. Bridging the gap between core-upgrade and ext-upgrade (from the POV of components) feels like its own issue.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@totten would you be more comfortable if I replaced extends with class_alias() in those files? That would be less inviting.

@colemanw
Copy link
Member Author

@totten ok I've updated this to not switch the component extensions to EFv2 & the change is more minimal.

@totten totten merged commit fa916c6 into civicrm:master Feb 6, 2025
1 check passed
@totten totten deleted the upgradeCoreExts branch February 6, 2025 02:58
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.

2 participants