Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
2b1b3b1
feat: US-001 - Create SyncConfigV2 configuration class
tomas862 Jan 21, 2026
2656dc6
feat: US-002 - Create SyncV2Sdk main class with constructor
tomas862 Jan 21, 2026
1434755
feat: US-003 - Implement createIndex method (Index Management)
tomas862 Jan 21, 2026
7cfac19
feat: US-004 - Implement getIndexInfo method (Index Management)
tomas862 Jan 21, 2026
3fed8b2
feat: US-005 - Implement listIndexVersions method (Index Management)
tomas862 Jan 21, 2026
307c4fc
feat: US-006 - Implement activateIndexVersion method (Index Management)
tomas862 Jan 21, 2026
05f375e
feat: US-007 - Implement deleteIndexVersion method (Index Management)
tomas862 Jan 21, 2026
7146954
feat: US-008 - Implement setConfiguration method (Configuration Manag…
tomas862 Jan 21, 2026
b4e662b
feat: US-009 - Implement getConfiguration method (Configuration Manag…
tomas862 Jan 21, 2026
54b80e7
feat: US-010 - Implement updateConfiguration method (Configuration Ma…
tomas862 Jan 21, 2026
549df4f
feat: US-011 - Implement deleteConfiguration method (Configuration Ma…
tomas862 Jan 21, 2026
777dfc1
feat: US-012 - Implement setSynonyms method (Synonym Management)
tomas862 Jan 21, 2026
cb82668
feat: US-013 - Implement getSynonyms method (Synonym Management)
tomas862 Jan 21, 2026
79b86d9
feat: US-014 - Implement deleteSynonyms method (Synonym Management)
tomas862 Jan 21, 2026
f594168
feat: US-015 - Implement bulkOperations method (Sync Operations)
tomas862 Jan 21, 2026
ecbafa8
feat: US-016 - Implement Search Settings CRUD methods
tomas862 Jan 21, 2026
ec88447
feat: US-017 - Add unit tests for SyncV2Sdk
tomas862 Jan 21, 2026
c359213
adds unit test runner
tomas862 Jan 21, 2026
7a868f9
fix test runner
tomas862 Jan 21, 2026
ac05306
spec updated
tomas862 Jan 21, 2026
7aab3df
removes tests
tomas862 Jan 21, 2026
8a7a5e3
feat: US-001 - Create base ValueObject infrastructure
tomas862 Jan 29, 2026
4d8b605
feat: US-002 - Create LocalizedField helper
tomas862 Jan 29, 2026
e941d21
feat: US-003 - Create FieldDefinition ValueObject and Builder
tomas862 Jan 29, 2026
985aac4
feat: US-004 - Create IndexCreateRequest ValueObject and Builder
tomas862 Jan 29, 2026
3e1bd4b
feat: US-005 - Create SearchFieldConfig ValueObject and Builder
tomas862 Jan 29, 2026
f8043a8
feat: US-006 - Create FuzzyMatchingConfig ValueObject
tomas862 Jan 29, 2026
0ed9058
feat: US-007 - Create PopularityBoostConfig ValueObject
tomas862 Jan 29, 2026
8dbb07b
feat: US-008 - Create QueryConfigurationRequest ValueObject and Builder
tomas862 Jan 29, 2026
05962f2
feat: US-009 - Create SynonymConfiguration ValueObject
tomas862 Jan 29, 2026
2242e8d
feat: US-010 - Create ImageUrl ValueObject
tomas862 Jan 29, 2026
4cce248
feat: US-011 - Create BulkOperation ValueObjects
tomas862 Jan 29, 2026
1f3504d
feat: US-012 - Create SearchSettingsRequest ValueObject and Builders
tomas862 Jan 29, 2026
4c8a856
feat: US-013 - Create API Response ValueObjects
tomas862 Jan 29, 2026
7481e11
feat: US-014 - Update SyncV2Sdk to use ValueObjects
tomas862 Jan 29, 2026
80e1749
feat: US-015 - Comprehensive API payload verification tests
tomas862 Jan 29, 2026
2d04b2c
feat: US-016 - Full workflow simulation test for Darbo Drabuziai client
tomas862 Jan 29, 2026
bd96c5f
removed boost_multiplier option as its no longer used, removed fuzzy …
tomas862 Jan 30, 2026
870816a
feat: US-017 - Create fromJSON factory methods for Search Configurati…
tomas862 Jan 30, 2026
4aaa1a1
feat: US-018 - Create PrestaShopAdapterV2 service for V2 bulk operations
tomas862 Jan 30, 2026
0aa1d16
created entities for bulk operations
tomas862 Feb 2, 2026
f301762
adjusts the code to map by feature id in the mappings
tomas862 Feb 4, 2026
1159bf2
created fromArray method that retranforms products from one format to…
tomas862 Feb 5, 2026
1689e0f
version number passing instead of string
tomas862 Feb 5, 2026
60910c4
Merge branch 'main' into feature/v2-endpoint
tomas862 Feb 5, 2026
8870db6
adjusts code to actually perform tests
tomas862 Feb 5, 2026
cb85e14
updated bulk operations and tests
tomas862 Feb 5, 2026
dfced31
fix synch v2 sdk code
tomas862 Feb 5, 2026
f7e018a
fix: parse version string with 'v' prefix in IndexCreationResponse
tomas862 Feb 5, 2026
6a9b67f
fix: use 'type' instead of 'operation_type' in bulk operations
tomas862 Feb 5, 2026
9ef0efb
debug: add temporary logging to see brad-search API response
tomas862 Feb 5, 2026
f569eb3
debug: write API response to /tmp/brad-search-api-response.log
tomas862 Feb 5, 2026
6f83943
revert: remove debug logging
tomas862 Feb 5, 2026
f2cbf92
feat: update SDK to match brad-search V2 API per-item results structure
tomas862 Feb 5, 2026
922aad9
code changes done
tomas862 Feb 5, 2026
763aeac
returns different information now
tomas862 Feb 5, 2026
fbe6618
Update operation for v2 added
tomas862 Feb 5, 2026
c087e72
adds support for endpoint
tomas862 Feb 6, 2026
c9c91ef
cast value
tomas862 Feb 6, 2026
dd5a1f5
fix locale suffix
tomas862 Feb 6, 2026
3f9ed56
fix settings response
tomas862 Feb 6, 2026
e541f93
fix locale suffix, fix tests
tomas862 Feb 6, 2026
71d49e9
updates new expectation from prestsahop API
tomas862 Feb 9, 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
69 changes: 69 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Tests

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

jobs:
tests:
runs-on: ubuntu-latest

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: json, curl, bcmath
coverage: xdebug

- name: Validate composer.json
run: composer validate --strict

- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

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

- name: Run PHPUnit tests
run: vendor/bin/phpunit --testdox

code-quality:
runs-on: ubuntu-latest

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: json, curl, bcmath

- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

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

- name: Run PHPStan
run: vendor/bin/phpstan analyse

- name: Run PHP CodeSniffer
run: vendor/bin/phpcs src tests
2 changes: 1 addition & 1 deletion .phpunit.cache/test-results

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions .ralph-tui/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Ralph TUI Configuration
# Generated by setup wizard
# See: ralph-tui config help

configVersion = "2.0"
tracker = "json"
agent = "claude"
maxIterations = 10
autoCommit = true

[trackerOptions]
[agentOptions]
11 changes: 11 additions & 0 deletions .ralph-tui/progress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Ralph Progress Log

This file tracks progress across iterations. It's automatically updated
after each iteration and included in agent prompts for context.

## Codebase Patterns (Study These First)

*Add reusable patterns discovered during development here.*

---

15 changes: 15 additions & 0 deletions .ralph-tui/session-meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"id": "30036f8a-76f6-46f1-af2b-b5b264aa3420",
"status": "completed",
"startedAt": "2026-01-30T12:06:59.963Z",
"updatedAt": "2026-01-30T12:07:14.726Z",
"agentPlugin": "claude",
"trackerPlugin": "json",
"prdPath": "./tasks/prd.json",
"currentIteration": 0,
"maxIterations": 10,
"totalTasks": 0,
"tasksCompleted": 0,
"cwd": "/Users/tomasilginis/Desktop/projects/brad-search-php-sdk",
"endedAt": "2026-01-30T12:07:14.726Z"
}
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@
"ext-bcmath": "*"
},
"require-dev": {
"phpunit/phpunit": "^11.0",
"laravel/pint": "^1.27",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^11.0",
"squizlabs/php_codesniffer": "^3.7"
},
"autoload": {
Expand Down
30 changes: 30 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0"?>
<ruleset name="BradSearch SDK">
<description>Coding standard for BradSearch Sync SDK</description>

<file>src</file>
<file>tests</file>

<arg name="colors"/>
<arg value="sp"/>
<!-- Only report errors, not warnings -->
<arg name="warning-severity" value="0"/>

<!-- Use PSR-12 as base -->
<rule ref="PSR12"/>

<!-- Disable line length limits -->
<rule ref="Generic.Files.LineLength">
<severity>0</severity>
</rule>

<!-- Allow multiple classes in test files -->
<rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses">
<exclude-pattern>tests/*</exclude-pattern>
</rule>

<!-- Allow non-standard default parameter order (PHP 8 nullable types) -->
<rule ref="PEAR.Functions.ValidDefaultValue.NotAtEnd">
<severity>0</severity>
</rule>
</ruleset>
10 changes: 10 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
parameters:
level: 4
paths:
- src
excludePaths:
- vendor
ignoreErrors:
- '#PHPDoc tag @param references unknown parameter#'
- '#Deprecated in PHP 8.0: Required parameter .* follows optional parameter#'
- '#Strict comparison using === between .* and null will always evaluate to false#'
8 changes: 5 additions & 3 deletions src/Adapters/PrestaShopAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@

class PrestaShopAdapter
{
public function __construct() {}
public function __construct()
{
}

/**
* Transform PrestaShop product data to BradSearch format
*
*
* @param array $prestaShopData The PrestaShop API response
* @return array<array> Array of products in BradSearch format
*/
Expand Down Expand Up @@ -485,7 +487,7 @@ private function getRequiredField(array $data, string $field): string

/**
* Validate and convert a field value to a proper boolean or null
*
*
* @param mixed $value The value to validate
* @return bool|null Returns true/false for valid boolean values, null for invalid/missing values
*/
Expand Down
Loading