- Issue created by @fathershawn
- @fathershawn opened merge request.
- πΊπΈUnited States kevinquillen
I am currently unable to install this module in Drupal 10. I get the following Composer error:
Problem 1 - Root composer.json requires coveo/sdkpushphp 1.5 -> satisfiable by coveo/sdkpushphp[1.5]. - coveo/sdkpushphp 1.5 requires psr/log ^1.1 -> found psr/log[1.1.0, ..., 1.1.4] but the package is fixed to 3.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. Installation failed, reverting ./composer.json and ./composer.lock to their original content. composer [require coveo/sdkpushphp:1.5] failed, composer command failed: exit status 2.
Drupal 10 core requires psr/log 3.0:
drupal/core 10.0.9 requires psr/log (^3.0) drupal/core-recommended 10.0.9 requires psr/log (~3.0.0)
- πΊπΈUnited States kevinquillen
I had to add this to my composer.json to get the package:
"coveo": { "type": "package", "package": { "name": "coveo/sdkpushphp", "version": "1.5", "dist": { "url": "https://github.com/coveo-labs/SDK-Push-PHP/archive/refs/tags/1.5.zip", "type": "zip" }, "require": { "psr/log": "^1.0 || ^3.0" } } },
I don't know another way to solve this without the upstream package widening its requirement.
- πΊπΈUnited States kevinquillen
This module also requires the Key module, but does not list it in its composer.json or info.yml file. That will need to be added.
Even after getting the Coveo SDK PHP library, the module refuses to install, even though the class path does resolve (from the IDE level). Clearing Composer autoload does not work either.
- πΊπΈUnited States fathershawn New York
Thanks for these reports @kevinquillen! I'll have a look as well. We're moving to D10 soon and I thought this was ready :(
- πΊπΈUnited States kevinquillen
This will get it moving:
"coveo": { "type": "package", "package": { "name": "coveo/sdkpushphp", "version": "1.5", "dist": { "url": "https://github.com/coveo-labs/SDK-Push-PHP/archive/refs/tags/1.5.zip", "type": "zip" }, "require": { "psr/log": "^1.0 || ^3.0" }, "autoload": { "psr-4": { "Coveo\\Search\\SDK\\SDKPushPHP\\": "vendor/coveo/sdkpushphp/coveopush/" } } } },
- πΊπΈUnited States kevinquillen
Managing fields in Search API has some issues as well. It looks like the fields API url is hard coded to HIPAA const in some places, despite the PROD API value being set in the connector configuration.
After setting it to PROD, I get 'field already exists' error. It looks like CREATE instructions are being sent for all fields, instead of newly added fields and/or diffing against the existing field list to know what should be created or updated. I don't know how to solve that offhand. This prevents adding fields from Drupal, or connecting them to custom fields in Coveo by changing their machine name.
- πΊπΈUnited States fathershawn New York
That's code before my time - Let's track that in another issue if need be. If we can get this minimal for D10, and if we can get Coveo to release a new version with updated requirements, I'll move it to a full project and start tagging alpha releases so it's easier to install.
Here's how I have it installed in a D10 demo site:
{ "type": "package", "package": { "name": "coveo/sdkpushphp", "version": "1.7", "source": { "type": "git", "url": "https://github.com/FatherShawn/SDK-Coveo-Push-PHP.git", "reference": "71f54fb32b02b7f6013b368c0a47f19447f1e45d" } } }, { "type": "package", "package": { "name": "drupal/search_api_coveo", "type": "drupal-module", "version": "1.0", "require": { "coveo/sdkpushphp": "^1.7", "drupal/search_api": "^1.21" }, "source": { "url": "https://git.drupalcode.org/issue/3232145-3359458.git", "type": "git", "reference": "3e8bc6150c044c8bec9977f6a071ef3c7b853196" } } }
- πΊπΈUnited States kevinquillen
Yeah it will likely be easier to contribute with a 1.x dev branch on drupal.org. I will file some more issues around what I see.
- Status changed to Needs work
about 1 year ago 3:22pm 21 September 2023 -
FatherShawn β
committed a38936ce on 1.0.x
Issue #3359458 by FatherShawn, kevinquillen: Drupal 10 compatibility
-
FatherShawn β
committed a38936ce on 1.0.x
- Status changed to Fixed
about 1 year ago 1:44pm 26 September 2023 -
FatherShawn β
committed a38936ce on issue-3388663
Issue #3359458 by FatherShawn, kevinquillen: Drupal 10 compatibility
-
FatherShawn β
committed a38936ce on issue-3388663
Automatically closed - issue fixed for 2 weeks with no activity.