diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml
index ca4d6a4..10b5613 100644
--- a/.github/workflows/unit-tests.yml
+++ b/.github/workflows/unit-tests.yml
@@ -10,7 +10,8 @@ jobs:
- uses: extdn/github-actions-m2/magento-unit-tests/8.3@master
with:
composer_name: grin/module
+ magento_version: 2.4.8
module_name: Grin_Module
+ module_source: src
php_version: 8.3
- magento_version: 2.4.8
project_name: magento/project-community-edition
diff --git a/scripts/setup-first-time.sh b/scripts/setup-first-time.sh
index 162a7e5..5f54847 100755
--- a/scripts/setup-first-time.sh
+++ b/scripts/setup-first-time.sh
@@ -205,7 +205,7 @@ bin/clinotty bin/magento cache:flush || handle_error "Flushing cache"
# Add module volume mount to Docker Compose
echo "Adding module volume mount to Docker Compose..."
cat << EOF | sed -i '' '/volumes:/r /dev/stdin' "$MAGENTO_DIR/compose.yaml"
- - ${ROOT_DIR}:/var/www/html/app/code/Grin/Module:delegated,exclude=.docker-magento
+ - ${ROOT_DIR}/src:/var/www/html/app/code/Grin/Module:delegated
EOF
# Restart containers to apply volume mount
@@ -239,4 +239,8 @@ bin/clinotty bin/magento setup:upgrade || handle_error "Running setup:upgrade af
bin/clinotty bin/magento cache:flush || handle_error "Final cache flush"
echo ""
-echo "Install complete."
\ No newline at end of file
+echo "Install complete."
+echo "You can access Magento at https://magento.grin.co.test:8443"
+echo "Admin URL: https://magento.grin.co.test:8443/admin"
+echo "Admin credentials: admin/admin123"
+echo ""
diff --git a/Api/Data/RequestInterface.php b/src/Api/Data/RequestInterface.php
similarity index 100%
rename from Api/Data/RequestInterface.php
rename to src/Api/Data/RequestInterface.php
diff --git a/Api/Data/RuleStagingInterface.php b/src/Api/Data/RuleStagingInterface.php
similarity index 100%
rename from Api/Data/RuleStagingInterface.php
rename to src/Api/Data/RuleStagingInterface.php
diff --git a/Api/Data/StagingDataInterface.php b/src/Api/Data/StagingDataInterface.php
similarity index 100%
rename from Api/Data/StagingDataInterface.php
rename to src/Api/Data/StagingDataInterface.php
diff --git a/Api/GrinServiceInterface.php b/src/Api/GrinServiceInterface.php
similarity index 100%
rename from Api/GrinServiceInterface.php
rename to src/Api/GrinServiceInterface.php
diff --git a/Api/PublisherInterface.php b/src/Api/PublisherInterface.php
similarity index 100%
rename from Api/PublisherInterface.php
rename to src/Api/PublisherInterface.php
diff --git a/Api/RuleStagingRepositoryInterface.php b/src/Api/RuleStagingRepositoryInterface.php
similarity index 100%
rename from Api/RuleStagingRepositoryInterface.php
rename to src/Api/RuleStagingRepositoryInterface.php
diff --git a/Api/StockItemsInterface.php b/src/Api/StockItemsInterface.php
similarity index 100%
rename from Api/StockItemsInterface.php
rename to src/Api/StockItemsInterface.php
diff --git a/Block/Checkout/CartWidget.php b/src/Block/Checkout/CartWidget.php
similarity index 100%
rename from Block/Checkout/CartWidget.php
rename to src/Block/Checkout/CartWidget.php
diff --git a/Block/Checkout/Success.php b/src/Block/Checkout/Success.php
similarity index 100%
rename from Block/Checkout/Success.php
rename to src/Block/Checkout/Success.php
diff --git a/Block/Footer/FooterScript.php b/src/Block/Footer/FooterScript.php
similarity index 100%
rename from Block/Footer/FooterScript.php
rename to src/Block/Footer/FooterScript.php
diff --git a/Block/System/Version.php b/src/Block/System/Version.php
similarity index 100%
rename from Block/System/Version.php
rename to src/Block/System/Version.php
diff --git a/Controller/Adminhtml/Queue/Messages.php b/src/Controller/Adminhtml/Queue/Messages.php
similarity index 100%
rename from Controller/Adminhtml/Queue/Messages.php
rename to src/Controller/Adminhtml/Queue/Messages.php
diff --git a/Model/Carrier/Method.php b/src/Model/Carrier/Method.php
similarity index 100%
rename from Model/Carrier/Method.php
rename to src/Model/Carrier/Method.php
diff --git a/Model/Data/Request.php b/src/Model/Data/Request.php
similarity index 100%
rename from Model/Data/Request.php
rename to src/Model/Data/Request.php
diff --git a/Model/Data/RuleStaging.php b/src/Model/Data/RuleStaging.php
similarity index 100%
rename from Model/Data/RuleStaging.php
rename to src/Model/Data/RuleStaging.php
diff --git a/Model/Data/StagingData.php b/src/Model/Data/StagingData.php
similarity index 100%
rename from Model/Data/StagingData.php
rename to src/Model/Data/StagingData.php
diff --git a/Model/Grid/Source/MessageStatus.php b/src/Model/Grid/Source/MessageStatus.php
similarity index 100%
rename from Model/Grid/Source/MessageStatus.php
rename to src/Model/Grid/Source/MessageStatus.php
diff --git a/Model/GrinService.php b/src/Model/GrinService.php
similarity index 100%
rename from Model/GrinService.php
rename to src/Model/GrinService.php
diff --git a/Model/Http/Client/Adapter/CurlFactory.php b/src/Model/Http/Client/Adapter/CurlFactory.php
similarity index 100%
rename from Model/Http/Client/Adapter/CurlFactory.php
rename to src/Model/Http/Client/Adapter/CurlFactory.php
diff --git a/Model/Http/UriFactory.php b/src/Model/Http/UriFactory.php
similarity index 100%
rename from Model/Http/UriFactory.php
rename to src/Model/Http/UriFactory.php
diff --git a/Model/Message/Invalid.php b/src/Model/Message/Invalid.php
similarity index 100%
rename from Model/Message/Invalid.php
rename to src/Model/Message/Invalid.php
diff --git a/Model/OrderTracker.php b/src/Model/OrderTracker.php
similarity index 100%
rename from Model/OrderTracker.php
rename to src/Model/OrderTracker.php
diff --git a/Model/Queue/Consumer.php b/src/Model/Queue/Consumer.php
similarity index 100%
rename from Model/Queue/Consumer.php
rename to src/Model/Queue/Consumer.php
diff --git a/Model/Queue/ConsumerHandler.php b/src/Model/Queue/ConsumerHandler.php
similarity index 100%
rename from Model/Queue/ConsumerHandler.php
rename to src/Model/Queue/ConsumerHandler.php
diff --git a/Model/Queue/InvokerFactory.php b/src/Model/Queue/InvokerFactory.php
similarity index 100%
rename from Model/Queue/InvokerFactory.php
rename to src/Model/Queue/InvokerFactory.php
diff --git a/Model/Queue/Publisher.php b/src/Model/Queue/Publisher.php
similarity index 100%
rename from Model/Queue/Publisher.php
rename to src/Model/Queue/Publisher.php
diff --git a/Model/Queue/ResourceModel/ResponseHandler.php b/src/Model/Queue/ResourceModel/ResponseHandler.php
similarity index 100%
rename from Model/Queue/ResourceModel/ResponseHandler.php
rename to src/Model/Queue/ResourceModel/ResponseHandler.php
diff --git a/Model/Queue/StoreIdsManager.php b/src/Model/Queue/StoreIdsManager.php
similarity index 100%
rename from Model/Queue/StoreIdsManager.php
rename to src/Model/Queue/StoreIdsManager.php
diff --git a/Model/RuleStagingRepository.php b/src/Model/RuleStagingRepository.php
similarity index 100%
rename from Model/RuleStagingRepository.php
rename to src/Model/RuleStagingRepository.php
diff --git a/Model/SalesRuleValidator.php b/src/Model/SalesRuleValidator.php
similarity index 100%
rename from Model/SalesRuleValidator.php
rename to src/Model/SalesRuleValidator.php
diff --git a/Model/StockItems.php b/src/Model/StockItems.php
similarity index 100%
rename from Model/StockItems.php
rename to src/Model/StockItems.php
diff --git a/Model/SystemConfig.php b/src/Model/SystemConfig.php
similarity index 100%
rename from Model/SystemConfig.php
rename to src/Model/SystemConfig.php
diff --git a/Model/WebhookStateInterface.php b/src/Model/WebhookStateInterface.php
similarity index 100%
rename from Model/WebhookStateInterface.php
rename to src/Model/WebhookStateInterface.php
diff --git a/Observer/CategoryWebhook.php b/src/Observer/CategoryWebhook.php
similarity index 100%
rename from Observer/CategoryWebhook.php
rename to src/Observer/CategoryWebhook.php
diff --git a/Observer/OrderState.php b/src/Observer/OrderState.php
similarity index 100%
rename from Observer/OrderState.php
rename to src/Observer/OrderState.php
diff --git a/Observer/OrderWebhook.php b/src/Observer/OrderWebhook.php
similarity index 100%
rename from Observer/OrderWebhook.php
rename to src/Observer/OrderWebhook.php
diff --git a/Observer/ProductWebhook.php b/src/Observer/ProductWebhook.php
similarity index 100%
rename from Observer/ProductWebhook.php
rename to src/Observer/ProductWebhook.php
diff --git a/Observer/SalesRule.php b/src/Observer/SalesRule.php
similarity index 100%
rename from Observer/SalesRule.php
rename to src/Observer/SalesRule.php
diff --git a/Observer/StockItemWebhook.php b/src/Observer/StockItemWebhook.php
similarity index 100%
rename from Observer/StockItemWebhook.php
rename to src/Observer/StockItemWebhook.php
diff --git a/Plugin/AttributeData.php b/src/Plugin/AttributeData.php
similarity index 100%
rename from Plugin/AttributeData.php
rename to src/Plugin/AttributeData.php
diff --git a/Plugin/Magento/SalesRule/Model/RulesApplier/ValidateByToken.php b/src/Plugin/Magento/SalesRule/Model/RulesApplier/ValidateByToken.php
similarity index 100%
rename from Plugin/Magento/SalesRule/Model/RulesApplier/ValidateByToken.php
rename to src/Plugin/Magento/SalesRule/Model/RulesApplier/ValidateByToken.php
diff --git a/Test/Api/StockItemsTest.php b/src/Test/Api/StockItemsTest.php
similarity index 100%
rename from Test/Api/StockItemsTest.php
rename to src/Test/Api/StockItemsTest.php
diff --git a/Test/Integration/CategoryPublisherTest.php b/src/Test/Integration/CategoryPublisherTest.php
similarity index 100%
rename from Test/Integration/CategoryPublisherTest.php
rename to src/Test/Integration/CategoryPublisherTest.php
diff --git a/Test/Integration/Fixture/Category.php b/src/Test/Integration/Fixture/Category.php
similarity index 100%
rename from Test/Integration/Fixture/Category.php
rename to src/Test/Integration/Fixture/Category.php
diff --git a/Test/Integration/Fixture/Order.php b/src/Test/Integration/Fixture/Order.php
similarity index 100%
rename from Test/Integration/Fixture/Order.php
rename to src/Test/Integration/Fixture/Order.php
diff --git a/Test/Integration/Fixture/Product.php b/src/Test/Integration/Fixture/Product.php
similarity index 100%
rename from Test/Integration/Fixture/Product.php
rename to src/Test/Integration/Fixture/Product.php
diff --git a/Test/Integration/GrinServiceTest.php b/src/Test/Integration/GrinServiceTest.php
similarity index 100%
rename from Test/Integration/GrinServiceTest.php
rename to src/Test/Integration/GrinServiceTest.php
diff --git a/Test/Integration/Model/MysqlQueueMessageManager.php b/src/Test/Integration/Model/MysqlQueueMessageManager.php
similarity index 100%
rename from Test/Integration/Model/MysqlQueueMessageManager.php
rename to src/Test/Integration/Model/MysqlQueueMessageManager.php
diff --git a/Test/Integration/Model/OrderManager.php b/src/Test/Integration/Model/OrderManager.php
similarity index 100%
rename from Test/Integration/Model/OrderManager.php
rename to src/Test/Integration/Model/OrderManager.php
diff --git a/Test/Integration/OrderPublisherTest.php b/src/Test/Integration/OrderPublisherTest.php
similarity index 100%
rename from Test/Integration/OrderPublisherTest.php
rename to src/Test/Integration/OrderPublisherTest.php
diff --git a/Test/Integration/ProductPublisherTest.php b/src/Test/Integration/ProductPublisherTest.php
similarity index 100%
rename from Test/Integration/ProductPublisherTest.php
rename to src/Test/Integration/ProductPublisherTest.php
diff --git a/Test/Unit/Plugin/Magento/SalesRule/Model/RulesApplier/ValidateByTokenTest.php b/src/Test/Unit/Plugin/Magento/SalesRule/Model/RulesApplier/ValidateByTokenTest.php
similarity index 100%
rename from Test/Unit/Plugin/Magento/SalesRule/Model/RulesApplier/ValidateByTokenTest.php
rename to src/Test/Unit/Plugin/Magento/SalesRule/Model/RulesApplier/ValidateByTokenTest.php
diff --git a/Ui/DataProvider/MessageQueue/ListingDataProvider.php b/src/Ui/DataProvider/MessageQueue/ListingDataProvider.php
similarity index 100%
rename from Ui/DataProvider/MessageQueue/ListingDataProvider.php
rename to src/Ui/DataProvider/MessageQueue/ListingDataProvider.php
diff --git a/composer.json b/src/composer.json
similarity index 86%
rename from composer.json
rename to src/composer.json
index 3f5badc..65938ea 100755
--- a/composer.json
+++ b/src/composer.json
@@ -19,6 +19,9 @@
],
"psr-4": {
"Grin\\Module\\": ""
- }
+ },
+ "exclude-from-classmap": [
+ "/Test/"
+ ]
}
}
diff --git a/composer.lock b/src/composer.lock
similarity index 100%
rename from composer.lock
rename to src/composer.lock
diff --git a/etc/acl.xml b/src/etc/acl.xml
similarity index 100%
rename from etc/acl.xml
rename to src/etc/acl.xml
diff --git a/etc/adminhtml/di.xml b/src/etc/adminhtml/di.xml
similarity index 100%
rename from etc/adminhtml/di.xml
rename to src/etc/adminhtml/di.xml
diff --git a/etc/adminhtml/menu.xml b/src/etc/adminhtml/menu.xml
similarity index 100%
rename from etc/adminhtml/menu.xml
rename to src/etc/adminhtml/menu.xml
diff --git a/etc/adminhtml/routes.xml b/src/etc/adminhtml/routes.xml
similarity index 100%
rename from etc/adminhtml/routes.xml
rename to src/etc/adminhtml/routes.xml
diff --git a/etc/adminhtml/system.xml b/src/etc/adminhtml/system.xml
similarity index 100%
rename from etc/adminhtml/system.xml
rename to src/etc/adminhtml/system.xml
diff --git a/etc/communication.xml b/src/etc/communication.xml
similarity index 100%
rename from etc/communication.xml
rename to src/etc/communication.xml
diff --git a/etc/config.xml b/src/etc/config.xml
similarity index 100%
rename from etc/config.xml
rename to src/etc/config.xml
diff --git a/etc/db_schema.xml b/src/etc/db_schema.xml
similarity index 100%
rename from etc/db_schema.xml
rename to src/etc/db_schema.xml
diff --git a/etc/db_schema_whitelist.json b/src/etc/db_schema_whitelist.json
similarity index 100%
rename from etc/db_schema_whitelist.json
rename to src/etc/db_schema_whitelist.json
diff --git a/etc/di.xml b/src/etc/di.xml
similarity index 100%
rename from etc/di.xml
rename to src/etc/di.xml
diff --git a/etc/events.xml b/src/etc/events.xml
similarity index 100%
rename from etc/events.xml
rename to src/etc/events.xml
diff --git a/etc/extension_attributes.xml b/src/etc/extension_attributes.xml
similarity index 100%
rename from etc/extension_attributes.xml
rename to src/etc/extension_attributes.xml
diff --git a/etc/module.xml b/src/etc/module.xml
similarity index 100%
rename from etc/module.xml
rename to src/etc/module.xml
diff --git a/etc/queue.xml b/src/etc/queue.xml
similarity index 100%
rename from etc/queue.xml
rename to src/etc/queue.xml
diff --git a/etc/queue_consumer.xml b/src/etc/queue_consumer.xml
similarity index 100%
rename from etc/queue_consumer.xml
rename to src/etc/queue_consumer.xml
diff --git a/etc/queue_publisher.xml b/src/etc/queue_publisher.xml
similarity index 100%
rename from etc/queue_publisher.xml
rename to src/etc/queue_publisher.xml
diff --git a/etc/queue_topology.xml b/src/etc/queue_topology.xml
similarity index 100%
rename from etc/queue_topology.xml
rename to src/etc/queue_topology.xml
diff --git a/etc/webapi.xml b/src/etc/webapi.xml
similarity index 100%
rename from etc/webapi.xml
rename to src/etc/webapi.xml
diff --git a/etc/webapi_rest/di.xml b/src/etc/webapi_rest/di.xml
similarity index 100%
rename from etc/webapi_rest/di.xml
rename to src/etc/webapi_rest/di.xml
diff --git a/i18n/en_US.csv b/src/i18n/en_US.csv
similarity index 100%
rename from i18n/en_US.csv
rename to src/i18n/en_US.csv
diff --git a/phpunit.xml b/src/phpunit.xml
similarity index 66%
rename from phpunit.xml
rename to src/phpunit.xml
index 0d3589e..6150d23 100644
--- a/phpunit.xml
+++ b/src/phpunit.xml
@@ -7,17 +7,17 @@
stderr="true">
- ../../../vendor/grin/module/Test/Unit
+ app/code/Grin/Module/Test/Unit
- ../../../vendor/grin/module
+ app/code/Grin/Module
- ../../../lib/internal/*/*/Test
- ../../../lib/internal/*/*/*/Test
- ../../../setup/src/*/*/Test
+ lib/internal/*/*/Test
+ lib/internal/*/*/*/Test
+ setup/src/*/*/Test
diff --git a/registration.php b/src/registration.php
similarity index 100%
rename from registration.php
rename to src/registration.php
diff --git a/view/adminhtml/layout/grin_module_queue_messages.xml b/src/view/adminhtml/layout/grin_module_queue_messages.xml
similarity index 100%
rename from view/adminhtml/layout/grin_module_queue_messages.xml
rename to src/view/adminhtml/layout/grin_module_queue_messages.xml
diff --git a/view/adminhtml/ui_component/grin_module_queue_messages.xml b/src/view/adminhtml/ui_component/grin_module_queue_messages.xml
similarity index 100%
rename from view/adminhtml/ui_component/grin_module_queue_messages.xml
rename to src/view/adminhtml/ui_component/grin_module_queue_messages.xml
diff --git a/view/adminhtml/ui_component/sales_rule_form.xml b/src/view/adminhtml/ui_component/sales_rule_form.xml
similarity index 100%
rename from view/adminhtml/ui_component/sales_rule_form.xml
rename to src/view/adminhtml/ui_component/sales_rule_form.xml
diff --git a/view/frontend/layout/checkout_cart_index.xml b/src/view/frontend/layout/checkout_cart_index.xml
similarity index 100%
rename from view/frontend/layout/checkout_cart_index.xml
rename to src/view/frontend/layout/checkout_cart_index.xml
diff --git a/view/frontend/layout/checkout_onepage_success.xml b/src/view/frontend/layout/checkout_onepage_success.xml
similarity index 100%
rename from view/frontend/layout/checkout_onepage_success.xml
rename to src/view/frontend/layout/checkout_onepage_success.xml
diff --git a/view/frontend/layout/default.xml b/src/view/frontend/layout/default.xml
similarity index 100%
rename from view/frontend/layout/default.xml
rename to src/view/frontend/layout/default.xml
diff --git a/view/frontend/templates/affiliate/footer.phtml b/src/view/frontend/templates/affiliate/footer.phtml
similarity index 100%
rename from view/frontend/templates/affiliate/footer.phtml
rename to src/view/frontend/templates/affiliate/footer.phtml
diff --git a/view/frontend/templates/affiliate/success.phtml b/src/view/frontend/templates/affiliate/success.phtml
similarity index 100%
rename from view/frontend/templates/affiliate/success.phtml
rename to src/view/frontend/templates/affiliate/success.phtml
diff --git a/view/frontend/templates/checkout/cart-id.phtml b/src/view/frontend/templates/checkout/cart-id.phtml
similarity index 100%
rename from view/frontend/templates/checkout/cart-id.phtml
rename to src/view/frontend/templates/checkout/cart-id.phtml
diff --git a/view/frontend/web/css/source/_module.less b/src/view/frontend/web/css/source/_module.less
similarity index 100%
rename from view/frontend/web/css/source/_module.less
rename to src/view/frontend/web/css/source/_module.less