Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
b25e650
Initial commit: Setup PHP SDK structure, autoloading, and dependencies
kevinlively Feb 14, 2025
a447c03
entry file code implementation and folder structure
kevinlively Feb 20, 2025
8fc1247
code structure changes
kevinlively Feb 25, 2025
e0ed8f5
code structure change and api implementation
kevinlively Feb 25, 2025
8669a09
code structural changes
kevinlively Feb 25, 2025
5818ed0
Test cases for Api manager
kevinlively Feb 25, 2025
9f10d8e
minor change
kevinlively Feb 25, 2025
b3aee4a
Experience manager implementation and test
kevinlively Feb 26, 2025
ee29092
Logger Manager changes with interfaces implementation and test coverage
kevinlively Feb 27, 2025
81c197f
Event module code changes completed + test cases + Monolog implementa…
kevinlively Mar 3, 2025
6b39535
ApiManager interface implementation and test cases
kevinlively Mar 3, 2025
9b3ee4e
resolved comment
kevinlively Mar 3, 2025
1ae8987
Delete composer.lock
kevinlively Mar 3, 2025
2656633
Delete packages/Api/composer.lock
kevinlively Mar 3, 2025
1fbb0dc
Delete packages/Data/composer.lock
kevinlively Mar 3, 2025
bdfb8d3
remove composer.lock files
kevinlively Mar 3, 2025
32ae16a
Merge branch 'chore/project-setup' of github.com:kevinlively/php-sdk …
kevinlively Mar 3, 2025
334554a
Utils module test cases completed
kevinlively Mar 4, 2025
1804dff
Bucketing module along with php unit tests completed
kevinlively Mar 4, 2025
34998a5
Rule Manager Module along with its php unit test cases and configurat…
kevinlively Mar 6, 2025
b9481c7
Added openapi cli generated Php types and handled in Logger, Event mo…
kevinlively Mar 7, 2025
238e0b8
resolved comment
kevinlively Mar 10, 2025
d585f3c
RuleManager Module alongwith test cases completed
kevinlively Mar 10, 2025
15aae72
uncommented the test case
kevinlively Mar 10, 2025
62209f9
use types in rule test cases
kevinlively Mar 11, 2025
594e17c
Added RuleManager import and initialization in the main file
kevinlively Mar 11, 2025
9aea510
updated main file composer.json
kevinlively Mar 11, 2025
67a9877
data store manager interface and concrete class alongwith test cases …
kevinlively Mar 12, 2025
498696f
DataManager concrete class and interface code complete
kevinlively Mar 13, 2025
4e5cf4f
Added custom types, ApiManager code refactored + test cases completed…
kevinlively Mar 17, 2025
3342da8
DataManager and DataStoreManager alongwith the test cases is complete
kevinlively Mar 27, 2025
b645274
experienceManager alongwith unit test cases complete
kevinlively Apr 3, 2025
32075bb
segments manager alongwith unit tests complete
kevinlively Apr 4, 2025
ea164bd
segment manager issue fixed, text cases updated
kevinlively Apr 7, 2025
54fdc92
FeatureManager alongwith unit tests complete
kevinlively Apr 9, 2025
b829baf
core and context completed with unit test cases
kevinlively Apr 14, 2025
80742bc
minor changes
kevinlively Apr 16, 2025
0246209
minor changes
kevinlively Apr 30, 2025
c8c09e5
Update README.md
kevinlively May 8, 2025
559757a
Update README.md
kevinlively May 9, 2025
8358ba8
Update README.md
kevinlively May 9, 2025
988bdd1
Update README.md
kevinlively May 9, 2025
19de32d
Update README.md
kevinlively May 9, 2025
5c73776
Update README.md
kevinlively May 9, 2025
cd95dcb
Update README.md
kevinlively May 9, 2025
c0f48d4
Update README.md
kevinlively May 9, 2025
781bae3
minr changes
kevinlively May 9, 2025
5787dc8
Merge branch 'chore/project-setup' of github.com:kevinlively/php-sdk …
kevinlively May 9, 2025
80613af
doc
kevinlively May 12, 2025
4ac1fd5
Merge branch 'chore/project-setup' of github.com:kevinlively/php-sdk …
kevinlively May 12, 2025
945fb16
wip: PHP 8.2 strict types, native enums, PSR interface migrations
abbaseya Mar 18, 2026
90126bf
wip: PSR-18/17 HTTP migration, logger, config, DTOs, exceptions
abbaseya Mar 19, 2026
22f41b8
wip: bucketing, rule evaluation, visitor context, experience selection
abbaseya Mar 19, 2026
d1b891d
wip: feature flag resolution with typed variables
abbaseya Mar 19, 2026
e7f6911
wip: observability and debug logging across SDK
abbaseya Mar 19, 2026
e831c01
wip: test infrastructure, static analysis, CI pipeline
abbaseya Mar 19, 2026
84e70e6
wip: integration tests, legacy test fixes, and post-retro updates
abbaseya Mar 19, 2026
1b2eba8
wip: event system integration, legacy test fixes, manager updates
abbaseya Mar 21, 2026
42ba80e
wip: event tracking — goal dedup, revenue reporting, conversion DTOs
abbaseya Mar 21, 2026
667fc3f
Merge pull request #3 from convertcom/chore/epic-1-sdk-installation-a…
abbaseya Mar 21, 2026
eaf0a48
Merge pull request #4 from convertcom/chore/epic-2-experimentation-an…
abbaseya Mar 21, 2026
802a003
Merge pull request #5 from convertcom/chore/epic-3-feature-flag-resol…
abbaseya Mar 21, 2026
0a1f74c
Merge pull request #6 from convertcom/chore/epic-4-observability-and-…
abbaseya Mar 21, 2026
8797aff
Merge pull request #7 from convertcom/chore/epic-5-quality-assurance-…
abbaseya Mar 21, 2026
7681e28
Merge pull request #8 from convertcom/chore/course-correction
abbaseya Mar 21, 2026
db45edc
Merge pull request #9 from convertcom/chore/epic-1.1-event-tracking
abbaseya Mar 21, 2026
15962d0
Merge pull request #10 from convertcom/chore/epic-3.1-conversion-trac…
abbaseya Mar 21, 2026
71f1a15
wip: legacy test fixes, integration test updates, PHP 8.4 compat
abbaseya Mar 21, 2026
3e49006
Merge pull request #12 from convertcom/chore/full-chain-integration
abbaseya Mar 21, 2026
9d5abc6
wip: test fixes, coverage tests, CI and static analysis updates
abbaseya Mar 21, 2026
d13e59c
Merge pull request #13 from convertcom/chore/extend-test-coverage
abbaseya Mar 21, 2026
b4d3393
docs: comprehensive README with full API reference and examples
abbaseya Mar 21, 2026
5c99596
Merge pull request #14 from convertcom/chore/update-docs
abbaseya Mar 21, 2026
caa6917
fix: update CI workflow configuration
abbaseya Mar 21, 2026
64ccaf9
Merge pull request #15 from convertcom/fix/ci-pipeline
abbaseya Mar 21, 2026
945acdc
chore: restore php version requirement in CI pipeline
abbaseya Mar 21, 2026
173d1dd
Merge pull request #16 from convertcom/fix/ci-pipeline-2
abbaseya Mar 21, 2026
16f6d5b
chore: Ignore php env when running php-cs-fixer
abbaseya Mar 21, 2026
beb6a16
Merge pull request #17 from convertcom/fix/ci-pipeline-3
abbaseya Mar 21, 2026
ca70b74
chore: fix guzzle incompatible version
abbaseya Mar 21, 2026
4a08d35
Merge pull request #18 from convertcom/fix/ci-pipeline-4
abbaseya Mar 21, 2026
692664b
fix: test fixes and cleanup
abbaseya Mar 22, 2026
4577e16
Merge pull request #19 from convertcom/fix/logs-in-tests
abbaseya Mar 22, 2026
e4a14cb
wip: staging integration tests, CI updates, config fixes
abbaseya Mar 22, 2026
f481165
docs: add environment variables instructions
abbaseya Mar 22, 2026
4a447a5
Merge pull request #20 from convertcom/fix/staging-full-chain-integra…
abbaseya Mar 22, 2026
79729b1
wip: queue/persistence cleanup, API manager updates, README refresh
abbaseya Mar 22, 2026
76f0286
Merge pull request #21 from convertcom/chore/persistent-data-store
abbaseya Mar 22, 2026
d4340d6
fix: ConvertSDK test update
abbaseya Mar 22, 2026
463c69a
fix: update full-chain integration test
abbaseya Mar 22, 2026
dcaed3c
Merge pull request #22 from convertcom/fix/cs-checks
abbaseya Mar 22, 2026
b2121da
docs: update README
abbaseya Mar 22, 2026
8e27c3c
Merge pull request #23 from convertcom/fix/documentation-update
abbaseya Mar 22, 2026
7408cde
wip: server-side demo, SDK fixes, ObjectUtils and LogManager updates
abbaseya Mar 22, 2026
7c1a255
Merge pull request #24 from convertcom/chore/demo-example
abbaseya Mar 22, 2026
a143a1d
refactor: reorganize Types package — move OpenAPI models to Generated/
abbaseya Mar 22, 2026
cba78ad
chore: update untracked files
abbaseya Mar 22, 2026
3bbd011
Merge pull request #25 from convertcom/chore/untracked-files
abbaseya Mar 22, 2026
552dc6e
feat: automated release pipeline with semantic-release
abbaseya Mar 23, 2026
3670cbf
docs: Update release instructions
abbaseya Mar 23, 2026
8fd48d9
fix: rollover version plugin and release docs update
abbaseya Mar 23, 2026
8e74489
Merge pull request #26 from convertcom/chore/automated-release
abbaseya Mar 23, 2026
67ea9fe
fix: integration test updates, CI and README fixes
abbaseya Mar 23, 2026
556084c
Merge pull request #27 from convertcom/chore/add-sdk-secret-to-full-c…
abbaseya Mar 23, 2026
683f137
chore(release): publish monorepo root as single convertcom/php-sdk pa…
abbaseya Apr 15, 2026
9ff166a
fix(release): migrate rollover-version-plugin to conventional-commits…
abbaseya Apr 15, 2026
47dddf1
fix(release): use node-modules linker for semantic-release compatibility
abbaseya Apr 15, 2026
93e2171
docs(release): consolidate PACKAGE_SPLIT.md into RELEASE.md
abbaseya Apr 15, 2026
71acfb1
docs(release): clarify first-release flow, remove misleading manual-t…
abbaseya Apr 15, 2026
62aa145
Merge pull request #28 from convertcom/feat/publish-main-package-only
abbaseya Apr 15, 2026
d90e56a
feat(utils): add LogUtils::toLoggable helper for safe logging of Open…
abbaseya Apr 22, 2026
4c940b7
test(utils): add LogUtilsTest covering scalars, models, nested, DateTime
abbaseya Apr 22, 2026
e6ea094
fix(rules): wrap log context to prevent OpenAPI enum serialization error
abbaseya Apr 22, 2026
09d1259
test(rules): add reproduction test for OpenAPI enum log serialization…
abbaseya Apr 22, 2026
3d22905
fix(data,experience,bucketing,api): wrap remaining log contexts via L…
abbaseya Apr 22, 2026
1d9d751
refactor(sdk): address adversarial-review findings on PR #29
abbaseya Apr 22, 2026
cb4ce2c
Merge pull request #29 from convertcom/fix/pr-11-rule-log-serialization
abbaseya Apr 22, 2026
bf0dfae
Merge pull request #11 from convertcom/chore/project-setup-2
abbaseya Apr 24, 2026
f9dcf1f
Merge branch 'main' into fix/update-maine-base
abbaseya Apr 24, 2026
3603e58
Merge pull request #31 from convertcom/fix/update-maine-base
abbaseya Apr 24, 2026
09c6f3b
ci(code-scanning): replace empty CodeQL matrix with PHPStan SARIF wor…
abbaseya Apr 24, 2026
cb91942
Merge pull request #32 from convertcom/feat/code-scanner
abbaseya Apr 24, 2026
23653d1
ci: consolidate PHPStan into code-scanning workflow as single gate
abbaseya Apr 24, 2026
f9b09cf
ci: rename ci.yml to qa.yml (Quality Checks)
abbaseya Apr 24, 2026
9e92919
Merge branch 'main' into chore/project-setup
abbaseya Apr 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
88 changes: 88 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# PHP is not supported by CodeQL, so this workflow runs PHPStan and uploads
# its findings as SARIF to GitHub Code Scanning (Security > Code scanning).
# It is the single PHPStan gate for the repo: findings are uploaded to the
# Security tab AND fail the workflow (and thus block the PR).
#
# Scanner: PHPStan 2.x (reuses the repo's phpstan.neon)
# Formatter: jbelien/phpstan-sarif-formatter (installed CI-only, not committed)
# Upload: github/codeql-action/upload-sarif@v4
#
# Docs: https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github
name: "Code Scanning (PHP)"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '15 9 * * 4'

