diff --git a/php/php.ini b/php/php.ini index cb4e8c4..f882f0d 100644 --- a/php/php.ini +++ b/php/php.ini @@ -1,4 +1,5 @@ [php] extension=imagick -extension=xdebug -extension=ds \ No newline at end of file +extension=ds +extension=pdo_mysql +extension=xdebug \ No newline at end of file diff --git a/php/src/helpers.rs b/php/src/helpers.rs index e17f971..518894d 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 xdebug".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",