The rest of the language

Constructs the first showcase left out, plus the three plugin features that are easiest to miss.

On this deck

  • The rest of the language
  • Tabs
  • Code groups
  • Details, folded away
  • A table with block content
  • Spoilers and swatches
  • Diffs and line numbers
  • Code with callouts
  • Auto-animate
  • Auto-animate, grown
  • Containers as real elements
  • When a slide is broken
  • That is the language

Tabs

The upgrade runs, and half the finders are gone.

  • No error, no exit code
  • Only the tables with a behavior

--extension tabs. Any block goes in a tab: prose, a table, a list, a quote. Up and down switch tabs, left and right stay with the deck.

Code groups

composer require cakephp/cakephp:^5.2
{ "require": { "cakephp/cakephp": "^5.2" } }
$this->addPlugin('Migrations');

--extension codeGroup. One block per file, switched on screen and unfolded in the PDF.

Details, folded away

Details

The long version of why buffering changed

5.0 always buffered result sets, which raised memory on large exports. 5.1 brought back disableBufferedResults().

Useful for the question you only sometimes get asked.

A table with block content

StepCommandGuards it
Deprecations
bin/cake upgrade rector --rules cakephp45 src
Tests
The jump
composer update -W
Tests, PHPStan

Spoilers and swatches

The answer to “how long does the upgrade take” is as long as your test suite is short.

Palette: #d33c43 accent, #1f7a4d success, #6b7280 muted.

Diffs and line numbers

  let icon = document.querySelector('li.file-entry > span.icon');
- icon.classList.add('icon-file-text');
+ icon.classList.remove('icon-file-text');
$table->updateQuery()
    ->set(['published' => true])
    ->execute();

{.diff} colours the changed lines, {data-line-numbers} numbers them. Both are plain Carve attribute lines.

Code with callouts

$query = $this->Articles->selectQuery();   1
$query->contain(['Authors'])               2
    ->where(['published' => true]);
  1. One query type, so the IDE and PHPStan know what comes next.
  2. Eager loading, which is the whole point of the slide.

--extension codeCallouts. The markers bind to the list under the block.

Auto-animate

One idea

Auto-animate, grown

One idea, moved and grown

Two slides, both with %% animate, and the same data-id on the element that should travel. Without that id reveal has nothing to pair, because the text differs.

Containers as real elements

Built with --element card=figure

This box is a <figure> in the output, while the source stays {.card} plus a container.

When a slide is broken

A source error does not shorten the deck silently. It renders a slide carrying the engine’s message, so you see it on the projector instead of wondering where slide nine went. --strict fails the build instead.

That is the language

Still no raw HTML.