-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from Adyen/develop
Release 1.2.2
- Loading branch information
Showing
23 changed files
with
482 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,15 +15,54 @@ jobs: | |
php-version: [8.2,8.3] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Use PHP ${{ matrix.php-version }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
tools: composer:v1 | ||
tools: composer:v2 | ||
|
||
- name: Define Hyvä Checkout repositories | ||
run: | | ||
composer config repositories.hyva-themes/hyva-checkout git [email protected]:hyva-checkout/checkout.git | ||
composer config repositories.hyva-themes/magento2-theme-module git [email protected]:hyva-themes/magento2-theme-module.git | ||
composer config repositories.hyva-themes/magento2-reset-theme git [email protected]:hyva-themes/magento2-reset-theme.git | ||
composer config repositories.hyva-themes/magento2-email-theme git [email protected]:hyva-themes/magento2-email-module.git | ||
composer config repositories.hyva-default-theme git [email protected]:hyva-themes/magento2-default-theme.git | ||
- name: Configure SSH access to Hyvä Gitlab | ||
env: | ||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | ||
HYVA_GITLAB_SSH_KEY: ${{ secrets.GITLAB_SSH_KEY }} | ||
run: | | ||
mkdir -p ~/.ssh | ||
ssh-keyscan gitlab.hyva.io >> ~/.ssh/known_hosts | ||
echo "${HYVA_GITLAB_SSH_KEY}" > ~/.ssh/hyva_id_rsa | ||
chmod 600 ~/.ssh/hyva_id_rsa | ||
ssh-agent -a ${SSH_AUTH_SOCK} > /dev/null | ||
ssh-add ~/.ssh/hyva_id_rsa | ||
- name: Install the plugin | ||
run: | | ||
echo "{\"http-basic\":{\"repo.magento.com\":{\"username\":\"${MAGENTO_USERNAME}\",\"password\":\"${MAGENTO_PASSWORD}\"}}}" > auth.json | ||
composer install --prefer-dist | ||
env: | ||
CI: true | ||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | ||
MAGENTO_USERNAME: ${{ secrets.MAGENTO_USERNAME }} | ||
MAGENTO_PASSWORD: ${{ secrets.MAGENTO_PASSWORD }} | ||
|
||
- name: Code Sniffer | ||
run: vendor/bin/phpcs . | ||
|
||
- name: Run PHPUnit | ||
run: vendor/bin/phpunit --coverage-clover=build/clover.xml --log-junit=build/tests-log.xml -c Test/phpunit.xml Test/Unit | ||
|
||
- name: Fix code coverage paths | ||
run: sed -i "s;`pwd`/;;g" build/*.xml | ||
|
||
- name: SonarCloud Scan | ||
if: ${{ env.SONAR_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Adyen\Hyva\Model; | ||
|
||
use Magento\Checkout\Model\ConfigProviderInterface; | ||
class CompositeConfigProvider implements ConfigProviderInterface | ||
{ | ||
/** | ||
* @param array $configProviders | ||
*/ | ||
public function __construct( | ||
private readonly array $configProviders | ||
) { } | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public function getConfig(): array | ||
{ | ||
$config = []; | ||
|
||
foreach ($this->configProviders as $configProvider) { | ||
$config = array_merge_recursive($config, $configProvider->getConfig()); | ||
} | ||
|
||
return $config; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.