Skip to content

chore(deps): bump latte/latte from 3.1.2 to 3.1.4#28

Open
dependabot[bot] wants to merge 1 commit intomasterfrom
dependabot/composer/latte/latte-3.1.4
Open

chore(deps): bump latte/latte from 3.1.2 to 3.1.4#28
dependabot[bot] wants to merge 1 commit intomasterfrom
dependabot/composer/latte/latte-3.1.4

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github Apr 23, 2026

Bumps latte/latte from 3.1.2 to 3.1.4.

Release notes

Sourced from latte/latte's releases.

Released version 3.1.4

  • Range – a new Latte\Compiler\Range class (extending Position with a length) gives every token and parser node a precise source span instead of just a starting position, unlocking richer tooling and editor integrations
  • StatementNode::$tagRanges – statement nodes now expose exact byte ranges for their opening and closing tags, making it straightforward to map compiled output back to the original template
  • |limit accepts strings – the |limit filter now works on strings too, so you can trim text the same way you slice arrays
  • {dedent} – fixed inline content handling and atLineStart tracking; the logic moved into a dedicated Dedent class with considerably more test coverage (#412, #413, #414)
  • PhpHelpers::checkCode()proc_open now uses array syntax for the PHP binary path, so installations where the interpreter lives in a directory with spaces no longer break (#415)
  • TemplateGenerator – stopped emitting the /** source */ comment for multi-line template names, which could produce broken PHP
  • {switch} – a {case} with a single value now compiles to === instead of in_array(), producing faster and cleaner generated PHP

Released version 3.1.3

Latte 3.1.3 brings two powerful new engine features – automatic dedentation and scoped loop variables – alongside a fresh batch of filters that make everyday template work smoother.

✨ New Features

  • Feature::Dedent – removes structural indentation from paired tag content, so your generated HTML stays clean regardless of how deeply you nest your Latte tags
  • Feature::ScopedLoopVariables – variables introduced by {foreach} now live only inside the loop body, preventing accidental leaks into the surrounding scope (supports destructuring via ListNode too)
  • |commas filter – joins array elements with , and supports a custom last-item glue (e.g. {$items|commas:' and '}a, b and c)
  • |column filter – extracts values from a single column of a multidimensional array or iterable, mirroring PHP's array_column()
  • |limit filter – a friendlier wrapper around |slice with swapped arguments: limit first, offset second, and keys preserved by default
  • |slice – now works with iterators, not just arrays and strings
  • |padLeft, |padRight – now accept int|float values in addition to strings (#408)

♻️ Code Refactoring

  • Helpers::sortBeforeAfter() – reimplemented using Kahn's algorithm for topological sorting, making extension ordering both faster and more correct
  • Engine::addDefaultExtensions() – extracted into its own method for better extensibility
Commits
  • 18eee40 Released version 3.1.4
  • ad07faf PrintContext: added optional $escaper parameter to constructor
  • 292e987 TemplateGenerator: don't emit /** source */ comment for multi-line names
  • 6e74e2b SwitchNode: generate === instead of in_array() for single-value {case}
  • 666a3c9 generated templates: moved declare(strict_types=1) to the same line as <?php
  • 0af999d StatementNode: added tagRanges
  • 0a71c2c added Range
  • 5565ecc improved TagParser::parseType()
  • 0d27878 Dedent: fixed inline content and atLineStart tracking [Closes #412][Closes #4...
  • 906c762 PhpHelpers::checkCode: fixed proc_open to use array syntax for PHP binary pat...
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [latte/latte](https://github.com/nette/latte) from 3.1.2 to 3.1.4.
- [Release notes](https://github.com/nette/latte/releases)
- [Commits](nette/latte@v3.1.2...3.1.4)

---
updated-dependencies:
- dependency-name: latte/latte
  dependency-version: 3.1.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file php Pull requests that update php code labels Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file php Pull requests that update php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants