Commit Graph
38 Commits
Author SHA1 Message Date
Shivam Mathur 1d62418c5a Validate cached Xdebug 2 on macOS 2026-09-03 20:10:28 +05:30
Shivam Mathur e4c0f64cb6 Suppress PECL info warnings 2026-09-03 15:39:00 +05:30
Shivam Mathur 12cc6a507b Fix versioned extension caching 2026-08-19 14:35:13 +05:30
Ibrahim Lawal 33139dbaea Honor a cache-restored build when a versioned extension mismatches (#1108)
* fix: honor a cache-restored build when a versioned extension mismatches

When a PHP package install bundles its own default build of a versioned
extension (e.g. redis ships with its own recent version pre-enabled),
add_pecl_extension correctly detects the version mismatch against the
pinned version and falls back to pecl_install - but it does this even
when a matching build has already been restored from a CI cache into a
separate directory, since shared_extension only checks that *some* file
exists at ext_dir, not which version it is.

This adds an opt-in CACHED_EXTENSIONS_DIR: when set and a mismatch is
detected, look for extension.so there, and if found, copy it into
ext_dir and re-check before falling back to a full pecl_install. When
CACHED_EXTENSIONS_DIR is unset, behavior is unchanged.

Related to shivammathur/cache-extensions#21 and #37, where a cached
build of a versioned PECL extension is silently ignored and
recompiled on every run regardless of caching.

* fix: preserve versioned builds in ext_dir instead of a separate cache dir

Per @shivammathur's review on the PR: drop the opt-in
CACHED_EXTENSIONS_DIR env var. Instead, after installing a versioned
extension, keep a second copy of the built .so in ext_dir itself under
a name with no .so suffix (e.g. redis-5.3.7), so it can't be mistaken
for the active extension and rides along in the same ext_dir that
cache-extensions already caches wholesale - no separate cache
directory, key, or workflow step required. On a version mismatch,
restore that preserved build over the active binary and re-check
before falling back to a full pecl_install.
2026-08-19 13:21:10 +05:30
Shivam Mathur f7b7badb27 Add support to show error on add_extension_log 2025-10-18 07:55:37 +05:30
Shivam Mathur 2a3befd7ab Do not fallback extension to default version on fail-fast 2025-07-17 05:07:54 +05:30
Shivam Mathur 6d7209f44a Add patch for old random headers on PHP 8.4 2024-01-15 11:14:26 +05:30
Shivam Mathur 661ad4bf75 Fix enabling latest pecl extensions 2023-09-09 08:53:07 +05:30
Shivam Mathur 592bbc7716 Shorten grep call in add_extensions.sh 2023-06-07 09:24:56 +05:30
Shivam Mathur fb5054b163 Use correct prefix for zend_extensions when installed using PECL 2023-06-06 19:27:14 +05:30
Shivam Mathur 3818224063 Fix to avoid double activation
Fix parsing extension input
2023-05-24 19:58:08 +05:30
Shivam Mathur 36e33e130a Add known non-default extension priorities in a config 2023-04-03 02:48:41 +05:30
Shivam Mathur 3d794ddd93 Use phpenmod only for PHP 5.6 and above 2023-04-03 01:18:19 +05:30
Shivam Mathur fb1ad7fc84 Fix enable_extension 2023-02-09 15:50:52 +05:30
Shivam Mathur 1224b29111 Add support for snmp on macOS using shivammathur/extensions 2023-02-08 20:44:10 +05:30
Shivam Mathur 2f306f9d25 Use phpenmod to enable extensions on linux 2023-02-05 19:45:47 +05:30
Shivam Mathur 39b4e4a983 Fix warning about using -n and -I together in xargs 2023-02-05 19:19:43 +05:30
Shivam Mathur 89f4f7e8be Run configure_pecl only when ini_files are set 2022-10-24 10:30:28 +05:30
Shivam Mathur e8836c6d46 Fix logs on failure in add_pecl_extension 2022-10-24 09:37:13 +05:30
Shivam Mathur aa82ffc68f Fix logs in add_pecl_extension 2022-07-29 02:57:11 +05:30
Shivam Mathur 7e03c76ef2 Fix extension setup using PECL on Linux and macOS 2022-07-29 02:39:20 +05:30
Shivam Mathur 0d9a1ba5ae Add support for phalcon5 on Linux and macOS
Fix get_pecl_version
2022-07-16 00:46:28 +05:30
Shivam Mathur dbc8ba0844 Fix enabling cached dependent extensions on lower PHP versions 2022-05-25 19:44:02 +05:30
Shivam Mathur f0db57dcab Fix pecl support on PHP 5.3
Remove pecl suffix option support from PHP 5.3 as Console_Getopt version used does not support it
2022-05-19 11:56:00 +05:30
Shivam Mathur 412722b7c7 Install libraries on each PECL install if specified 2022-03-22 21:37:20 +05:30
Shivam Mathur 4e4b26a024 Suppress output while generating extension map 2022-03-16 05:10:11 +05:30
Shivam Mathur e29242d481 Add support to specify configure options to pecl extensions 2022-03-15 22:09:38 +05:30
Shivam Mathur e9884d0d9a Add support for installing libraries for pecl extensions 2022-03-10 04:50:16 +05:30
Shivam Mathur 62bd8f3ca4 Improve enabling extensions 2022-03-10 04:36:15 +05:30
Shivam Mathur 6f6e534936 Improve tools support when extensions are disabled/missing 2022-02-06 03:37:57 +05:30
Shivam Mathur c1285cc7f3 Fix variable scope 2022-02-06 03:37:56 +05:30
Shivam Mathur 0022878947 Remove unnecessary dist parameter 2022-01-29 12:14:42 +05:30
Shivam Mathur 7f951c9333 Improve extension map 2022-01-17 16:13:16 +05:30
Shivam Mathur 449da348c0 Fix enabling disabled extensions with dependencies
Improve enabling extensions with no dependencies
2022-01-17 08:58:30 +05:30
Shivam Mathur 282305f4d7 Fix to not delete pecl.ini when disabling extensions 2022-01-16 09:37:27 +05:30
Shivam Mathur c2a765ed5b Do not disable phar on macOS and Linux 2022-01-16 09:24:30 +05:30
Shivam Mathur 9ea5899759 Refactor add_extension 2022-01-13 06:33:07 +05:30
Shivam Mathur 2fd8046c9d Refactor extension functions to add_extensions scripts 2022-01-05 15:20:40 +05:30