Skip to content

Commit

Permalink
update php support to 8.2 (#10)
Browse files Browse the repository at this point in the history
* update php support to 8.2

* update depreciated pattern

* remove php 7.4
  • Loading branch information
dpatil-magento authored Feb 1, 2023
1 parent 7075435 commit b23215c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "library",
"license": "OSL-3.0",
"require": {
"php": "~7.4.0||~8.1.0",
"php": "~8.1.0||~8.2.0",
"mustache/mustache": "^2.12",
"xantios/mimey": "^2.2",
"symfony/yaml": "^2.3 || ^3.3 || ^4.0 || ^5.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct(

foreach (self::STANDARD_FIELDS as $key) {
if (!$this->definition->has($key)) {
throw new \RuntimeException("Definition YAML is missing required key: ${key}");
throw new \RuntimeException("Definition YAML is missing required key: {$key}");
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Definition.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static function fromYamlFile(string $filePath): self
$data = Yaml::parseFile($filePath);

if (!\is_array($data)) {
throw new \InvalidArgumentException("File ${filePath} could not be parsed as YAML.");
throw new \InvalidArgumentException("File {$filePath} could not be parsed as YAML.");
}

$instance = new static($data);
Expand Down
2 changes: 1 addition & 1 deletion src/Resolver/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function resolve($definition)
$currentPathname = $uri->getPath();
if ($pathname[0] !== '/') {
if ($currentPathname === null) {
$pathname = "/${pathname}";
$pathname = "/{$pathname}";
} elseif ($currentPathname[\strlen($currentPathname) - 1] === '/') {
$pathname = $currentPathname . $pathname;
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/Template/TemplateFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ public static function get(string $basePath, ?string $engine): TemplateInterface
}
}

throw new \InvalidArgumentException("${engine} could not be found or does not implement TemplateInterface");
throw new \InvalidArgumentException("{$engine} could not be found or does not implement TemplateInterface");
}
}

0 comments on commit b23215c

Please sign in to comment.