Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI workflow for PHP versions #17

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ jobs:
ci:
uses: ray-di/.github/.github/workflows/continuous-integration.yml@v1
with:
old_stable: '["8.1", "8.2"]'
current_stable: 8.3
old_stable: '["8.1", "8.2", "8.3"]'
current_stable: 8.4
koriym marked this conversation as resolved.
Show resolved Hide resolved
9 changes: 7 additions & 2 deletions src/Halo/HaloRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use BEAR\Resource\RenderInterface;
use BEAR\Resource\Request;
use BEAR\Resource\ResourceObject;
use LogicException;
use Ray\Aop\WeavedInterface;
use Ray\Di\Di\Named;
use ReflectionClass;
Expand Down Expand Up @@ -138,11 +139,15 @@

$resourceBody = (string) preg_replace_callback(
'/<!-- resource(.*?)resource_tab_end -->/s',
static function ($matches) {
/** @param array<int|string, string> $matches */
static function ($matches): string {
$uri = substr(explode(' ', $matches[1])[0], 1);
preg_match('/ <!-- resource_body_start -->(.*?)<!-- resource_body_end -->/s', $matches[1], $resourceBodyMatch);
if (! isset($resourceBodyMatch[1])) {

Check warning on line 146 in src/Halo/HaloRenderer.php

View check run for this annotation

Codecov / codecov/patch

src/Halo/HaloRenderer.php#L146

Added line #L146 was not covered by tests
throw new LogicException('Resource body not found'); // @codeCoverageIgnore
}

return "<!-- resource:$uri -->\n{$resourceBodyMatch[1]}<!-- /resource:$uri -->";
return ''; // not used but needed for the callback signature

Check warning on line 150 in src/Halo/HaloRenderer.php

View check run for this annotation

Codecov / codecov/patch

src/Halo/HaloRenderer.php#L150

Added line #L150 was not covered by tests
},
$escapedBody
);
Expand Down
2 changes: 1 addition & 1 deletion src/Halo/TemplateLocator.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ final class TemplateLocator
*/
public function __construct(
private AbstractAppMeta $meta,
#[TwigPaths('twigPaths')] private array $twigPaths = [],
#[TwigPaths] private array $twigPaths = [],
#[Named('qiq_paths')] private array $qiqPaths = [],
#[Named('qiq_extension')] private string $qiqExt = '',
) {
Expand Down
Loading
Loading