gulp-phug 1.3.5 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/README.md +26 -0
  2. package/index.js +16 -3
  3. package/package.json +1 -1
  4. package/support/bootstrap.php +6 -0
  5. package/support/composer.json +1 -1
  6. package/support/composer.lock +14 -14
  7. package/support/vendor/composer/installed.json +15 -15
  8. package/support/vendor/composer/installed.php +17 -17
  9. package/support/vendor/composer/platform_check.php +2 -3
  10. package/support/vendor/phug/phug/.github/workflows/coverage.yml +12 -22
  11. package/support/vendor/phug/phug/.github/workflows/multi-tester.yml +7 -5
  12. package/support/vendor/phug/phug/.github/workflows/split.yml +12 -12
  13. package/support/vendor/phug/phug/.github/workflows/style.yml +2 -2
  14. package/support/vendor/phug/phug/.github/workflows/tests.yml +3 -4
  15. package/support/vendor/phug/phug/.multi-tester.yml +11 -13
  16. package/support/vendor/phug/phug/composer.json +8 -8
  17. package/support/vendor/phug/phug/src/Phug/Ast/Ast/Node.php +2 -2
  18. package/support/vendor/phug/phug/src/Phug/Ast/composer.json +1 -1
  19. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/AbstractNodeCompiler.php +4 -4
  20. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/Element/BlockElement.php +3 -3
  21. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/AssignmentListNodeCompiler.php +1 -1
  22. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/AssignmentNodeCompiler.php +1 -1
  23. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/AttributeListNodeCompiler.php +1 -1
  24. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/AttributeNodeCompiler.php +1 -1
  25. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/BlockNodeCompiler.php +3 -3
  26. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/CaseNodeCompiler.php +1 -1
  27. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/CodeNodeCompiler.php +2 -2
  28. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/CommentNodeCompiler.php +1 -1
  29. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/ConditionalNodeCompiler.php +1 -1
  30. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/DoNodeCompiler.php +1 -1
  31. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/DoctypeNodeCompiler.php +1 -1
  32. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/DocumentNodeCompiler.php +1 -1
  33. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/EachNodeCompiler.php +1 -1
  34. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/ElementNodeCompiler.php +1 -1
  35. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/ExpressionNodeCompiler.php +1 -1
  36. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/FilterNodeCompiler.php +1 -1
  37. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/ForNodeCompiler.php +1 -1
  38. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/ImportNodeCompiler.php +1 -1
  39. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/KeywordNodeCompiler.php +1 -1
  40. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/MixinCallNodeCompiler.php +1 -1
  41. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/MixinNodeCompiler.php +1 -1
  42. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/TextNodeCompiler.php +1 -1
  43. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/VariableNodeCompiler.php +1 -1
  44. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/WhenNodeCompiler.php +1 -1
  45. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/WhileNodeCompiler.php +1 -1
  46. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompiler/YieldNodeCompiler.php +1 -1
  47. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler/NodeCompilerInterface.php +4 -4
  48. package/support/vendor/phug/phug/src/Phug/Compiler/Compiler.php +2 -2
  49. package/support/vendor/phug/phug/src/Phug/Compiler/CompilerInterface.php +2 -2
  50. package/support/vendor/phug/phug/src/Phug/Compiler/composer.json +5 -5
  51. package/support/vendor/phug/phug/src/Phug/DependencyInjection/composer.json +2 -2
  52. package/support/vendor/phug/phug/src/Phug/Event/composer.json +1 -1
  53. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/AbstractElement.php +1 -1
  54. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/AbstractFormat.php +2 -2
  55. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Element/AbstractValueElement.php +3 -3
  56. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Element/AnonymousBlockElement.php +1 -1
  57. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Element/AssignmentElement.php +5 -5
  58. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Element/AttributeElement.php +3 -3
  59. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Element/CodeElement.php +3 -3
  60. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Element/KeywordElement.php +3 -3
  61. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Element/MarkupElement.php +4 -4
  62. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Element/VariableElement.php +5 -5
  63. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Event/FormatEvent.php +1 -1
  64. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Format/HtmlFormat.php +1 -1
  65. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Format/XhtmlFormat.php +1 -1
  66. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Format/XmlFormat.php +1 -1
  67. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/FormatInterface.php +1 -1
  68. package/support/vendor/phug/phug/src/Phug/Formatter/Formatter/Partial/PatternTrait.php +1 -1
  69. package/support/vendor/phug/phug/src/Phug/Formatter/composer.json +4 -4
  70. package/support/vendor/phug/phug/src/Phug/Invoker/composer.json +4 -4
  71. package/support/vendor/phug/phug/src/Phug/Lexer/Lexer/AbstractToken.php +1 -1
  72. package/support/vendor/phug/phug/src/Phug/Lexer/Lexer/Scanner/AttributeScanner.php +1 -1
  73. package/support/vendor/phug/phug/src/Phug/Lexer/Lexer/Scanner/IndentationScanner.php +1 -1
  74. package/support/vendor/phug/phug/src/Phug/Lexer/Lexer/TokenInterface.php +1 -1
  75. package/support/vendor/phug/phug/src/Phug/Lexer/composer.json +3 -3
  76. package/support/vendor/phug/phug/src/Phug/Parser/Parser/Node.php +5 -5
  77. package/support/vendor/phug/phug/src/Phug/Parser/Parser/State.php +4 -4
  78. package/support/vendor/phug/phug/src/Phug/Parser/ParserException.php +1 -1
  79. package/support/vendor/phug/phug/src/Phug/Parser/composer.json +4 -4
  80. package/support/vendor/phug/phug/src/Phug/Phug/Phug/Partial/PluginEnablerTrait.php +1 -1
  81. package/support/vendor/phug/phug/src/Phug/Phug/composer.json +4 -4
  82. package/support/vendor/phug/phug/src/Phug/Reader/Reader.php +4 -4
  83. package/support/vendor/phug/phug/src/Phug/Reader/composer.json +2 -2
  84. package/support/vendor/phug/phug/src/Phug/Renderer/Renderer/Task/TasksGroup.php +1 -1
  85. package/support/vendor/phug/phug/src/Phug/Renderer/composer.json +5 -5
  86. package/support/vendor/phug/phug/src/Phug/Util/CompatibilityUtil/TestCaseUntyped.php +5 -5
  87. package/support/vendor/phug/phug/src/Phug/Util/Util/SandBox.php +1 -1
  88. package/support/vendor/phug/phug/src/Phug/Util/composer.json +2 -2
