@vituum/vite-plugin-latte 2.0.0-next.4 → 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.
- package/README.md +1 -1
- package/index.js +4 -2
- package/package.json +11 -9
- package/types/index.d.ts +1 -1
- package/vendor/autoload.php +1 -4
- package/vendor/composer/InstalledVersions.php +36 -2
- package/vendor/composer/autoload_classmap.php +14 -15
- package/vendor/composer/autoload_psr4.php +2 -0
- package/vendor/composer/autoload_static.php +38 -15
- package/vendor/composer/installed.json +32 -22
- package/vendor/composer/installed.php +12 -12
- package/vendor/composer/platform_check.php +4 -5
- package/vendor/latte/latte/bin/latte-lint +10 -3
- package/vendor/latte/latte/composer.json +16 -6
- package/vendor/latte/latte/src/Bridges/Tracy/BlueScreenPanel.php +13 -38
- package/vendor/latte/latte/src/Bridges/Tracy/LattePanel.php +9 -7
- package/vendor/latte/latte/src/Bridges/Tracy/TracyExtension.php +2 -4
- package/vendor/latte/latte/src/Bridges/Tracy/dist/panel.phtml +94 -0
- package/vendor/latte/latte/src/Bridges/Tracy/dist/tab.phtml +10 -0
- package/vendor/latte/latte/src/Latte/Compiler/Block.php +4 -6
- package/vendor/latte/latte/src/Latte/Compiler/Escaper.php +67 -86
- package/vendor/latte/latte/src/Latte/Compiler/Node.php +6 -3
- package/vendor/latte/latte/src/Latte/Compiler/NodeHelpers.php +16 -6
- package/vendor/latte/latte/src/Latte/Compiler/NodeTraverser.php +25 -12
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/AreaNode.php +7 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/AuxiliaryNode.php +5 -4
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/FragmentNode.php +8 -4
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Html/AttributeNode.php +7 -15
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Html/BogusTagNode.php +4 -6
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Html/CommentNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Html/ElementNode.php +37 -67
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Html/ExpressionAttributeNode.php +60 -0
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Html/TagNode.php +70 -0
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/NopNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/ArgumentNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/ArrayItemNode.php +4 -15
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/ClosureUseNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/ComplexTypeNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/ArrayAccessNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/ArrayNode.php +6 -22
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/AssignNode.php +18 -5
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/AssignOpNode.php +18 -7
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/AuxiliaryNode.php +5 -4
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/BinaryOpNode.php +38 -9
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/CastNode.php +14 -6
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/ClassConstantFetchNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/CloneNode.php +12 -4
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/ClosureNode.php +10 -6
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/ConstantFetchNode.php +7 -6
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/EmptyNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/FilterCallNode.php +10 -4
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/FunctionCallNode.php +14 -5
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/InNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/InstanceofNode.php +14 -5
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/IssetNode.php +6 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/MatchNode.php +6 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/MethodCallNode.php +18 -5
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/NewNode.php +14 -4
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/PostOpNode.php +14 -6
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/PreOpNode.php +14 -6
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/PropertyFetchNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/StaticMethodCallNode.php +14 -15
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/StaticPropertyFetchNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/TemporaryNode.php +7 -6
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/TernaryNode.php +16 -11
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/UnaryOpNode.php +19 -9
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/VariableNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/ExpressionNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/FilterNode.php +33 -8
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/IdentifierNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/InterpolatedStringPartNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/IntersectionTypeNode.php +6 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/ListItemNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/ListNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/MatchArmNode.php +6 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/ModifierNode.php +29 -41
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/NameNode.php +9 -4
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/NullableTypeNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/OperatorNode.php +27 -0
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/ParameterNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Scalar/BooleanNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Scalar/FloatNode.php +9 -6
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Scalar/IntegerNode.php +8 -6
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Scalar/InterpolatedStringNode.php +9 -5
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Scalar/NullNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Scalar/StringNode.php +6 -4
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/ScalarNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/SuperiorTypeNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/UnionTypeNode.php +6 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/VarLikeIdentifierNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/{Expression/NotNode.php → VariadicPlaceholderNode.php} +9 -9
- package/vendor/latte/latte/src/Latte/{Essential → Compiler}/Nodes/PrintNode.php +9 -15
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/StatementNode.php +7 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/TemplateNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/TextNode.php +6 -4
- package/vendor/latte/latte/src/Latte/Compiler/PhpHelpers.php +32 -18
- package/vendor/latte/latte/src/Latte/Compiler/Position.php +7 -7
- package/vendor/latte/latte/src/Latte/Compiler/PrintContext.php +72 -104
- package/vendor/latte/latte/src/Latte/Compiler/Tag.php +17 -16
- package/vendor/latte/latte/src/Latte/Compiler/TagLexer.php +11 -8
- package/vendor/latte/latte/src/Latte/Compiler/TagParser.php +28 -23
- package/vendor/latte/latte/src/Latte/Compiler/TagParserData.php +360 -336
- package/vendor/latte/latte/src/Latte/Compiler/TemplateGenerator.php +49 -38
- package/vendor/latte/latte/src/Latte/Compiler/TemplateLexer.php +37 -12
- package/vendor/latte/latte/src/Latte/Compiler/TemplateParser.php +35 -21
- package/vendor/latte/latte/src/Latte/Compiler/TemplateParserHtml.php +121 -71
- package/vendor/latte/latte/src/Latte/Compiler/Token.php +79 -70
- package/vendor/latte/latte/src/Latte/Compiler/TokenStream.php +21 -14
- package/vendor/latte/latte/src/Latte/ContentType.php +4 -3
- package/vendor/latte/latte/src/Latte/Engine.php +147 -188
- package/vendor/latte/latte/src/Latte/Essential/AuxiliaryIterator.php +5 -7
- package/vendor/latte/latte/src/Latte/Essential/Blueprint.php +5 -5
- package/vendor/latte/latte/src/Latte/Essential/CachingIterator.php +5 -4
- package/vendor/latte/latte/src/Latte/Essential/CoreExtension.php +155 -127
- package/vendor/latte/latte/src/Latte/Essential/Filters.php +99 -44
- package/vendor/latte/latte/src/Latte/Essential/Nodes/BlockNode.php +14 -13
- package/vendor/latte/latte/src/Latte/Essential/Nodes/CaptureNode.php +5 -6
- package/vendor/latte/latte/src/Latte/Essential/Nodes/ContentTypeNode.php +3 -4
- package/vendor/latte/latte/src/Latte/Essential/Nodes/CustomFunctionCallNode.php +46 -0
- package/vendor/latte/latte/src/Latte/Essential/Nodes/DebugbreakNode.php +2 -3
- package/vendor/latte/latte/src/Latte/Essential/Nodes/DefineNode.php +10 -7
- package/vendor/latte/latte/src/Latte/Essential/Nodes/DoNode.php +3 -4
- package/vendor/latte/latte/src/Latte/Essential/Nodes/DumpNode.php +2 -3
- package/vendor/latte/latte/src/Latte/Essential/Nodes/EmbedNode.php +8 -9
- package/vendor/latte/latte/src/Latte/Essential/Nodes/ExtendsNode.php +3 -5
- package/vendor/latte/latte/src/Latte/Essential/Nodes/FirstLastSepNode.php +4 -7
- package/vendor/latte/latte/src/Latte/Essential/Nodes/ForNode.php +6 -5
- package/vendor/latte/latte/src/Latte/Essential/Nodes/ForeachNode.php +7 -7
- package/vendor/latte/latte/src/Latte/Essential/Nodes/IfChangedNode.php +4 -5
- package/vendor/latte/latte/src/Latte/Essential/Nodes/IfContentNode.php +7 -6
- package/vendor/latte/latte/src/Latte/Essential/Nodes/IfNode.php +11 -11
- package/vendor/latte/latte/src/Latte/Essential/Nodes/ImportNode.php +5 -6
- package/vendor/latte/latte/src/Latte/Essential/Nodes/IncludeBlockNode.php +26 -27
- package/vendor/latte/latte/src/Latte/Essential/Nodes/IncludeFileNode.php +7 -10
- package/vendor/latte/latte/src/Latte/Essential/Nodes/IterateWhileNode.php +6 -6
- package/vendor/latte/latte/src/Latte/Essential/Nodes/JumpNode.php +4 -8
- package/vendor/latte/latte/src/Latte/Essential/Nodes/NAttrNode.php +35 -47
- package/vendor/latte/latte/src/Latte/Essential/Nodes/NClassNode.php +4 -5
- package/vendor/latte/latte/src/Latte/Essential/Nodes/NElseNode.php +69 -34
- package/vendor/latte/latte/src/Latte/Essential/Nodes/NTagNode.php +9 -33
- package/vendor/latte/latte/src/Latte/Essential/Nodes/ParametersNode.php +7 -4
- package/vendor/latte/latte/src/Latte/Essential/Nodes/RawPhpNode.php +3 -4
- package/vendor/latte/latte/src/Latte/Essential/Nodes/RollbackNode.php +2 -3
- package/vendor/latte/latte/src/Latte/Essential/Nodes/SpacelessNode.php +4 -5
- package/vendor/latte/latte/src/Latte/Essential/Nodes/SwitchNode.php +9 -7
- package/vendor/latte/latte/src/Latte/Essential/Nodes/TemplatePrintNode.php +4 -4
- package/vendor/latte/latte/src/Latte/Essential/Nodes/TemplateTypeNode.php +3 -4
- package/vendor/latte/latte/src/Latte/Essential/Nodes/TraceNode.php +2 -3
- package/vendor/latte/latte/src/Latte/Essential/Nodes/TranslateNode.php +5 -5
- package/vendor/latte/latte/src/Latte/Essential/Nodes/TryNode.php +4 -5
- package/vendor/latte/latte/src/Latte/Essential/Nodes/VarNode.php +10 -6
- package/vendor/latte/latte/src/Latte/Essential/Nodes/VarPrintNode.php +2 -3
- package/vendor/latte/latte/src/Latte/Essential/Nodes/VarTypeNode.php +3 -4
- package/vendor/latte/latte/src/Latte/Essential/Nodes/WhileNode.php +5 -5
- package/vendor/latte/latte/src/Latte/Essential/Passes.php +82 -21
- package/vendor/latte/latte/src/Latte/Essential/RawPhpExtension.php +2 -4
- package/vendor/latte/latte/src/Latte/Essential/RollbackException.php +1 -3
- package/vendor/latte/latte/src/Latte/Essential/Tracer.php +24 -28
- package/vendor/latte/latte/src/Latte/Essential/TranslatorExtension.php +14 -14
- package/vendor/latte/latte/src/Latte/Extension.php +12 -6
- package/vendor/latte/latte/src/Latte/Feature.php +24 -0
- package/vendor/latte/latte/src/Latte/Helpers.php +65 -15
- package/vendor/latte/latte/src/Latte/Loader.php +1 -9
- package/vendor/latte/latte/src/Latte/Loaders/FileLoader.php +11 -17
- package/vendor/latte/latte/src/Latte/Loaders/StringLoader.php +7 -21
- package/vendor/latte/latte/src/Latte/Policy.php +4 -3
- package/vendor/latte/latte/src/Latte/Runtime/Block.php +2 -4
- package/vendor/latte/latte/src/Latte/Runtime/Cache.php +143 -0
- package/vendor/latte/latte/src/Latte/Runtime/FilterExecutor.php +5 -6
- package/vendor/latte/latte/src/Latte/Runtime/FilterInfo.php +11 -11
- package/vendor/latte/latte/src/Latte/Runtime/FunctionExecutor.php +5 -6
- package/vendor/latte/latte/src/Latte/Runtime/Helpers.php +91 -0
- package/vendor/latte/latte/src/Latte/Runtime/Html.php +3 -5
- package/vendor/latte/latte/src/Latte/Runtime/HtmlHelpers.php +374 -0
- package/vendor/latte/latte/src/Latte/Runtime/HtmlStringable.php +1 -3
- package/vendor/latte/latte/src/Latte/Runtime/Template.php +162 -182
- package/vendor/latte/latte/src/Latte/Runtime/XmlHelpers.php +108 -0
- package/vendor/latte/latte/src/Latte/Sandbox/Nodes/FunctionCallNode.php +12 -4
- package/vendor/latte/latte/src/Latte/Sandbox/Nodes/MethodCallNode.php +15 -5
- package/vendor/latte/latte/src/Latte/Sandbox/Nodes/PropertyFetchNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Sandbox/Nodes/SandboxNode.php +5 -6
- package/vendor/latte/latte/src/Latte/Sandbox/Nodes/StaticMethodCallNode.php +14 -4
- package/vendor/latte/latte/src/Latte/Sandbox/Nodes/StaticPropertyFetchNode.php +4 -3
- package/vendor/latte/latte/src/Latte/Sandbox/RuntimeChecker.php +8 -6
- package/vendor/latte/latte/src/Latte/Sandbox/SandboxExtension.php +16 -12
- package/vendor/latte/latte/src/Latte/Sandbox/SecurityPolicy.php +18 -16
- package/vendor/latte/latte/src/Latte/attributes.php +7 -3
- package/vendor/latte/latte/src/Latte/exceptions.php +52 -6
- package/vendor/latte/latte/src/Tools/Linter.php +74 -28
- package/vendor/latte/latte/src/Tools/LinterExtension.php +176 -0
- package/vendor/nette/utils/composer.json +15 -5
- package/vendor/nette/utils/readme.md +1 -1
- package/vendor/nette/utils/src/HtmlStringable.php +4 -1
- package/vendor/nette/utils/src/Iterators/CachingIterator.php +10 -25
- package/vendor/nette/utils/src/Iterators/Mapper.php +2 -3
- package/vendor/nette/utils/src/SmartObject.php +3 -0
- package/vendor/nette/utils/src/StaticClass.php +1 -11
- package/vendor/nette/utils/src/Translator.php +1 -1
- package/vendor/nette/utils/src/Utils/ArrayHash.php +6 -10
- package/vendor/nette/utils/src/Utils/ArrayList.php +8 -12
- package/vendor/nette/utils/src/Utils/Arrays.php +38 -18
- package/vendor/nette/utils/src/Utils/Callback.php +13 -8
- package/vendor/nette/utils/src/Utils/DateTime.php +95 -26
- package/vendor/nette/utils/src/Utils/FileInfo.php +6 -7
- package/vendor/nette/utils/src/Utils/FileSystem.php +10 -5
- package/vendor/nette/utils/src/Utils/Finder.php +31 -12
- package/vendor/nette/utils/src/Utils/Floats.php +1 -0
- package/vendor/nette/utils/src/Utils/Helpers.php +22 -2
- package/vendor/nette/utils/src/Utils/Html.php +130 -127
- package/vendor/nette/utils/src/Utils/Image.php +80 -60
- package/vendor/nette/utils/src/Utils/ImageColor.php +5 -0
- package/vendor/nette/utils/src/Utils/ImageType.php +2 -0
- package/vendor/nette/utils/src/Utils/Iterables.php +41 -7
- package/vendor/nette/utils/src/Utils/Json.php +2 -0
- package/vendor/nette/utils/src/Utils/ObjectHelpers.php +2 -0
- package/vendor/nette/utils/src/Utils/Paginator.php +10 -43
- package/vendor/nette/utils/src/Utils/Random.php +2 -0
- package/vendor/nette/utils/src/Utils/Reflection.php +22 -15
- package/vendor/nette/utils/src/Utils/ReflectionMethod.php +6 -1
- package/vendor/nette/utils/src/Utils/Strings.php +62 -57
- package/vendor/nette/utils/src/Utils/Type.php +91 -42
- package/vendor/nette/utils/src/Utils/Validators.php +9 -7
- package/vendor/latte/latte/src/Bridges/Tracy/templates/LattePanel.panel.phtml +0 -101
- package/vendor/latte/latte/src/Bridges/Tracy/templates/LattePanel.tab.phtml +0 -15
- package/vendor/latte/latte/src/Latte/Compiler/ExpressionBuilder.php +0 -129
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/ErrorSuppressNode.php +0 -36
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/FunctionCallableNode.php +0 -39
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/MethodCallableNode.php +0 -42
- package/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/Expression/StaticMethodCallableNode.php +0 -57
- package/vendor/latte/latte/src/Latte/PositionAwareException.php +0 -47
- package/vendor/latte/latte/src/Latte/Runtime/Filters.php +0 -283
- package/vendor/latte/latte/src/Latte/Sandbox/Nodes/FunctionCallableNode.php +0 -29
- package/vendor/latte/latte/src/Latte/Sandbox/Nodes/MethodCallableNode.php +0 -30
- package/vendor/latte/latte/src/Latte/Sandbox/Nodes/StaticMethodCallableNode.php +0 -30
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
"packages": [
|
|
3
3
|
{
|
|
4
4
|
"name": "latte/latte",
|
|
5
|
-
"version": "v3.
|
|
6
|
-
"version_normalized": "3.
|
|
5
|
+
"version": "v3.1.2",
|
|
6
|
+
"version_normalized": "3.1.2.0",
|
|
7
7
|
"source": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/nette/latte.git",
|
|
10
|
-
"reference": "
|
|
10
|
+
"reference": "734ab908c17b28bd75b9331debd1901bec2f23ef"
|
|
11
11
|
},
|
|
12
12
|
"dist": {
|
|
13
13
|
"type": "zip",
|
|
14
|
-
"url": "https://api.github.com/repos/nette/latte/zipball/
|
|
15
|
-
"reference": "
|
|
14
|
+
"url": "https://api.github.com/repos/nette/latte/zipball/734ab908c17b28bd75b9331debd1901bec2f23ef",
|
|
15
|
+
"reference": "734ab908c17b28bd75b9331debd1901bec2f23ef",
|
|
16
16
|
"shasum": ""
|
|
17
17
|
},
|
|
18
18
|
"require": {
|
|
19
19
|
"ext-json": "*",
|
|
20
20
|
"ext-tokenizer": "*",
|
|
21
|
-
"php": "8.
|
|
21
|
+
"php": "8.2 - 8.5"
|
|
22
22
|
},
|
|
23
23
|
"conflict": {
|
|
24
24
|
"nette/application": "<3.1.7",
|
|
@@ -26,9 +26,11 @@
|
|
|
26
26
|
},
|
|
27
27
|
"require-dev": {
|
|
28
28
|
"nette/php-generator": "^4.0",
|
|
29
|
-
"nette/
|
|
29
|
+
"nette/phpstan-rules": "^1.0",
|
|
30
|
+
"nette/tester": "^2.6",
|
|
30
31
|
"nette/utils": "^4.0",
|
|
31
|
-
"phpstan/
|
|
32
|
+
"phpstan/extension-installer": "^1.4@stable",
|
|
33
|
+
"phpstan/phpstan": "^2.1@stable",
|
|
32
34
|
"tracy/tracy": "^2.10"
|
|
33
35
|
},
|
|
34
36
|
"suggest": {
|
|
@@ -39,18 +41,21 @@
|
|
|
39
41
|
"nette/php-generator": "to use tag {templatePrint}",
|
|
40
42
|
"nette/utils": "to use filter |webalize"
|
|
41
43
|
},
|
|
42
|
-
"time": "
|
|
44
|
+
"time": "2026-02-24T21:38:20+00:00",
|
|
43
45
|
"bin": [
|
|
44
46
|
"bin/latte-lint"
|
|
45
47
|
],
|
|
46
48
|
"type": "library",
|
|
47
49
|
"extra": {
|
|
48
50
|
"branch-alias": {
|
|
49
|
-
"dev-master": "3.
|
|
51
|
+
"dev-master": "3.1-dev"
|
|
50
52
|
}
|
|
51
53
|
},
|
|
52
54
|
"installation-source": "dist",
|
|
53
55
|
"autoload": {
|
|
56
|
+
"psr-4": {
|
|
57
|
+
"Latte\\": "src/Latte"
|
|
58
|
+
},
|
|
54
59
|
"classmap": [
|
|
55
60
|
"src/"
|
|
56
61
|
]
|
|
@@ -85,36 +90,38 @@
|
|
|
85
90
|
],
|
|
86
91
|
"support": {
|
|
87
92
|
"issues": "https://github.com/nette/latte/issues",
|
|
88
|
-
"source": "https://github.com/nette/latte/tree/v3.
|
|
93
|
+
"source": "https://github.com/nette/latte/tree/v3.1.2"
|
|
89
94
|
},
|
|
90
95
|
"install-path": "../latte/latte"
|
|
91
96
|
},
|
|
92
97
|
{
|
|
93
98
|
"name": "nette/utils",
|
|
94
|
-
"version": "v4.
|
|
95
|
-
"version_normalized": "4.
|
|
99
|
+
"version": "v4.1.3",
|
|
100
|
+
"version_normalized": "4.1.3.0",
|
|
96
101
|
"source": {
|
|
97
102
|
"type": "git",
|
|
98
103
|
"url": "https://github.com/nette/utils.git",
|
|
99
|
-
"reference": "
|
|
104
|
+
"reference": "bb3ea637e3d131d72acc033cfc2746ee893349fe"
|
|
100
105
|
},
|
|
101
106
|
"dist": {
|
|
102
107
|
"type": "zip",
|
|
103
|
-
"url": "https://api.github.com/repos/nette/utils/zipball/
|
|
104
|
-
"reference": "
|
|
108
|
+
"url": "https://api.github.com/repos/nette/utils/zipball/bb3ea637e3d131d72acc033cfc2746ee893349fe",
|
|
109
|
+
"reference": "bb3ea637e3d131d72acc033cfc2746ee893349fe",
|
|
105
110
|
"shasum": ""
|
|
106
111
|
},
|
|
107
112
|
"require": {
|
|
108
|
-
"php": "8.
|
|
113
|
+
"php": "8.2 - 8.5"
|
|
109
114
|
},
|
|
110
115
|
"conflict": {
|
|
111
116
|
"nette/finder": "<3",
|
|
112
117
|
"nette/schema": "<1.2.2"
|
|
113
118
|
},
|
|
114
119
|
"require-dev": {
|
|
115
|
-
"jetbrains/phpstorm-attributes": "
|
|
120
|
+
"jetbrains/phpstorm-attributes": "^1.2",
|
|
121
|
+
"nette/phpstan-rules": "^1.0",
|
|
116
122
|
"nette/tester": "^2.5",
|
|
117
|
-
"phpstan/
|
|
123
|
+
"phpstan/extension-installer": "^1.4@stable",
|
|
124
|
+
"phpstan/phpstan": "^2.1@stable",
|
|
118
125
|
"tracy/tracy": "^2.9"
|
|
119
126
|
},
|
|
120
127
|
"suggest": {
|
|
@@ -125,15 +132,18 @@
|
|
|
125
132
|
"ext-mbstring": "to use Strings::lower() etc...",
|
|
126
133
|
"ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()"
|
|
127
134
|
},
|
|
128
|
-
"time": "
|
|
135
|
+
"time": "2026-02-13T03:05:33+00:00",
|
|
129
136
|
"type": "library",
|
|
130
137
|
"extra": {
|
|
131
138
|
"branch-alias": {
|
|
132
|
-
"dev-master": "4.
|
|
139
|
+
"dev-master": "4.1-dev"
|
|
133
140
|
}
|
|
134
141
|
},
|
|
135
142
|
"installation-source": "dist",
|
|
136
143
|
"autoload": {
|
|
144
|
+
"psr-4": {
|
|
145
|
+
"Nette\\": "src"
|
|
146
|
+
},
|
|
137
147
|
"classmap": [
|
|
138
148
|
"src/"
|
|
139
149
|
]
|
|
@@ -174,7 +184,7 @@
|
|
|
174
184
|
],
|
|
175
185
|
"support": {
|
|
176
186
|
"issues": "https://github.com/nette/utils/issues",
|
|
177
|
-
"source": "https://github.com/nette/utils/tree/v4.
|
|
187
|
+
"source": "https://github.com/nette/utils/tree/v4.1.3"
|
|
178
188
|
},
|
|
179
189
|
"install-path": "../nette/utils"
|
|
180
190
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<?php return array(
|
|
2
2
|
'root' => array(
|
|
3
3
|
'name' => '__root__',
|
|
4
|
-
'pretty_version' => 'dev-
|
|
5
|
-
'version' => 'dev-
|
|
6
|
-
'reference' => '
|
|
4
|
+
'pretty_version' => 'dev-next',
|
|
5
|
+
'version' => 'dev-next',
|
|
6
|
+
'reference' => '5e6a20cb81d9ef14f05ca7da6255b2dcf4d72ef2',
|
|
7
7
|
'type' => 'library',
|
|
8
8
|
'install_path' => __DIR__ . '/../../',
|
|
9
9
|
'aliases' => array(),
|
|
@@ -11,27 +11,27 @@
|
|
|
11
11
|
),
|
|
12
12
|
'versions' => array(
|
|
13
13
|
'__root__' => array(
|
|
14
|
-
'pretty_version' => 'dev-
|
|
15
|
-
'version' => 'dev-
|
|
16
|
-
'reference' => '
|
|
14
|
+
'pretty_version' => 'dev-next',
|
|
15
|
+
'version' => 'dev-next',
|
|
16
|
+
'reference' => '5e6a20cb81d9ef14f05ca7da6255b2dcf4d72ef2',
|
|
17
17
|
'type' => 'library',
|
|
18
18
|
'install_path' => __DIR__ . '/../../',
|
|
19
19
|
'aliases' => array(),
|
|
20
20
|
'dev_requirement' => false,
|
|
21
21
|
),
|
|
22
22
|
'latte/latte' => array(
|
|
23
|
-
'pretty_version' => 'v3.
|
|
24
|
-
'version' => '3.
|
|
25
|
-
'reference' => '
|
|
23
|
+
'pretty_version' => 'v3.1.2',
|
|
24
|
+
'version' => '3.1.2.0',
|
|
25
|
+
'reference' => '734ab908c17b28bd75b9331debd1901bec2f23ef',
|
|
26
26
|
'type' => 'library',
|
|
27
27
|
'install_path' => __DIR__ . '/../latte/latte',
|
|
28
28
|
'aliases' => array(),
|
|
29
29
|
'dev_requirement' => false,
|
|
30
30
|
),
|
|
31
31
|
'nette/utils' => array(
|
|
32
|
-
'pretty_version' => 'v4.
|
|
33
|
-
'version' => '4.
|
|
34
|
-
'reference' => '
|
|
32
|
+
'pretty_version' => 'v4.1.3',
|
|
33
|
+
'version' => '4.1.3.0',
|
|
34
|
+
'reference' => 'bb3ea637e3d131d72acc033cfc2746ee893349fe',
|
|
35
35
|
'type' => 'library',
|
|
36
36
|
'install_path' => __DIR__ . '/../nette/utils',
|
|
37
37
|
'aliases' => array(),
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
$issues = array();
|
|
6
6
|
|
|
7
|
-
if (!(PHP_VERSION_ID >=
|
|
8
|
-
$issues[] = 'Your Composer dependencies require a PHP version ">= 8.
|
|
7
|
+
if (!(PHP_VERSION_ID >= 80200)) {
|
|
8
|
+
$issues[] = 'Your Composer dependencies require a PHP version ">= 8.2.0". You are running ' . PHP_VERSION . '.';
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
if ($issues) {
|
|
@@ -19,8 +19,7 @@ if ($issues) {
|
|
|
19
19
|
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
'Composer detected issues in your platform: ' . implode(' ', $issues)
|
|
24
|
-
E_USER_ERROR
|
|
22
|
+
throw new \RuntimeException(
|
|
23
|
+
'Composer detected issues in your platform: ' . implode(' ', $issues)
|
|
25
24
|
);
|
|
26
25
|
}
|
|
@@ -30,6 +30,13 @@ if ($strict = in_array('--strict', $argv, true)) {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
$path = $argv[1];
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
|
|
34
|
+
try {
|
|
35
|
+
$linter = new Latte\Tools\Linter(debug: $debug, strict: $strict);
|
|
36
|
+
$ok = $linter->scanDirectory($path);
|
|
37
|
+
exit($ok ? 0 : 1);
|
|
38
|
+
|
|
39
|
+
} catch (Throwable $e) {
|
|
40
|
+
fwrite(STDERR, $debug ? "\n$e\n" : "\nError: {$e->getMessage()}\n");
|
|
41
|
+
exit(2);
|
|
42
|
+
}
|
|
@@ -15,16 +15,18 @@
|
|
|
15
15
|
}
|
|
16
16
|
],
|
|
17
17
|
"require": {
|
|
18
|
-
"php": "8.
|
|
18
|
+
"php": "8.2 - 8.5",
|
|
19
19
|
"ext-json": "*",
|
|
20
20
|
"ext-tokenizer": "*"
|
|
21
21
|
},
|
|
22
22
|
"require-dev": {
|
|
23
|
-
"nette/tester": "^2.
|
|
23
|
+
"nette/tester": "^2.6",
|
|
24
24
|
"tracy/tracy": "^2.10",
|
|
25
25
|
"nette/utils": "^4.0",
|
|
26
|
-
"
|
|
27
|
-
"
|
|
26
|
+
"nette/php-generator": "^4.0",
|
|
27
|
+
"phpstan/phpstan": "^2.1@stable",
|
|
28
|
+
"phpstan/extension-installer": "^1.4@stable",
|
|
29
|
+
"nette/phpstan-rules": "^1.0"
|
|
28
30
|
},
|
|
29
31
|
"suggest": {
|
|
30
32
|
"ext-iconv": "to use filters |reverse, |substring",
|
|
@@ -39,7 +41,10 @@
|
|
|
39
41
|
"nette/caching": "<3.1.4"
|
|
40
42
|
},
|
|
41
43
|
"autoload": {
|
|
42
|
-
"classmap": ["src/"]
|
|
44
|
+
"classmap": ["src/"],
|
|
45
|
+
"psr-4": {
|
|
46
|
+
"Latte\\": "src/Latte"
|
|
47
|
+
}
|
|
43
48
|
},
|
|
44
49
|
"minimum-stability": "dev",
|
|
45
50
|
"bin": ["bin/latte-lint"],
|
|
@@ -49,7 +54,12 @@
|
|
|
49
54
|
},
|
|
50
55
|
"extra": {
|
|
51
56
|
"branch-alias": {
|
|
52
|
-
"dev-master": "3.
|
|
57
|
+
"dev-master": "3.1-dev"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"config": {
|
|
61
|
+
"allow-plugins": {
|
|
62
|
+
"phpstan/extension-installer": true
|
|
53
63
|
}
|
|
54
64
|
}
|
|
55
65
|
}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
<?php
|
|
1
|
+
<?php declare(strict_types=1);
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* This file is part of the Latte (https://latte.nette.org)
|
|
5
5
|
* Copyright (c) 2008 David Grudl (https://davidgrudl.com)
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
declare(strict_types=1);
|
|
9
|
-
|
|
10
8
|
namespace Latte\Bridges\Tracy;
|
|
11
9
|
|
|
12
10
|
use Latte;
|
|
13
11
|
use Tracy;
|
|
14
12
|
use Tracy\BlueScreen;
|
|
15
13
|
use Tracy\Helpers;
|
|
14
|
+
use const ENT_IGNORE;
|
|
16
15
|
|
|
17
16
|
|
|
18
17
|
/**
|
|
@@ -32,20 +31,21 @@ class BlueScreenPanel
|
|
|
32
31
|
self::$initialized = true;
|
|
33
32
|
|
|
34
33
|
$blueScreen ??= Tracy\Debugger::getBlueScreen();
|
|
35
|
-
$blueScreen->addPanel(
|
|
36
|
-
$blueScreen->addAction(
|
|
34
|
+
$blueScreen->addPanel(self::renderError(...));
|
|
35
|
+
$blueScreen->addAction(self::renderUnknownMacro(...));
|
|
37
36
|
if (
|
|
38
37
|
version_compare(Tracy\Debugger::VERSION, '2.9.0', '>=')
|
|
39
38
|
&& version_compare(Tracy\Debugger::VERSION, '3.0', '<')
|
|
40
39
|
) {
|
|
41
|
-
Tracy\Debugger::addSourceMapper(
|
|
42
|
-
$blueScreen->addFileGenerator(fn(string $file) =>
|
|
40
|
+
Tracy\Debugger::addSourceMapper(self::mapLatteSourceCode(...));
|
|
41
|
+
$blueScreen->addFileGenerator(fn(string $file) => str_ends_with($file, '.latte')
|
|
43
42
|
? "{block content}\n\$END\$"
|
|
44
43
|
: null);
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
46
|
|
|
48
47
|
|
|
48
|
+
/** @return ?array{tab: string, panel: string} */
|
|
49
49
|
public static function renderError(?\Throwable $e): ?array
|
|
50
50
|
{
|
|
51
51
|
if ($e instanceof Latte\CompileException && $e->sourceName) {
|
|
@@ -59,29 +59,16 @@ class BlueScreenPanel
|
|
|
59
59
|
: '<b>' . htmlspecialchars($e->sourceName . ($e->position?->line ? ':' . $e->position->line : '')) . '</b>')
|
|
60
60
|
. '</p>')
|
|
61
61
|
. '<pre class="code tracy-code"><div>'
|
|
62
|
-
. BlueScreen::highlightLine(htmlspecialchars($e->sourceCode, ENT_IGNORE, 'UTF-8'), $e->position->line ?? 0, 15, $e->position->column ?? 0)
|
|
62
|
+
. BlueScreen::highlightLine(htmlspecialchars($e->sourceCode ?? '', ENT_IGNORE, 'UTF-8'), $e->position->line ?? 0, 15, $e->position->column ?? 0)
|
|
63
63
|
. '</div></pre>',
|
|
64
64
|
];
|
|
65
|
-
|
|
66
|
-
} elseif (
|
|
67
|
-
$e
|
|
68
|
-
&& ($file = $e->getFile())
|
|
69
|
-
&& (version_compare(Tracy\Debugger::VERSION, '2.9.0', '<'))
|
|
70
|
-
&& ($mapped = self::mapLatteSourceCode($file, $e->getLine()))
|
|
71
|
-
) {
|
|
72
|
-
return [
|
|
73
|
-
'tab' => 'Template',
|
|
74
|
-
'panel' => '<p><b>File:</b> ' . Helpers::editorLink($mapped['file'], $mapped['line']) . '</p>'
|
|
75
|
-
. ($mapped['line']
|
|
76
|
-
? BlueScreen::highlightFile($mapped['file'], $mapped['line'])
|
|
77
|
-
: ''),
|
|
78
|
-
];
|
|
79
65
|
}
|
|
80
66
|
|
|
81
67
|
return null;
|
|
82
68
|
}
|
|
83
69
|
|
|
84
70
|
|
|
71
|
+
/** @return ?array{link: string, label: string} */
|
|
85
72
|
public static function renderUnknownMacro(?\Throwable $e): ?array
|
|
86
73
|
{
|
|
87
74
|
if (
|
|
@@ -92,7 +79,7 @@ class BlueScreenPanel
|
|
|
92
79
|
|| preg_match('#Unknown attribute (n:\w+), did you mean (n:\w+)\?#A', $e->getMessage(), $m))
|
|
93
80
|
) {
|
|
94
81
|
return [
|
|
95
|
-
'link' => Helpers::editorUri($e->sourceName, $e->position?->line, 'fix', $m[1], $m[2]),
|
|
82
|
+
'link' => (string) Helpers::editorUri($e->sourceName, $e->position?->line, 'fix', $m[1], $m[2]),
|
|
96
83
|
'label' => 'fix it',
|
|
97
84
|
];
|
|
98
85
|
}
|
|
@@ -104,20 +91,8 @@ class BlueScreenPanel
|
|
|
104
91
|
/** @return array{file: string, line: int, label: string, active: bool} */
|
|
105
92
|
public static function mapLatteSourceCode(string $file, int $line): ?array
|
|
106
93
|
{
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
$lines = file($file);
|
|
112
|
-
if (
|
|
113
|
-
!preg_match('#^/\*\* source: (\S+\.latte)#m', implode('', array_slice($lines, 0, 10)), $m)
|
|
114
|
-
|| !@is_file($m[1]) // @ - may trigger error
|
|
115
|
-
) {
|
|
116
|
-
return null;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
$file = $m[1];
|
|
120
|
-
$line = $line && preg_match('#/\* line (\d+) \*/#', $lines[$line - 1], $m) ? (int) $m[1] : 0;
|
|
121
|
-
return ['file' => $file, 'line' => $line, 'label' => 'Latte', 'active' => true];
|
|
94
|
+
return ($source = Latte\Helpers::mapCompiledToSource($file, $line)) && $source['name'] !== null && @is_file($source['name']) // @ - may trigger error
|
|
95
|
+
? ['file' => $source['name'], 'line' => $source['line'] ?? 0, 'column' => $source['column'] ?? 0, 'label' => 'Latte', 'active' => true]
|
|
96
|
+
: null;
|
|
122
97
|
}
|
|
123
98
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
<?php
|
|
1
|
+
<?php declare(strict_types=1);
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* This file is part of the Latte (https://latte.nette.org)
|
|
5
5
|
* Copyright (c) 2008 David Grudl (https://davidgrudl.com)
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
declare(strict_types=1);
|
|
9
|
-
|
|
10
8
|
namespace Latte\Bridges\Tracy;
|
|
11
9
|
|
|
12
10
|
use Latte\Engine;
|
|
@@ -25,11 +23,13 @@ class LattePanel implements Tracy\IBarPanel
|
|
|
25
23
|
|
|
26
24
|
/** @var Template[] */
|
|
27
25
|
private array $templates = [];
|
|
26
|
+
|
|
27
|
+
/** @var \stdClass[] */
|
|
28
28
|
private array $list;
|
|
29
29
|
private ?string $name = null;
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
#[\Deprecated('use TracyExtension see https://bit.ly/46flfDi')]
|
|
33
33
|
public static function initialize(Engine $latte, ?string $name = null, ?Tracy\Bar $bar = null): void
|
|
34
34
|
{
|
|
35
35
|
$bar ??= Tracy\Debugger::getBar();
|
|
@@ -42,6 +42,7 @@ class LattePanel implements Tracy\IBarPanel
|
|
|
42
42
|
{
|
|
43
43
|
$this->name = $name;
|
|
44
44
|
if ($latte) {
|
|
45
|
+
trigger_error('Replace LattePanel with TracyExtension; see https://bit.ly/46flfDi', E_USER_DEPRECATED);
|
|
45
46
|
$latte->addExtension(
|
|
46
47
|
new class ($this->templates) extends Extension {
|
|
47
48
|
public function __construct(
|
|
@@ -76,8 +77,9 @@ class LattePanel implements Tracy\IBarPanel
|
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
return Tracy\Helpers::capture(function () {
|
|
79
|
-
$
|
|
80
|
-
|
|
80
|
+
$first = reset($this->templates);
|
|
81
|
+
$name = $this->name ?? ($first ? basename($first->getName()) : '');
|
|
82
|
+
require __DIR__ . '/dist/tab.phtml';
|
|
81
83
|
});
|
|
82
84
|
}
|
|
83
85
|
|
|
@@ -93,7 +95,7 @@ class LattePanel implements Tracy\IBarPanel
|
|
|
93
95
|
return Tracy\Helpers::capture(function () {
|
|
94
96
|
$list = $this->list;
|
|
95
97
|
$dumpParameters = $this->dumpParameters;
|
|
96
|
-
require __DIR__ . '/
|
|
98
|
+
require __DIR__ . '/dist/panel.phtml';
|
|
97
99
|
});
|
|
98
100
|
}
|
|
99
101
|
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
<?php
|
|
1
|
+
<?php declare(strict_types=1);
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* This file is part of the Latte (https://latte.nette.org)
|
|
5
5
|
* Copyright (c) 2008 David Grudl (https://davidgrudl.com)
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
declare(strict_types=1);
|
|
9
|
-
|
|
10
8
|
namespace Latte\Bridges\Tracy;
|
|
11
9
|
|
|
12
10
|
use Latte\Extension;
|
|
@@ -19,7 +17,7 @@ use Tracy;
|
|
|
19
17
|
*/
|
|
20
18
|
class TracyExtension extends Extension
|
|
21
19
|
{
|
|
22
|
-
private LattePanel $panel;
|
|
20
|
+
private readonly LattePanel $panel;
|
|
23
21
|
|
|
24
22
|
|
|
25
23
|
public function __construct(?string $name = null)
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<?php declare(strict_types=1); ?>
|
|
2
|
+
<?php /** @var \stdClass[] $list */ ?><?php /** @var bool $dumpParameters */ ?><?php $colors = [
|
|
3
|
+
'include' => '#00000052',
|
|
4
|
+
'extends' => '#cd1c1c7d',
|
|
5
|
+
'import' => '#17c35b8f',
|
|
6
|
+
'includeblock' => '#17c35b8f',
|
|
7
|
+
'embed' => '#4f1ccd7d',
|
|
8
|
+
'sandbox' => 'black',
|
|
9
|
+
] ?>
|
|
10
|
+
<style class="tracy-debug">
|
|
11
|
+
#tracy-debug .LattePanel td {
|
|
12
|
+
white-space: nowrap;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
#tracy-debug .LattePanel-php {
|
|
16
|
+
background: #8993be;
|
|
17
|
+
color: white;
|
|
18
|
+
border-radius: 79px;
|
|
19
|
+
padding: 1px 4px 3px 4px;
|
|
20
|
+
font-size: 75%;
|
|
21
|
+
font-style: italic;
|
|
22
|
+
font-weight: bold;
|
|
23
|
+
vertical-align: text-top;
|
|
24
|
+
opacity: .5;
|
|
25
|
+
margin-left: 2ex;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
#tracy-debug .LattePanel-type {
|
|
29
|
+
border-radius: 2px;
|
|
30
|
+
padding: 2px 4px;
|
|
31
|
+
font-size: 80%;
|
|
32
|
+
color: white;
|
|
33
|
+
font-weight: bold;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
#tracy-debug .LattePanel-include {
|
|
37
|
+
background: #00000052;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
#tracy-debug .LattePanel-extends {
|
|
41
|
+
background: #cd1c1c7d;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
#tracy-debug .LattePanel-import,
|
|
45
|
+
#tracy-debug .LattePanel-includeblock {
|
|
46
|
+
background: #17c35b8f;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
#tracy-debug .LattePanel-embed {
|
|
50
|
+
background: #4f1ccd7d;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
#tracy-debug .LattePanel-sandbox {
|
|
54
|
+
background: black;
|
|
55
|
+
}
|
|
56
|
+
</style>
|
|
57
|
+
|
|
58
|
+
<h1>Rendered Templates</h1>
|
|
59
|
+
|
|
60
|
+
<div class="tracy-inner LattePanel">
|
|
61
|
+
<table>
|
|
62
|
+
<?php foreach ($list as $item): ?> <tr>
|
|
63
|
+
<td>
|
|
64
|
+
<?php if ($item->template->getReferenceType()): ?> <span style="margin-left: <?= Tracy\Helpers::escapeHtml($item->depth * 4) ?>
|
|
65
|
+
ex"></span>└
|
|
66
|
+
<span class="LattePanel-type" style="background: <?= Tracy\Helpers::escapeHtml($colors[$item->template->getReferenceType()]) ?>
|
|
67
|
+
"><?= Tracy\Helpers::escapeHtml($item->template->getReferenceType()) ?>
|
|
68
|
+
</span>
|
|
69
|
+
<?php endif ?>
|
|
70
|
+
<?= Tracy\Helpers::editorLink($item->template->getName()) ?>
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
<a href="<?= Tracy\Helpers::escapeHtml(Tracy\Helpers::editorUri($item->phpFile)) ?>
|
|
74
|
+
" class="LattePanel-php">php</a>
|
|
75
|
+
</td>
|
|
76
|
+
|
|
77
|
+
<td><?= Tracy\Helpers::escapeHtml($item->count > 1 ? $item->count . '×' : '') ?>
|
|
78
|
+
</td>
|
|
79
|
+
</tr>
|
|
80
|
+
<?php endforeach ?> </table>
|
|
81
|
+
|
|
82
|
+
<?php if ($dumpParameters): ?> <h2>Parameters</h2>
|
|
83
|
+
|
|
84
|
+
<div class="tracy-inner">
|
|
85
|
+
<table class="tracy-sortable">
|
|
86
|
+
<?php foreach (reset($list)->template->getParameters() as $k => $v): ?> <tr>
|
|
87
|
+
<th><?= Tracy\Helpers::escapeHtml($k) ?>
|
|
88
|
+
</th>
|
|
89
|
+
<td><?= Tracy\Dumper::toHtml($v, [Tracy\Dumper::LIVE => true]) ?>
|
|
90
|
+
</td>
|
|
91
|
+
</tr>
|
|
92
|
+
<?php endforeach ?> </table>
|
|
93
|
+
</div>
|
|
94
|
+
<?php endif ?></div>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<?php declare(strict_types=1); ?>
|
|
2
|
+
<?php /** @var string $name */ ?><span title="Latte Templates">
|
|
3
|
+
<svg viewBox="0 0 1793.77 1538.57">
|
|
4
|
+
<path fill="#F1A443" d="M934.87 1166.46c41.84,-2.2 75.14,-17.07 99.91,-44.59 24.77,-27.53 37.16,-58.9 37.16,-94.13 0,-38.53 -12.38,-71.01 -37.16,-97.43 -24.77,-26.42 -58.08,-45.14 -99.91,-56.15l0 292.31zm-67.71 -786.08c-40.74,2.2 -72.66,15.41 -95.79,39.63 -23.12,24.22 -34.68,52.29 -34.68,84.22 0,33.03 11.29,63.03 33.86,90 22.57,26.98 54.77,43.21 96.61,48.72l0 -262.58zm0 1013.98l0 -64.41c-61.66,-5.5 -114.22,-15.97 -157.71,-31.38 -43.49,-15.41 -79.27,-37.43 -107.34,-66.06 -28.07,-28.63 -48.72,-64.13 -61.93,-106.52 -13.21,-42.39 -19.82,-92.76 -19.82,-151.11l198.18 0c4.4,35.23 10.18,64.41 17.34,87.53 7.16,23.12 16.51,41.84 28.07,56.15 11.56,14.31 25.6,25.05 42.11,32.2 16.51,7.16 36.88,12.39 61.1,15.69l0 -318.73c-55.05,-14.31 -102.94,-30.55 -143.67,-48.72 -40.74,-18.16 -74.59,-39.63 -101.57,-64.41 -26.97,-24.77 -47.34,-53.4 -61.1,-85.88 -13.76,-32.48 -20.64,-71.29 -20.64,-116.43 0,-42.93 8.26,-83.39 24.77,-121.38 16.51,-37.98 39.36,-71.29 68.53,-99.91 29.18,-28.63 63.58,-51.19 103.22,-67.71 39.63,-16.51 83.12,-25.32 130.46,-26.42l0 -72.67 67.71 0 0 72.67c203.68,6.6 310.47,113.4 320.38,320.38l-194.87 0c-5.5,-59.45 -18.44,-99.91 -38.81,-121.38 -20.37,-21.47 -49.27,-33.31 -86.7,-35.51l0 284.05c73.76,24.22 132.94,47.89 177.53,71.01 44.59,23.12 78.72,47.61 102.39,73.49 23.67,25.87 39.36,54.22 47.07,85.05 7.71,30.83 11.56,66.61 11.56,107.34 0,48.44 -7.98,92.2 -23.94,131.29 -15.97,39.08 -38.81,72.94 -68.54,101.56 -29.72,28.63 -65.5,51.2 -107.34,67.71 -41.84,16.51 -88.08,25.87 -138.72,28.07l0 64.41 -67.71 0z"/>
|
|
5
|
+
<path fill="#5F4D36" d="M462.33 1411.31c-54.32,0 -98.33,-4.78 -132.03,-14.33 -33.7,-9.56 -59.85,-24.14 -78.46,-43.76 -18.61,-19.62 -30.93,-44.51 -36.97,-74.69 -6.04,-30.18 -9.05,-65.38 -9.05,-105.62 0,-9.05 0.5,-22.13 1.51,-39.23 1.01,-17.1 1.76,-35.21 2.27,-54.32 0.5,-19.11 1.26,-36.97 2.26,-53.56 1.01,-16.6 1.51,-28.42 1.51,-35.46 0,-58.34 -8.8,-99.08 -26.41,-122.22 -17.6,-23.13 -50.05,-34.7 -97.33,-34.7l0 -129.76c47.28,0 79.72,-11.82 97.33,-35.46 17.6,-23.64 26.41,-64.63 26.41,-122.97 0,-7.04 -0.5,-18.86 -1.51,-35.46 -1.01,-16.6 -1.76,-33.95 -2.26,-52.06 -0.5,-18.11 -1.26,-35.71 -2.27,-52.81 -1.01,-17.1 -1.51,-30.18 -1.51,-39.23 0,-40.24 3.02,-75.45 9.05,-105.62 6.03,-30.18 18.36,-55.08 36.97,-74.69 18.61,-19.62 44.76,-34.2 78.46,-43.76 33.7,-9.56 77.71,-14.34 132.03,-14.34l55.83 0 0 123.73 -33.2 0c-44.26,0 -74.18,7.04 -89.78,21.12 -15.59,14.08 -23.39,38.73 -23.39,73.94 0,45.27 1.51,90.03 4.53,134.29 3.02,44.26 4.53,89.02 4.53,134.29 0,21.12 -4.53,40.49 -13.58,58.09 -9.05,17.6 -20.87,33.19 -35.46,46.77 -14.59,13.58 -31.69,24.4 -51.3,32.44 -19.62,8.05 -39.98,13.58 -61.11,16.6 21.12,3.02 41.49,8.55 61.11,16.59 19.61,8.05 36.72,18.86 51.3,32.44 14.59,13.58 26.41,29.17 35.46,46.77 9.05,17.6 13.58,36.97 13.58,58.09 0,45.27 -1.51,90.28 -4.53,135.04 -3.02,44.76 -4.53,89.78 -4.53,135.05 0,35.21 7.79,59.85 23.39,73.94 15.59,14.08 45.52,21.12 89.78,21.12l33.2 0 0 123.73 -55.83 0z"/>
|
|
6
|
+
<path fill="#5F4D36" d="M1275.61 1411.31l0 -123.73 33.2 0c44.26,0 74.19,-7.04 89.78,-21.12 15.59,-14.08 23.39,-38.73 23.39,-73.94 0,-45.27 -1.51,-90.28 -4.53,-135.05 -3.02,-44.76 -4.53,-89.78 -4.53,-135.04 0,-21.12 4.53,-40.49 13.58,-58.09 9.05,-17.6 20.87,-33.19 35.46,-46.77 14.59,-13.58 31.69,-24.4 51.3,-32.44 19.61,-8.05 39.98,-13.58 61.11,-16.59 -21.12,-3.02 -41.5,-8.55 -61.11,-16.6 -19.62,-8.05 -36.72,-18.86 -51.3,-32.44 -14.59,-13.58 -26.41,-29.17 -35.46,-46.77 -9.05,-17.6 -13.58,-36.97 -13.58,-58.09 0,-45.27 1.51,-90.03 4.53,-134.29 3.02,-44.26 4.53,-89.02 4.53,-134.29 0,-35.21 -7.8,-59.85 -23.39,-73.94 -15.59,-14.08 -45.52,-21.12 -89.78,-21.12l-33.2 0 0 -123.73 55.83 0c54.32,0 98.33,4.78 132.03,14.34 33.7,9.55 59.85,24.14 78.46,43.76 18.61,19.61 30.93,44.51 36.97,74.69 6.03,30.17 9.05,65.38 9.05,105.62 0,9.05 -0.5,22.13 -1.51,39.23 -1.01,17.1 -1.76,34.7 -2.26,52.81 -0.5,18.11 -1.26,35.46 -2.27,52.06 -1.01,16.59 -1.51,28.41 -1.51,35.46 0,58.34 8.8,99.33 26.41,122.97 17.6,23.64 50.04,35.46 97.32,35.46l0 129.76c-47.28,0 -79.72,11.57 -97.32,34.7 -17.6,23.14 -26.41,63.88 -26.41,122.22 0,7.04 0.5,18.86 1.51,35.46 1.01,16.6 1.76,34.45 2.27,53.56 0.5,19.11 1.26,37.22 2.26,54.32 1.01,17.1 1.51,30.18 1.51,39.23 0,40.24 -3.02,75.44 -9.05,105.62 -6.04,30.18 -18.36,55.07 -36.97,74.69 -18.61,19.61 -44.76,34.2 -78.46,43.76 -33.7,9.55 -77.7,14.33 -132.03,14.33l-55.83 0z"/>
|
|
7
|
+
</svg
|
|
8
|
+
><span class="tracy-label"><?= Tracy\Helpers::escapeHtml($name) ?>
|
|
9
|
+
</span>
|
|
10
|
+
</span>
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
<?php
|
|
1
|
+
<?php declare(strict_types=1);
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* This file is part of the Latte (https://latte.nette.org)
|
|
5
5
|
* Copyright (c) 2008 David Grudl (https://davidgrudl.com)
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
declare(strict_types=1);
|
|
9
|
-
|
|
10
8
|
namespace Latte\Compiler;
|
|
11
9
|
|
|
12
10
|
use Latte\Compiler\Nodes\Php\ExpressionNode;
|
|
@@ -26,9 +24,9 @@ final class Block
|
|
|
26
24
|
|
|
27
25
|
|
|
28
26
|
public function __construct(
|
|
29
|
-
public
|
|
30
|
-
public
|
|
31
|
-
public
|
|
27
|
+
public readonly ExpressionNode $name,
|
|
28
|
+
public readonly int|string $layer,
|
|
29
|
+
public readonly Tag $tag,
|
|
32
30
|
) {
|
|
33
31
|
}
|
|
34
32
|
|