Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: pseventbus v4 infos #371

Merged
merged 4 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 0 additions & 15 deletions config/common/repository.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,6 @@ services:
class: PrestaShop\Module\PsEventbus\Repository\ModuleRepository
public: true

PrestaShop\Module\PsEventbus\Repository\ServerInformationRepository:
class: PrestaShop\Module\PsEventbus\Repository\ServerInformationRepository
public: true
arguments:
- '@=service("prestashop.adapter.legacy.context").getContext()'
- '@PrestaShop\Module\PsEventbus\Service\PsAccountsAdapterService'
- '@PrestaShop\Module\PsEventbus\Repository\LanguageRepository'
- '@PrestaShop\Module\PsEventbus\Repository\ConfigurationRepository'
- '@PrestaShop\Module\PsEventbus\Repository\ShopRepository'
- '@PrestaShop\Module\PsEventbus\Service\ShopContent\CurrenciesService'
- '@PrestaShop\Module\PsEventbus\Handler\ErrorHandler\ErrorHandlerInterface'
- '%ps_eventbus.sync_api_url%'
- '%ps_eventbus.live_sync_api_url%'
- '%ps_eventbus.proxy_api_url%'

PrestaShop\Module\PsEventbus\Repository\ThemeRepository:
class: PrestaShop\Module\PsEventbus\Repository\ThemeRepository
public: true
Expand Down
15 changes: 15 additions & 0 deletions config/front/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ services:
public: true
arguments:
- '@ps_eventbus'
- '@PrestaShop\Module\PsEventbus\Service\PsAccountsAdapterService'
- '@PrestaShop\Module\PsEventbus\Handler\ErrorHandler\ErrorHandlerInterface'
- '%ps_eventbus.sync_api_url%'
- '%ps_eventbus.live_sync_api_url%'
- '%ps_eventbus.proxy_api_url%'

# SHOP CONTENT SERVICES
PrestaShop\Module\PsEventbus\Service\ShopContent\OrdersService:
Expand Down Expand Up @@ -177,3 +182,13 @@ services:
public: true
arguments:
- '@PrestaShop\Module\PsEventbus\Repository\NewRepository\ImageTypeRepository'

PrestaShop\Module\PsEventbus\Service\ShopContent\ShopInformationService:
class: PrestaShop\Module\PsEventbus\Service\ShopContent\ShopInformationService
public: true
arguments:
- '@=service("prestashop.adapter.legacy.context").getContext()'
- '@PrestaShop\Module\PsEventbus\Repository\LanguageRepository'
- '@PrestaShop\Module\PsEventbus\Repository\ConfigurationRepository'
- '@PrestaShop\Module\PsEventbus\Repository\ShopRepository'
- '@PrestaShop\Module\PsEventbus\Service\ShopContent\CurrenciesService'
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"id": "1",
"collection": "shops",
"collection": "shop_information",
"properties": {
"created_at": "2024-07-16 15:33:52",
"folder_created_at": "2024-07-16 15:34:17",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"id": "1",
"collection": "shops",
"collection": "shop_information",
"properties": {
"created_at": "2023-12-20 22:56:03",
"folder_created_at": "2024-03-05 12:59:12",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[
{
"id": "1",
"collection": "shops",
"collection": "shop_information",
"properties": {
"created_at": "2024-02-06 20:24:44",
"folder_created_at": "2024-02-09 16:24:55",
"cms_version": "8.1.3",
"created_at": "2024-08-22T12:27:09+0200",
"folder_created_at": "2024-08-27T10:07:19+0200",
"cms_version": "8.1.7",
"url_is_simplified": true,
"cart_is_persistent": false,
"default_language": "en",
Expand All @@ -19,8 +19,8 @@
"timezone": "Europe/Paris",
"is_order_return_enabled": false,
"order_return_nb_days": 14,
"php_version": "8.1.27",
"http_server": "nginx/1.24.0",
"php_version": "8.1.29",
"http_server": "nginx/1.26.2",
"url": "http://localhost:8000/",
"ssl": false,
"multi_shop_count": 1,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"id": "1",
"collection": "shops",
"collection": "shop_information",
"properties": {
"created_at": "2024-06-10 02:27:21",
"folder_created_at": "2024-06-10 18:01:29",
Expand Down
2 changes: 1 addition & 1 deletion e2e/src/helpers/shop-contents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import R from "ramda";
'specific_prices': 'specific-prices',
'taxonomies': 'taxonomies',
'modules': 'modules',
'shops': 'info',
'stores': 'stores',
'themes': 'themes',
'wishlists': 'wishlists',
Expand Down Expand Up @@ -40,6 +39,7 @@ export const shopContentMapping = {
employees: "employees",
images: "images",
image_types: "image-types",
shop_information: "shop-information",
} as const;

type ShopContentMapping = typeof shopContentMapping;
Expand Down
9 changes: 0 additions & 9 deletions ps_eventbus.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,6 @@ class Ps_eventbus extends Module

const DEFAULT_ENV = '';

/**
* @var array<mixed>
*/
const REQUIRED_TABLES = [
'eventbus_type_sync',
'eventbus_job',
'eventbus_incremental_sync',
];

/**
* @var string
*/
Expand Down
5 changes: 2 additions & 3 deletions src/Config/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Config
const COLLECTION_PRODUCT_BUNDLES = 'product_bundles';
const COLLECTION_PRODUCT_CARRIERS = 'product_carriers';
const COLLECTION_PRODUCT_SUPPLIERS = 'product_suppliers';
const COLLECTION_SHOPS = 'shops';
const COLLECTION_SHOP_INFORMATION = 'shop_information';
const COLLECTION_SPECIFIC_PRICES = 'specific_prices';
const COLLECTION_STOCKS = 'stocks';
const COLLECTION_STOCK_MVTS = 'stock_movements';
Expand All @@ -85,7 +85,6 @@ class Config
self::COLLECTION_EMPLOYEES,
self::COLLECTION_IMAGES,
self::COLLECTION_IMAGE_TYPES,
self::COLLECTION_INFO,
self::COLLECTION_LANGUAGES,
self::COLLECTION_MANUFACTURERS,
self::COLLECTION_MODULES,
Expand All @@ -98,7 +97,7 @@ class Config
self::COLLECTION_PRODUCT_BUNDLES,
self::COLLECTION_PRODUCT_CARRIERS,
self::COLLECTION_PRODUCT_SUPPLIERS,
self::COLLECTION_SHOPS,
self::COLLECTION_SHOP_INFORMATION,
self::COLLECTION_SPECIFIC_PRICES,
self::COLLECTION_STOCKS,
self::COLLECTION_STOCK_MVTS,
Expand Down
231 changes: 0 additions & 231 deletions src/Repository/ServerInformationRepository.php

This file was deleted.

Loading
Loading