Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
972dc9a7
Commit
972dc9a7
authored
3 months ago
by
colemanw
Browse files
Options
Downloads
Patches
Plain Diff
Api3 - Delete old Profile API function (deprecated since 2014)
parent
fe23695a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
api/v3/Profile.php
+0
-18
0 additions, 18 deletions
api/v3/Profile.php
tests/phpunit/api/v3/ProfileTest.php
+0
-35
0 additions, 35 deletions
tests/phpunit/api/v3/ProfileTest.php
with
0 additions
and
53 deletions
api/v3/Profile.php
+
0
−
18
View file @
972dc9a7
...
...
@@ -312,23 +312,6 @@ function _civicrm_api3_profile_submit_spec(&$params, $apirequest) {
}
}
/**
* Update Profile field values.
*
* @deprecated - calling this function directly is deprecated as 'set' is not a clear action
* use submit
*
* @param array $params
* Array of property name/value.
* pairs to update profile field values
*
* @return array
* Updated Contact/ Activity object|CRM_Error
*/
function
civicrm_api3_profile_set
(
$params
)
{
return
civicrm_api3
(
'profile'
,
'submit'
,
$params
);
}
/**
* Apply profile.
*
...
...
@@ -758,7 +741,6 @@ function _civicrm_api3_profile_appendaliases($values, $entity) {
*/
function
_civicrm_api3_profile_deprecation
()
{
return
[
'set'
=>
'Profile api "set" action is deprecated in favor of "submit".'
,
'apply'
=>
'Profile api "apply" action is deprecated in favor of "submit".'
,
];
}
This diff is collapsed.
Click to expand it.
tests/phpunit/api/v3/ProfileTest.php
+
0
−
35
View file @
972dc9a7
...
...
@@ -518,41 +518,6 @@ class api_v3_ProfileTest extends CiviUnitTestCase {
]);
}
/**
* Set is deprecated but we need to ensure it still works.
*/
public
function
testLegacySet
():
void
{
$profileFieldValues
=
$this
->
createIndividualContact
();
$contactId
=
key
(
$profileFieldValues
);
$updateParams
=
[
'first_name'
=>
'abc2'
,
'last_name'
=>
'xyz2'
,
'email-Primary'
=>
'abc2.xyz2@gmail.com'
,
'phone-1-1'
=>
'022 321 826'
,
'country-1'
=>
'1013'
,
'state_province-1'
=>
'1000'
,
];
$params
=
array_merge
([
'profile_id'
=>
$this
->
_profileID
,
'contact_id'
=>
$contactId
,
],
$updateParams
);
$result
=
$this
->
callAPISuccess
(
'profile'
,
'set'
,
$params
);
$this
->
assertArrayKeyExists
(
'values'
,
$result
);
$getParams
=
[
'profile_id'
=>
$this
->
_profileID
,
'contact_id'
=>
$contactId
,
];
$profileDetails
=
$this
->
callAPISuccess
(
'profile'
,
'get'
,
$getParams
);
foreach
(
$updateParams
as
$profileField
=>
$value
)
{
$this
->
assertEquals
(
$value
,
$profileDetails
[
'values'
][
$profileField
],
'In line '
.
__LINE__
.
' error message: '
.
"missing/mismatching value for
$profileField
"
);
}
}
/**
* Check contact activity profile without activity id.
*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment