Skip to content

Commit

Permalink
[BUGFIX] Respect extension configuration for helper registration
Browse files Browse the repository at this point in the history
  • Loading branch information
eliashaeussler committed Jan 7, 2025
1 parent d744729 commit 954f64e
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 10 deletions.
2 changes: 0 additions & 2 deletions Classes/Renderer/Helper/BlockHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

namespace Fr\Typo3Handlebars\Renderer\Helper;

use Fr\Typo3Handlebars\Attribute;
use Fr\Typo3Handlebars\Exception;
use Fr\Typo3Handlebars\Renderer;

Expand All @@ -34,7 +33,6 @@
* @license GPL-2.0-or-later
* @see https://github.com/shannonmoeller/handlebars-layouts#block-name
*/
#[Attribute\AsHelper('block')]
final readonly class BlockHelper implements HelperInterface
{
/**
Expand Down
2 changes: 0 additions & 2 deletions Classes/Renderer/Helper/ContentHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

namespace Fr\Typo3Handlebars\Renderer\Helper;

use Fr\Typo3Handlebars\Attribute;
use Fr\Typo3Handlebars\Renderer;
use Psr\Log;

Expand All @@ -34,7 +33,6 @@
* @license GPL-2.0-or-later
* @see https://github.com/shannonmoeller/handlebars-layouts#content-name-modeappendprependreplace
*/
#[Attribute\AsHelper('content')]
final readonly class ContentHelper implements HelperInterface
{
private const DEFAULT_MODE = Renderer\Component\Layout\HandlebarsLayoutActionMode::Replace;
Expand Down
2 changes: 0 additions & 2 deletions Classes/Renderer/Helper/ExtendHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

namespace Fr\Typo3Handlebars\Renderer\Helper;

use Fr\Typo3Handlebars\Attribute;
use Fr\Typo3Handlebars\Renderer;

/**
Expand All @@ -33,7 +32,6 @@
* @license GPL-2.0-or-later
* @see https://github.com/shannonmoeller/handlebars-layouts#extend-partial-context-keyvalue-
*/
#[Attribute\AsHelper('extend')]
final readonly class ExtendHelper implements HelperInterface
{
public function __construct(
Expand Down
2 changes: 0 additions & 2 deletions Classes/Renderer/Helper/RenderHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

namespace Fr\Typo3Handlebars\Renderer\Helper;

use Fr\Typo3Handlebars\Attribute;
use Fr\Typo3Handlebars\DataProcessing;
use Fr\Typo3Handlebars\Exception;
use Fr\Typo3Handlebars\Renderer;
Expand All @@ -38,7 +37,6 @@
* @license GPL-2.0-or-later
* @see https://github.com/frctl/fractal/blob/main/packages/handlebars/src/helpers/render.js
*/
#[Attribute\AsHelper('render')]
final readonly class RenderHelper implements HelperInterface
{
public function __construct(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private static function assertHelperIsTagged(DependencyInjection\ContainerBuilde
$serviceIds = $container->findTaggedServiceIds('handlebars.helper');
$expectedConfiguration = [
'identifier' => $name,
'method' => 'evaluate',
'method' => 'render',
];

self::assertArrayHasKey($className, $serviceIds);
Expand Down
2 changes: 1 addition & 1 deletion Tests/Unit/Renderer/Helper/VarDumpHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected function setUp(): void
}

#[Framework\Attributes\Test]
public function evaluateReturnsDumpedContext(): void
public function renderReturnsDumpedContext(): void
{
Core\Utility\DebugUtility::useAnsiColor(false);

Expand Down

0 comments on commit 954f64e

Please sign in to comment.