From 6f3f3a0f1621a4a698ef2c897a4762a0076d0491 Mon Sep 17 00:00:00 2001 From: Norbert Orzechowicz Date: Wed, 21 Jan 2026 10:33:58 +0100 Subject: [PATCH 1/9] fix: pg-query-ext installation on macos - added: macOS support for pg-query-ext CI build matrix - added: macOS libtool fix in config.m4 to prevent symbol conflicts with system protobuf-c - changed: PIE install test now uses local repository path instead of Packagist 1.x-dev - changed: Simplified pg-query-ext documentation by removing --with-pg-version option --- .github/workflows/job-pg-query-extension.yml | 16 ++++++++++++---- .../components/extensions/pg-query-ext.md | 5 +---- src/extension/pg-query-ext/ext/config.m4 | 17 +++++++++++++++++ 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/.github/workflows/job-pg-query-extension.yml b/.github/workflows/job-pg-query-extension.yml index 37a5d7641..17d2a6e22 100644 --- a/.github/workflows/job-pg-query-extension.yml +++ b/.github/workflows/job-pg-query-extension.yml @@ -9,10 +9,11 @@ on: jobs: build: name: Build and Test Extension - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: + os: ['ubuntu-latest', 'macos-latest'] php: ['8.3', '8.4', '8.5'] steps: @@ -27,11 +28,17 @@ jobs: extensions: ':psr, bcmath, dom, hash, json, mbstring, xml, xmlwriter, xmlreader, zlib, protobuf' tools: 'composer:v2, phpize, php-config' - - name: Install build dependencies + - name: Install build dependencies (Ubuntu) + if: runner.os == 'Linux' run: | sudo apt-get update sudo apt-get install -y build-essential autoconf automake libtool protobuf-compiler libprotobuf-c-dev + - name: Install build dependencies (macOS) + if: runner.os == 'macOS' + run: | + brew install autoconf automake libtool protobuf protobuf-c + - name: Build libpg_query and extension working-directory: src/extension/pg-query-ext run: | @@ -76,9 +83,10 @@ jobs: chmod +x /usr/local/bin/pie pie --version - - name: Install extension via PIE + - name: Install extension via PIE (from local) run: | - sudo pie install flow-php/pg-query-ext:1.x-dev + sudo pie repository:add path ${{ github.workspace }}/src/extension/pg-query-ext + sudo pie install flow-php/pg-query-ext - name: Verify extension is loaded run: | diff --git a/documentation/components/extensions/pg-query-ext.md b/documentation/components/extensions/pg-query-ext.md index 05a277df6..2d6ee3f06 100644 --- a/documentation/components/extensions/pg-query-ext.md +++ b/documentation/components/extensions/pg-query-ext.md @@ -35,11 +35,8 @@ interface with strongly-typed AST nodes, see the [pg-query library](/documentati [PIE](https://github.com/php/pie) is the modern PHP extension installer. ```bash -# Simple installation (auto-downloads libpg_query for PostgreSQL 17) +# Simple installation pie install flow-php/pg-query-ext - -# Install with a specific PostgreSQL grammar version (15, 16, or 17) -pie install flow-php/pg-query-ext --with-pg-version=16 ``` The extension will automatically download and build the appropriate libpg_query version. Build dependencies ( diff --git a/src/extension/pg-query-ext/ext/config.m4 b/src/extension/pg-query-ext/ext/config.m4 index 581bfbcc3..2756c25d6 100644 --- a/src/extension/pg-query-ext/ext/config.m4 +++ b/src/extension/pg-query-ext/ext/config.m4 @@ -118,4 +118,21 @@ if test "$PHP_PG_QUERY" != "no"; then dnl Define extension PHP_NEW_EXTENSION(pg_query, pg_query.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) + + dnl macOS libtool fix for flat namespace issue + dnl libpg_query.a bundles its own copy of protobuf-c. On macOS, libtool defaults to + dnl -flat_namespace which pools all symbols together. If system protobuf-c is also loaded + dnl (e.g., via grpc extension), symbol conflicts cause segfaults. This fix keeps the + dnl two-level namespace so bundled symbols stay isolated. + dnl See: https://bugs.php.net/80393, https://github.com/protocolbuffers/protobuf/issues/7611 + case $host_os in + darwin*) + AC_CONFIG_COMMANDS([libtool-macos-fix], [ + if test -f libtool; then + sed -i.bak 's/.*flat_namespace.*suppress.*/allow_undefined_flag="-undefined dynamic_lookup"/' libtool + rm -f libtool.bak + fi + ]) + ;; + esac fi From 16e6a88a77413ff7cc73bab8ba6f855e2435c99a Mon Sep 17 00:00:00 2001 From: Norbert Orzechowicz Date: Wed, 21 Jan 2026 10:59:14 +0100 Subject: [PATCH 2/9] chore: update libpg_query to latest version - added: New `pg_query_is_utility_stmt()` function to quickly check if SQL contains DDL/utility statements without full parsing - changed: Updated libpg_query from 17-6.1.0 to 17-6.2.1 (PostgreSQL 17.7) --- .nix/pkgs/php-pg-query-ext/package.nix | 6 ++-- src/extension/pg-query-ext/ext/pg_query.c | 30 ++++++++++++++++++- .../pg-query-ext/ext/pg_query.stub.php | 12 ++++++++ .../pg-query-ext/ext/pg_query_arginfo.h | 6 ++++ .../tests/phpt/011_is_utility_stmt.phpt | 27 +++++++++++++++++ 5 files changed, 77 insertions(+), 4 deletions(-) create mode 100644 src/extension/pg-query-ext/tests/phpt/011_is_utility_stmt.phpt diff --git a/.nix/pkgs/php-pg-query-ext/package.nix b/.nix/pkgs/php-pg-query-ext/package.nix index a3efac4d0..d98b9f83c 100644 --- a/.nix/pkgs/php-pg-query-ext/package.nix +++ b/.nix/pkgs/php-pg-query-ext/package.nix @@ -9,13 +9,13 @@ let libpg_query = stdenv.mkDerivation { pname = "libpg_query"; - version = "17-latest"; + version = "17-6.2.1"; src = fetchFromGitHub { owner = "pganalyze"; repo = "libpg_query"; - rev = "03e2f436c999a1d22dbce439573e8cfabced5720"; # 17-latest branch as of 2025-11-28 - hash = "sha256-0fnQF4KSIVpNqxzdvS0UtHnqUmLXgBKI/XRZjNrYLSo="; + rev = "b2217bfeac36b09eb053a65a315878586723df08"; # 17-6.2.1 tag + hash = "sha256-+7JR5rup+9ie6wUaU5cuTyVhaEkH7X1eC7kYn0NNVrc="; }; buildPhase = '' diff --git a/src/extension/pg-query-ext/ext/pg_query.c b/src/extension/pg-query-ext/ext/pg_query.c index cb8c08225..0cc8bbc46 100644 --- a/src/extension/pg-query-ext/ext/pg_query.c +++ b/src/extension/pg-query-ext/ext/pg_query.c @@ -86,7 +86,7 @@ PHP_MINFO_FUNCTION(pg_query) php_info_print_table_start(); php_info_print_table_header(2, "pg_query support", "enabled"); php_info_print_table_row(2, "Version", PHP_PG_QUERY_VERSION); - php_info_print_table_row(2, "libpg_query version", "17-6.1.0"); + php_info_print_table_row(2, "libpg_query version", "17-6.2.1"); php_info_print_table_end(); } @@ -488,3 +488,31 @@ PHP_FUNCTION(pg_query_summary) RETURN_STR(protobuf_data); } + +PHP_FUNCTION(pg_query_is_utility_stmt) +{ + char *sql; + size_t sql_len; + + ZEND_PARSE_PARAMETERS_START(1, 1) + Z_PARAM_STRING(sql, sql_len) + ZEND_PARSE_PARAMETERS_END(); + + PgQueryIsUtilityResult result = pg_query_is_utility_stmt(sql); + + if (result.error) { + pg_query_free_is_utility_result(result); + RETURN_FALSE; + } + + bool has_utility = false; + for (int i = 0; i < result.length; i++) { + if (result.items[i]) { + has_utility = true; + break; + } + } + + pg_query_free_is_utility_result(result); + RETURN_BOOL(has_utility); +} diff --git a/src/extension/pg-query-ext/ext/pg_query.stub.php b/src/extension/pg-query-ext/ext/pg_query.stub.php index bf46795e1..babea4b8e 100644 --- a/src/extension/pg-query-ext/ext/pg_query.stub.php +++ b/src/extension/pg-query-ext/ext/pg_query.stub.php @@ -145,3 +145,15 @@ function pg_query_deparse_opts( function pg_query_summary(string $sql, int $options = 0, int $truncate_limit = 0) : string { } + +/** + * Check if query contains utility statements (DDL like CREATE, ALTER, DROP) + * without full parsing. More efficient than full parse when only checking statement type. + * + * @param string $sql The SQL query to check + * + * @return bool True if the query contains utility statements, false otherwise + */ +function pg_query_is_utility_stmt(string $sql) : bool +{ +} diff --git a/src/extension/pg-query-ext/ext/pg_query_arginfo.h b/src/extension/pg-query-ext/ext/pg_query_arginfo.h index c64ca4836..c937c7358 100644 --- a/src/extension/pg-query-ext/ext/pg_query_arginfo.h +++ b/src/extension/pg-query-ext/ext/pg_query_arginfo.h @@ -50,6 +50,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_query_summary, 0, 1, IS_STRIN ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, truncate_limit, IS_LONG, 0, "0") ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_query_is_utility_stmt, 0, 1, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO(0, sql, IS_STRING, 0) +ZEND_END_ARG_INFO() + ZEND_FUNCTION(pg_query_parse); ZEND_FUNCTION(pg_query_parse_protobuf); ZEND_FUNCTION(pg_query_fingerprint); @@ -61,6 +65,7 @@ ZEND_FUNCTION(pg_query_scan); ZEND_FUNCTION(pg_query_deparse); ZEND_FUNCTION(pg_query_deparse_opts); ZEND_FUNCTION(pg_query_summary); +ZEND_FUNCTION(pg_query_is_utility_stmt); static const zend_function_entry ext_functions[] = { ZEND_FE(pg_query_parse, arginfo_pg_query_parse) @@ -74,5 +79,6 @@ static const zend_function_entry ext_functions[] = { ZEND_FE(pg_query_deparse, arginfo_pg_query_deparse) ZEND_FE(pg_query_deparse_opts, arginfo_pg_query_deparse_opts) ZEND_FE(pg_query_summary, arginfo_pg_query_summary) + ZEND_FE(pg_query_is_utility_stmt, arginfo_pg_query_is_utility_stmt) ZEND_FE_END }; diff --git a/src/extension/pg-query-ext/tests/phpt/011_is_utility_stmt.phpt b/src/extension/pg-query-ext/tests/phpt/011_is_utility_stmt.phpt new file mode 100644 index 000000000..c879df6e9 --- /dev/null +++ b/src/extension/pg-query-ext/tests/phpt/011_is_utility_stmt.phpt @@ -0,0 +1,27 @@ +--TEST-- +pg_query_is_utility_stmt() functionality +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bool(false) +bool(false) +bool(false) +bool(false) +bool(true) +bool(true) +bool(true) +bool(true) From 470c477cec0867c857a70cd6d0c60a2b2da9f552 Mon Sep 17 00:00:00 2001 From: Norbert Orzechowicz Date: Wed, 21 Jan 2026 11:02:44 +0100 Subject: [PATCH 3/9] chore: update pg-query-ext documentation --- .../components/extensions/pg-query-ext.md | 37 ++++++++++++------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/documentation/components/extensions/pg-query-ext.md b/documentation/components/extensions/pg-query-ext.md index 2d6ee3f06..738f8478f 100644 --- a/documentation/components/extensions/pg-query-ext.md +++ b/documentation/components/extensions/pg-query-ext.md @@ -19,6 +19,7 @@ interface with strongly-typed AST nodes, see the [pg-query library](/documentati - Split multiple SQL statements - Scan SQL into tokens - Generate query summaries for logging/monitoring +- Check if queries contain utility/DDL statements (without full parsing) ## Requirements @@ -46,7 +47,7 @@ The extension will automatically download and build the appropriate libpg_query | PostgreSQL | libpg_query version | |------------|---------------------| -| 17 | 17-6.1.0 (default) | +| 17 | 17-6.2.1 (default) | | 16 | 16-5.2.0 | | 15 | 15-4.2.4 | @@ -124,23 +125,31 @@ $sql = pg_query_deparse_opts( // Generate query summary (protobuf format, useful for logging) $summary = pg_query_summary('SELECT * FROM users WHERE id = 1'); + +// Check if query contains utility statements (DDL) - fast, without full parsing +$isUtility = pg_query_is_utility_stmt('CREATE TABLE users (id int)'); +// Returns: true + +$isUtility = pg_query_is_utility_stmt('SELECT * FROM users'); +// Returns: false ``` ## Functions Reference -| Function | Description | Returns | -|--------------------------------------------------------------|-----------------------------------|---------------------| -| `pg_query_parse(string $sql)` | Parse SQL to JSON AST | `string` (JSON) | -| `pg_query_parse_protobuf(string $sql)` | Parse SQL to protobuf AST | `string` (protobuf) | -| `pg_query_fingerprint(string $sql)` | Generate query fingerprint | `string\|false` | -| `pg_query_normalize(string $sql)` | Normalize query with placeholders | `string\|false` | -| `pg_query_normalize_utility(string $sql)` | Normalize DDL/utility statements | `string\|false` | -| `pg_query_parse_plpgsql(string $sql)` | Parse PL/pgSQL function | `string` (JSON) | -| `pg_query_split(string $sql)` | Split multiple statements | `array` | -| `pg_query_scan(string $sql)` | Scan SQL into tokens | `string` (protobuf) | -| `pg_query_deparse(string $protobuf)` | Convert protobuf AST back to SQL | `string` | -| `pg_query_deparse_opts(...)` | Deparse with formatting options | `string` | -| `pg_query_summary(string $sql, int $options, int $truncate)` | Generate query summary | `string` (protobuf) | +| Function | Description | Returns | +|--------------------------------------------------------------|------------------------------------------------|---------------------| +| `pg_query_parse(string $sql)` | Parse SQL to JSON AST | `string` (JSON) | +| `pg_query_parse_protobuf(string $sql)` | Parse SQL to protobuf AST | `string` (protobuf) | +| `pg_query_fingerprint(string $sql)` | Generate query fingerprint | `string\|false` | +| `pg_query_normalize(string $sql)` | Normalize query with placeholders | `string\|false` | +| `pg_query_normalize_utility(string $sql)` | Normalize DDL/utility statements | `string\|false` | +| `pg_query_parse_plpgsql(string $sql)` | Parse PL/pgSQL function | `string` (JSON) | +| `pg_query_split(string $sql)` | Split multiple statements | `array` | +| `pg_query_scan(string $sql)` | Scan SQL into tokens | `string` (protobuf) | +| `pg_query_deparse(string $protobuf)` | Convert protobuf AST back to SQL | `string` | +| `pg_query_deparse_opts(...)` | Deparse with formatting options | `string` | +| `pg_query_summary(string $sql, int $options, int $truncate)` | Generate query summary | `string` (protobuf) | +| `pg_query_is_utility_stmt(string $sql)` | Check if query contains utility/DDL statements | `bool` | ### pg_query_deparse_opts Parameters From 33c14b533df3d759088e0c0fea29824c9f2f29e9 Mon Sep 17 00:00:00 2001 From: Norbert Orzechowicz Date: Wed, 21 Jan 2026 11:28:15 +0100 Subject: [PATCH 4/9] fix: failing tests - added: macOS support for PIE installation test in GitHub Actions workflow - fixed: pg-query-ext build on macOS by using pkg-config to find protobuf-c library paths - fixed: PIE installation from local path repository by specifying dev-1.x version constraint --- .github/workflows/job-pg-query-extension.yml | 20 +++++++--- src/extension/pg-query-ext/ext/config.m4 | 40 +++++++++++++++++++- 2 files changed, 53 insertions(+), 7 deletions(-) diff --git a/.github/workflows/job-pg-query-extension.yml b/.github/workflows/job-pg-query-extension.yml index 17d2a6e22..e96548f01 100644 --- a/.github/workflows/job-pg-query-extension.yml +++ b/.github/workflows/job-pg-query-extension.yml @@ -59,7 +59,11 @@ jobs: pie-install-test: name: Test PIE Installation - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ['ubuntu-latest', 'macos-latest'] steps: - uses: actions/checkout@v5 @@ -72,21 +76,27 @@ jobs: extensions: ':psr, bcmath, dom, hash, json, mbstring, xml, xmlwriter, xmlreader, zlib' tools: 'composer:v2, phpize, php-config' - - name: Install build dependencies + - name: Install build dependencies (Ubuntu) + if: runner.os == 'Linux' run: | sudo apt-get update sudo apt-get install -y build-essential autoconf automake libtool protobuf-compiler libprotobuf-c-dev + - name: Install build dependencies (macOS) + if: runner.os == 'macOS' + run: | + brew install autoconf automake libtool protobuf protobuf-c + - name: Install PIE run: | - curl -L -o /usr/local/bin/pie https://github.com/php/pie/releases/latest/download/pie.phar - chmod +x /usr/local/bin/pie + sudo curl -L -o /usr/local/bin/pie https://github.com/php/pie/releases/latest/download/pie.phar + sudo chmod +x /usr/local/bin/pie pie --version - name: Install extension via PIE (from local) run: | sudo pie repository:add path ${{ github.workspace }}/src/extension/pg-query-ext - sudo pie install flow-php/pg-query-ext + sudo pie install flow-php/pg-query-ext:dev-1.x - name: Verify extension is loaded run: | diff --git a/src/extension/pg-query-ext/ext/config.m4 b/src/extension/pg-query-ext/ext/config.m4 index 2756c25d6..524268329 100644 --- a/src/extension/pg-query-ext/ext/config.m4 +++ b/src/extension/pg-query-ext/ext/config.m4 @@ -109,9 +109,45 @@ if test "$PHP_PG_QUERY" != "no"; then AC_MSG_ERROR([libpg_query.a not found in $PG_QUERY_LIB_DIR]) fi - dnl protobuf-c is bundled in libpg_query.a for static builds + dnl protobuf-c is required for shared builds (libpg_query.a needs it) if test "$ext_shared" = "yes"; then - PHP_ADD_LIBRARY(protobuf-c,, PG_QUERY_SHARED_LIBADD) + AC_MSG_CHECKING([for protobuf-c]) + + dnl Try pkg-config first (the standard way to find libraries) + if test -z "$PKG_CONFIG"; then + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + fi + + if test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists libprotobuf-c 2>/dev/null; then + PROTOBUF_C_LIBS=$($PKG_CONFIG --libs libprotobuf-c) + PROTOBUF_C_LIBDIR=$($PKG_CONFIG --variable=libdir libprotobuf-c) + AC_MSG_RESULT([found via pkg-config]) + + if test -n "$PROTOBUF_C_LIBDIR"; then + PHP_ADD_LIBPATH($PROTOBUF_C_LIBDIR, PG_QUERY_SHARED_LIBADD) + fi + PHP_ADD_LIBRARY(protobuf-c,, PG_QUERY_SHARED_LIBADD) + else + dnl Fallback: search common paths (for systems without pkg-config) + PROTOBUF_C_SEARCH_PATHS="/opt/homebrew /usr/local /usr" + PROTOBUF_C_FOUND="" + + for i in $PROTOBUF_C_SEARCH_PATHS; do + if test -r "$i/lib/libprotobuf-c.dylib" || test -r "$i/lib/libprotobuf-c.so"; then + PROTOBUF_C_FOUND=$i + break + fi + done + + if test -n "$PROTOBUF_C_FOUND"; then + AC_MSG_RESULT([found in $PROTOBUF_C_FOUND]) + PHP_ADD_LIBPATH($PROTOBUF_C_FOUND/lib, PG_QUERY_SHARED_LIBADD) + PHP_ADD_LIBRARY(protobuf-c,, PG_QUERY_SHARED_LIBADD) + else + AC_MSG_RESULT([not found, assuming system default]) + PHP_ADD_LIBRARY(protobuf-c,, PG_QUERY_SHARED_LIBADD) + fi + fi fi PHP_SUBST(PG_QUERY_SHARED_LIBADD) From 8d550c589d28426638ad9a60ad45df6278a58df8 Mon Sep 17 00:00:00 2001 From: Norbert Orzechowicz Date: Wed, 21 Jan 2026 11:33:01 +0100 Subject: [PATCH 5/9] fix: extension version in pg-query-extension ci/cd --- .github/workflows/job-pg-query-extension.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/job-pg-query-extension.yml b/.github/workflows/job-pg-query-extension.yml index e96548f01..6ecc10e7d 100644 --- a/.github/workflows/job-pg-query-extension.yml +++ b/.github/workflows/job-pg-query-extension.yml @@ -96,7 +96,7 @@ jobs: - name: Install extension via PIE (from local) run: | sudo pie repository:add path ${{ github.workspace }}/src/extension/pg-query-ext - sudo pie install flow-php/pg-query-ext:dev-1.x + sudo pie install flow-php/pg-query-ext:1.x-dev - name: Verify extension is loaded run: | From 4d02e8e46301828aa797d34bac072b8f6679c648 Mon Sep 17 00:00:00 2001 From: Norbert Orzechowicz Date: Wed, 21 Jan 2026 11:46:17 +0100 Subject: [PATCH 6/9] fix: pg-query-ext ci/cd configuration --- .github/workflows/job-pg-query-extension.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/job-pg-query-extension.yml b/.github/workflows/job-pg-query-extension.yml index 6ecc10e7d..3258ef082 100644 --- a/.github/workflows/job-pg-query-extension.yml +++ b/.github/workflows/job-pg-query-extension.yml @@ -95,8 +95,9 @@ jobs: - name: Install extension via PIE (from local) run: | + sudo pie repository:remove packagist.org sudo pie repository:add path ${{ github.workspace }}/src/extension/pg-query-ext - sudo pie install flow-php/pg-query-ext:1.x-dev + sudo pie install flow-php/pg-query-ext:dev-1.x - name: Verify extension is loaded run: | From 49635902b60e365bcce76fc410a7cf013e2a37b5 Mon Sep 17 00:00:00 2001 From: Norbert Orzechowicz Date: Wed, 21 Jan 2026 11:51:06 +0100 Subject: [PATCH 7/9] fix: create a tmp repo/commit to test local pie installation on CI/CD --- .github/workflows/job-pg-query-extension.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/job-pg-query-extension.yml b/.github/workflows/job-pg-query-extension.yml index 3258ef082..3f17b1f7e 100644 --- a/.github/workflows/job-pg-query-extension.yml +++ b/.github/workflows/job-pg-query-extension.yml @@ -93,11 +93,21 @@ jobs: sudo chmod +x /usr/local/bin/pie pie --version + - name: Initialize temporary git repo for version detection + working-directory: src/extension/pg-query-ext + run: | + git init + git config user.email "ci@flow-php.com" + git config user.name "CI" + git add . + git commit -m "temp commit for PIE installation test" + git tag 0.0.9999 + - name: Install extension via PIE (from local) run: | sudo pie repository:remove packagist.org sudo pie repository:add path ${{ github.workspace }}/src/extension/pg-query-ext - sudo pie install flow-php/pg-query-ext:dev-1.x + sudo pie install flow-php/pg-query-ext:0.0.9999 - name: Verify extension is loaded run: | From f864f2bb37c2f3a87fca397f6474d63a9236c711 Mon Sep 17 00:00:00 2001 From: Norbert Orzechowicz Date: Wed, 21 Jan 2026 12:28:46 +0100 Subject: [PATCH 8/9] fix: added @dev to tmp commit on ci/cd --- .github/workflows/job-pg-query-extension.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/job-pg-query-extension.yml b/.github/workflows/job-pg-query-extension.yml index 3f17b1f7e..9c9153ae0 100644 --- a/.github/workflows/job-pg-query-extension.yml +++ b/.github/workflows/job-pg-query-extension.yml @@ -107,7 +107,7 @@ jobs: run: | sudo pie repository:remove packagist.org sudo pie repository:add path ${{ github.workspace }}/src/extension/pg-query-ext - sudo pie install flow-php/pg-query-ext:0.0.9999 + sudo pie install flow-php/pg-query-ext:0.0.9999@dev - name: Verify extension is loaded run: | From 98a33f2c0c6b8eb62dd662f1a2f8843422b945f1 Mon Sep 17 00:00:00 2001 From: Norbert Orzechowicz Date: Wed, 21 Jan 2026 12:32:57 +0100 Subject: [PATCH 9/9] fix: try to set version directly in pg query extension composer.json file --- .github/workflows/job-pg-query-extension.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/job-pg-query-extension.yml b/.github/workflows/job-pg-query-extension.yml index 9c9153ae0..f8261818a 100644 --- a/.github/workflows/job-pg-query-extension.yml +++ b/.github/workflows/job-pg-query-extension.yml @@ -93,15 +93,11 @@ jobs: sudo chmod +x /usr/local/bin/pie pie --version - - name: Initialize temporary git repo for version detection + - name: Prepare local package for PIE installation working-directory: src/extension/pg-query-ext run: | - git init - git config user.email "ci@flow-php.com" - git config user.name "CI" - git add . - git commit -m "temp commit for PIE installation test" - git tag 0.0.9999 + jq '. + {"version": "0.0.9999"}' composer.json > composer.tmp.json + mv composer.tmp.json composer.json - name: Install extension via PIE (from local) run: |