Problem/Motivation
Would love to have the Sodium PHP extension in the build, for contrib modules that can use it (or require it).
| Comment | File | Size | Author |
|---|---|---|---|
| sodium.patch | 4.08 KB | mfb |
Would love to have the Sodium PHP extension in the build, for contrib modules that can use it (or require it).
| Comment | File | Size | Author |
|---|---|---|---|
| sodium.patch | 4.08 KB | mfb |
Comments
Comment #2
mfbComment #3
MixologicWe dont add any extensions to the containers so that we dont end up in a situation where a feature in core accidentally uses an api that doesnt exist in core's minimum requirements.
If core is planning on changing requirements we can work on that then.
What do you need this for? It might be a good candidate for a gitlabCI job instead.
Comment #4
mfbMy use case is I maintain a couple modules that can optionally use Sodium extension if it's present, and ideally I'd like to be able to run tests both with and without Sodium extension.
I haven't looked into using gitlabCI on drupal.org yet but yes that should make it easy to e.g. build two different CI environments and run the tests in each.
Guess this issue should be closed if only extensions that core uses can be added.
Comment #5
mfbClosing this as works as designed - Sodium is intentionally missing.
Altho I've used GitLab CI heavily elsewhere, I am still blissfully ignorant how to use it w/ my drupal.org projects; someday I'll try to figure that out :)
Comment #6
yasFYI, I tried to put a
drupalci.ymlfile at the top directory on my project (drupal/cloud) for #3352839: Drupal 10 compatibility: Support drupal/simple_oauth:5.2 (by trying to add ext-sodium PHP library) because our dependent moduledrupal/simple_oauthrequires aext-sodiumPHP library. They looked trying to switch GitLabCI instead at #3326143: Switch GitLab CI configuration to the template developed by the DA, however it means still we cannot use DrupalCI.In my trial,
drupalci.ymllooks not solving the problem w/ the following error:We cannot install ext-sodium onto Docker container running on DrupalCI (?) Moreover, I found that we could insert our custom command as follows after PHP composer analyzes the dependencies and downloads the library. We want to run the following command before starting PHP composer:
Thanks
Comment #7
yasUPDATE:
I wrote:
I was wrong, it was successful to install
ext-sodiumby the following configuration ofdrupalci.yml:In this case, I want to use
--ignore-platform-ext=sodiumoption for PHP composer, but it didn't work even when I specify as follows:Comment #8
rhovlandTo get composer to ignore the lack of the extension put this in the .gitlab-ci.yml file
Comment #9
rhovlandSodium is supposed to be part of newer versions of PHP, especially Debian. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911135
I know for certain it is installed by default in all supported versions of Ubuntu.
If we don't want it enabled by default that's fine, It can be enabled by adding the following once the module is included with PHP
As it stands it is nearly impossible to enable sodium in php on the drupalci images because the dependencies to use
docker-php-ext-installhave been removed from the images, the package php-libsodium has been removed from debian, and the PECL module is not compatible with PHP 8.1 and newer.Comment #10
rhovlandI just realized this is an issue for drupalci, not gitlabci. Closing.