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

Restire possibility to configure 'table groups' + added container for building #84

Closed
wants to merge 1 commit into from
Closed
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
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

build: magedbm2.phar

build-in-container:
docker-compose run --rm build /bin/bash -c "cd /var/www/html && make build"

clean:
rm -rf vendor box.phar composer.phar magedbm2.phar

Expand Down
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: "3.9"
services:
build:
image: docker.io/php:8.0.30-cli

container_name: magedbm_build
volumes:
- ./:/var/www/html
17 changes: 0 additions & 17 deletions src/Application/ConfigLoader/FileLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ public function asConfig()
try {
$values = Yaml::parseFile($this->filePath);

if (is_array($values) && !$this->validateYamlVariables($values)) {
$this->configurationError();
}

if (is_array($values)) {
$values = $this->formatConfigVariableNames($values);
}
Expand All @@ -48,19 +44,6 @@ public function asConfig()
}
}

// yaml doesn't like variable names with hyphens (https://github.com/Space48/magedbm2/issues/21)
private function validateYamlVariables(array $variables)
{
$isValidYaml = true;
foreach ($variables as $variableName => $variableValue) {
if (strpos($variableName, '-') !== false) {
$isValidYaml = false;
break;
}
}
return $isValidYaml;
}

private function formatConfigVariableNames(array $variables)
{
foreach ($variables as $variableName => $variableValue) {
Expand Down
Loading