Eileen McNaughton [Thu, 20 May 2021 03:12:42 +0000 (15:12 +1200)]
Fix for tax rates being mangled on contribution update
Update sample code
Handle tax_amount as empty string
m
colemanw [Thu, 3 Jun 2021 16:32:03 +0000 (12:32 -0400)]
Merge pull request #20474 from JMAConsulting/add_aclrole_api4_entity
dev/core#2486 Add ACLEntityRole APIv4 Entity
Monish Deb [Wed, 2 Jun 2021 05:40:36 +0000 (11:10 +0530)]
Add AclRole Api4 Entity
colemanw [Thu, 3 Jun 2021 12:28:48 +0000 (08:28 -0400)]
Merge pull request #20466 from JMAConsulting/add_deduperule_api4
Add DedupeRule, DedupeRuleGroup and DedupeException API4 entity
Seamus Lee [Thu, 3 Jun 2021 09:19:22 +0000 (19:19 +1000)]
Merge pull request #20491 from seamuslee001/array_cache_undefined
[php8-compat] Fix undefined property on Array Cache class in wordpres…
Seamus Lee [Thu, 3 Jun 2021 07:21:44 +0000 (07:21 +0000)]
[php8-compat] Fix undefined property on Array Cache class in wordpress on PHP8
Monish Deb [Thu, 3 Jun 2021 06:17:52 +0000 (11:47 +0530)]
test failure fix and add API4 files
Seamus Lee [Thu, 3 Jun 2021 05:56:26 +0000 (15:56 +1000)]
Merge pull request #20490 from seamuslee001/required_after_optional_fix
[REF][php8-compat] Further fixes where there is a required paramater …
Eileen McNaughton [Thu, 3 Jun 2021 05:00:24 +0000 (17:00 +1200)]
Merge pull request #20478 from totten/master-translation-table-only
dev/translation#67 - Define "Translation" table. Add during installation/upgrade.
Eileen McNaughton [Thu, 3 Jun 2021 04:56:38 +0000 (16:56 +1200)]
Merge pull request #20489 from colemanw/getFieldsFix
APIv4 - Cleanup getFields, add @internal flag for non-public field attributes
Seamus Lee [Thu, 3 Jun 2021 04:11:02 +0000 (14:11 +1000)]
[REF][php8-compat] Further fixes where there is a required paramater after an optional paramater
demeritcowboy [Thu, 3 Jun 2021 02:50:46 +0000 (22:50 -0400)]
Merge pull request #20487 from eileenmcnaughton/cust_value
Remove some unused variables
Coleman Watts [Thu, 3 Jun 2021 01:31:54 +0000 (21:31 -0400)]
APIv4 - Cleanup getFields, add @internal flag for non-public field attributes
Eileen McNaughton [Thu, 3 Jun 2021 01:43:26 +0000 (13:43 +1200)]
Merge pull request #20485 from seamuslee001/fix_not_always_defined_constant
[php8-compat][REF] Fix php8 error on undefined constant CIVICRM_DISAB…
Tim Otten [Thu, 3 Jun 2021 00:51:05 +0000 (17:51 -0700)]
(NFC) CRM_Utils_Hook::translateFields - Tidy up comments
The previous comments reflected a developmental iteration.
Eileen McNaughton [Thu, 3 Jun 2021 00:35:36 +0000 (12:35 +1200)]
Remove some unused variables
Seamus Lee [Wed, 2 Jun 2021 23:50:20 +0000 (09:50 +1000)]
Merge pull request #20486 from civicrm/5.38
5.38
Seamus Lee [Wed, 2 Jun 2021 23:37:03 +0000 (09:37 +1000)]
[php8-compat][REF] Fix php8 error on undefined constant CIVICRM_DISABLE_DEFAULT_MENU
Seamus Lee [Wed, 2 Jun 2021 23:30:06 +0000 (09:30 +1000)]
Merge pull request #20483 from seamuslee001/hash_equals_string
[php8-compat][NFC] Ensure that the 2nd parameter of hash_equals is a …
colemanw [Wed, 2 Jun 2021 23:25:29 +0000 (19:25 -0400)]
Merge pull request #20484 from agh1/5.38.0-releasenotes-final
5.38.0 release notes: added late changes
Eileen McNaughton [Wed, 2 Jun 2021 23:07:12 +0000 (11:07 +1200)]
Merge pull request #20480 from colemanw/afformCustomFields
Afform - Fix custom field handling and add tests
Andrew Hunt [Wed, 2 Jun 2021 22:46:41 +0000 (18:46 -0400)]
5.38.0 release notes: added late changes
colemanw [Wed, 2 Jun 2021 22:17:08 +0000 (18:17 -0400)]
Merge pull request #20458 from eileenmcnaughton/group2
Extract code that populates temp table for an individual group
Seamus Lee [Wed, 2 Jun 2021 21:48:57 +0000 (07:48 +1000)]
[php8-compat][NFC] Ensure that the 2nd parameter of hash_equals is a string in authx
Eileen McNaughton [Wed, 2 Jun 2021 20:59:52 +0000 (08:59 +1200)]
Merge pull request #20481 from colemanw/getFieldsFix
APIv4 - Fix getFields to respect default_value from getFields
Tim Otten [Wed, 2 Jun 2021 20:27:16 +0000 (13:27 -0700)]
dev/translation#67 - Add titles to XML+DAO
Coleman Watts [Wed, 2 Jun 2021 19:09:10 +0000 (15:09 -0400)]
APIv4 - Fix getFields to respect default_value from getFields
GetFields had an odd way of setting defaults for field metadata;
this reuses the default_value property instead for more internal consistency.
Coleman Watts [Wed, 2 Jun 2021 15:15:02 +0000 (11:15 -0400)]
Afform - Fix custom field handling and add tests
This ensures custom fields are handled properly by Afform,
including multi-record custom field groups & their autogenerated blocks,
and contact reference fields.
Monish Deb [Wed, 2 Jun 2021 14:47:16 +0000 (20:17 +0530)]
Merge pull request #20475 from eileenmcnaughton/trigg
Remove pass-by-ref as param not altered
Seamus Lee [Wed, 2 Jun 2021 11:08:22 +0000 (21:08 +1000)]
Merge pull request #20477 from seamuslee001/core_ext_phpunit8
[php8-compat][phpunit8][NFC] Fix PHPUnit Warnings and fix a php error on f…
Tim Otten [Wed, 28 Apr 2021 06:03:27 +0000 (23:03 -0700)]
dev/translation#67 - Define "Translation" entity. Add during installation/upgrade.
This creates an entity, `Translation` (`civicrm_translation`), to represent a single translated database value. Loosely speaking,
any field in the database can be designated as translatable -- and then it will be permitted to store values like:
```sql
INSERT INTO civicrm_translation (entity_table, entity_id, entity_field, language, string)
VALUES ('civicrm_event', 100, 'title', 'fr_FR', 'La nouvelle chaine')
```
This is based on a `civi-data-translate` strings table, but with some changes:
* Entity names are usually singular, but `String` is conflicted. I previously used hybrid
String/Strings (depending on context), but we negotiated `Translation` on tcon.
* The language only needs 5 characters (NN_nn).
* Consolidated `bool is_active` and `bool is_default` into one `int status_id`.
* Added indexing
* Mark dynamic foreign key
This commit includes the BAO with some of the backing-methods required for
API exposure. However, the API won't really work until we have the
validation-values event, so the API has been kicked to a subsequent PR.
The list of translatable entities/fields will be signficant because it will
determine when/how to redirect data in API calls. This patch does not
commit to specific translatable fields - but it does provide a hook to
determine them.
When the API PR becomes unblocked, it will include test-coverage that hits the API, BAO, and hook.
Monish Deb [Tue, 1 Jun 2021 10:52:26 +0000 (16:22 +0530)]
Add DedupeRule, DedupeRuleGroup and DedupeException APIv4 entities
Seamus Lee [Wed, 2 Jun 2021 09:00:50 +0000 (19:00 +1000)]
[php8-compat][phpunit8] Fix PHPUnit Warnings and fix a php error on function declaration syntax in core extension tests
Eileen McNaughton [Wed, 2 Jun 2021 07:09:10 +0000 (19:09 +1200)]
Merge pull request #20473 from seamuslee001/php8_deprecated_required_follow_optional
[php8-compat] Fix deprecation error where by required function parame…
Eileen McNaughton [Wed, 2 Jun 2021 07:03:48 +0000 (19:03 +1200)]
Remove pass-by-ref as param not altered
Seamus Lee [Wed, 2 Jun 2021 05:22:01 +0000 (15:22 +1000)]
[php8-compat] Fix deprecation error where by required function parameter follows an optional function parameter
Eileen McNaughton [Tue, 1 Jun 2021 23:00:17 +0000 (11:00 +1200)]
Merge pull request #20469 from civicrm/5.38
5.38
Seamus Lee [Tue, 1 Jun 2021 22:00:37 +0000 (08:00 +1000)]
Merge pull request #20465 from MikeyMJCO/patch-11
Bump DOMPDF to `~1.0.0`
Seamus Lee [Tue, 1 Jun 2021 21:33:41 +0000 (07:33 +1000)]
Merge pull request #20467 from colemanw/getSearchTasksPermissions
SearchKit - Update `hook_civicrm_searchKitTasks` signature
Eileen McNaughton [Tue, 1 Jun 2021 21:17:49 +0000 (09:17 +1200)]
Merge pull request #20460 from eileenmcnaughton/logg
[Ref] [tests only] replace direct calls to enable logging with calls to the setting
Seamus Lee [Tue, 1 Jun 2021 21:07:00 +0000 (07:07 +1000)]
Merge pull request #20468 from alifrumin/rn5.38
[NFC] 5.38 Release notes First pass
Alice Frumin [Tue, 25 May 2021 17:37:25 +0000 (13:37 -0400)]
[NFC] Release notes 5.38 first pass
Eileen McNaughton [Tue, 1 Jun 2021 06:21:49 +0000 (18:21 +1200)]
[Ref] replace direct calls to enable logging with calls to the setting
Coleman Watts [Tue, 1 Jun 2021 17:40:07 +0000 (13:40 -0400)]
SearchKit - Update hook_civicrm_searchKitTasks signature to include checkPermissions and userId
demeritcowboy [Tue, 1 Jun 2021 16:49:10 +0000 (12:49 -0400)]
Merge pull request #20459 from eileenmcnaughton/trigg
[Ref] Remove function parameter only used from test
Michael O'Toole [Tue, 1 Jun 2021 15:53:09 +0000 (15:53 +0000)]
Update composer.lock
colemanw [Tue, 1 Jun 2021 11:55:03 +0000 (07:55 -0400)]
Merge pull request #20457 from colemanw/id_field
APIv4 - Return id_field as part of Entity.get
colemanw [Tue, 1 Jun 2021 11:39:56 +0000 (07:39 -0400)]
Merge pull request #20464 from JMAConsulting/add_financial_metadata
dev/core#2486 Add pseudoconstant callback for LineItem and Financial item entity
Eileen McNaughton [Tue, 1 Jun 2021 10:19:33 +0000 (22:19 +1200)]
Merge pull request #20463 from mattwire/transactdopayment
Don't pass doPayment by reference in Contribution.transact API
Eileen McNaughton [Tue, 1 Jun 2021 08:57:46 +0000 (20:57 +1200)]
Merge pull request #20433 from seamuslee001/financial_item_v4
dev/core#2486 Add in FinancialItem APIv4 Entity
Mikey O'Toole [Tue, 1 Jun 2021 08:56:48 +0000 (09:56 +0100)]
Bump DOMPDF to `~1.0.0`
Having reviewed the changelogs and actual changes here https://github.com/dompdf/dompdf/releases and following a run-test on this I can't find any broken functionality as a result of this upgrade.
There are numerous fixes and improvements in this and the next planned version 1.0.3 will further improve SVG handling.
Monish Deb [Tue, 1 Jun 2021 08:41:55 +0000 (14:11 +0530)]
Add pseudoconstant callback for LineItem and Financial item entity
Matthew Wire [Tue, 1 Jun 2021 08:16:59 +0000 (09:16 +0100)]
Don't pass doPayment by reference in Contribution.transact API
Eileen McNaughton [Tue, 1 Jun 2021 05:43:44 +0000 (17:43 +1200)]
Fix trigger rebuild to avoid deprecated function
[Ref] Remove function parameter only used from test
The test passes a function parameter to rebuild triggers but the only other
call to this function in the civi-verse doesn't. We shouldn't make this function
more complex for just the test.
Note the function also uses the force param which I didn't move to the
test call - it's possible when the tests all run together I'll need
to force cache clearing but this seems like a dumb way
Eileen McNaughton [Tue, 1 Jun 2021 02:24:23 +0000 (14:24 +1200)]
Extract code that populates temp table for an individual group
This is part of breaking the individual group actions (this might
actually be the only one that needs to be done on an individual group)
into single actions. Then the ones that could be on one
or more groups can all be consistent.
Note this is only called from one place and is protected (& covered by tests)
so there is no practical change
Eileen McNaughton [Tue, 1 Jun 2021 03:30:56 +0000 (15:30 +1200)]
Merge pull request #20456 from eileenmcnaughton/group2
[Ref] remove never-passed param
Coleman Watts [Tue, 1 Jun 2021 02:35:32 +0000 (22:35 -0400)]
APIv4 - Return id_field as part of Entity.get
All entities have a unique identifier field, usually named 'id'
but some entities the field is named something else.
e.g. Afform uses 'name' as the identifier.
This returns the name of the field as part of Entity.get,
and it's also available directly from each API class e.g. Contact::getInfo().
Eileen McNaughton [Tue, 1 Jun 2021 01:25:17 +0000 (13:25 +1200)]
Merge pull request #20455 from eileenmcnaughton/group
Make functions protected
Eileen McNaughton [Mon, 31 May 2021 23:50:42 +0000 (11:50 +1200)]
[Ref] remove never-passed param
Removes a parameter that is never passed in
colemanw [Tue, 1 Jun 2021 00:30:51 +0000 (20:30 -0400)]
Merge pull request #20448 from eileenmcnaughton/report
Mark test class as having invalid financials
Eileen McNaughton [Mon, 31 May 2021 23:38:22 +0000 (11:38 +1200)]
Make functions protected
I did a universe search & determined these functions could be protected
as they are not called from outside this class
Eileen McNaughton [Mon, 31 May 2021 23:20:49 +0000 (11:20 +1200)]
Merge pull request #20454 from colemanw/organizeOnClause
SearchKit - Organize ON clause field selectors with joined entity first
Eileen McNaughton [Mon, 31 May 2021 21:13:53 +0000 (09:13 +1200)]
Merge pull request #20427 from totten/master-scanner
BAOs, Tests, etal - Support `HookInterface` and `EventSubscriberInterface` for auto-registration
Eileen McNaughton [Mon, 31 May 2021 21:08:20 +0000 (09:08 +1200)]
Merge pull request #20431 from colemanw/garlandTabFix
AfformGui - Fix tabs when cms theme adds extra margin
Eileen McNaughton [Mon, 31 May 2021 21:06:29 +0000 (09:06 +1200)]
Merge pull request #20440 from colemanw/apiCalculatedField
[REF] APIv4 refactoring to support calculated fields
Coleman Watts [Mon, 31 May 2021 19:20:24 +0000 (15:20 -0400)]
SearchKit - Organize ON clause field selectors with joined entity first
colemanw [Mon, 31 May 2021 18:24:26 +0000 (14:24 -0400)]
Merge pull request #20434 from colemanw/groupContact
SearchKit - Add static groups and organize main entity selector
Coleman Watts [Mon, 31 May 2021 15:53:56 +0000 (11:53 -0400)]
APIv4 - Ensure getFields always returns table_name and column_name
demeritcowboy [Mon, 31 May 2021 15:39:18 +0000 (11:39 -0400)]
Merge pull request #20447 from magnolia61/missing_image_fatal_error
dev/core#2369 - Change missing image fatal error to 404
magnolia61 [Mon, 31 May 2021 13:16:54 +0000 (15:16 +0200)]
change missing image fatal error to 404
Tim Otten [Mon, 31 May 2021 07:56:03 +0000 (00:56 -0700)]
EventPrinter - More aggressive type-hinting
Tim Otten [Mon, 31 May 2021 07:32:53 +0000 (00:32 -0700)]
For Symfony-style event listeners, encourage use of `void` return
When using Symfony-style listeners, all inputs and outputs for the event go
through the event object.
Note that `hook_*()` notation does allow return values, For these functions,
it is *normal* to return void, but some existing hooks rely on returning
array-data. It could be misleading if we made it appear that all `hook_*()`
examples have to return void.
Tim Otten [Mon, 31 May 2021 07:27:04 +0000 (00:27 -0700)]
HookStyleListener - Convey hook results. Refine type-hints.
Note: This is uncommon and discouraged for new hooks, but some hooks require returning values, e.g
```php
function hook_foo() {
return ['my-data'];
}
```
This should fix compatibility with those.
Tim Otten [Mon, 31 May 2021 07:22:06 +0000 (00:22 -0700)]
EventScanner - More aggressive type-hinting
Monish Deb [Mon, 31 May 2021 06:19:24 +0000 (11:49 +0530)]
Merge pull request #20395 from eileenmcnaughton/entry2
[REF] Set receipt_date after sending, (from batch) not in anticipation
Seamus Lee [Sun, 30 May 2021 21:57:09 +0000 (07:57 +1000)]
Merge pull request #20424 from eileenmcnaughton/ppp3
dev/core#2593 Fix failure to complete contributions when membership deleted
Eileen McNaughton [Sun, 30 May 2021 21:49:03 +0000 (09:49 +1200)]
Merge pull request #20449 from seamuslee001/phpword_upgrade
[php8-compat] Upgrade PHPWord Package to support php8
Seamus Lee [Sun, 30 May 2021 05:51:50 +0000 (15:51 +1000)]
[WIP][php8-compat] Upgrade PHPWord Package to support php8
Eileen McNaughton [Sun, 30 May 2021 03:02:17 +0000 (15:02 +1200)]
Mark test class as having invalid financials
Marks the class as unsuitable for financial validation due to use
of mysql to set up contributions without related entities
Coleman Watts [Sat, 29 May 2021 00:31:12 +0000 (20:31 -0400)]
APIv4 - Refactor field options getter into a swappable callback function
This allows any fieldSpec provider to change the callback used to build field options,
or to add an ad-hoc field not in the schema with its own option getter.
demeritcowboy [Sat, 29 May 2021 22:16:31 +0000 (18:16 -0400)]
Merge pull request #20446 from eileenmcnaughton/order
[NFC] Superficial code cleanup
Eileen McNaughton [Sat, 29 May 2021 20:33:40 +0000 (08:33 +1200)]
Merge pull request #20376 from MegaphoneJon/financial-173
financial#173: Show 'Pay Now' on user dashboard for partially paid contributions
Eileen McNaughton [Sat, 29 May 2021 20:33:02 +0000 (08:33 +1200)]
Merge pull request #20442 from seamuslee001/fix_required_param_after_optional
[php8-compat] [REF] Fix a couple of functions triggering deprecation notices in php…
Eileen McNaughton [Sat, 29 May 2021 20:32:27 +0000 (08:32 +1200)]
Merge pull request #20445 from seamuslee001/fix_warning_notice_code_gen
[php8-compat] Fix Warning Notices when running schema generation
Eileen McNaughton [Sat, 29 May 2021 20:24:13 +0000 (08:24 +1200)]
Merge pull request #20444 from seamuslee001/upgrade_symfony
[php8-compat] Update Various Symfony components to latest version in …
demeritcowboy [Sat, 29 May 2021 11:40:25 +0000 (07:40 -0400)]
Merge pull request #20189 from lemniscus/oauth-client
OAuth: initial support for per-contact OAuth tokens
Eileen McNaughton [Sat, 29 May 2021 07:12:23 +0000 (19:12 +1200)]
[NFC] Superficial code cleanup
Seamus Lee [Sat, 29 May 2021 07:03:38 +0000 (17:03 +1000)]
Merge pull request #20439 from eileenmcnaughton/proftest
Fix profile test teardown
Seamus Lee [Sat, 29 May 2021 04:46:16 +0000 (14:46 +1000)]
Merge pull request #20443 from seamuslee001/fix_error_php8
[php8-compat] Fix calling method_exist with paremeter that is bool not an object in…
Seamus Lee [Sat, 29 May 2021 04:43:32 +0000 (04:43 +0000)]
[php8-compat] Fix Warning Notices when running schema generation
Seamus Lee [Sat, 29 May 2021 04:16:51 +0000 (14:16 +1000)]
Merge pull request #20441 from seamuslee001/fix_createrandom
[php8-compat] [REF] Fix call to function CRM_Utils_String::createRandom by ensuring that …
Seamus Lee [Sat, 29 May 2021 02:26:59 +0000 (02:26 +0000)]
[REF] Fix a couple of functions triggering deprecation notices in php8.0 where by an optional parameter is before required parameters in the function signature
Seamus Lee [Sat, 29 May 2021 02:50:47 +0000 (02:50 +0000)]
[php8-compat] Update Various Symfony components to latest version in the 3.4.x series to fix deprecation notice around libxml entity disable
Seamus Lee [Sat, 29 May 2021 02:28:46 +0000 (02:28 +0000)]
Fix calling method_exist with paremeter that is bool not an object in php8
Seamus Lee [Sat, 29 May 2021 02:26:53 +0000 (02:26 +0000)]
Fix call to function CRM_Utils_String::createRandom by ensuring that the length is the first parameter not 2nd
Eileen McNaughton [Sat, 29 May 2021 00:04:06 +0000 (12:04 +1200)]
Fix profile test teardown
This should make https://github.com/civicrm/civicrm-core/pull/20420 pass
for this class
Noah Miller [Tue, 27 Apr 2021 07:08:04 +0000 (00:08 -0700)]
add support for OAuthContactTokens, with tests, upgrade step, new permissions
Per discussion with @totten, re the logic that interprets "tag" and links/creates contacts accordingly: in earlier versions of this code, I had put that logic in OAuthTokenFacade. Moving it to the api4 "create" action means it will happen even when a ContactToken is created outside the OAuth flow. I decided not to put it in BAO writeRecords() because then it would run too late for the permissions checking we do in the api4 Create action.
Note: the permissions change here means that some current users of the OAuth Extension will need to enable an additional permission to allow for the acquisition of new tokens through the auth-code flow.
Coleman Watts [Fri, 28 May 2021 00:26:30 +0000 (20:26 -0400)]
SearchKit - Organize main entity selector with primary entities first
Adds a collapsed optgroup for secondary entities so they are available
but not as prominent as the commonly-searched primary entities.
Coleman Watts [Thu, 27 May 2021 21:51:18 +0000 (17:51 -0400)]
Select2 - Move collapsible feature from Api4Explorer to Common.js for reusability in SearchKit
Coleman Watts [Thu, 27 May 2021 20:01:25 +0000 (16:01 -0400)]
SearchKit - Change @searchable annotation from boolean to option list
In preparation for showing different tiers of entities, make this a string
instead of a boolean property, to mark searchability as 'primary', 'secondary', or 'none'.