jobs:
phpstan-sarif:
name: PHPStan → SARIF
runs-on: ubuntu-latest
permissions:
security-events: write
contents: read
actions: read

steps:
- uses: actions/checkout@v4

- uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
tools: composer:v2
coverage: none

- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: ~/.composer/cache
key: composer-${{ hashFiles('composer.json') }}
restore-keys: composer-

- name: Install project dependencies
run: composer install --no-interaction --no-progress

- name: Install PHPStan SARIF formatter (CI-only)
run: composer require --dev --no-interaction --no-progress --no-scripts jbelien/phpstan-sarif-formatter

- name: Generate SARIF PHPStan config
run: |
cat > phpstan-sarif.neon <<'NEON'
includes:
- phpstan.neon
services:
errorFormatter.sarif:
class: PHPStanSarifErrorFormatter\SarifErrorFormatter
arguments:
relativePathHelper: @simpleRelativePathHelper
currentWorkingDirectory: %currentWorkingDirectory%
pretty: true
NEON

- name: Run PHPStan (SARIF output)
id: phpstan
continue-on-error: true
run: |
vendor/bin/phpstan analyse \
--configuration=phpstan-sarif.neon \
--error-format=sarif \
--memory-limit=512M \
--no-progress \
> phpstan.sarif

- name: Upload SARIF to GitHub Code Scanning
if: always()
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: phpstan.sarif
category: phpstan

- name: Fail workflow if PHPStan reported findings
if: steps.phpstan.outcome == 'failure'
run: |
echo "PHPStan reported findings — see Security → Code scanning for details."
exit 1
103 changes: 103 additions & 0 deletions .github/workflows/qa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Quality Checks

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
lint:
name: Code Style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
tools: composer:v2
coverage: none
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: ~/.composer/cache
key: composer-${{ hashFiles('composer.json') }}
restore-keys: composer-
- run: composer install --no-interaction --no-progress
- run: composer cs-check

validate:
name: Monorepo Validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
tools: composer:v2
coverage: none
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: ~/.composer/cache
key: composer-${{ hashFiles('composer.json') }}
restore-keys: composer-
- run: composer install --no-interaction --no-progress
- run: composer build:validate

test:
name: Tests (PHP ${{ matrix.php-version }}, ${{ matrix.dependency-preference }})
runs-on: ubuntu-latest
env:
CONVERT_STAGING_SDK_KEY: ${{ secrets.CONVERT_STAGING_SDK_KEY }}
CONVERT_STAGING_SDK_KEY2: ${{ secrets.CONVERT_STAGING_SDK_KEY2 }}
CONVERT_STAGING_SDK_KEY2_SECRET: ${{ secrets.CONVERT_STAGING_SDK_KEY2_SECRET }}
strategy:
fail-fast: false
matrix:
php-version: ['8.2', '8.3', '8.4']
dependency-preference: ['prefer-lowest', 'prefer-stable']
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:v2
coverage: pcov
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: ~/.composer/cache
key: composer-php${{ matrix.php-version }}-${{ matrix.dependency-preference }}-${{ hashFiles('composer.json') }}
restore-keys: |
composer-php${{ matrix.php-version }}-${{ matrix.dependency-preference }}-
composer-php${{ matrix.php-version }}-
- name: Install dependencies
run: composer update --${{ matrix.dependency-preference }} --prefer-stable --no-interaction --no-progress
- name: Run tests with coverage
if: matrix.php-version == '8.4' && matrix.dependency-preference == 'prefer-stable'
run: composer test:coverage:ci
- name: Enforce 85% coverage threshold
if: matrix.php-version == '8.4' && matrix.dependency-preference == 'prefer-stable'
run: |
php -r "
\$x = new SimpleXMLElement(file_get_contents('coverage.xml'));
\$m = \$x->project->metrics;
\$statements = (int)\$m['statements'];
if (\$statements === 0) { echo 'Error: zero statements in coverage report'; exit(1); }
\$pct = round(((int)\$m['coveredstatements'] / \$statements) * 100, 2);
echo \"Code coverage: {\$pct}%\n\";
exit(\$pct >= 85.0 ? 0 : 1);
"
- name: Upload coverage report
if: matrix.php-version == '8.4' && matrix.dependency-preference == 'prefer-stable'
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage.xml
retention-days: 30
- name: Run tests without coverage
if: matrix.php-version != '8.4' || matrix.dependency-preference != 'prefer-stable'
run: composer test
- name: Run cross-SDK parity tests
run: composer test:cross-sdk
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Release

