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
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
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
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 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'.
Coleman Watts [Thu, 27 May 2021 18:17:52 +0000 (14:17 -0400)]
SearchKit - Improve descriptions for Relationship & GroupContact joins
This changes the 'bridge' metadata property to a multi-dimensional array
to hold extra info like description.
colemanw [Fri, 28 May 2021 11:16:20 +0000 (07:16 -0400)]
Merge pull request #20435 from eileenmcnaughton/gg
[REF] Extract code to transfer groups from temp table to cache
Seamus Lee [Fri, 28 May 2021 04:04:20 +0000 (14:04 +1000)]
Merge pull request #20436 from eileenmcnaughton/mem_test_fix
Fix separate payment membership test to create valid financial transa…
Eileen McNaughton [Wed, 26 May 2021 21:50:37 +0000 (09:50 +1200)]
Fix separate payment membership test to create valid financial transations
The issue is inconsistency on the test side, not the core code
Eileen McNaughton [Fri, 28 May 2021 01:58:27 +0000 (13:58 +1200)]
[REF] Extract code to transfer groups from temp table to cache
This continues efforts to have the 'worker functions' accept an
array of groups, not just a single
Seamus Lee [Thu, 27 May 2021 22:10:35 +0000 (08:10 +1000)]
dev/core#2486 Add in FinancialItem APIv4 Entity
Eileen McNaughton [Thu, 27 May 2021 22:09:37 +0000 (10:09 +1200)]
Merge pull request #20403 from colemanw/contactEmailUpdate
Ensure contacts without a name are updated when primary email changes
Jon Goldberg [Fri, 21 May 2021 15:10:47 +0000 (11:10 -0400)]
Show 'Pay Now' on user dashboard for partially paid contributions
Coleman Watts [Thu, 27 May 2021 17:19:33 +0000 (13:19 -0400)]
SearchKit - Fix GroupContact so static groups are searchable
Coleman Watts [Thu, 27 May 2021 12:06:54 +0000 (08:06 -0400)]
AfformGui - Fix tabs when cms theme adds extra margin
Themes like Drupal's 'Garland' add extra margin to `li` elements which
interferes with the tab spacing in the Afform GUI.
Seamus Lee [Thu, 27 May 2021 08:45:33 +0000 (18:45 +1000)]
Merge pull request #20416 from colemanw/afformTabFix
Afform GUI - Fix tab breakage in Shoreditch theme
Tim Otten [Thu, 27 May 2021 07:44:33 +0000 (00:44 -0700)]
Merge pull request #20385 from eileenmcnaughton/gc3
Fix internal group contact cache functions to be protected
Tim Otten [Thu, 27 May 2021 07:13:55 +0000 (00:13 -0700)]
Merge pull request #20421 from eileenmcnaughton/ev_confirm
[REF] minor extraction - getInfoUrl
Seamus Lee [Thu, 27 May 2021 04:46:11 +0000 (14:46 +1000)]
Merge pull request #20419 from colemanw/angularMain
Use new `crm-angular-js` instead of `ng-app` to bootstrap AngularJS
Seamus Lee [Thu, 27 May 2021 01:15:43 +0000 (11:15 +1000)]
Merge pull request #20430 from seamuslee001/master
5.38
Seamus Lee [Thu, 27 May 2021 01:13:22 +0000 (11:13 +1000)]
Merge in 5.38
colemanw [Thu, 27 May 2021 01:06:54 +0000 (21:06 -0400)]
Merge pull request #20428 from seamuslee001/ckeditor_upgrade
[REF] Upgrade CKEditor to be 4.16.1
Coleman Watts [Tue, 25 May 2021 19:04:15 +0000 (15:04 -0400)]
AngularLoader - cleanup resource loading to use new service
Use new `crm-angular-js` instead of `ng-app` to bootstrap AngularJS
Emit a deprecated warning from the old load() function to alert extension maintainers of the change.
Tim Otten [Wed, 26 May 2021 23:05:15 +0000 (16:05 -0700)]
(REF) CRM_Api4_Services - Switch to EventScanner
Tim Otten [Wed, 26 May 2021 20:53:54 +0000 (13:53 -0700)]
(REF) RecurringEntity BAO - Switch EventSubscriberInterface
This is just an example of doing declarative event-registration from a BAO.
Tim Otten [Wed, 26 May 2021 07:40:22 +0000 (00:40 -0700)]
(REF) RelationshipCache BAO - Switch to HookInterface
This is just an example of doing declarative event-registration from a BAO.
Tim Otten [Fri, 21 May 2021 18:51:32 +0000 (11:51 -0700)]
BAOs - Allow BAOs to subscribe to hooks/events via `EventSubscriberInterface` or `HookInterface`
Before: There is no pleasant way for a BAO to register a listener for an
event. True, one can use `Civi::dispatch()`, but (lacking a good
initialization point) it's hard to register reliably. True, you can also
add new items to `\Civi\Core\Container::createEventDispatcher()`, but
this is rather out-of-the-way.
After: A BAO class may optionally implement `EventDispatcherInterface` or
`HookInterface`. Methods will be automatically registered. The list
of listeners will be cached in the container.
Tim Otten [Fri, 21 May 2021 02:47:29 +0000 (19:47 -0700)]
CiviTestListener - Move scanning responsibility from 'CiviTestListener' to 'EventScanner'
The removes duplicate code and expands the functionality to support methods
of the form `_on_{$symfony_event}()`.
Tim Otten [Thu, 20 May 2021 23:41:59 +0000 (16:41 -0700)]
CiviTestListener - Provide a variable to identify the active test
Tim Otten [Wed, 26 May 2021 04:40:15 +0000 (21:40 -0700)]
EventScanner - Add utility class which can auto-identify listeners in an object
```
$map = EventScanner::findListeners($someObject);
$dispatcher->addListenerMap($someObject, $map);
```
Tim Otten [Wed, 26 May 2021 04:27:54 +0000 (21:27 -0700)]
Testing - Add more examples of tests which register listeners
Eileen McNaughton [Wed, 26 May 2021 21:33:27 +0000 (09:33 +1200)]
Merge pull request #20102 from seamuslee001/d8_mailing_urls
[REF] Fix issue where by mailing urls were always stuck in the origin…
Eileen McNaughton [Tue, 25 May 2021 22:06:18 +0000 (10:06 +1200)]
dev/core#2593 Fix failure to complete contributions when membership deleted
Final cleanup on paypal pro fixes https://lab.civicrm.org/dev/core/-/issues/2593
Seamus Lee [Wed, 26 May 2021 20:45:04 +0000 (06:45 +1000)]
[REF] Upgrade CKEditor to be 4.16.1
Eileen McNaughton [Wed, 26 May 2021 08:20:15 +0000 (20:20 +1200)]
Merge pull request #20129 from larssandergreen/apply-mailing-tracking-only-to-a-urls
dev/mailing#95 Only track <a> urls in Flexmailer for HTML emails
Seamus Lee [Wed, 26 May 2021 04:14:59 +0000 (14:14 +1000)]
Merge pull request #20415 from eileenmcnaughton/tax_test
Test - fix contributionTest to validate contributions
Seamus Lee [Wed, 26 May 2021 04:13:27 +0000 (14:13 +1000)]
Merge pull request #20422 from eileenmcnaughton/ppp
dev/core#2593 Fully remove loadRelatedObjects from PaypalExpress
Seamus Lee [Wed, 26 May 2021 02:53:23 +0000 (12:53 +1000)]
Merge pull request #20426 from eileenmcnaughton/tolerate_tax
Test fixes
Eileen McNaughton [Wed, 26 May 2021 00:35:30 +0000 (12:35 +1200)]
Test fixes
This improves cleanup in one class & in another makes it accept tax_amount = 0
rather than requiring it to be NULL. In general it's better for us to return
and save 0 so this makes the test tolerate those changes
Seamus Lee [Tue, 25 May 2021 23:49:39 +0000 (09:49 +1000)]
Merge pull request #20423 from eileenmcnaughton/ppp1
[REF] Paypal pro - remove call to load contact record
Eileen McNaughton [Tue, 25 May 2021 21:57:34 +0000 (09:57 +1200)]
[REF] Paypal pro - remove call to load contact record
This removes a look up since we are going to use the contribution contact id & all we are doing
is logging warning if it has changed
Eileen McNaughton [Tue, 25 May 2021 21:43:58 +0000 (09:43 +1200)]
dev/core#2593 Fully remove loadRelatedObjects from PaypalExpress
Seamus Lee [Tue, 25 May 2021 21:37:18 +0000 (07:37 +1000)]
Merge pull request #20412 from eileenmcnaughton/ppp
[REF] Stop passing unneed params to the recur function
Eileen McNaughton [Tue, 25 May 2021 20:43:04 +0000 (08:43 +1200)]
[REF] minor extraction - getInfoUrl
Eileen McNaughton [Tue, 25 May 2021 19:38:43 +0000 (07:38 +1200)]
Merge pull request #20417 from mattwire/payjunctionsetparam
Remove unused functions from payJunction
Eileen McNaughton [Tue, 25 May 2021 19:37:55 +0000 (07:37 +1200)]
Merge pull request #20418 from mattwire/dummynoparams
Remove unused variable on dummy processor
Eileen McNaughton [Tue, 25 May 2021 19:31:42 +0000 (07:31 +1200)]
Merge pull request #20306 from aydun/api_case_defaults
Add defaults for APIv4 Case create
Matthew Wire [Tue, 25 May 2021 15:21:55 +0000 (16:21 +0100)]
Remove unused variable on dummy processor