Skip to content

Commit 332ff32

Browse files
committed
Adding support for actually testing config blocks
1 parent 1859eb3 commit 332ff32

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.github/workflows/code-blocks.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,23 @@ jobs:
4444
cd ../_checker
4545
composer install
4646
47+
- name: Install test application
48+
if: ${{ steps.find-files.outputs.files }}
49+
run: |
50+
git clone -b ${{ github.base_ref }} --depth 5 --single-branch https://github.com/symfony-docs-tools/symfony-application.git ../_sf_app
51+
cd ../_sf_app
52+
composer update
53+
4754
- name: Generate baseline
4855
if: ${{ steps.find-files.outputs.files }}
4956
run: |
5057
CURRENT=$(git rev-parse HEAD)
5158
git checkout -m ${{ github.base_ref }}
52-
../_checker/code-block-checker.php verify:docs `pwd` ${{ steps.find-files.outputs.files }} --generate-baseline=baseline.json
59+
../_checker/code-block-checker.php verify:docs `pwd` ${{ steps.find-files.outputs.files }} --generate-baseline=baseline.json --symfony-application=`realpath ../_sf_app`
5360
git checkout -m $CURRENT
5461
cat baseline.json
5562
5663
- name: Verify examples
5764
if: ${{ steps.find-files.outputs.files }}
5865
run: |
59-
../_checker/code-block-checker.php verify:docs `pwd` ${{ steps.find-files.outputs.files }} --baseline=baseline.json --output-format=github
66+
../_checker/code-block-checker.php verify:docs `pwd` ${{ steps.find-files.outputs.files }} --baseline=baseline.json --output-format=github --symfony-application=`realpath ../_sf_app`

cache.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The following example shows a typical usage of the cache::
1515
// The callable will only be executed on a cache miss.
1616
$value = $pool->get('my_cache_key', function (ItemInterface $item) {
1717
$item->expiresAfter(3600);
18-
'abc'
18+
1919
// ... do some HTTP request or heavy computations
2020
$computedValue = 'foobar';
2121

@@ -63,7 +63,7 @@ adapter (template) they use by using the ``app`` and ``system`` key like:
6363
6464
# config/packages/cache.yaml
6565
framework:
66-
cache:
66+
caxche:
6767
app: cache.adapter.filesystem
6868
system: cache.adapter.system
6969

0 commit comments

Comments
 (0)