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

fix: service container v9 #397

Merged
merged 5 commits into from
Dec 5, 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
1 change: 1 addition & 0 deletions .zip-contents
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ src
upgrade
vendor
ps_eventbus.php
config.php
logo.png
config.xml
LICENSE
Expand Down
17 changes: 8 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,22 @@ zip: zip-prod zip-inte zip-e2e
# target: zip-e2e - Bundle a local E2E integrable zip
.PHONY: zip-e2e
zip-e2e: vendor tools/vendor dist
@$(call zip_it,./config/parameters.yml,${PACKAGE}_e2e.zip)
@$(call zip_it,${PACKAGE}_e2e.zip)

# target: zip-inte - Bundle an integration zip
.PHONY: zip-inte
zip-inte: vendor tools/vendor dist
@$(call zip_it,.config.inte.yml,${PACKAGE}_integration.zip)
@$(call zip_it,${PACKAGE}_integration.zip)

# target: zip-prod - Bundle a production zip
.PHONY: zip-prod
zip-prod: vendor tools/vendor dist
@$(call zip_it,.config.prod.yml,${PACKAGE}.zip)
@$(call zip_it,${PACKAGE}.zip)

# target: zip-unzipped - Bundle a production module, but without zip step (only to check sources)
.PHONY: zip-unzipped
zip-unzipped: vendor tools/vendor dist
@$(call no_zip_it,.config.prod.yml)
@$(call no_zip_it)

dist:
@mkdir -p ./dist
Expand Down Expand Up @@ -184,20 +184,19 @@ define create_module
$(call replace_version,${TMP_DIR}/${MODULE_NAME},${SEM_VERSION})
./tools/vendor/bin/autoindex prestashop:add:index ${TMP_DIR}
tools/vendor/bin/header-stamp --target=${TMP_DIR}/${MODULE_NAME} --license=tools/vendor/prestashop/header-stamp/assets/osl3.txt --exclude=vendor,e2e,e2e-env,tests,composer.json,scoper.inc.php
cp $1 ${TMP_DIR}/${MODULE_NAME}/config/parameters.yml
cd ${TMP_DIR}/${MODULE_NAME} && composer dump-autoload
endef

define zip_it
TMP_DIR=$(call create_module,$1)
cd ${TMP_DIR} && zip -9 -r $2 ./${MODULE_NAME};
mv ${TMP_DIR}/$2 ./dist;
TMP_DIR=$(call create_module)
cd ${TMP_DIR} && zip -9 -r $1 ./${MODULE_NAME};
mv ${TMP_DIR}/$1 ./dist;
rm -rf ${TMP_DIR};
endef

define no_zip_it
rm -rf ./dist/${MODULE_NAME}
TMP_DIR=$(call create_module,$1)
TMP_DIR=$(call create_module)
mv ${TMP_DIR}/${MODULE_NAME} ./dist;
rm -rf ${TMP_DIR:-/dev/null};
endef
Expand Down
27 changes: 27 additions & 0 deletions config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* @author PrestaShop SA and Contributors <[email protected]>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/

return [
'ps_eventbus.proxy_api_url' => 'http://reverse-proxy/collector',
'ps_eventbus.sync_api_url' => 'http://reverse-proxy/sync-api',
'ps_eventbus.live_sync_api_url' => 'http://reverse-proxy/live-sync-api/v1',
'ps_eventbus.sentry_dsn' => 'https://[email protected]/stuff',
'ps_eventbus.sentry_env' => 'development'
];
14 changes: 0 additions & 14 deletions config/admin/services.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1 @@
imports:
- { resource: ../common/common.yml }
- { resource: ../common/repository.yml }
- { resource: ../front/services.yml }

services:
ps_eventbus.service.presenter:
class: 'PrestaShop\Module\PsEventbus\Service\PresenterService'
public: true

ps_eventbus.module.upgrade:
class: 'PrestaShop\Module\PsEventbus\Module\Upgrade'
arguments:
- "@ps_eventbus"
public: true
55 changes: 0 additions & 55 deletions config/common/common.yml

This file was deleted.

152 changes: 0 additions & 152 deletions config/common/repository.yml

This file was deleted.

24 changes: 0 additions & 24 deletions config/front/api.yml

This file was deleted.

Loading
Loading