File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments