From 95cdd1687a7491bd3b1a91e47b942815acab4074 Mon Sep 17 00:00:00 2001 From: Tsiry Sandratraina Date: Fri, 12 Jul 2024 08:39:12 +0000 Subject: [PATCH] feat(php): install minimal php extensions feat(php): install minimal php extensions feat(php): install minimal php extensions feat(php): install minimal php extensions feat(php): install minimal php extensions --- php/src/helpers.rs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/php/src/helpers.rs b/php/src/helpers.rs index e17f971..9e69ff3 100644 --- a/php/src/helpers.rs +++ b/php/src/helpers.rs @@ -51,12 +51,29 @@ pub fn setup() -> Result { )])?; } + let php_extensions = dag().get_env("PHP_EXTENSIONS")?; + if php_extensions.is_empty() { + dag().set_envs(vec![( + "PHP_EXTENSIONS".into(), + "imagick ds pdo_mysql".into(), + )])?; + } + + let php_extensions = dag() + .get_env("PHP_EXTENSIONS")? + .split_whitespace() + .map(|ext| format!("php83Extensions.{}", ext)) + .collect::>() + .join(" "); + let stdout = dag() .flox()? .with_workdir(".fluentci")? .with_exec(vec![ "flox", "install", + &php_extensions, + /* "php83Extensions.phalcon", "php83Extensions.imagick", "php83Extensions.snuffleupagus", @@ -144,7 +161,7 @@ pub fn setup() -> Result { "php83Extensions.pinba", "php83Extensions.pdlib", "php83Extensions.apcu", - "php83Extensions.zstd", + "php83Extensions.zstd",*/ "php83Packages.composer", "php83", "overmind",