@OmarAlmonte The signature for CreateContact in 2.0.9. regressed:
Here’s 2.0.8
public function createContact($create_update_contact_request, $fields = null, $duplicate_option = null, string $contentType = self::contentTypes['createContact'][0])
{
list($response) = $this->createContactWithHttpInfo($create_update_contact_request, $fields, $duplicate_option, $contentType);
return $response;
}
Here’s 2.0.9
public function createContactUsingPOST1($create_update_contact_request = null, string $contentType = self::contentTypes['createContactUsingPOST1'][0])
{
list($response) = $this->createContactUsingPOST1WithHttpInfo($create_update_contact_request, $contentType);
return $response;
}
Hi Jeffrey, we’ll look into this. Thanks for bringing it up to my attention.
Perhaps noone else implemented the new dup check argument using the SDK but me. That may be why it’s absence in the head version hasn’t been noticed by others
Hi @Jeffrey_Chimene, I checked the published keap/keap-sdk artifacts on Packagist and there’s no signature change between 2.0.8 and 2.0.9; the createContact method is byte-identical across both versions. The snippet you’re referring to as “2.0.9” (createContactUsingPOST1(...)) actually belongs to the 1.0.10–1.0.20 line, since that method was later renamed to createContact in 1.0.21 and the $fields / $duplicate_option parameters were introduced in the 2.0.x series. It looks like your installation may have resolved to a 1.0.1x version instead. Could you run composer show keap/keap-sdk and share the version along with your composer.json constraint? Running composer require keap/keap-sdk:^2.0 && composer update keap/keap-sdk should ensure you’re on the expected 2.x release with the correct method signature.
@OmarAlmonte Thanks, but I thought we were supposed to be following *@dev ?
anyway, I’m not enough of a composer guru to settle the following issue:
composer require keap/keap-sdk:\^2.0 && composer update -W keap/keap-sdk
./composer.json has been updated
Running composer update keap/keap-sdk
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires keap/keap-sdk ^2.0, it is satisfiable by keap/keap-sdk[2.0.1, ..., 2.0.10] from composer repo (https://repo.packagist.org) but keap/keap-sdk[dev-dependabot/pip/samples/v2/python/pytest-9.0.3, 0.0.19, ..., 0.0.54, 1.0.1, 1.0.2] from vcs repo (github https://github.com/infusionsoft/keap-sdk.git) has higher repository priority. The packages from the higher priority repository do not match your constraint and are therefore not installable. That repository is canonical so the lower priority repo's packages are not installable. See https://getcomposer.org/repoprio for details and assistance.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Ideas welcome!
I’m not really a Composer/PHP expert either, but the error message makes it seem like Composer is being forced to look at the wrong source for the package. Since your composer.json has a custom repositories entry for the SDK, Composer is prioritizing that instead of Packagist, which is where the current keap/keap-sdk 2.x releases actually live. I’d try removing that repositories entry completely and then run composer require keap/keap-sdk:^2.0 followed by composer update keap/keap-sdk . That should let Composer pull the latest 2.0.x version normally.
@OmarAlmonte Thanks, I think that fixed it. I’d still like to know when the change to ^2.0 from *@dev happened