Allen Shaw [Wed, 5 Feb 2020 23:07:38 +0000 (17:07 -0600)]
Fix for #1579.
Seamus Lee [Wed, 5 Feb 2020 19:07:28 +0000 (06:07 +1100)]
Merge pull request #16457 from colemanw/api4doc
APIv4 documentation & code cleanup
Seamus Lee [Wed, 5 Feb 2020 07:05:11 +0000 (18:05 +1100)]
Merge pull request #16472 from eileenmcnaughton/cn_for_now
Revert "Remove unreachable code lines."
Seamus Lee [Wed, 5 Feb 2020 06:57:54 +0000 (17:57 +1100)]
Merge pull request #16466 from mattwire/recurringentity_copy
Call hook_civicrm_copy for RecurringEntity
Seamus Lee [Wed, 5 Feb 2020 06:44:55 +0000 (17:44 +1100)]
Merge pull request #16471 from totten/master-psr-log
composer.json - Relax psr/log constraint. Improve D8 compatibility.
eileen [Wed, 5 Feb 2020 05:12:54 +0000 (18:12 +1300)]
Revert "Remove unreachable code lines."
In the course of https://github.com/civicrm/civicrm-core/pull/16462
I concluded that there might be (untested scenarios) where this would still be hit.
In #16462 I adopted a cleaner (tested) approach. However, I think it's unlikely that
will be merged before 5.23 is cut so I propose reverting this change & re-reverting it
once the rc is cut as a more conservative approach. We can focus on getting #16462
wrapped up for 5.24
This reverts commit
d7943ca7f7107c1466e687e876bddaf0f1998d99.
Eileen McNaughton [Wed, 5 Feb 2020 04:44:29 +0000 (17:44 +1300)]
Merge pull request #16460 from colemanw/noInclude
APIv3 - Only scan files for deprecation checks in Entity.get
Tim Otten [Wed, 5 Feb 2020 03:53:58 +0000 (19:53 -0800)]
composer.json - Relax psr/log constraint. Improve D8 compatibility.
Overview
--------
This addresses a composer conflict that's reported when trying to install
on Drupal 8.7. For example, run these commands:
```
drush8 dl drupal-8.7.x
cd drupal-8*
composer require civicrm/civicrm-core:5.22.x-dev
```
This is a port of #16470 for `master`.
Before
------
The install fails because `civicrm-core` requires `psr/log:~1.1`, and something else
is prodding us to use `psr/log:1.0.2`.
```
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for civicrm/civicrm-core 5.22.x-dev -> satisfiable by civicrm/civicrm-core[5.22.x-dev].
- Conclusion: remove psr/log 1.0.2
- Conclusion: don't install psr/log 1.0.2
- civicrm/civicrm-core 5.22.x-dev requires psr/log ~1.1 -> satisfiable by psr/log[1.1.0, 1.1.1, 1.1.2, 1.1.x-dev].
- Can only install one of: psr/log[1.1.0, 1.0.2].
- Can only install one of: psr/log[1.1.1, 1.0.2].
- Can only install one of: psr/log[1.1.2, 1.0.2].
- Can only install one of: psr/log[1.1.x-dev, 1.0.2].
- Installation request for psr/log (locked at 1.0.2) -> satisfiable by psr/log[1.0.2].
Installation failed, reverting ./composer.json to its original content.
```
After
-----
It should work. However, this is hard to demonstrate via `r-run` without merging.
Comments
--------
The substantive differences between `psr/log` in v1.0 and v1.1 relate to `LoggerInterfaceTest` and `TestLogger`:
https://github.com/php-fig/log/compare/1.0.2...1.1.2
However, `civicrm-core` does not use `LoggerInterfaceTest` or `TestLogger`, so it shouldn't matter.
For the standard tarballs which use `composer.lock`, this does have the side-effect of bumping up from 1.1.0 to 1.1.2.
Eileen McNaughton [Wed, 5 Feb 2020 03:01:22 +0000 (16:01 +1300)]
Merge pull request #16458 from twomice/1573_extra_columns_contribution_detail_report
Fix for #1573: Extra columns for Contribution Detail report.
Coleman Watts [Tue, 4 Feb 2020 14:12:17 +0000 (09:12 -0500)]
APIv4 Organize debug sql into a single array
Eileen McNaughton [Tue, 4 Feb 2020 22:43:47 +0000 (11:43 +1300)]
Merge pull request #16469 from civicrm/5.22
5.22 to master
Eileen McNaughton [Tue, 4 Feb 2020 22:43:13 +0000 (11:43 +1300)]
Merge pull request #16464 from WeMoveEU/core-1564-against-5.22
dev/core#1564 Fix category name for a/b test temporary table
Seamus Lee [Tue, 4 Feb 2020 22:08:59 +0000 (09:08 +1100)]
Merge pull request #16463 from eileenmcnaughton/obscure
Fix obscure bug
Matthew Wire [Tue, 4 Feb 2020 11:43:20 +0000 (11:43 +0000)]
Call hook_civicrm_copy when we copy entities using RecurringEntity
scardinius [Thu, 30 Jan 2020 09:10:04 +0000 (10:10 +0100)]
dev/core#1564 Fix category name for a/b test temporary table
eileen [Tue, 4 Feb 2020 07:26:58 +0000 (20:26 +1300)]
Fix obscure bug
After upgrading to MacOS Catalina & MAMP 5.6 (latest) with php version 7.4.1 or 7.3.9
my site was unable to load CiviCRM with a segfault error. I traced it to this line & found that
phpstorm was highlighting the line it red as possibly subject to https://bugs.php.net/bug.php?id=62577
- taking phpstorm's recommendation allowed the site to load - the failure had been on parsing info.xml files
Seamus Lee [Tue, 4 Feb 2020 05:24:53 +0000 (16:24 +1100)]
Merge pull request #16461 from eileenmcnaughton/api_test
Add require_once to api3TestTrait
eileen [Tue, 4 Feb 2020 02:11:11 +0000 (15:11 +1300)]
Add require_once to api3TestTrait
I used this trait from an extension but it was used with apiv4 before apiv3 (it supports both).
I got an error because utils.php is not included by this file. It 'freeloads' off the fact apiv3 initialises
the file - but in fact the file that includes a function requiring a function
should have the require once - reduces risk & cognitive load
Coleman Watts [Tue, 4 Feb 2020 02:00:48 +0000 (21:00 -0500)]
APIv3 - Only scan files for deprecation checks in Entiy.get
Coleman Watts [Mon, 3 Feb 2020 23:05:38 +0000 (18:05 -0500)]
APIv4 - Pluralize entity name in docblocks
Allen Shaw [Mon, 3 Feb 2020 19:18:45 +0000 (13:18 -0600)]
Fix for #1573: Extra columns for Contribution Detail report.
Seamus Lee [Mon, 3 Feb 2020 20:58:30 +0000 (07:58 +1100)]
Merge pull request #16441 from eileenmcnaughton/event_pre
[REF] Interim code cleanup - make the usage of addPayments clearer
Coleman Watts [Mon, 3 Feb 2020 18:22:01 +0000 (13:22 -0500)]
Api4 Replace - simplify by removing unnecessary fallback
Coleman Watts [Mon, 3 Feb 2020 18:17:58 +0000 (13:17 -0500)]
Clearer docblock description of the defaults param
Coleman Watts [Mon, 3 Feb 2020 18:05:39 +0000 (13:05 -0500)]
APIv4 Explorer - use OOP format for chained api calls
Passing an array into setChain works, but the more "pure" way is to pass an object into addChain.
Mathieu Lu [Mon, 3 Feb 2020 18:04:07 +0000 (13:04 -0500)]
Merge pull request #16446 from mattwire/wp_passlanguage
Pass language code to CiviCRM for Wordpress
colemanw [Mon, 3 Feb 2020 01:52:25 +0000 (20:52 -0500)]
Merge pull request #16397 from eileenmcnaughton/cont_setting3
dev/core#1558 retrieve setting credit_notes_prefix as a 'real' setting.
Eileen McNaughton [Sun, 2 Feb 2020 20:18:06 +0000 (09:18 +1300)]
Merge pull request #16449 from colemanw/docVars
APIv4 - Variable substution in docblocks
Eileen McNaughton [Sun, 2 Feb 2020 20:17:00 +0000 (09:17 +1300)]
Merge pull request #16454 from colemanw/explorerDefaults
APIv4 Explorer - Better UI for defaults param
Coleman Watts [Sun, 2 Feb 2020 14:54:00 +0000 (09:54 -0500)]
APIv4 Explorer - Better UI for defaults param
Seamus Lee [Sun, 2 Feb 2020 02:38:20 +0000 (13:38 +1100)]
Merge pull request #16452 from mattwire/tokenrow_docblock
NFC Fix TokenRow docblock
Matthew Wire [Sun, 2 Feb 2020 00:28:37 +0000 (00:28 +0000)]
Fix TokenRow docblock
Coleman Watts [Fri, 31 Jan 2020 22:06:41 +0000 (17:06 -0500)]
APIv4 - Variable substution in docblocks
Replaces $ENTITY and $ACTION in docblocks to improve help text in the api explorer.
Seamus Lee [Sat, 1 Feb 2020 03:20:42 +0000 (14:20 +1100)]
Merge pull request #16450 from eileenmcnaughton/ev_test
[NFC] Minor test cleanup.
eileen [Sat, 1 Feb 2020 00:08:48 +0000 (13:08 +1300)]
Minor test cleanup.
colemanw [Fri, 31 Jan 2020 22:32:45 +0000 (17:32 -0500)]
Merge pull request #16438 from eileenmcnaughton/ev_clean
[REF] Pass params into function rather than this weird check for whether params exists.
Seamus Lee [Fri, 31 Jan 2020 21:09:11 +0000 (08:09 +1100)]
Merge pull request #16447 from samuelsov/lab#1319
dev/core#1319 Fix regression with shared household address
Samuel Vanhove [Fri, 31 Jan 2020 16:33:29 +0000 (11:33 -0500)]
dev/core#1319 UI - different label for household and employer
Matthew Wire [Fri, 31 Jan 2020 16:17:54 +0000 (16:17 +0000)]
Pass language code to CiviCRM
Yashodha Chaku [Fri, 31 Jan 2020 13:52:21 +0000 (19:22 +0530)]
Merge pull request #16267 from jitendrapurohit/dev-1471
dev/core#1471 - Add system status alert for deleted custom fields in …
eileen [Fri, 31 Jan 2020 07:55:16 +0000 (20:55 +1300)]
[REF] Interim code cleanup - make the usage of addPayments clearer
This brings the condition back to the calling function which clarifies what is going on with it
Eileen McNaughton [Fri, 31 Jan 2020 08:30:36 +0000 (21:30 +1300)]
Merge pull request #16437 from eileenmcnaughton/ev_back
Add unit test to back office form when a payment is made against a partially paid contribution
Seamus Lee [Fri, 31 Jan 2020 07:13:13 +0000 (18:13 +1100)]
Merge pull request #16439 from eileenmcnaughton/part_odd
Respect form value for register_date on partipant form
eileen [Thu, 30 Jan 2020 21:57:40 +0000 (10:57 +1300)]
dev/core#1558 retrieve credit_notes_prefix as a 'real' setting.
This is part of work to convert the non-standard contribution_invoice_settings array of settings into settings in line
with our standards
eileen [Fri, 31 Jan 2020 02:55:59 +0000 (15:55 +1300)]
Extend checks in test
Seamus Lee [Fri, 31 Jan 2020 05:34:21 +0000 (16:34 +1100)]
Merge pull request #16425 from colemanw/markdown
Use markdown in php docblocks & display in APIv4 Explorer
Seamus Lee [Fri, 31 Jan 2020 05:33:32 +0000 (16:33 +1100)]
Merge pull request #16098 from MegaphoneJon/event-23-correct
event#23 - don't count non-counted participants on Confirm Registrati…
eileen [Fri, 31 Jan 2020 04:45:06 +0000 (17:45 +1300)]
Respect form value for register_date on partipant form
The backoffice event registration form has a register_date field. In credit card mode it
does an awful lot of handling which is mostly for legacy code reasons but the net result is to ignore it
& set it to now. However, the field defaults to now & if someone actually changed it they would expect their change to
be respected. This removes that handling & just uses the field value entered. The field is always present from my
digging
eileen [Fri, 31 Jan 2020 03:59:54 +0000 (16:59 +1300)]
Array formatting
eileen [Fri, 31 Jan 2020 03:58:59 +0000 (16:58 +1300)]
[REF] Pass params into function rather than this weird check for whether params exists.
This function used to be shared with the online form & hence this form had to work to make itself 'look' like the other form.
It is now free to be it's own form
Seamus Lee [Fri, 31 Jan 2020 03:45:06 +0000 (14:45 +1100)]
Merge pull request #16434 from eileenmcnaughton/cont_form_settings
[REF] Remove unused variable
eileen [Fri, 31 Jan 2020 02:33:54 +0000 (15:33 +1300)]
Add unit test to back office form when a payment is made against a partially paid contribution
colemanw [Fri, 31 Jan 2020 00:23:28 +0000 (19:23 -0500)]
Merge pull request #16374 from colemanw/api4Delete
APIv4 - don't throw exception when updating/deleting 0 items
colemanw [Fri, 31 Jan 2020 00:20:14 +0000 (19:20 -0500)]
Merge pull request #16432 from colemanw/comments
Cleanup API_Exception usage
Jon Goldberg [Thu, 12 Dec 2019 22:10:03 +0000 (17:10 -0500)]
event#23 - don't count non-counted participants on Confirm Registration screen
eileen [Thu, 30 Jan 2020 23:02:10 +0000 (12:02 +1300)]
Remove unused setting
Coleman Watts [Thu, 30 Jan 2020 01:34:49 +0000 (20:34 -0500)]
Use markdown in php docblocks & display in APIv4 Explorer
Reformats some docblocks to use markdown, and uses the marked.js library
to display them in the APIv4 Explorer.
Eileen McNaughton [Thu, 30 Jan 2020 21:41:58 +0000 (10:41 +1300)]
Merge pull request #16424 from eileenmcnaughton/cont_setting_handling
dev/core#1558 Data conversion for non-standard setting.
Seamus Lee [Thu, 30 Jan 2020 21:38:42 +0000 (08:38 +1100)]
Merge pull request #16433 from eileenmcnaughton/fatal
dev/core#560 Replace fatal with exception
Coleman Watts [Thu, 30 Jan 2020 21:33:05 +0000 (16:33 -0500)]
APIv4 - don't throw exception when updating 0 items
Coleman Watts [Fri, 24 Jan 2020 21:04:07 +0000 (16:04 -0500)]
APIv4 - don't throw exception when deleting 0 items
Eileen McNaughton [Thu, 30 Jan 2020 21:28:59 +0000 (10:28 +1300)]
Merge pull request #16431 from colemanw/explorerCss
APIv4 Explorer css tweaks
eileen [Wed, 29 Jan 2020 21:49:16 +0000 (10:49 +1300)]
dev/core#1558 Data conversion for non-standard setting.
Per https://lab.civicrm.org/dev/core/issues/1558 the 'contribution_invoice_settings' 'setting'
does not follow our standard of one setting per key and this has led to all sorts of hacks in various places.
In trying to unravel this I eventually concluded we needed an interim step where the data would be
stored as the correct settings but set and get would still work on the deprecated settinng. The reason for
goinng this way is that I found more than one place where extension code is accessing these settings
and the amount of work to fix up all the places in core that access it and the settings form were too big
to deal with without a stepping stone.
With this merged the settinngs are correctly defined and a definition for the deprecated setting still exists.
Requesting the deprecated setting returns an array retrieved from the correct settings so is unchanged from calling
functions point of view. Saving the deprecated setting saves to the correct places. However, it's now also
possible to get & set the correct settings and once the core places are removed we will deprecate & remove the
deprecated setting.
Unit tests cover past & desired behaviour and the upgrade routine.
eileen [Thu, 30 Jan 2020 20:30:48 +0000 (09:30 +1300)]
Replace fatal with exception
Eileen McNaughton [Thu, 30 Jan 2020 20:05:54 +0000 (09:05 +1300)]
Merge pull request #16365 from mattwire/civicontribute_disabled_devcore547
dev/core#547 If CiviContribute is not enabled don't crash when calling ContributionPage.getoptions or Event.getoptions
Eileen McNaughton [Thu, 30 Jan 2020 20:04:16 +0000 (09:04 +1300)]
Merge pull request #16392 from jaapjansma/dev_1522_tests
dev/core#1522 Handle space as thousand separator
Matthew Wire [Thu, 23 Jan 2020 22:53:16 +0000 (22:53 +0000)]
If CiviContribute is not enabled don't crash when calling ContributionPage.getoptions or Event.getoptions
Coleman Watts [Thu, 30 Jan 2020 15:54:11 +0000 (10:54 -0500)]
API Kernel - move params check to v3 where it's relevant
Coleman Watts [Fri, 24 May 2019 18:20:23 +0000 (14:20 -0400)]
NFC - Comment & case cleanup
Coleman Watts [Thu, 30 Jan 2020 03:36:08 +0000 (22:36 -0500)]
APIv4 Explorer css tweaks
Jaap Jansma [Thu, 30 Jan 2020 10:07:46 +0000 (11:07 +0100)]
Issue 1522: style formatting
Seamus Lee [Thu, 30 Jan 2020 04:53:43 +0000 (15:53 +1100)]
Merge pull request #16398 from eileenmcnaughton/pref_form
dev/core#1558 [REF] Remove deprecated code from CRM_Admin_Form_Preferences
Seamus Lee [Thu, 30 Jan 2020 03:50:32 +0000 (14:50 +1100)]
Merge pull request #15842 from totten/master-config-backend
dev/core#1387 Continue removal of "config_backend"
Tim Otten [Wed, 13 Nov 2019 06:14:57 +0000 (22:14 -0800)]
(dev/core#1387) ConfigSetting - Deprecation+guard for retrieve()/add()
These functions were traditionally used for accessing `config_backend`,
which was (mostly) dropped in v4.7 and became inert. However, the
functions are still referenced in a couple oddball cases.
Note that the references to `$domain->config_backend` are liable to raise
warnings if evaluated - since the field no longer exists on the DAO class.
Consequently, the extra `$hasBackend` guard should reduce warnings.
Tim Otten [Wed, 13 Nov 2019 05:54:54 +0000 (21:54 -0800)]
(dev/core#1387) Remove some lingering references to config_backend
Tim Otten [Wed, 13 Nov 2019 05:54:12 +0000 (21:54 -0800)]
(dev/core#1387) Remove config_backend from sample/dev setup
Tim Otten [Wed, 13 Nov 2019 05:38:56 +0000 (21:38 -0800)]
(dev/core#1387) FiveTwentyThree - Drop civicrm_domain.config_backend if it snuck in
This column was dropped in 4.7.alpha1, but it was still created on new installs, so
* Sites originating with 4.7 - 5.22 should have an empty copy of the column today
(because it was defined in xml schema - but never used by live code).
* Sites originating with <4.7 (and subsequently upgraded) should not have the column today
(because FourSeven.php previously dropped it).
* Sites originating with <4.7 (and not yet upgraded) should have the column with some data
(because FourSeven.php hasn't run yet).
* It is unexpected that any site currently on 4.7-5.22 would have any data in that column.
Note: `dropColumn` has a built-in guard so it only drops the column if it
exists.
Tim Otten [Wed, 13 Nov 2019 05:19:04 +0000 (21:19 -0800)]
(dev/core#1387) Domain.xml - Drop config_backend
Eileen McNaughton [Thu, 30 Jan 2020 02:15:11 +0000 (15:15 +1300)]
Merge pull request #15760 from colemanw/iconPicker
IconPicker widget improvements
Eileen McNaughton [Thu, 30 Jan 2020 01:57:03 +0000 (14:57 +1300)]
Merge pull request #16405 from totten/master-test-codegen
Civi\Test - Allow `headless()->apply()` (etc) to execute without setup.sh
Eileen McNaughton [Thu, 30 Jan 2020 01:52:27 +0000 (14:52 +1300)]
Merge pull request #16403 from totten/master-relurl
Allow most values of $civicrm_paths['XXX']['url'] to be relative
Eileen McNaughton [Thu, 30 Jan 2020 01:49:22 +0000 (14:49 +1300)]
Merge pull request #16407 from totten/master-altpkgs-basic
Fix loading with alternate packages path (system-level)
Eileen McNaughton [Thu, 30 Jan 2020 01:39:48 +0000 (14:39 +1300)]
Merge pull request #16406 from totten/master-menu-warn
CRM_Core_Menu - Fix warnings during local test run (dev/core#742)
Eileen McNaughton [Thu, 30 Jan 2020 01:13:46 +0000 (14:13 +1300)]
Merge pull request #16409 from totten/master-altpkgs-ui
Fix loading with alternate packages path (UI-level)
Eileen McNaughton [Thu, 30 Jan 2020 01:02:10 +0000 (14:02 +1300)]
Merge pull request #16411 from colemanw/api4EntityDoc
Api4 docs improvements
Eileen McNaughton [Thu, 30 Jan 2020 00:59:03 +0000 (13:59 +1300)]
Merge pull request #16423 from totten/master-setup04
composer.json - Update civicrm-setup
Eileen McNaughton [Thu, 30 Jan 2020 00:56:41 +0000 (13:56 +1300)]
Merge pull request #16402 from eileenmcnaughton/part_test
[REF] Add test for line item, extract fn
Seamus Lee [Thu, 30 Jan 2020 00:44:28 +0000 (11:44 +1100)]
Merge pull request #16422 from seamuslee001/contribute_summary_report_stats_hook
[REF] Ensure that the from is correctly modified in both the main que…
eileen [Tue, 28 Jan 2020 21:41:38 +0000 (10:41 +1300)]
Add test for line item, extract fn
Tim Otten [Wed, 29 Jan 2020 22:01:49 +0000 (14:01 -0800)]
composer.json - Update civicrm-setup
Tim Otten [Wed, 29 Jan 2020 22:06:30 +0000 (14:06 -0800)]
Merge pull request #16421 from totten/master-config-php
composer.json - Explicitly set target PHP platform
Seamus Lee [Wed, 29 Jan 2020 21:46:04 +0000 (08:46 +1100)]
Add in unit test of to verify the change
Seamus Lee [Wed, 29 Jan 2020 21:20:03 +0000 (08:20 +1100)]
[REF] Ensure that the from is correctly modified in both the main query and in the statistics section of the Contribute Summary Report
Tim Otten [Wed, 29 Jan 2020 20:12:47 +0000 (12:12 -0800)]
composer.json - Explicitly set target PHP platform
Overview
--------
This refines the way in which `composer` resolves dependencies - so as to
prefer packages that are compatible with Civi's declared minimum requirement.
https://blog.martinhujer.cz/17-tips-for-using-composer-efficiently/#tip-%2315%3A-specify-the-production-php-version-in-%60composer.json%60
Before
------
Suppose that:
* The current minimum declared is PHP 7.0. (That happens to be the case at time of writing.)
* You locally use PHP 7.4.
* You wish to add or update a package.
`composer` may grab a version of a package that works on PHP 7.4 -- but is
not available/compatible with PHP 7.0. Then you start developing things under
the false expectation that the library will be usable -- and only discover the
problem later.
After
-----
`composer` should grab packages that are compatible with the declared PHP version,
regardless of the local PHP version.
Comment
-------
* This is orthogonal to the question of *which* PHP version should be the
platform for CiviCRM -- whatever version that is, this dynamic can play out.
The patch doesn't change that.
* The value will undoubtedly change over time, which has a small maintenance
issue to keep the PHP constants in sync with the composer metadata.
KISS solution: add a comment!
Eileen McNaughton [Wed, 29 Jan 2020 19:55:00 +0000 (08:55 +1300)]
Merge pull request #16420 from civicrm/5.22
5.22 to master
Eileen McNaughton [Wed, 29 Jan 2020 19:54:18 +0000 (08:54 +1300)]
Merge pull request #16417 from jmcclelland/1555b
avoid undefined offset and uninitialized key errors on upgrade - dev/core#1555
Coleman Watts [Wed, 29 Jan 2020 16:43:55 +0000 (11:43 -0500)]
APIv4 - Add docblocks to base classes
Seamus Lee [Wed, 29 Jan 2020 14:39:27 +0000 (01:39 +1100)]
Merge pull request #16419 from civicrm/5.22
5.22
Seamus Lee [Wed, 29 Jan 2020 14:37:45 +0000 (01:37 +1100)]
Merge pull request #16418 from seamuslee001/5.22
Add release-notes/5.21.2.md
Tim Otten [Thu, 23 Jan 2020 23:58:31 +0000 (15:58 -0800)]
Add release-notes/5.21.2.md