Skip to content
Merged
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
4 changes: 3 additions & 1 deletion .github/workflows/behavioural_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,7 @@ jobs:
run: ./run_behat_tests.sh && make behat-js-quiet

- name: Upload Behat logs
run: ./bin/upload-textfiles "var/log/behat-reports/*.html"
run: |
ls -als "var/log/behat-reports/"
./bin/upload-textfiles "var/log/behat-reports/*.log"
if: always()
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"symfony/dependency-injection": "^5.1",
"symfony/dotenv": "^5.1",
"symfony/expression-language": "^5.1",
"symfony/flex": "^1.9",
"symfony/flex": "1.13.*",
"symfony/form": "^5.1",
"symfony/framework-bundle": "^5.1",
"symfony/http-client": "^5.1",
Expand Down
10 changes: 9 additions & 1 deletion src/Widget/CacheTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,22 @@ public function __invoke(array $params = []): ?string
throw new WidgetException('Widget of class ' . self::class . ' is not initialised properly. Make sure the Widget `implements CacheAwareInterface`.');
}

return $this->cache->get(
$result = $this->cache->get(
$this->key,
function (ItemInterface $item) use ($params) {
$item->expiresAfter($this->getCacheDuration());

return $this->run($params);
}
);

// @TODO This shouldn't be required, because it _should_ already be a string, but apparently
// it isn't. See the screenshot attached to https://github.com/bolt/core/pull/2786
if (is_array($result)) {
$result = implode('', $result);
}

return $result;
}

private function createKey()
Expand Down
15 changes: 15 additions & 0 deletions symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@
"composer/composer": {
"version": "1.9.3"
},
"composer/metadata-minifier": {
"version": "1.0.0"
},
"composer/package-versions-deprecated": {
"version": "1.11.99"
},
Expand Down Expand Up @@ -160,6 +163,9 @@
"doctrine/dbal": {
"version": "v2.10.1"
},
"doctrine/deprecations": {
"version": "v0.5.3"
},
"doctrine/doctrine-bundle": {
"version": "2.0",
"recipe": {
Expand Down Expand Up @@ -350,6 +356,9 @@
"league/glide-symfony": {
"version": "1.0.3"
},
"league/mime-type-detection": {
"version": "1.7.0"
},
"miljar/php-exif": {
"version": "v0.6.5"
},
Expand Down Expand Up @@ -897,6 +906,9 @@
"symfony/options-resolver": {
"version": "v4.4.4"
},
"symfony/password-hasher": {
"version": "v5.3.4"
},
"symfony/polyfill-ctype": {
"version": "v1.14.0"
},
Expand Down Expand Up @@ -927,6 +939,9 @@
"symfony/polyfill-php80": {
"version": "v1.17.0"
},
"symfony/polyfill-php81": {
"version": "v1.23.0"
},
"symfony/process": {
"version": "v4.4.4"
},
Expand Down