on:
workflow_run:
workflows: ['CI']
types: [completed]
branches: [main]

permissions:
contents: write

jobs:
release:
name: Semantic Release
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: true
token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/setup-node@v4
with:
node-version: 'lts/*'

- uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
tools: composer:v2
coverage: none

- name: Install PHP dependencies
run: composer install --no-interaction --no-progress

- name: Install Node dependencies
run: yarn install --immutable

- name: Run semantic-release
run: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50 changes: 50 additions & 0 deletions .github/workflows/split.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Split Monorepo

on:
workflow_dispatch:

jobs:
split:
name: Split ${{ matrix.package.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
- { name: 'Api', local_path: 'packages/Api', split_repository: 'php-sdk-api' }
- { name: 'Bucketing', local_path: 'packages/Bucketing', split_repository: 'php-sdk-bucketing' }
- { name: 'Data', local_path: 'packages/Data', split_repository: 'php-sdk-data' }
- { name: 'Enums', local_path: 'packages/Enums', split_repository: 'php-sdk-enums' }
- { name: 'Event', local_path: 'packages/Event', split_repository: 'php-sdk-event' }
- { name: 'Experience', local_path: 'packages/Experience', split_repository: 'php-sdk-experience' }
- { name: 'Logger', local_path: 'packages/Logger', split_repository: 'php-sdk-logger' }
- { name: 'Php-sdk', local_path: 'packages/Php-sdk', split_repository: 'php-sdk' }
- { name: 'Rules', local_path: 'packages/Rules', split_repository: 'php-sdk-rules' }
- { name: 'Segments', local_path: 'packages/Segments', split_repository: 'php-sdk-segments' }
- { name: 'Types', local_path: 'packages/Types', split_repository: 'php-sdk-types' }
- { name: 'Utils', local_path: 'packages/Utils', split_repository: 'php-sdk-utils' }
env:
GITHUB_TOKEN: ${{ secrets.SPLIT_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- if: "!startsWith(github.ref, 'refs/tags/')"
uses: danharrin/monorepo-split-github-action@v2.4.4
with:
package_directory: ${{ matrix.package.local_path }}
repository_organization: 'convertcom'
repository_name: ${{ matrix.package.split_repository }}
user_name: 'convert-ci-bot'
user_email: 'ci@convert.com'

- if: "startsWith(github.ref, 'refs/tags/')"
uses: danharrin/monorepo-split-github-action@v2.4.4
with:
tag: ${{ github.ref_name }}
package_directory: ${{ matrix.package.local_path }}
repository_organization: 'convertcom'
repository_name: ${{ matrix.package.split_repository }}
user_name: 'convert-ci-bot'
user_email: 'ci@convert.com'
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/vendor/
/packages/*/vendor/
/packages/*/composer.lock
.DS_Store
.phpunit.result.cache
coverage-report/
coverage.xml
.php-cs-fixer.cache
node_modules/
.pnp.*
.yarn/
46 changes: 46 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php

declare(strict_types=1);

$directories = [
__DIR__ . '/packages/Api/src',
__DIR__ . '/packages/Api/tests',
__DIR__ . '/packages/Bucketing/src',
__DIR__ . '/packages/Bucketing/tests',
__DIR__ . '/packages/Data/src',
__DIR__ . '/packages/Data/tests',
__DIR__ . '/packages/Enums/src',
__DIR__ . '/packages/Event/src',
__DIR__ . '/packages/Event/tests',
__DIR__ . '/packages/Experience/src',
__DIR__ . '/packages/Experience/tests',
__DIR__ . '/packages/Logger/src',
__DIR__ . '/packages/Logger/tests',
__DIR__ . '/packages/Php-sdk/src',
__DIR__ . '/packages/Php-sdk/tests',
__DIR__ . '/packages/Rules/src',
__DIR__ . '/packages/Rules/tests',
__DIR__ . '/packages/Segments/src',
__DIR__ . '/packages/Segments/tests',
__DIR__ . '/packages/Utils/src',
__DIR__ . '/packages/Utils/tests',
__DIR__ . '/tests/CrossSdk',
];

$finder = PhpCsFixer\Finder::create()
->in(array_filter($directories, 'is_dir'))
->name('*.php');

return (new PhpCsFixer\Config())
->setRules([
'@PSR12' => true,
'strict_param' => true,
'declare_strict_types' => true,
'array_syntax' => ['syntax' => 'short'],
'no_unused_imports' => true,
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'single_quote' => true,
'trailing_comma_in_multiline' => true,
])
->setFinder($finder)
->setRiskyAllowed(true);
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
Loading
Loading