Files
MiraviaConnector/platform-middleware-master/composer.json
Miravia Connector Bot 752600f337 Fix image upload structure for Miravia API compliance
🔧 Bug Fixes:
- Fixed product image structure to match Miravia API requirements
- Updated MiraviaProduct.php getData() method to wrap images in {"Image": [...]} format
- Updated MiraviaCombination.php getData() method to wrap SKU images properly
- Resolved error "[4224] The Main image of the product is required"

📋 Changes:
- Modified getData() methods to transform flat image arrays to nested structure
- Product images: images[] → Images: {"Image": [...]}
- SKU images: images[] → Images: {"Image": [...]}
- Maintains backward compatibility for empty image arrays

🎯 Impact:
- Product uploads will now pass Miravia's image validation
- Both product-level and SKU-level images properly formatted
- Complies with official Miravia API documentation structure

🤖 Generated with Claude Code (https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-21 11:34:59 +02:00

66 lines
1.4 KiB
JSON

{
"name": "sweeper/platform-middleware",
"description": "Access Platform API Middleware",
"type": "library",
"keywords": [
"PHP",
"Platform",
"API",
"Middleware"
],
"homepage": "https://github.com/HypnosKiss/platform-middleware/",
"license": "Apache-2.0",
"authors": [
{
"name": "sweeper",
"email": "wili.lixiang@gmail.com"
}
],
"require": {
"php": ">=7.2",
"ext-curl": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-mysqli": "*",
"ext-openssl": "*",
"ext-pdo": "*",
"ext-redis": "*",
"ext-simplexml": "*",
"ext-soap": "*",
"ext-xml": "*",
"mirakl/sdk-php-shop": "*",
"php-amqplib/php-amqplib": "^3.3.0",
"phpclassic/php-shopify": "1.1.20",
"predis/predis": "^2.2.0 || ^v3",
"psr/log": "^1.1 || ^2.0 || ^3.0",
"sweeper/design-pattern": "^1.0 || ^2.0",
"sweeper/guzzlehttp-request": "^1.0 || ^2.0",
"sweeper/helper-php": "^1.0 || ^2.0"
},
"require-dev": {
"phpunit/phpunit": "^8",
"symfony/var-dumper": "^5.4.29"
},
"autoload": {
"psr-4": {
"Sweeper\\PlatformMiddleware\\": "src/"
},
"files": [
"src/helper.php"
]
},
"autoload-dev": {
"psr-4": {
"Sweeper\\PlatformMiddleware\\Test\\": "test"
}
},
"config": {
"preferred-install": "dist",
"optimize-autoloader": true,
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
}