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

Add github actions, DEV-362 #10

Merged
merged 34 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
6cc9931
Add github actions, DEV-362
RanaMuhammadIrshad Jan 31, 2024
142de67
Improve code, DEV-362
RanaMuhammadIrshad Feb 1, 2024
10e1283
Ignore error, DEV-362
RanaMuhammadIrshad Feb 1, 2024
91e4e83
Ignore error code improve, DEV-362
RanaMuhammadIrshad Feb 1, 2024
ffb5c24
Ignore next line, DEV-362
RanaMuhammadIrshad Feb 1, 2024
4db4223
Improve code to handle errors, DEV-362
RanaMuhammadIrshad Feb 1, 2024
ce80953
Handle errors in mageworx, DEV-362
RanaMuhammadIrshad Feb 2, 2024
1872058
Improve errors in mageworx, DEV-362
RanaMuhammadIrshad Feb 2, 2024
9cfdc16
Improve mageworx code, DEV-362
RanaMuhammadIrshad Feb 2, 2024
134ca75
Improve mageworx code structure, DEV-362
RanaMuhammadIrshad Feb 2, 2024
be79461
Fix indentation, DEV-362
RanaMuhammadIrshad Feb 7, 2024
0adbbe6
Improve indentation, DEV-362
RanaMuhammadIrshad Feb 7, 2024
50e8d1a
Improve indentation once more, DEV-362
RanaMuhammadIrshad Feb 7, 2024
96225be
Improve code, DEV-362
RanaMuhammadIrshad Feb 7, 2024
19cd89c
Change file location, DEV-362
RanaMuhammadIrshad Feb 9, 2024
08fb37b
Change file location to normal, DEV-362
RanaMuhammadIrshad Feb 10, 2024
a10890b
Change in composer.json, DEV-362
RanaMuhammadIrshad Feb 10, 2024
577deff
Add else statement, DEV-362
RanaMuhammadIrshad Feb 10, 2024
436a731
Remove else statement, DEV-362
RanaMuhammadIrshad Feb 10, 2024
e4a24a9
Remove changes in di.xml, DEV-362
RanaMuhammadIrshad Feb 10, 2024
8e0faa6
Check if class exists, DEV-362
RanaMuhammadIrshad Feb 10, 2024
7a32a44
Improve code if class exists, DEV-362
RanaMuhammadIrshad Feb 10, 2024
aeae369
Improve class exists, DEV-362
RanaMuhammadIrshad Feb 10, 2024
13739f1
Improve class exists, DEV-362
RanaMuhammadIrshad Feb 10, 2024
e5e2614
Improve class exists, DEV-362
RanaMuhammadIrshad Feb 10, 2024
50e1645
Improve class exists, DEV-362
RanaMuhammadIrshad Feb 10, 2024
74c43d3
Improve class exists, DEV-362
RanaMuhammadIrshad Feb 10, 2024
7ed5ef7
Improve class exists, DEV-362
RanaMuhammadIrshad Feb 10, 2024
5ee19ba
Fix phpstan error, DEV-362
RanaMuhammadIrshad Feb 28, 2024
115bc4d
Add unified github actions, DEV-362
RanaMuhammadIrshad Jun 4, 2024
497df8a
Update php version, DEV-362
RanaMuhammadIrshad Jun 4, 2024
acae034
Merge remote-tracking branch 'refs/remotes/origin/master' into DEV-36…
RanaMuhammadIrshad Jun 4, 2024
bfe00d9
Ignore phpcs, DEV-362
RanaMuhammadIrshad Jun 4, 2024
c075dad
Improve code, DEV-362
RanaMuhammadIrshad Jun 5, 2024
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
6 changes: 6 additions & 0 deletions .github/workflows/coding-standard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: ExtDN M2 Coding Standard
on: [push, pull_request]

jobs:
phpcs:
uses: customgento/m2-github-actions/.github/workflows/coding-standard.yml@main
9 changes: 9 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: ExtDN M2 Integration
on: [push, pull_request]

jobs:
integration:
uses: customgento/m2-github-actions/.github/workflows/integration.yml@main
with:
module_name: CustomGento_DefaultStoreCodeRemover
composer_name: customgento/module-default-store-code-remover-m2
6 changes: 6 additions & 0 deletions .github/workflows/mess-detector.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: ExtDN M2 Mess Detector
on: [push, pull_request]

jobs:
phpmd:
uses: customgento/m2-github-actions/.github/workflows/mess-detector.yml@main
8 changes: 8 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: ExtDN M2 PHPStan
on: [push, pull_request]

jobs:
phpstan:
uses: customgento/m2-github-actions/.github/workflows/phpstan.yml@main
with:
composer_name: customgento/module-default-store-code-remover-m2
3 changes: 3 additions & 0 deletions Helper/StoreUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@

use Magento\Store\Api\Data\StoreInterface;
use Magento\Store\Model\Store;
/** @phpstan-ignore-next-line */
use MageWorx\SeoBase\Helper\StoreUrl as MageworxStoreUrl;

// phpcs:disable PSR1.Classes.ClassDeclaration.MultipleClasses

if (class_exists(MageworxStoreUrl::class)) {
class StoreUrl extends MageworxStoreUrl
{
Expand Down
24 changes: 17 additions & 7 deletions Test/Integration/CheckDefaultStoreCodeHiddenInUrlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function testStoreCodeIsShownInNonDefaultStoreUrl(): void
{
$store = $this->storeRepository->get('test');
$this->config->setValue(Store::XML_PATH_STORE_IN_URL, true, ScopeInterface::SCOPE_STORE, $store->getCode());
$this->assertContains('test', $store->getBaseUrl());
$this->assertStringContainsString('test', $store->getBaseUrl());
}

/**
Expand All @@ -47,21 +47,31 @@ public function testStoreCodeIsShownInNonDefaultStoreUrl(): void
public function testStoreCodeIsNotShownInNonDefaultStoreUrl(): void
{
$store = $this->storeRepository->get('test');
$this->config->setValue(Store::XML_PATH_STORE_IN_URL, false, ScopeInterface::SCOPE_STORE, $store->getCode());
$this->assertNotContains('test', $store->getBaseUrl());
$this->config->setValue(
Store::XML_PATH_STORE_IN_URL,
false,
ScopeInterface::SCOPE_STORE,
$store->getCode()
);
$this->assertStringNotContainsString('test', $store->getBaseUrl());
}

public function testStoreCodeIsNotShownInDefaultStoreUrl(): void
{
$store = $this->storeRepository->get('default');
$this->config->setValue(Store::XML_PATH_STORE_IN_URL, false, ScopeInterface::SCOPE_STORE, $store->getCode());
$this->assertNotContains('default', $store->getBaseUrl());
$this->config->setValue(
Store::XML_PATH_STORE_IN_URL,
false,
ScopeInterface::SCOPE_STORE,
$store->getCode()
);
$this->assertStringNotContainsString('default', $store->getBaseUrl());
}

public function testStoreCodeIsShownInDefaultStoreUrl(): void
{
$store = $this->storeRepository->get('default');
$this->config->setValue(Store::XML_PATH_STORE_IN_URL, true, ScopeInterface::SCOPE_STORE, $store->getCode());
$this->assertNotContains('default', $store->getBaseUrl());
$this->assertStringNotContainsString('default', $store->getBaseUrl());
}
}
}
Loading