Skip to content

Commit 82e7bdf

Browse files
committed
Drop Phug < 1.13
1 parent 10704ca commit 82e7bdf

2 files changed

Lines changed: 1 addition & 23 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"prefer-stable": true,
2323
"require": {
2424
"php": ">=7.2",
25-
"phug/phug": "^1.7.2 || ^2.0.1"
25+
"phug/phug": "^1.13.0 || ^2.0.1"
2626
},
2727
"require-dev": {
2828
"phpunit/phpunit": "^8.5",

tests/Phug/Component/ComponentExtensionTest.php

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -376,12 +376,6 @@ public function testWithPug()
376376
*/
377377
public function testNamespace()
378378
{
379-
$phugVersion = $this->getPhugInstalledVersion();
380-
381-
if ($phugVersion !== null && version_compare($phugVersion, '2.0.0', '<')) {
382-
self::markTestSkipped('Namespace support is only available since Phug 2.0.0');
383-
}
384-
385379
$pug = new Pug([
386380
'on_output' => function (OutputEvent $event) {
387381
$event->prependCode('namespace pug;');
@@ -458,20 +452,4 @@ private function rawHtml($html)
458452

459453
return $html;
460454
}
461-
462-
private function getPhugInstalledVersion(): ?string
463-
{
464-
$composerLockFile = __DIR__ . '/../../../composer.lock';
465-
$packages = file_exists($composerLockFile)
466-
? (json_decode(file_get_contents($composerLockFile), true)['packages'] ?? [])
467-
: [];
468-
469-
foreach ($packages as $package) {
470-
if (($package['name'] ?? null) === 'phug/phug') {
471-
return $package['version'] ?? null;
472-
}
473-
}
474-
475-
return null;
476-
}
477455
}

0 commit comments

Comments
 (0)