Skip to content

Commit

Permalink
Fix circle-ci config + behat tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Hannes Giesenow committed Jun 20, 2022
1 parent 42e4de7 commit 60b9622
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
- checkout
- attach_workspace:
at: '.'
- run: 'sleep 10' # Wait for elasticsearch
- run: 'bin/console sulu:build dev -n'
- run: 'bin/console sulu:document:init'
- run: 'phpdbg -qrr -d memory_limit=-1 vendor/bin/behat --profile admin'
Expand Down
3 changes: 2 additions & 1 deletion doc/development.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
For local development you can use docker-compose.
```bash
docker-compose run php sh
docker-compose up -d
docker-compose exec php bash
composer install
bin/console sulu:build dev -n
bin/console sulu:document:init
Expand Down
2 changes: 1 addition & 1 deletion src/Context/AbstractPhpCrContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected function saveDocument(object $document, array $data, string $formType
}

/**
* @param array<string,mixed> $moduleData
* @param array<string|int,mixed> $moduleData
*/
protected function addModule(string $moduleName, string $blockName, array $moduleData, string $formType = PageDocumentType::class): void
{
Expand Down
8 changes: 4 additions & 4 deletions src/Context/AbstractSuluContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,19 @@ protected function getLocale(): string
/**
* Convert data with dot notation into nested array structure
*
* @param array<string,string> $data
* @return array<string,mixed>
* @param array<string|int,string> $data
* @return array<string|int,mixed>
*/
protected function expandData(array $data): array
{
$newData = [];
foreach ($data as $k => $v) {
// Plain key
if (false === strpos($k, '.')) {
if (false === strpos((string)$k, '.')) {
$newData[$k] = $this->replacePlaceholders($v);
continue;
}
$parts = explode('.', $k, 2);
$parts = explode('.', (string)$k, 2);
$deepStructure = $this->expandData([$parts[1] => $v]);
/** @var array<string,mixed> $existing */
$existing = $newData[$parts[0]] ?? [];
Expand Down

0 comments on commit 60b9622

Please sign in to comment.