@@ -28,11 +28,11 @@ class VariableElement extends AbstractElement
28
28
  * @param array|null $children
29
29
  */
30
30
  public function __construct(
31
- CodeElement $variable = null,
32
- ExpressionElement $expression = null,
33
- ParserNode $originNode = null,
34
- NodeInterface $parent = null,
35
- array $children = null
31
+ ?CodeElement $variable = null,
32
+ ?ExpressionElement $expression = null,
33
+ ?ParserNode $originNode = null,
34
+ ?NodeInterface $parent = null,
35
+ ?array $children = null
36
36
  ) {
37
37
  parent::__construct($originNode, $parent, $children);
38
38
 
@@ -37,7 +37,7 @@ class FormatEvent extends Event
37
37
  /**
38
38
  * @param ElementInterface $element
39
39
  */
40
- public function setElement(ElementInterface $element = null)
40
+ public function setElement(?ElementInterface $element = null)
41
41
  {
42
42
  $this->element = $element;
43
43
  }
@@ -11,7 +11,7 @@ class HtmlFormat extends XhtmlFormat
11
11
  const EXPLICIT_CLOSING_TAG = '<%s/>';
12
12
  const BOOLEAN_ATTRIBUTE_PATTERN = ' %s';
13
13
 
14
- public function __construct(Formatter $formatter = null)
14
+ public function __construct(?Formatter $formatter = null)
15
15
  {
16
16
  parent::__construct($formatter);
17
17
 
@@ -13,7 +13,7 @@ abstract class XhtmlFormat extends XmlFormat
13
13
  const DOCTYPE_LANGUAGE = 'html';
14
14
  const SELF_CLOSING_TAG = '<%s />';
15
15
 
16
- public function __construct(Formatter $formatter = null)
16
+ public function __construct(?Formatter $formatter = null)
17
17
  {
18
18
  $this->setOptionsRecursive([
19
19
  'white_space_sensitive_tags' => [
@@ -37,7 +37,7 @@ class XmlFormat extends AbstractFormat
37
37
  const BOOLEAN_ATTRIBUTE_PATTERN = ' %s="%s"';
38
38
  const BUFFER_VARIABLE = '$__value';
39
39
 
40
- public function __construct(Formatter $formatter = null)
40
+ public function __construct(?Formatter $formatter = null)
41
41
  {
42
42
  parent::__construct($formatter);
43
43
 
@@ -11,7 +11,7 @@ interface FormatInterface
11
11
  {
12
12
  const DEFAULT_VARIABLES_VARIABLE_NAME = 'pug_vars';
13
13
 
14
- public function __construct(Formatter $formatter = null);
14
+ public function __construct(?Formatter $formatter = null);
15
15
 
16
16
  public function format($element);
17
17
 
@@ -98,7 +98,7 @@ trait PatternTrait
98
98
  *
99
99
  * @return string
100
100
  */
101
- public function exportHelper($name, array $arguments = null)
101
+ public function exportHelper($name, ?array $arguments = null)
102
102
  {
103
103
  $this->requireHelper($name);
104
104
 
@@ -24,9 +24,9 @@
24
24
  "minimum-stability": "dev",
25
25
  "require": {
26
26
  "php": ">=5.5.0",
27
- "phug/util": "^1.6",
28
- "phug/parser": "^1.6",
29
- "phug/dependency-injection": "^1.3.0"
27
+ "phug/util": "^1.6 || ^2.0",
28
+ "phug/parser": "^1.6 || ^2.0",
29
+ "phug/dependency-injection": "^1.3.0 || ^2.0"
30
30
  },
31
31
  "autoload": {
32
32
  "psr-4": {
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "extra": {
37
37
  "branch-alias": {
38
- "dev-master": "1.x-dev"
38
+ "dev-master": "2.x-dev"
39
39
  }
40
40
  }
41
41
  }
@@ -24,11 +24,11 @@
24
24
  "minimum-stability": "dev",
25
25
  "require": {
26
26
  "php": ">=5.5.0",
27
- "phug/event": "^1.4"
27
+ "phug/event": "^1.4 || ^2.0"
28
28
  },
29
29
  "require-dev": {
30
- "phug/compiler": "^1.4",
31
- "phug/parser": "^1.4"
30
+ "phug/compiler": "^1.4 || ^2.0",
31
+ "phug/parser": "^1.4 || ^2.0"
32
32
  },
33
33
  "autoload": {
34
34
  "psr-4": {
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "extra": {
39
39
  "branch-alias": {
40
- "dev-master": "1.x-dev"
40
+ "dev-master": "2.x-dev"
41
41
  }
42
42
  }
43
43
  }
@@ -13,7 +13,7 @@ abstract class AbstractToken implements TokenInterface, HandleTokenInterface
13
13
  private $indentation;
14
14
  private $handled = false;
15
15
 
16
- public function __construct(SourceLocationInterface $sourceLocation = null, $level = null, $indentation = null)
16
+ public function __construct(?SourceLocationInterface $sourceLocation = null, $level = null, $indentation = null)
17
17
  {
18
18
  $this->sourceLocation = $sourceLocation;
19
19
  $this->level = $level ?: 0;
@@ -103,7 +103,7 @@ class AttributeScanner implements ScannerInterface
103
103
  $this->isTruncatedValue($expression);
104
104
  }
105
105
 
106
- private function getAttributeValue(Reader $reader, array $chars = null)
106
+ private function getAttributeValue(Reader $reader, ?array $chars = null)
107
107
  {
108
108
  $chars = $chars ?: [
109
109
  ' ', "\t", "\n", ',', ')', '//',
@@ -53,7 +53,7 @@ class IndentationScanner implements ScannerInterface
53
53
  return $indentChar;
54
54
  }
55
55
 
56
- public function getIndentLevel(State $state, $maxLevel = INF, callable $getIndentChar = null)
56
+ public function getIndentLevel(State $state, $maxLevel = INF, ?callable $getIndentChar = null)
57
57
  {
58
58
  if ($maxLevel <= 0) {
59
59
  return 0;
@@ -6,7 +6,7 @@ use Phug\Util\SourceLocationInterface;
6
6
 
7
7
  interface TokenInterface
8
8
  {
9
- public function __construct(SourceLocationInterface $sourceLocation = null, $level = null, $indentation = null);
9
+ public function __construct(?SourceLocationInterface $sourceLocation = null, $level = null, $indentation = null);
10
10
 
11
11
  /**
12
12
  * @return SourceLocationInterface|null
@@ -24,8 +24,8 @@
24
24
  "minimum-stability": "dev",
25
25
  "require": {
26
26
  "php": ">=5.5.0",
27
- "phug/reader": "^0.2.0 || ^1.0",
28
- "phug/util": "^1.5"
27
+ "phug/reader": "^0.2.0 || ^1.0 || ^2.0",
28
+ "phug/util": "^1.5 || ^2.0"
29
29
  },
30
30
  "autoload": {
31
31
  "psr-4": {
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "extra": {
36
36
  "branch-alias": {
37
- "dev-master": "1.x-dev"
37
+ "dev-master": "2.x-dev"
38
38
  }
39
39
  }
40
40
  }
@@ -34,11 +34,11 @@ class Node extends AstNode implements NodeInterface
34
34
  * @param TokenInterface $token the token that created the node
35
35
  */
36
36
  public function __construct(
37
- TokenInterface $token = null,
38
- SourceLocationInterface $sourceLocation = null,
37
+ ?TokenInterface $token = null,
38
+ ?SourceLocationInterface $sourceLocation = null,
39
39
  $level = null,
40
- NodeInterface $parent = null,
41
- array $children = null
40
+ ?NodeInterface $parent = null,
41
+ ?array $children = null
42
42
  ) {
43
43
  parent::__construct($parent, $children);
44
44
 
@@ -77,7 +77,7 @@ class Node extends AstNode implements NodeInterface
77
77
  *
78
78
  * @return $this
79
79
  */
80
- public function setOuterNode(NodeInterface $node = null)
80
+ public function setOuterNode(?NodeInterface $node = null)
81
81
  {
82
82
  $this->outerNode = $node;
83
83
 
@@ -101,7 +101,7 @@ class State implements OptionInterface, EventManagerInterface
101
101
  */
102
102
  private $interpolationNodes;
103
103
 
104
- public function __construct(Parser $parser, \Iterator $tokens, array $options = null)
104
+ public function __construct(Parser $parser, \Iterator $tokens, ?array $options = null)
105
105
  {
106
106
  $this->parser = $parser;
107
107
  $this->level = 0;
@@ -329,7 +329,7 @@ class State implements OptionInterface, EventManagerInterface
329
329
  *
330
330
  * @return $this
331
331
  */
332
- public function handleToken(TokenInterface $token = null)
332
+ public function handleToken(?TokenInterface $token = null)
333
333
  {
334
334
  $token = $token ?: $this->getToken();
335
335
  $className = get_class($token);
@@ -534,7 +534,7 @@ class State implements OptionInterface, EventManagerInterface
534
534
  *
535
535
  * @return Node The newly created node
536
536
  */
537
- public function createNode($className, TokenInterface $token = null)
537
+ public function createNode($className, ?TokenInterface $token = null)
538
538
  {
539
539
  if (!is_subclass_of($className, Node::class)) {
540
540
  throw new \InvalidArgumentException(
@@ -630,7 +630,7 @@ class State implements OptionInterface, EventManagerInterface
630
630
  *
631
631
  * @throws ParserException
632
632
  */
633
- public function throwException($message, $code = 0, TokenInterface $relatedToken = null, $previous = null)
633
+ public function throwException($message, $code = 0, ?TokenInterface $relatedToken = null, $previous = null)
634
634
  {
635
635
  $lexer = $this->parser->getLexer();
636
636
  //This will basically check for a source location for this Node. The process is like:
@@ -17,7 +17,7 @@ class ParserException extends LocatedException
17
17
  SourceLocation $location,
18
18
  $message = '',
19
19
  $code = 0,
20
- TokenInterface $relatedToken = null,
20
+ ?TokenInterface $relatedToken = null,
21
21
  $previous = null
22
22
  ) {
23
23
  parent::__construct($location, $message, $code, $previous);
@@ -24,9 +24,9 @@
24
24
  "minimum-stability": "dev",
25
25
  "require": {
26
26
  "php": ">=5.5.0",
27
- "phug/lexer": "^0.5.6 || ^1.0",
28
- "phug/util": "^1.6",
29
- "phug/ast": "^0.1.0 || ^1.0"
27
+ "phug/lexer": "^0.5.6 || ^1.0 || ^2.0",
28
+ "phug/util": "^1.6 || ^2.0",
29
+ "phug/ast": "^0.1.0 || ^1.0 || ^2.0"
30
30
  },
31
31
  "autoload": {
32
32
  "psr-4": {
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "extra": {
37
37
  "branch-alias": {
38
- "dev-master": "1.x-dev"
38
+ "dev-master": "2.x-dev"
39
39
  }
40
40
  }
41
41
  }
@@ -15,7 +15,7 @@ trait PluginEnablerTrait
15
15
  *
16
16
  * @throws PhugException
17
17
  */
18
- public static function enable(Renderer $renderer = null)
18
+ public static function enable(?Renderer $renderer = null)
19
19
  {
20
20
  if ($renderer) {
21
21
  static::activateOnRenderer($renderer);
@@ -24,9 +24,9 @@
24
24
  "minimum-stability": "dev",
25
25
  "require": {
26
26
  "php": ">=5.5.0",
27
- "phug/invoker": "^1.5",
28
- "phug/renderer": "^1.3",
29
- "phug/util": "^1.5"
27
+ "phug/invoker": "^1.5 || ^2.0",
28
+ "phug/renderer": "^1.3 || ^2.0",
29
+ "phug/util": "^1.5 || ^2.0"
30
30
  },
31
31
  "autoload": {
32
32
  "psr-4": {
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "extra": {
42
42
  "branch-alias": {
43
- "dev-master": "1.x-dev"
43
+ "dev-master": "2.x-dev"
44
44
  }
45
45
  }
46
46
  }
@@ -618,7 +618,7 @@ class Reader
618
618
  *
619
619
  * @return bool whether it could be or not.
620
620
  */
621
- public function peekAlphaIdentifier(array $allowedChars = null)
621
+ public function peekAlphaIdentifier(?array $allowedChars = null)
622
622
  {
623
623
  $allowedChars = $allowedChars ?: ['_'];
624
624
 
@@ -632,7 +632,7 @@ class Reader
632
632
  *
633
633
  * @return bool whether it could be or not.
634
634
  */
635
- public function peekIdentifier(array $allowedChars = null)
635
+ public function peekIdentifier(?array $allowedChars = null)
636
636
  {
637
637
  return $this->peekAlphaIdentifier($allowedChars) || $this->peekDigit();
638
638
  }
@@ -757,7 +757,7 @@ class Reader
757
757
  *
758
758
  * @return string|null the resulting string or null if none encountered.
759
759
  */
760
- public function readString(array $escapeSequences = null, $raw = false)
760
+ public function readString(?array $escapeSequences = null, $raw = false)
761
761
  {
762
762
  if (!$this->peekQuote()) {
763
763
  return;
@@ -820,7 +820,7 @@ class Reader
820
820
  *
821
821
  * @return string|null the resulting expression or null, if none encountered.
822
822
  */
823
- public function readExpression(array $breaks = null, array $brackets = null)
823
+ public function readExpression(?array $breaks = null, ?array $brackets = null)
824
824
  {
825
825
  if (!$this->hasLength()) {
826
826
  return;
@@ -26,7 +26,7 @@
26
26
  "php": ">=5.5.0",
27
27
  "symfony/polyfill-mbstring": "*",
28
28
  "psr/http-message": "^1.0",
29
- "phug/util": "^0.3.5 || ^1.0"
29
+ "phug/util": "^0.3.5 || ^1.0 || ^2.0"
30
30
  },
31
31
  "autoload": {
32
32
  "psr-4": {
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "extra": {
37
37
  "branch-alias": {
38
- "dev-master": "1.x-dev"
38
+ "dev-master": "2.x-dev"
39
39
  }
40
40
  }
41
41
  }
@@ -11,7 +11,7 @@ class TasksGroup
11
11
  protected $success = 0;
12
12
  protected $errorDetails = [];
13
13
 
14
- public function __construct(Renderer $renderer = null)
14
+ public function __construct(?Renderer $renderer = null)
15
15
  {
16
16
  if ($renderer) {
17
17
  $this->renderer = $renderer;
@@ -24,10 +24,10 @@
24
24
  "minimum-stability": "dev",
25
25
  "require": {
26
26
  "php": ">=5.5.0",
27
- "phug/formatter": "^1.8.1",
28
- "phug/compiler": "^1.2",
29
- "phug/util": "^1.5",
30
- "symfony/var-dumper": "^3.4 || ^4.0 || ^5.0 || ^6.0 || ^7.0"
27
+ "phug/formatter": "^1.8.1 || ^2.0",
28
+ "phug/compiler": "^1.2 || ^2.0",
29
+ "phug/util": "^1.5 || ^2.0",
30
+ "symfony/var-dumper": "^3.4 || ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0"
31
31
  },
32
32
  "autoload": {
33
33
  "psr-4": {
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "extra": {
38
38
  "branch-alias": {
39
- "dev-master": "1.x-dev"
39
+ "dev-master": "2.x-dev"
40
40
  }
41
41
  }
42
42
  }
@@ -21,17 +21,17 @@ class TestCaseTypeBase extends PHPUnitTestCase
21
21
  // Override
22
22
  }
23
23
 
24
- protected function setUp()
24
+ protected function setUp(): void
25
25
  {
26
26
  $this->prepareTest();
27
27
  }
28
28
 
29
- protected function tearDown()
29
+ protected function tearDown(): void
30
30
  {
31
31
  $this->finishTest();
32
32
  }
33
33
 
34
- public static function assertMatchesRegularExpression($pattern, $string, $message = '')
34
+ public static function assertMatchesRegularExpression(string $pattern, string $string, string $message = ''): void
35
35
  {
36
36
  if (!method_exists(parent::class, 'assertMatchesRegularExpression')) {
37
37
  self::assertRegExp($pattern, $string, $message);
@@ -42,7 +42,7 @@ class TestCaseTypeBase extends PHPUnitTestCase
42
42
  parent::assertMatchesRegularExpression($pattern, $string, $message);
43
43
  }
44
44
 
45
- public static function assertFileDoesNotExist($filename, $message = '')
45
+ public static function assertFileDoesNotExist(string $filename, string $message = ''): void
46
46
  {
47
47
  if (!method_exists(parent::class, 'assertFileDoesNotExist')) {
48
48
  self::assertFileNotExists($filename, $message);
@@ -53,7 +53,7 @@ class TestCaseTypeBase extends PHPUnitTestCase
53
53
  parent::assertFileDoesNotExist($filename, $message);
54
54
  }
55
55
 
56
- public static function assertIsArray($actual, $message = '')
56
+ public static function assertIsArray($actual, string $message = ''): void
57
57
  {
58
58
  if (!method_exists(parent::class, 'assertIsArray')) {
59
59
  self::assertSame('array', gettype($actual));
@@ -23,7 +23,7 @@ class SandBox
23
23
  */
24
24
  private $throwable;
25
25
 
26
- public function __construct(callable $action, callable $errorInterceptor = null)
26
+ public function __construct(callable $action, ?callable $errorInterceptor = null)
27
27
  {
28
28
  set_error_handler($errorInterceptor ?: function ($number, $message, $file, $line) {
29
29
  if (error_reporting() & $number) {
@@ -24,7 +24,7 @@
24
24
  "minimum-stability": "dev",
25
25
  "require": {
26
26
  "php": ">=5.5.0",
27
- "phug/event": "^0.1.0 || ^1.0"
27
+ "phug/event": "^0.1.0 || ^1.0 || ^2.0"
28
28
  },
29
29
  "autoload": {
30
30
  "psr-4": {
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "extra": {
35
35
  "branch-alias": {
36
- "dev-master": "1.x-dev"
36
+ "dev-master": "2.x-dev"
37
37
  }
38
38
  }
39
39
  }