Skip to content

[TASK] Update devtheorem/php-handlebars to v2#35

Merged
eliashaeussler merged 2 commits into
mainfrom
renovate/devtheorem-php-handlebars-2.x
Apr 28, 2026
Merged

[TASK] Update devtheorem/php-handlebars to v2#35
eliashaeussler merged 2 commits into
mainfrom
renovate/devtheorem-php-handlebars-2.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented Apr 28, 2026

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
devtheorem/php-handlebars ^1.0^1.0 || ^2.0 age adoption passing confidence

Release Notes

devtheorem/php-handlebars (devtheorem/php-handlebars)

v2.0.0

Compare Source

Added
  • compat compile option to enable recursive field lookup. When set to true, if a template variable is not
    found in the current scope it will automatically be looked up in parent scopes, matching Mustache's behavior.
  • Official Mustache spec tests are now run to verify compat functionality.
  • partialResolver runtime option: a Closure(string $name): ?Closure called lazily the first time each
    unresolved partial is called. This replaces the previous compile-time partialResolver option.
Changed
  • Improved compiler performance and reduced memory usage by simplifying internal state.
  • Optimized rendering of indented partials.
Removed
  • partials and partialResolver compile-time options. These options baked partials into the generated PHP closure,
    causing each partial to be recompiled and duplicated across every template that referenced it.
    Partials should now be supplied when invoking a template via the partials or partialResolver runtime options.

    Upgrade: if you were passing partials via Options, move them to the runtime options instead:

    // Before
    $template = Handlebars::compile($source, new Options(
        partials: ['footer' => '<footer>...</footer>'],
        partialResolver: fn($name) => loadTemplate($name),
    ));
    echo $template($data);
    
    // After
    $template = Handlebars::compile($source);
    echo $template($data, [
        'partials' => ['footer' => Handlebars::compile('<footer>...</footer>')],
        'partialResolver' => fn($name) => Handlebars::compile(loadTemplate($name)),
    ]);

    This change makes it possible to precompile all partials in a directory, and then lazily import them
    on first use for optimal performance. See the example in the readme.

Fixed
  • Failure to invoke @data variables containing a closure when passed to if or unless helpers.
  • Hoisted block closures leaked into the caller's scope when a precompiled template was loaded via include/require.
  • Hash arguments passed to a partial were ignored when the partial was invoked in certain non-array contexts.
  • Block helpers returning a nested or non-list array were not stringified correctly.
  • Partials with literal names ({{> true}}, {{> false}}, {{> null}}, {{> undefined}}) were not
    resolved correctly: boolean names caused a type error, and null/undefined silently rendered nothing.

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • Monday through Friday (* * * * 1-5)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

| datasource | package                   | from  | to    |
| ---------- | ------------------------- | ----- | ----- |
| packagist  | devtheorem/php-handlebars | 1.2.3 | 2.0.0 |
@renovate renovate Bot added the dependencies Updates project dependencies label Apr 28, 2026
@renovate
Copy link
Copy Markdown
Contributor Author

renovate Bot commented Apr 28, 2026

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: composer.lock
Command failed: composer update devtheorem/php-handlebars:2.0.0 --with-dependencies --ignore-platform-req ext-intl --no-ansi --no-interaction --no-scripts --no-autoloader --no-plugins --minimal-changes
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires devtheorem/php-handlebars ^1.0 || ^2.0, found devtheorem/php-handlebars[v1.0.0, ..., v1.2.3, v2.0.0] but these were not loaded, likely because it conflicts with another require.
  Problem 2
    - Root composer.json requires cpsit/typo3-handlebars ^1.0 -> satisfiable by cpsit/typo3-handlebars[1.x-dev (alias of dev-main)].
    - cpsit/typo3-handlebars dev-main requires devtheorem/php-handlebars ^1.1 -> found devtheorem/php-handlebars[v1.1.0, ..., v1.2.3] but it conflicts with your temporary update constraint (devtheorem/php-handlebars:2.0.0).
    - cpsit/typo3-handlebars 1.x-dev is an alias of cpsit/typo3-handlebars dev-main and thus requires it to be installed too.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Apr 28, 2026

Coverage Report for CI Build 25041895880

Coverage remained the same at 0.556%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 1258
Covered Lines: 7
Line Coverage: 0.56%
Coverage Strength: 0.02 hits per line

💛 - Coveralls

@renovate
Copy link
Copy Markdown
Contributor Author

renovate Bot commented Apr 28, 2026

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

@eliashaeussler eliashaeussler force-pushed the renovate/devtheorem-php-handlebars-2.x branch from 1caa563 to 2d5e762 Compare April 28, 2026 08:18
@eliashaeussler eliashaeussler merged commit 253c475 into main Apr 28, 2026
11 checks passed
@eliashaeussler eliashaeussler deleted the renovate/devtheorem-php-handlebars-2.x branch April 28, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Updates project dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants