Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
4ed121d
Fix PHP 8.4 implicit nullable deprecations
pandabadger Feb 2, 2025
5423fc7
Fix PHP 8.4 implicit nullable deprecations
pandabadger Feb 2, 2025
2134ecf
Deprecated: Foolz\SphinxQL\SphinxQL::__construct(): Implicitly markin…
umpirsky Jun 2, 2025
65c9e78
Deprecated: Foolz\SphinxQL\SphinxQL::enqueue(): Implicitly marking pa…
umpirsky Jun 2, 2025
92c3a43
Deprecated: Foolz\SphinxQL\SphinxQL::__construct(): Implicitly markin…
umpirsky Jun 5, 2025
07d5af8
Merge pull request #211 from pandabadger/master
oohnoitz Dec 18, 2025
bec64ec
Merge pull request #212 from umpirsky/patch-1
oohnoitz Dec 18, 2025
c0f3dfc
Merge pull request #213 from umpirsky/patch-2
oohnoitz Dec 18, 2025
b1eb01c
Merge pull request #215 from umpirsky/patch-3
oohnoitz Dec 18, 2025
c296c76
ci: migrate from Travis to GitHub Actions
woxxy Feb 27, 2026
f310e61
ci: handle libodbc package rename on newer Ubuntu
woxxy Feb 27, 2026
139bf7b
ci: install libodbc with libodbc1->libodbc2 fallback
woxxy Feb 27, 2026
893ad0a
ci: use search images in Actions and bump Sphinx versions
woxxy Feb 27, 2026
012e3ff
test: keep runtime untouched while stabilizing php8 test behavior
woxxy Feb 27, 2026
c4f0b33
Merge pull request #216 from FoolCode/ci/migrate-to-github-actions
woxxy Feb 27, 2026
17e598a
feat!: drop php<8.2 and align PDO/MySQLi result behavior
woxxy Feb 27, 2026
6ca6877
tests: add sphinx3 compatibility coverage without regressing sphinx2/…
woxxy Feb 27, 2026
94480d8
tests: add runtime helper API coverage across sphinx2 and manticore
woxxy Feb 27, 2026
65b31ad
feat!: harden 4.0 runtime validation, docs, and CI coverage
woxxy Feb 27, 2026
f797beb
feat: add helper parity APIs and advanced query builder clauses
woxxy Feb 27, 2026
891e2d9
feat: add capability discovery and feature-gated helper APIs
woxxy Feb 27, 2026
727da99
feat: expand parity matrix and capability ergonomics
woxxy Feb 27, 2026
0e585c9
feat: harden helper option contracts and add coverage artifacts
woxxy Feb 27, 2026
dd31561
ci: harden coverage artifacts and add buddy/phpstan lanes
woxxy Feb 27, 2026
1983529
chore: ignore phpstan temp directory
woxxy Feb 27, 2026
3008537
feat: resolve docs/auth/update issues and add license
woxxy Feb 27, 2026
b0ebfb8
docs: map 4.0.0 changelog entries to closed issues
woxxy Feb 27, 2026
3d9c06c
docs: modernize Sphinx docs with Furo and GitHub Pages workflow
woxxy Feb 27, 2026
70b45df
chore: harden ci and maximize typing for 4.0
woxxy Feb 28, 2026
c4caab2
test: strengthen assertions and make phpstan blocking
woxxy Feb 28, 2026
be6ffa6
ci: baseline phpstan and surface analyzer output
woxxy Feb 28, 2026
f1552c9
Merge pull request #217 from FoolCode/release/4.0.0
woxxy Feb 28, 2026
a5da4c3
docs: fully refresh docs with extensive real examples
woxxy Feb 28, 2026
776ca3c
Merge pull request #218 from FoolCode/docs/refurbish-documentation
woxxy Feb 28, 2026
e451890
ci(docs): only upload artifacts when html output exists
woxxy Feb 28, 2026
b52fb9b
Merge pull request #219 from FoolCode/docs/refurbish-documentation-v2
woxxy Feb 28, 2026
048435f
Rebesa upstrem into fork
Mar 5, 2026
404f566
add quoteIdentifier/quoteIdentifierArray and fix readme
Gruven Oct 4, 2023
fce8e39
fix tests with quoted identifiers
Gruven Oct 4, 2023
3444e7a
changelog 4.0.0
Gruven Oct 4, 2023
e8299ca
Rename new namespaces
Mar 5, 2026
a3c0e43
Post merge fixes
Mar 5, 2026
e1d096c
Merge master into mergeUpdatesFromOriginalRepo
Mar 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 90 additions & 0 deletions .github/workflows/buddy-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Buddy Integration

on:
workflow_dispatch:

jobs:
buddy-runtime:
name: Buddy runtime smoke (manual)
runs-on: ubuntu-22.04
timeout-minutes: 20
permissions:
contents: read
packages: read
env:
SEARCH_BUILD: MANTICORE
MANTICORE_IMAGE: manticoresearch/manticore@sha256:24835e1b590a31da0f45809b032865b1caab0a1b58f4ed14da9128a338f2d365

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
coverage: none
extensions: mysqli, pdo_mysql, mbstring
tools: composer:v2

- name: Start Manticore with Buddy extras
run: |
docker pull "$MANTICORE_IMAGE"
docker run -d --name searchd \
-e EXTRA=1 \
-p 9307:9306 \
-p 9312:9312 \
"$MANTICORE_IMAGE"

- name: Wait for searchd
run: |
n=0
while [ "$n" -lt 60 ]; do
if php -r '
try {
$pdo = new PDO("mysql:host=127.0.0.1;port=9307", "", "");
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$pdo->query("SHOW TABLES");
exit(0);
} catch (Throwable $exception) {
exit(1);
}
' >/dev/null 2>&1; then
exit 0
fi
n=$((n + 1))
sleep 1
done
echo "searchd did not become SQL-ready on 127.0.0.1:9307"
docker logs searchd || true
exit 1

- name: Seed runtime test table
run: |
cat > /tmp/seed-buddy-rt.php <<'PHP'
<?php
$pdo = new PDO('mysql:host=127.0.0.1;port=9307', '', '');
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$pdo->exec('CREATE TABLE IF NOT EXISTS rt(title text, content text, gid uint)');
$pdo->exec('TRUNCATE TABLE rt');
$pdo->exec("REPLACE INTO rt(id, title, content, gid) VALUES (1, 'test', 'teh words', 1)");
PHP
php /tmp/seed-buddy-rt.php

- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-progress

- name: Run Buddy-specific runtime tests (must not skip)
run: |
./vendor/bin/phpunit \
--configuration tests/travis/pdo.phpunit.xml \
--filter '/(testQSuggestExecutionWhenBuddySupported|testAutocompleteExecutionWhenBuddySupported)/' \
--fail-on-skipped

- name: Show searchd logs
if: always()
run: docker logs searchd || true

- name: Stop searchd container
if: always()
run: docker rm -f searchd || true
236 changes: 236 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,236 @@
name: CI

on:
pull_request:
push:
branches:
- master

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: PHP ${{ matrix.php }} / ${{ matrix.driver }} / ${{ matrix.search_build }}
runs-on: ubuntu-22.04
timeout-minutes: 30
permissions:
contents: read
packages: read
strategy:
fail-fast: false
matrix:
php: ['8.2', '8.3']
driver: [mysqli, pdo]
search_build: [SPHINX2, SPHINX3, MANTICORE]
env:
DRIVER: ${{ matrix.driver }}
SEARCH_BUILD: ${{ matrix.search_build }}
COVERAGE_LANE: ${{ matrix.php == '8.3' && matrix.driver == 'pdo' && matrix.search_build == 'MANTICORE' }}

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup PHP
if: env.COVERAGE_LANE != 'true'
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: mysqli, pdo_mysql, mbstring
tools: composer:v2

- name: Setup PHP (coverage lane)
if: env.COVERAGE_LANE == 'true'
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
extensions: mysqli, pdo_mysql, mbstring
tools: composer:v2

- name: Resolve search image and group exclusions
id: vars
run: |
EXCLUDE_GROUP=""
SEARCH_IMAGE=""
SEARCH_DOCKERFILE=""
case "$SEARCH_BUILD" in
SPHINX2)
SEARCH_IMAGE="ghcr.io/foolcode/sphinxql-query-builder-search-sphinx2:sphinx2-latest"
SEARCH_DOCKERFILE="docker/search/sphinx2/Dockerfile"
EXCLUDE_GROUP="--exclude-group=Manticore"
;;
SPHINX3)
SEARCH_IMAGE="ghcr.io/foolcode/sphinxql-query-builder-search-sphinx3:sphinx3-latest"
SEARCH_DOCKERFILE="docker/search/sphinx3/Dockerfile"
EXCLUDE_GROUP="--exclude-group=Manticore"
;;
MANTICORE)
SEARCH_IMAGE="ghcr.io/foolcode/sphinxql-query-builder-search-manticore:manticore-latest"
SEARCH_DOCKERFILE="docker/search/manticore/Dockerfile"
;;
*)
echo "Unknown SEARCH_BUILD: $SEARCH_BUILD"
exit 1
;;
esac
{
echo "search_image=$SEARCH_IMAGE"
echo "search_dockerfile=$SEARCH_DOCKERFILE"
echo "exclude_group=$EXCLUDE_GROUP"
} >> "$GITHUB_OUTPUT"

- name: Fetch search image
run: |
if ! docker pull "${{ steps.vars.outputs.search_image }}"; then
echo "Unable to pull image, building from repository Dockerfile fallback."
docker build -f "${{ steps.vars.outputs.search_dockerfile }}" -t "${{ steps.vars.outputs.search_image }}" .
fi

- name: Start search daemon container
run: |
docker run -d --name searchd \
-p 9307:9307 \
-p 9312:9312 \
"${{ steps.vars.outputs.search_image }}"

- name: Wait for searchd
run: |
n=0
while [ "$n" -lt 60 ]; do
if php -r '
try {
$pdo = new PDO("mysql:host=127.0.0.1;port=9307", "", "");
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$pdo->query("SHOW TABLES");
exit(0);
} catch (Throwable $exception) {
exit(1);
}
' >/dev/null 2>&1; then
exit 0
fi
n=$((n + 1))
sleep 1
done
echo "searchd did not become SQL-ready on 127.0.0.1:9307"
docker logs searchd || true
exit 1

- name: Validate composer metadata
run: composer validate --strict --no-check-publish

- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-progress

- name: Prepare autoload
run: composer dump-autoload

- name: Run PHPStan
if: env.COVERAGE_LANE == 'true'
run: |
set -o pipefail
mkdir -p static-analysis
./vendor/bin/phpstan analyse --configuration phpstan.neon.dist --memory-limit=1G --no-progress --error-format=raw 2>&1 | tee static-analysis/phpstan.txt

- name: Run tests
run: |
if [ "${COVERAGE_LANE}" = "true" ]; then
mkdir -p coverage
./vendor/bin/phpunit --configuration "tests/travis/${DRIVER}.phpunit.xml" --coverage-text --coverage-clover coverage/clover.xml ${{ steps.vars.outputs.exclude_group }}
else
./vendor/bin/phpunit --configuration "tests/travis/${DRIVER}.phpunit.xml" --coverage-text ${{ steps.vars.outputs.exclude_group }}
fi

- name: Build changed-line coverage artifact
if: always() && env.COVERAGE_LANE == 'true'
continue-on-error: true
run: |
mkdir -p coverage-artifact

BASE_SHA=""
BASE_LABEL=""

if [ "${{ github.event_name }}" = "pull_request" ]; then
BASE_SHA="${{ github.event.pull_request.base.sha }}"
BASE_LABEL="PR base (${BASE_SHA})"
else
BASE_SHA="${{ github.event.before }}"
BASE_LABEL="push before (${BASE_SHA})"
fi

if [ -z "${BASE_SHA}" ] \
|| [ "${BASE_SHA}" = "0000000000000000000000000000000000000000" ] \
|| ! git cat-file -e "${BASE_SHA}^{commit}" 2>/dev/null; then
DEFAULT_BRANCH="${{ github.event.repository.default_branch }}"
if git show-ref --verify --quiet "refs/remotes/origin/${DEFAULT_BRANCH}"; then
BASE_SHA="$(git merge-base "origin/${DEFAULT_BRANCH}" HEAD)"
BASE_LABEL="merge-base (origin/${DEFAULT_BRANCH})"
elif git cat-file -e "HEAD~1^{commit}" 2>/dev/null; then
BASE_SHA="$(git rev-parse HEAD~1)"
BASE_LABEL="fallback (HEAD~1)"
else
BASE_SHA="$(git rev-parse HEAD)"
BASE_LABEL="fallback (HEAD)"
fi
fi

git diff --unified=0 "${BASE_SHA}"...HEAD > coverage-artifact/changed-lines.patch || true
git diff --name-only "${BASE_SHA}"...HEAD > coverage-artifact/changed-files.txt || true

ADDED_LINES="$(git diff --numstat "${BASE_SHA}"...HEAD | awk '{a+=$1} END {print a+0}')"
REMOVED_LINES="$(git diff --numstat "${BASE_SHA}"...HEAD | awk '{d+=$2} END {print d+0}')"
CHANGED_FILES="$(wc -l < coverage-artifact/changed-files.txt | tr -d ' ')"

{
echo "Changed-line coverage artifact summary"
echo "Event: ${{ github.event_name }}"
echo "Base: ${BASE_LABEL}"
echo "Head: $(git rev-parse HEAD)"
echo "Changed files: ${CHANGED_FILES}"
echo "Added lines: ${ADDED_LINES}"
echo "Removed lines: ${REMOVED_LINES}"
if [ -f coverage/clover.xml ]; then
echo "Clover XML: coverage/clover.xml"
else
echo "Clover XML: missing"
fi
} > coverage-artifact/summary.txt

- name: Upload changed-line coverage artifact
if: always() && env.COVERAGE_LANE == 'true'
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: changed-line-coverage-php${{ matrix.php }}-${{ matrix.driver }}-${{ matrix.search_build }}
if-no-files-found: warn
path: |
coverage/clover.xml
static-analysis/phpstan.txt
coverage-artifact/summary.txt
coverage-artifact/changed-lines.patch
coverage-artifact/changed-files.txt

- name: Upload debug artifacts on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: ci-debug-php${{ matrix.php }}-${{ matrix.driver }}-${{ matrix.search_build }}
if-no-files-found: ignore
path: |
tests/searchd.log
tests/searchd.pid
tests/data/*

- name: Show searchd logs
if: always()
run: docker logs searchd || true

- name: Stop searchd container
if: always()
run: docker rm -f searchd || true
Loading
Loading