From 1e02797ee1858146d354111fe8d9c9da5861051e Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Tue, 28 Jul 2026 11:57:28 -0300 Subject: [PATCH 01/15] ci: add Harness CI pipeline for php-thin-client AI-Session-Id: 11594756-5432-4dad-ac25-4bf635ee148c AI-Tool: claude-code AI-Model: unknown --- .../input_sets/phpthinclientinputset.yaml | 14 ++ .harness/pipeline.yaml | 156 ++++++++++++++++++ 2 files changed, 170 insertions(+) create mode 100644 .harness/orgs/PROD/projects/Harness_Split/pipelines/phpthinclient/input_sets/phpthinclientinputset.yaml create mode 100644 .harness/pipeline.yaml diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/phpthinclient/input_sets/phpthinclientinputset.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/phpthinclient/input_sets/phpthinclientinputset.yaml new file mode 100644 index 0000000..4cfd410 --- /dev/null +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/phpthinclient/input_sets/phpthinclientinputset.yaml @@ -0,0 +1,14 @@ +inputSet: + name: phpthinclientinputset + identifier: phpthinclientinputset + orgIdentifier: PROD + projectIdentifier: Harness_Split + pipeline: + identifier: phpthinclient + properties: + ci: + codebase: + build: + type: PR + spec: + number: <+trigger.prNumber> diff --git a/.harness/pipeline.yaml b/.harness/pipeline.yaml new file mode 100644 index 0000000..a19afcd --- /dev/null +++ b/.harness/pipeline.yaml @@ -0,0 +1,156 @@ +pipeline: + name: php-thin-client-repo + identifier: phpthinclient + projectIdentifier: Harness_Split + orgIdentifier: PROD + tags: {} + properties: + ci: + codebase: + connectorRef: fmegithubharnessgitops + repoName: php-thin-client + build: + type: branch + spec: + branch: <+input> + stages: + - stage: + name: Build and Test + identifier: Build_and_Test + description: "" + type: CI + spec: + cloneCodebase: true + caching: + enabled: true + override: true + platform: + os: Linux + arch: Amd64 + runtime: + type: Cloud + spec: + size: flex + execution: + steps: + - step: + type: Run + name: Install PHP + identifier: Install_PHP + spec: + shell: Bash + command: |- + curl https://mise.run | sh + export PATH="$HOME/.local/bin:$PATH" + mise use --global php@<+matrix.phpVersion> + eval "$(mise activate bash)" + php --version + composer --version || (curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer) + php -m | grep -Ei 'mbstring|intl|pcntl|sockets|pcov' || true + - step: + type: Run + name: Install Dependencies + identifier: Install_Dependencies + spec: + shell: Bash + command: |- + export PATH="$HOME/.local/bin:$PATH" + eval "$(mise activate bash)" + composer install --prefer-dist + composer update + - step: + type: Run + name: Print Socket Buffer Sizes + identifier: Print_Socket_Buffer_Sizes + spec: + shell: Sh + command: |- + cat /proc/sys/net/core/wmem_max || true + cat /proc/sys/net/core/rmem_max || true + - step: + type: Run + name: Run Tests + identifier: Run_Tests + spec: + shell: Bash + envVariables: + DEBUG: "true" + GHA: "true" + command: |- + export PATH="$HOME/.local/bin:$PATH" + eval "$(mise activate bash)" + make test + - step: + type: Run + name: SonarQube Scan + identifier: SonarQube_Scan + when: + stageStatus: Success + condition: <+matrix.phpVersion> == "8.4" + spec: + shell: Sh + command: |- + export VERSION=$(php -r "require 'src/Version.php'; echo defined('SPLIT_SDK_VERSION') ? SPLIT_SDK_VERSION : (isset(\$version) ? \$version : '');" 2>/dev/null || echo "0.0.0") + export SONAR_SCANNER_VERSION=5.0.1.3006 + curl -sSLo sonar-scanner.zip \ + "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_SCANNER_VERSION}-linux.zip" + unzip -q sonar-scanner.zip + export PATH="$PWD/sonar-scanner-${SONAR_SCANNER_VERSION}-linux/bin:$PATH" + apt-get install -y openjdk-17-jdk -qq + sonar-scanner \ + -Dsonar.projectKey=splitsoftware_thin-sdk \ + -Dsonar.sources=src \ + -Dsonar.tests=tests \ + -Dsonar.projectVersion="${VERSION}" \ + -Dsonar.host.url=https://sonar.harness.io \ + -Dsonar.token=<+secrets.getValue("sonarqube-token")> \ + -Dsonar.php.coverage.reportPaths=coverage.xml \ + -Dsonar.exclusions="**/vendor/**,**/.git/**" + - step: + type: Run + name: Post Quality Gate + identifier: Post_Quality_Gate + when: + stageStatus: Success + condition: <+matrix.phpVersion> == "8.4" + spec: + shell: Bash + command: |- + #!/bin/bash + set -e + + SONAR_TOKEN="<+secrets.getValue("sonarqube-token")>" + SONAR_URL="https://sonar.harness.io" + SONAR_PROJECT_KEY="splitsoftware_thin-sdk" + GITHUB_TOKEN="<+secrets.getValue("github-devops-token")>" + GITHUB_REPO="php-thin-client" + COMMIT_SHA="<+codebase.commitSha>" + + STATUS_JSON=$(curl -sf \ + -H "Authorization: Bearer ${SONAR_TOKEN}" \ + "${SONAR_URL}/api/qualitygates/project_status?projectKey=${SONAR_PROJECT_KEY}") + + QG_STATUS=$(echo "$STATUS_JSON" | python3 -c "import sys,json; print(json.load(sys.stdin)['projectStatus']['status'])") + + case "$QG_STATUS" in + OK) GH_STATE="success"; DESCRIPTION="Quality gate passed" ;; + ERROR) GH_STATE="failure"; DESCRIPTION="Quality gate failed" ;; + WARN) GH_STATE="success"; DESCRIPTION="Quality gate passed with warnings" ;; + *) GH_STATE="pending"; DESCRIPTION="Quality gate status unknown" ;; + esac + + TARGET_URL="${SONAR_URL}/dashboard?id=${SONAR_PROJECT_KEY}" + + curl -sf -X POST \ + -H "Authorization: token ${GITHUB_TOKEN}" \ + -H "Accept: application/vnd.github.v3+json" \ + -H "Content-Type: application/json" \ + -d "{\"state\":\"${GH_STATE}\",\"description\":\"${DESCRIPTION}\",\"context\":\"sonarqube/quality-gate\",\"target_url\":\"${TARGET_URL}\"}" \ + "https://api.github.com/repos/splitio/${GITHUB_REPO}/statuses/${COMMIT_SHA}" + + echo "Posted SonarQube quality gate status: ${GH_STATE}" + strategy: + matrix: + phpVersion: + - "8.1" + - "8.4" From 724eb064b71d439fff8b82f8c984df2a2698cc3a Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Tue, 28 Jul 2026 12:07:46 -0300 Subject: [PATCH 02/15] ci: add Harness CI pipeline for php-thin-client AI-Session-Id: 11594756-5432-4dad-ac25-4bf635ee148c AI-Tool: claude-code AI-Model: unknown --- .harness/pipeline.yaml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/.harness/pipeline.yaml b/.harness/pipeline.yaml index a19afcd..93b3b8a 100644 --- a/.harness/pipeline.yaml +++ b/.harness/pipeline.yaml @@ -42,11 +42,12 @@ pipeline: command: |- curl https://mise.run | sh export PATH="$HOME/.local/bin:$PATH" - mise use --global php@<+matrix.phpVersion> eval "$(mise activate bash)" - php --version - composer --version || (curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer) - php -m | grep -Ei 'mbstring|intl|pcntl|sockets|pcov' || true + mise use --global php@<+matrix.phpVersion> + apt-get update -qq + apt-get install -y -qq php<+matrix.phpVersion>-mbstring php<+matrix.phpVersion>-intl php<+matrix.phpVersion>-pcov || true + php -v + composer --version || curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer - step: type: Run name: Install Dependencies @@ -65,8 +66,8 @@ pipeline: spec: shell: Sh command: |- - cat /proc/sys/net/core/wmem_max || true cat /proc/sys/net/core/rmem_max || true + cat /proc/sys/net/core/wmem_max || true - step: type: Run name: Run Tests @@ -80,6 +81,16 @@ pipeline: export PATH="$HOME/.local/bin:$PATH" eval "$(mise activate bash)" make test + - step: + type: Run + name: Extract Version + identifier: Extract_Version + spec: + shell: Bash + command: |- + VERSION=$(grep -oP "(?<=VERSION = ')[^']+" src/Version.php) + echo "Detected version: $VERSION" + echo "PROJECT_VERSION=$VERSION" >> $HARNESS_ENV_VARS_FILE - step: type: Run name: SonarQube Scan @@ -90,7 +101,6 @@ pipeline: spec: shell: Sh command: |- - export VERSION=$(php -r "require 'src/Version.php'; echo defined('SPLIT_SDK_VERSION') ? SPLIT_SDK_VERSION : (isset(\$version) ? \$version : '');" 2>/dev/null || echo "0.0.0") export SONAR_SCANNER_VERSION=5.0.1.3006 curl -sSLo sonar-scanner.zip \ "https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_SCANNER_VERSION}-linux.zip" @@ -101,10 +111,10 @@ pipeline: -Dsonar.projectKey=splitsoftware_thin-sdk \ -Dsonar.sources=src \ -Dsonar.tests=tests \ - -Dsonar.projectVersion="${VERSION}" \ -Dsonar.host.url=https://sonar.harness.io \ -Dsonar.token=<+secrets.getValue("sonarqube-token")> \ - -Dsonar.php.coverage.reportPaths=coverage.xml \ + -Dsonar.projectVersion=<+pipeline.variables.PROJECT_VERSION> \ + -Dsonar.php.coverage.reportPaths=coverage-clover.xml \ -Dsonar.exclusions="**/vendor/**,**/.git/**" - step: type: Run From 906b98ab46087f7733e017a07118c1d50a0d384d Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Tue, 28 Jul 2026 13:19:30 -0300 Subject: [PATCH 03/15] ci: add Harness CI pipeline for php-thin-client AI-Session-Id: 8b618809-aa17-47eb-af0d-0b02aac29387 AI-Tool: claude-code AI-Model: unknown --- .harness/pipeline.yaml | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/.harness/pipeline.yaml b/.harness/pipeline.yaml index 93b3b8a..bb28472 100644 --- a/.harness/pipeline.yaml +++ b/.harness/pipeline.yaml @@ -44,10 +44,8 @@ pipeline: export PATH="$HOME/.local/bin:$PATH" eval "$(mise activate bash)" mise use --global php@<+matrix.phpVersion> - apt-get update -qq - apt-get install -y -qq php<+matrix.phpVersion>-mbstring php<+matrix.phpVersion>-intl php<+matrix.phpVersion>-pcov || true php -v - composer --version || curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer + php -m - step: type: Run name: Install Dependencies @@ -57,8 +55,7 @@ pipeline: command: |- export PATH="$HOME/.local/bin:$PATH" eval "$(mise activate bash)" - composer install --prefer-dist - composer update + composer install --no-interaction --no-progress - step: type: Run name: Print Socket Buffer Sizes @@ -81,16 +78,6 @@ pipeline: export PATH="$HOME/.local/bin:$PATH" eval "$(mise activate bash)" make test - - step: - type: Run - name: Extract Version - identifier: Extract_Version - spec: - shell: Bash - command: |- - VERSION=$(grep -oP "(?<=VERSION = ')[^']+" src/Version.php) - echo "Detected version: $VERSION" - echo "PROJECT_VERSION=$VERSION" >> $HARNESS_ENV_VARS_FILE - step: type: Run name: SonarQube Scan @@ -113,8 +100,7 @@ pipeline: -Dsonar.tests=tests \ -Dsonar.host.url=https://sonar.harness.io \ -Dsonar.token=<+secrets.getValue("sonarqube-token")> \ - -Dsonar.projectVersion=<+pipeline.variables.PROJECT_VERSION> \ - -Dsonar.php.coverage.reportPaths=coverage-clover.xml \ + -Dsonar.php.coverage.reportPaths=coverage.xml \ -Dsonar.exclusions="**/vendor/**,**/.git/**" - step: type: Run From f305f7a4db9dd039bdd50abd1cdbae16af02e27f Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Tue, 28 Jul 2026 13:42:52 -0300 Subject: [PATCH 04/15] fix: make Harness pipeline codebase build fully runtime-input for PR trigger compatibility AI-Session-Id: 8b618809-aa17-47eb-af0d-0b02aac29387 AI-Tool: claude-code AI-Model: unknown --- .harness/pipeline.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.harness/pipeline.yaml b/.harness/pipeline.yaml index bb28472..71adfb4 100644 --- a/.harness/pipeline.yaml +++ b/.harness/pipeline.yaml @@ -9,10 +9,7 @@ pipeline: codebase: connectorRef: fmegithubharnessgitops repoName: php-thin-client - build: - type: branch - spec: - branch: <+input> + build: <+input> stages: - stage: name: Build and Test From da514e4584ca596a6524034f1442a847e4dccc84 Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Tue, 28 Jul 2026 13:47:41 -0300 Subject: [PATCH 05/15] ci: add Harness CI pipeline for php-thin-client AI-Session-Id: 8b618809-aa17-47eb-af0d-0b02aac29387 AI-Tool: claude-code AI-Model: unknown --- .../input_sets/phpthinclientinputset.yaml | 2 +- .harness/pipeline.yaml | 26 +++++++++++++++---- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/phpthinclient/input_sets/phpthinclientinputset.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/phpthinclient/input_sets/phpthinclientinputset.yaml index 4cfd410..e77d77e 100644 --- a/.harness/orgs/PROD/projects/Harness_Split/pipelines/phpthinclient/input_sets/phpthinclientinputset.yaml +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/phpthinclient/input_sets/phpthinclientinputset.yaml @@ -1,6 +1,6 @@ inputSet: - name: phpthinclientinputset identifier: phpthinclientinputset + name: phpthinclientinputset orgIdentifier: PROD projectIdentifier: Harness_Split pipeline: diff --git a/.harness/pipeline.yaml b/.harness/pipeline.yaml index 71adfb4..f8f58c6 100644 --- a/.harness/pipeline.yaml +++ b/.harness/pipeline.yaml @@ -9,7 +9,10 @@ pipeline: codebase: connectorRef: fmegithubharnessgitops repoName: php-thin-client - build: <+input> + build: + type: branch + spec: + branch: <+input> stages: - stage: name: Build and Test @@ -41,8 +44,10 @@ pipeline: export PATH="$HOME/.local/bin:$PATH" eval "$(mise activate bash)" mise use --global php@<+matrix.phpVersion> - php -v - php -m + apt-get update -qq + apt-get install -y -qq php<+matrix.phpVersion>-mbstring php<+matrix.phpVersion>-intl php<+matrix.phpVersion>-pcntl php<+matrix.phpVersion>-sockets php<+matrix.phpVersion>-pcov || true + php --version + composer --version - step: type: Run name: Install Dependencies @@ -52,7 +57,8 @@ pipeline: command: |- export PATH="$HOME/.local/bin:$PATH" eval "$(mise activate bash)" - composer install --no-interaction --no-progress + composer install --prefer-dist + composer update - step: type: Run name: Print Socket Buffer Sizes @@ -60,7 +66,9 @@ pipeline: spec: shell: Sh command: |- + cat /proc/sys/net/core/rmem_default || true cat /proc/sys/net/core/rmem_max || true + cat /proc/sys/net/core/wmem_default || true cat /proc/sys/net/core/wmem_max || true - step: type: Run @@ -75,6 +83,15 @@ pipeline: export PATH="$HOME/.local/bin:$PATH" eval "$(mise activate bash)" make test + - step: + type: Run + name: Extract Version + identifier: Extract_Version + spec: + shell: Bash + command: |- + VERSION=$(grep -oP "(?<=VERSION = ')[^']+" src/Version.php) + echo "Extracted version: ${VERSION}" - step: type: Run name: SonarQube Scan @@ -97,7 +114,6 @@ pipeline: -Dsonar.tests=tests \ -Dsonar.host.url=https://sonar.harness.io \ -Dsonar.token=<+secrets.getValue("sonarqube-token")> \ - -Dsonar.php.coverage.reportPaths=coverage.xml \ -Dsonar.exclusions="**/vendor/**,**/.git/**" - step: type: Run From 7c2cd46ce2b2ea77a1af3f2fb4cc2a3a697b6709 Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Tue, 28 Jul 2026 14:24:03 -0300 Subject: [PATCH 06/15] ci: add Harness CI pipeline for php-thin-client --- .../input_sets/phpthinclientinputset.yaml | 2 +- .harness/pipeline.yaml | 37 +++++++++++-------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/phpthinclient/input_sets/phpthinclientinputset.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/phpthinclient/input_sets/phpthinclientinputset.yaml index e77d77e..4cfd410 100644 --- a/.harness/orgs/PROD/projects/Harness_Split/pipelines/phpthinclient/input_sets/phpthinclientinputset.yaml +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/phpthinclient/input_sets/phpthinclientinputset.yaml @@ -1,6 +1,6 @@ inputSet: - identifier: phpthinclientinputset name: phpthinclientinputset + identifier: phpthinclientinputset orgIdentifier: PROD projectIdentifier: Harness_Split pipeline: diff --git a/.harness/pipeline.yaml b/.harness/pipeline.yaml index f8f58c6..0eb96fe 100644 --- a/.harness/pipeline.yaml +++ b/.harness/pipeline.yaml @@ -1,5 +1,5 @@ pipeline: - name: php-thin-client-repo + name: php-thin-client identifier: phpthinclient projectIdentifier: Harness_Split orgIdentifier: PROD @@ -9,10 +9,7 @@ pipeline: codebase: connectorRef: fmegithubharnessgitops repoName: php-thin-client - build: - type: branch - spec: - branch: <+input> + build: <+input> stages: - stage: name: Build and Test @@ -44,10 +41,19 @@ pipeline: export PATH="$HOME/.local/bin:$PATH" eval "$(mise activate bash)" mise use --global php@<+matrix.phpVersion> - apt-get update -qq - apt-get install -y -qq php<+matrix.phpVersion>-mbstring php<+matrix.phpVersion>-intl php<+matrix.phpVersion>-pcntl php<+matrix.phpVersion>-sockets php<+matrix.phpVersion>-pcov || true - php --version - composer --version + php -v + phpize -v || true + - step: + type: Run + name: Install Extensions + identifier: Install_Extensions + spec: + shell: Bash + command: |- + export PATH="$HOME/.local/bin:$PATH" + eval "$(mise activate bash)" + php -m | grep -qi mbstring || (apt-get update -qq && apt-get install -y php-mbstring php-intl php-pcntl php-sockets php-pcov -qq) || true + php -m - step: type: Run name: Install Dependencies @@ -66,10 +72,8 @@ pipeline: spec: shell: Sh command: |- - cat /proc/sys/net/core/rmem_default || true - cat /proc/sys/net/core/rmem_max || true - cat /proc/sys/net/core/wmem_default || true - cat /proc/sys/net/core/wmem_max || true + sysctl net.core.rmem_max net.core.wmem_max 2>/dev/null || true + sysctl net.ipv4.tcp_rmem net.ipv4.tcp_wmem 2>/dev/null || true - step: type: Run name: Run Tests @@ -90,8 +94,9 @@ pipeline: spec: shell: Bash command: |- - VERSION=$(grep -oP "(?<=VERSION = ')[^']+" src/Version.php) - echo "Extracted version: ${VERSION}" + VERSION=$(grep -Eo "[0-9]+\.[0-9]+\.[0-9]+" src/Version.php | head -1) + echo "Extracted VERSION=${VERSION}" + echo "VERSION=${VERSION}" >> $HARNESS_ENV_VARS_FILE || true - step: type: Run name: SonarQube Scan @@ -111,7 +116,7 @@ pipeline: sonar-scanner \ -Dsonar.projectKey=splitsoftware_thin-sdk \ -Dsonar.sources=src \ - -Dsonar.tests=tests \ + -Dsonar.tests=test \ -Dsonar.host.url=https://sonar.harness.io \ -Dsonar.token=<+secrets.getValue("sonarqube-token")> \ -Dsonar.exclusions="**/vendor/**,**/.git/**" From b6e459f919aac2217181beddb284dcf10b5915eb Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Tue, 28 Jul 2026 14:35:42 -0300 Subject: [PATCH 07/15] chore: remove stale input set file to allow fresh Harness registration --- .../input_sets/phpthinclientinputset.yaml | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 .harness/orgs/PROD/projects/Harness_Split/pipelines/phpthinclient/input_sets/phpthinclientinputset.yaml diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/phpthinclient/input_sets/phpthinclientinputset.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/phpthinclient/input_sets/phpthinclientinputset.yaml deleted file mode 100644 index 4cfd410..0000000 --- a/.harness/orgs/PROD/projects/Harness_Split/pipelines/phpthinclient/input_sets/phpthinclientinputset.yaml +++ /dev/null @@ -1,14 +0,0 @@ -inputSet: - name: phpthinclientinputset - identifier: phpthinclientinputset - orgIdentifier: PROD - projectIdentifier: Harness_Split - pipeline: - identifier: phpthinclient - properties: - ci: - codebase: - build: - type: PR - spec: - number: <+trigger.prNumber> From 7c91b51206f54e392510724b6f0d55f261a423a5 Mon Sep 17 00:00:00 2001 From: Mauro Sanz Date: Tue, 28 Jul 2026 17:36:08 +0000 Subject: [PATCH 08/15] Harness.io Git Commit --- .../input_sets/phpthinclientinputset.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .harness/orgs/PROD/projects/Harness_Split/pipelines/phpthinclient/input_sets/phpthinclientinputset.yaml diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/phpthinclient/input_sets/phpthinclientinputset.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/phpthinclient/input_sets/phpthinclientinputset.yaml new file mode 100644 index 0000000..4cfd410 --- /dev/null +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/phpthinclient/input_sets/phpthinclientinputset.yaml @@ -0,0 +1,14 @@ +inputSet: + name: phpthinclientinputset + identifier: phpthinclientinputset + orgIdentifier: PROD + projectIdentifier: Harness_Split + pipeline: + identifier: phpthinclient + properties: + ci: + codebase: + build: + type: PR + spec: + number: <+trigger.prNumber> From ab936f4bf63cb35d58ba0a5fb300d0302ef8d93e Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Tue, 28 Jul 2026 14:40:20 -0300 Subject: [PATCH 09/15] fix: install re2c before building PHP via mise in Harness pipeline AI-Session-Id: 8b764f3a-1000-481f-9b79-5d34b3643ebc AI-Tool: claude-code AI-Model: unknown --- .harness/pipeline.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.harness/pipeline.yaml b/.harness/pipeline.yaml index 0eb96fe..3685195 100644 --- a/.harness/pipeline.yaml +++ b/.harness/pipeline.yaml @@ -37,6 +37,8 @@ pipeline: spec: shell: Bash command: |- + apt-get update -qq + apt-get install -y -qq re2c curl https://mise.run | sh export PATH="$HOME/.local/bin:$PATH" eval "$(mise activate bash)" From 2dcea989192b6006a82c2fcbad33b3a3119439eb Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Tue, 28 Jul 2026 14:43:45 -0300 Subject: [PATCH 10/15] fix: install PHP build deps (libcurl, oniguruma, libzip, etc.) for mise AI-Session-Id: 8b764f3a-1000-481f-9b79-5d34b3643ebc AI-Tool: claude-code AI-Model: unknown --- .harness/pipeline.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.harness/pipeline.yaml b/.harness/pipeline.yaml index 3685195..a08d86b 100644 --- a/.harness/pipeline.yaml +++ b/.harness/pipeline.yaml @@ -38,7 +38,7 @@ pipeline: shell: Bash command: |- apt-get update -qq - apt-get install -y -qq re2c + apt-get install -y -qq re2c libcurl4-openssl-dev libonig-dev libzip-dev libsodium-dev libwebp-dev libxml2-dev libssl-dev curl https://mise.run | sh export PATH="$HOME/.local/bin:$PATH" eval "$(mise activate bash)" From 5690654d1744a19cf024250a0ceed39b3d341281 Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Tue, 28 Jul 2026 14:47:03 -0300 Subject: [PATCH 11/15] fix: install libgd and image deps for PHP mise build AI-Session-Id: 8b764f3a-1000-481f-9b79-5d34b3643ebc AI-Tool: claude-code AI-Model: unknown --- .harness/pipeline.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.harness/pipeline.yaml b/.harness/pipeline.yaml index a08d86b..98d0bcb 100644 --- a/.harness/pipeline.yaml +++ b/.harness/pipeline.yaml @@ -38,7 +38,7 @@ pipeline: shell: Bash command: |- apt-get update -qq - apt-get install -y -qq re2c libcurl4-openssl-dev libonig-dev libzip-dev libsodium-dev libwebp-dev libxml2-dev libssl-dev + apt-get install -y -qq re2c libcurl4-openssl-dev libonig-dev libzip-dev libsodium-dev libwebp-dev libxml2-dev libssl-dev libgd-dev libjpeg-dev libpng-dev libfreetype-dev libxpm-dev curl https://mise.run | sh export PATH="$HOME/.local/bin:$PATH" eval "$(mise activate bash)" From fae60bff998c260bf3c0045852febdf0cab275a9 Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Tue, 28 Jul 2026 14:56:07 -0300 Subject: [PATCH 12/15] fix: install pcov coverage driver for mise-managed PHP in Run Tests AI-Session-Id: 8b764f3a-1000-481f-9b79-5d34b3643ebc AI-Tool: claude-code AI-Model: unknown --- .harness/pipeline.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.harness/pipeline.yaml b/.harness/pipeline.yaml index 98d0bcb..7065900 100644 --- a/.harness/pipeline.yaml +++ b/.harness/pipeline.yaml @@ -54,7 +54,8 @@ pipeline: command: |- export PATH="$HOME/.local/bin:$PATH" eval "$(mise activate bash)" - php -m | grep -qi mbstring || (apt-get update -qq && apt-get install -y php-mbstring php-intl php-pcntl php-sockets php-pcov -qq) || true + pecl install pcov + echo "extension=pcov.so" > "$(php -r 'echo php_ini_loaded_file();' | xargs dirname)/conf.d/pcov.ini" 2>/dev/null || echo "extension=pcov.so" >> "$(php -r 'echo php_ini_loaded_file();')" php -m - step: type: Run From 7d0d23cc1c331a640d8e6cf34819c5be241ee658 Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Tue, 28 Jul 2026 15:05:04 -0300 Subject: [PATCH 13/15] fix: correctly locate php.ini scan dir for pcov extension AI-Session-Id: 8b764f3a-1000-481f-9b79-5d34b3643ebc AI-Tool: claude-code AI-Model: unknown --- .harness/pipeline.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.harness/pipeline.yaml b/.harness/pipeline.yaml index 7065900..07fa5d1 100644 --- a/.harness/pipeline.yaml +++ b/.harness/pipeline.yaml @@ -55,7 +55,9 @@ pipeline: export PATH="$HOME/.local/bin:$PATH" eval "$(mise activate bash)" pecl install pcov - echo "extension=pcov.so" > "$(php -r 'echo php_ini_loaded_file();' | xargs dirname)/conf.d/pcov.ini" 2>/dev/null || echo "extension=pcov.so" >> "$(php -r 'echo php_ini_loaded_file();')" + SCAN_DIR=$(php -i | grep '^Scan this dir for additional .ini files' | awk -F'=> ' '{print $2}' | xargs) + mkdir -p "$SCAN_DIR" + echo "extension=pcov.so" > "$SCAN_DIR/pcov.ini" php -m - step: type: Run From 7048a523226dbf5f83753586bca8266089660d71 Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Tue, 28 Jul 2026 15:12:05 -0300 Subject: [PATCH 14/15] fix: correct SonarQube sonar.tests directory to 'tests' AI-Session-Id: 8b764f3a-1000-481f-9b79-5d34b3643ebc AI-Tool: claude-code AI-Model: unknown --- .harness/pipeline.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.harness/pipeline.yaml b/.harness/pipeline.yaml index 07fa5d1..fc90039 100644 --- a/.harness/pipeline.yaml +++ b/.harness/pipeline.yaml @@ -121,7 +121,7 @@ pipeline: sonar-scanner \ -Dsonar.projectKey=splitsoftware_thin-sdk \ -Dsonar.sources=src \ - -Dsonar.tests=test \ + -Dsonar.tests=tests \ -Dsonar.host.url=https://sonar.harness.io \ -Dsonar.token=<+secrets.getValue("sonarqube-token")> \ -Dsonar.exclusions="**/vendor/**,**/.git/**" From bbbb21d92dc7b185acee4909b4b47bab57e29c88 Mon Sep 17 00:00:00 2001 From: Mauro Antonio Sanz Date: Tue, 28 Jul 2026 15:24:02 -0300 Subject: [PATCH 15/15] removing gha --- .github/dependabot.yaml | 10 ------ .github/workflows/ci.yml | 69 ---------------------------------------- 2 files changed, 79 deletions(-) delete mode 100644 .github/dependabot.yaml delete mode 100644 .github/workflows/ci.yml diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml deleted file mode 100644 index f8a529b..0000000 --- a/.github/dependabot.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -version: 2 - -updates: - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "daily" - reviewers: - - "splitio/sdk" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 023f750..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: ci - -on: - pull_request: - branches: - - main - push: - branches: - - main - -concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.run_number || github.event.pull_request.number }} - cancel-in-progress: true - -jobs: - test: - name: Run unit tests - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - version: - - '8.1' - - '8.4' - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.version }} - extensions: mbstring, intl, pcntl, sockets - ini-values: post_max_size=256M, max_execution_time=180 - coverage: pcov - - - name: Install dependencies - run: | - composer install --prefer-dist - composer update - - - name: Print max send & receive buffers (for reference) - run: | - echo "Max recv buffer size: $(cat /proc/sys/net/core/rmem_max)" - echo "Max send buffer size: $(cat /proc/sys/net/core/wmem_max)" - - - name: Test - env: - DEBUG: true - GHA: true - run: | - make test - - - name: Set VERSION env - run: echo "VERSION=$(cat src/Version.php | grep 'const CURRENT' | cut -d "'" -f 2 | sed "s/'//g")" >> $GITHUB_ENV - - - name: SonarQube Scan - if: matrix.version == '8.2' - uses: SonarSource/sonarcloud-github-action@v2.0.0 - env: - SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - projectBaseDir: . - args: > - -Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} - -Dsonar.projectVersion=${{ env.VERSION }}