Skip to content

Commit

Permalink
Run with shop 8.0.x and facts spike
Browse files Browse the repository at this point in the history
  • Loading branch information
hkreuter committed Dec 18, 2024
1 parent e15cf86 commit 4dd7feb
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dispatch_module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
- 'PHP8.3/MySQL5.7'
- 'PHP8.3/MySQL8.0'
- 'PHP8.3/MariaDb11'
default: 'PHP8.2/MySQL5.7'
default: 'PHP8.3/MySQL8.0'
description: 'Limit to one PHP/MySQL combination'

jobs:
Expand All @@ -40,7 +40,7 @@ jobs:
;;
esac
# shellcheck disable=SC2088
TESTPLAN="~/defaults/7.3.x.yaml,${LIMIT}~/graphql-base.yaml"
TESTPLAN="~/defaults/8.0.x.yaml,${LIMIT}~/graphql-base.yaml"
echo "testplan=${TESTPLAN}" | tee -a "${GITHUB_OUTPUT}"
dispatch_stable:
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG-v10.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Undecided] - unrelreased
## [Undecided] - unreleased

## Changed
- Update module to work with OXID eShop 8.0

## [Undecided] - unreleased

## Changed
- Update module to work with OXID eShop 7.3
Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@
"symfony/cache": "*",
"ecodev/graphql-upload": "^7.0.0",
"laminas/laminas-diactoros": "^2.5",
"myclabs/php-enum": "^1.8"
"myclabs/php-enum": "^1.8",
"oxid-esales/oxideshop-facts": "dev-b-8.0.x-compatibility-OXDEV-7248"
},
"require-dev": {
"phpunit/phpunit": "^10.4",
"ext-xdebug": "*",
"oxid-esales/oxideshop-ce": "dev-b-7.3.x",
"oxid-esales/oxideshop-ce": "dev-b-8.0.x",
"phpstan/phpstan": "^1.10",
"squizlabs/php_codesniffer": "3.*",
"phpmd/phpmd": "^2.11",
Expand All @@ -27,7 +28,7 @@
"codeception/module-phpbrowser": "*",
"codeception/module-db": "*",
"codeception/codeception": "^5.0",
"oxid-esales/codeception-modules": "dev-b-7.3.x",
"oxid-esales/codeception-modules": "dev-b-8.0.x",
"codeception/module-asserts": "^3.0"
},
"conflict": {
Expand Down
16 changes: 9 additions & 7 deletions tests/Codeception/Config/CodeceptionParametersProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

namespace OxidEsales\GraphQL\Base\Tests\Codeception\Config;

use OxidEsales\Codeception\Module\Database;
use OxidEsales\Codeception\Module\Database\DatabaseDefaultsFileGenerator;
use OxidEsales\Facts\Config\ConfigFile;
use OxidEsales\Facts\Facts;
use Symfony\Component\Filesystem\Path;

Expand All @@ -35,7 +35,7 @@ public function getParameters(): array
'DB_HOST' => $facts->getDatabaseHost(),
'DB_PORT' => $facts->getDatabasePort(),
'MODULE_DUMP_PATH' => $this->getModuleTestDataDumpFilePath(),
'MYSQL_CONFIG_PATH' => $this->getMysqlConfigPath(),
'MYSQL_CONFIG_PATH' => $this->generateMysqlStarUpConfigurationFile(),
'PHP_BIN' => $php,
];
}
Expand All @@ -45,14 +45,16 @@ private function getModuleTestDataDumpFilePath()
return Path::join(__DIR__, '..', 'Support', 'Data', 'dump.sql');
}

private function getMysqlConfigPath()
private function generateMysqlStarUpConfigurationFile(): string
{
$facts = new Facts();
$configFile = new ConfigFile($facts->getSourcePath() . '/config.inc.php');

$generator = new DatabaseDefaultsFileGenerator($configFile);

return $generator->generate();
return Database::generateStartupOptionsFile(
$facts->getDatabaseUserName(),
$facts->getDatabasePassword(),
$facts->getDatabaseHost(),
$facts->getDatabasePort(),
);
}
}

Expand Down

0 comments on commit 4dd7feb

Please sign in to comment.