Skip to content

Update civixmix-schema from 5.80.2=>5.85.beta1#403

Merged
totten merged 3 commits intomasterfrom
master-civimix-bump
Apr 16, 2025
Merged

Update civixmix-schema from 5.80.2=>5.85.beta1#403
totten merged 3 commits intomasterfrom
master-civimix-bump

Conversation

@totten
Copy link
Copy Markdown
Owner

@totten totten commented Apr 16, 2025

This should add new helpers from https://github.com/civicrm/civicrm-core/pull/32603/files.

TODO: Assess backward-compatibility. (Hopefully, the CI tests will give some clue... 🤞)

@totten
Copy link
Copy Markdown
Owner Author

totten commented Apr 16, 2025

TODO: Assess backward-compatibility. (Hopefully, the CI tests will give some clue... 🤞)

I think as currently written this bit would require 5.74+, but the tests are passing because there's no coverage for alterSchemaField().

So I should probably add some coverage for the new function.

After that, I strongly suspect one of these would get 5.69 (actually, 5.45) compat:

-$tableName = \Civi::entity($entityName)->getMeta('table');
+$tableName = CRM_Core_DAO_AllCoreTables::getTableForEntityName($entityName)
-$tableName = \Civi::entity($entityName)->getMeta('table');
+$tableName = method_exists('Civi', 'entity')
+   ? \Civi::entity($entityName)->getMeta('table')
+   : CRM_Core_DAO_AllCoreTables::getTableForEntityName($entityName)

But first, test-coverage...

@totten totten force-pushed the master-civimix-bump branch from bfdbaf6 to c4d1fe4 Compare April 16, 2025 06:04
@totten
Copy link
Copy Markdown
Owner Author

totten commented Apr 16, 2025

New revision just adds some test-coverage. Should see it failing in a few places. (After that, I've got a draft revision with compatibility fix...)

@totten
Copy link
Copy Markdown
Owner Author

totten commented Apr 16, 2025

Test now passes here (but with a small patch for SchemaHelper.php). But I'm gonna wait and merge after the canonical copy of SchemaHelper.php is updated.

@totten totten merged commit b4c7e5f into master Apr 16, 2025
1 check passed
@totten totten deleted the master-civimix-bump branch April 16, 2025 17:06
@colemanw
Copy link
Copy Markdown
Contributor

Cool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants