From 684749c2aa42dba55b6d9c44df118902d643ebc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=A0pa=C4=8Dek?= Date: Sun, 15 Oct 2023 14:29:58 +0200 Subject: [PATCH] Update packages - efabrica/phpstan-latte updated from 0.16.0 to 0.16.1 patch See changes: https://github.com/efabrica-team/phpstan-latte/compare/0.16.0...0.16.1 Release notes: https://github.com/efabrica-team/phpstan-latte/releases/tag/0.16.1 - latte/latte updated from v3.0.9 to v3.0.10 patch See changes: https://github.com/nette/latte/compare/v3.0.9...v3.0.10 Release notes: https://github.com/nette/latte/releases/tag/v3.0.10 - nette/application updated from v3.1.13 to v3.1.14 patch See changes: https://github.com/nette/application/compare/v3.1.13...v3.1.14 Release notes: https://github.com/nette/application/releases/tag/v3.1.14 - nette/di updated from v3.1.4 to v3.1.5 patch See changes: https://github.com/nette/di/compare/v3.1.4...v3.1.5 Release notes: https://github.com/nette/di/releases/tag/v3.1.5 - nette/forms updated from v3.1.11 to v3.1.12 patch See changes: https://github.com/nette/forms/compare/v3.1.11...v3.1.12 Release notes: https://github.com/nette/forms/releases/tag/v3.1.12 - nette/routing updated from v3.0.4 to v3.0.5 patch See changes: https://github.com/nette/routing/compare/v3.0.4...v3.0.5 Release notes: https://github.com/nette/routing/releases/tag/v3.0.5 - nette/schema updated from v1.2.4 to v1.2.5 patch See changes: https://github.com/nette/schema/compare/v1.2.4...v1.2.5 Release notes: https://github.com/nette/schema/releases/tag/v1.2.5 - phpstan/phpstan updated from 1.10.36 to 1.10.38 patch See changes: https://github.com/phpstan/phpstan/compare/1.10.36...1.10.38 Release notes: https://github.com/phpstan/phpstan/releases/tag/1.10.38 - roave/security-advisories updated from dev-latest@e20504c to dev-latest@efd3393 See changes: https://github.com/Roave/SecurityAdvisories/compare/e20504c...efd3393 - slevomat/coding-standard updated from 8.13.4 to 8.14.1 minor See changes: https://github.com/slevomat/coding-standard/compare/8.13.4...8.14.1 Release notes: https://github.com/slevomat/coding-standard/releases/tag/8.14.1 - symfony/cache updated from v6.3.4 to v6.3.5 patch See changes: https://github.com/symfony/cache/compare/v6.3.4...v6.3.5 Release notes: https://github.com/symfony/cache/releases/tag/v6.3.5 --- site/composer.lock | 165 ++++++++------- site/vendor/bin/latte-lint | 5 +- site/vendor/composer/autoload_classmap.php | 3 +- site/vendor/composer/autoload_static.php | 3 +- site/vendor/composer/installed.json | 185 ++++++++-------- site/vendor/composer/installed.php | 66 +++--- .../efabrica/phpstan-latte/CHANGELOG.md | 9 +- .../efabrica/phpstan-latte/composer.json | 2 +- .../efabrica/phpstan-latte/extension.neon | 1 + .../Compiler/Compiler/AbstractCompiler.php | 2 +- ...ParentNameToCompareWithNullNodeVisitor.php | 66 ++++++ .../NotNullableSnippetDriverNodeVisitor.php | 2 +- .../phpstan-latte/src/Error/ErrorBuilder.php | 1 + .../TemplateRenderCallsCollector.php | 2 +- ...bstractClassStandaloneTemplateResolver.php | 6 + .../NetteApplicationUIPresenterStandalone.php | 7 +- site/vendor/latte/latte/bin/latte-lint | 9 +- .../latte/src/Latte/Compiler/Escaper.php | 157 ++++++++------ .../Latte/Compiler/Nodes/Php/ModifierNode.php | 6 +- .../src/Latte/Compiler/TemplateLexer.php | 2 +- .../src/Latte/Compiler/TemplateParser.php | 19 +- site/vendor/latte/latte/src/Latte/Engine.php | 7 +- .../src/Latte/Essential/CoreExtension.php | 9 + .../latte/src/Latte/Essential/Filters.php | 8 +- .../src/Latte/Essential/Nodes/PrintNode.php | 19 +- .../src/Latte/Runtime/FilterExecutor.php | 94 ++++---- .../latte/latte/src/Latte/Runtime/Filters.php | 57 +++-- site/vendor/nette/application/composer.json | 2 +- site/vendor/nette/application/contributing.md | 33 --- .../src/Application/Application.php | 2 +- .../src/Application/Attributes/Parameter.php | 18 ++ .../src/Application/MicroPresenter.php | 5 +- .../src/Application/Routers/RouteList.php | 6 +- .../src/Application/UI/Component.php | 6 +- .../Application/UI/ComponentReflection.php | 157 +++++++------- .../src/Application/UI/Presenter.php | 4 +- .../src/Application/UI/StatePersistent.php | 4 +- .../Nodes/SnippetAreaNode.php | 13 +- .../ApplicationLatte/Nodes/SnippetNode.php | 17 +- .../{SnippetDriver.php => SnippetRuntime.php} | 2 +- .../Bridges/ApplicationLatte/UIExtension.php | 18 +- .../Bridges/ApplicationTracy/RoutingPanel.php | 143 +++++-------- .../templates/RoutingPanel.panel.phtml | 161 +++++++++----- .../nette/di/src/DI/Definitions/Statement.php | 2 +- .../src/DI/Extensions/ParametersExtension.php | 23 +- site/vendor/nette/forms/composer.json | 4 +- site/vendor/nette/forms/contributing.md | 33 --- site/vendor/nette/forms/package.json | 2 +- site/vendor/nette/forms/readme.md | 2 +- .../src/Bridges/FormsLatte/FormMacros.php | 9 +- .../FormsLatte/Nodes/FormNNameNode.php | 1 + .../src/Bridges/FormsLatte/Nodes/FormNode.php | 1 + .../forms/src/Bridges/FormsLatte/Runtime.php | 16 +- .../nette/forms/src/Forms/Container.php | 61 ++++-- .../src/Forms/Controls/UploadControl.php | 2 +- site/vendor/nette/forms/src/Forms/Form.php | 2 +- .../Forms/Rendering/DefaultFormRenderer.php | 4 - .../nette/forms/src/assets/netteForms.js | 122 ++++------- .../nette/forms/src/assets/netteForms.min.js | 44 ++-- site/vendor/nette/routing/readme.md | 2 +- .../nette/routing/src/Routing/RouteList.php | 38 +++- site/vendor/nette/schema/readme.md | 200 +++++++++++++----- .../nette/schema/src/Schema/Context.php | 10 + .../schema/src/Schema/Elements/AnyOf.php | 13 +- .../nette/schema/src/Schema/Elements/Base.php | 115 ++++------ .../schema/src/Schema/Elements/Structure.php | 24 +-- .../nette/schema/src/Schema/Elements/Type.php | 59 +++--- .../nette/schema/src/Schema/Helpers.php | 87 ++++++++ site/vendor/phpstan/phpstan/phpstan.phar | Bin 22082223 -> 22085270 bytes site/vendor/phpstan/phpstan/phpstan.phar.asc | 26 +-- .../vendor/slevomat/coding-standard/README.md | 1 + .../Helpers/NamespaceHelper.php | 16 +- .../DisallowImplicitArrayCreationSniff.php | 15 ++ .../Sniffs/Classes/ConstantSpacingSniff.php | 3 +- .../InlineDocCommentDeclarationSniff.php | 3 +- .../AbstractLineCondition.php | 10 + .../AssignmentInConditionSniff.php | 9 + .../RequireNullSafeObjectOperatorSniff.php | 6 +- .../RequireNonCapturingCatchSniff.php | 6 +- .../Functions/NamedArgumentSpacingSniff.php | 79 +++++++ .../AbstractFullyQualifiedGlobalReference.php | 5 + .../AlphabeticallySortedUsesSniff.php | 7 + ...llyQualifiedClassNameInAnnotationSniff.php | 16 +- .../ReferenceUsedNamesOnlySniff.php | 4 + .../Sniffs/PHP/UselessParenthesesSniff.php | 6 +- .../slevomat/coding-standard/composer.json | 11 +- .../slevomat/coding-standard/doc/functions.md | 4 + .../coding-standard/doc/namespaces.md | 4 + .../symfony/cache/Traits/Redis6Proxy.php | 8 +- .../symfony/cache/Traits/RedisTrait.php | 32 ++- .../symfony/cache/Traits/RelayProxy.php | 5 + 91 files changed, 1589 insertions(+), 1066 deletions(-) create mode 100644 site/vendor/efabrica/phpstan-latte/src/Compiler/NodeVisitor/ChangeGetParentNameToCompareWithNullNodeVisitor.php delete mode 100644 site/vendor/nette/application/contributing.md create mode 100644 site/vendor/nette/application/src/Application/Attributes/Parameter.php rename site/vendor/nette/application/src/Bridges/ApplicationLatte/{SnippetDriver.php => SnippetRuntime.php} (99%) delete mode 100644 site/vendor/nette/forms/contributing.md create mode 100644 site/vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Functions/NamedArgumentSpacingSniff.php diff --git a/site/composer.lock b/site/composer.lock index 4c842e183..0ec6092da 100644 --- a/site/composer.lock +++ b/site/composer.lock @@ -95,16 +95,16 @@ }, { "name": "latte/latte", - "version": "v3.0.9", + "version": "v3.0.10", "source": { "type": "git", "url": "https://github.com/nette/latte.git", - "reference": "e24c4123659d0177bf28561827e117fe7453c355" + "reference": "794f252da7437499e467766d633eed85e1a437b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/latte/zipball/e24c4123659d0177bf28561827e117fe7453c355", - "reference": "e24c4123659d0177bf28561827e117fe7453c355", + "url": "https://api.github.com/repos/nette/latte/zipball/794f252da7437499e467766d633eed85e1a437b7", + "reference": "794f252da7437499e467766d633eed85e1a437b7", "shasum": "" }, "require": { @@ -174,28 +174,28 @@ ], "support": { "issues": "https://github.com/nette/latte/issues", - "source": "https://github.com/nette/latte/tree/v3.0.9" + "source": "https://github.com/nette/latte/tree/v3.0.10" }, - "time": "2023-09-08T10:05:30+00:00" + "time": "2023-10-11T13:42:28+00:00" }, { "name": "nette/application", - "version": "v3.1.13", + "version": "v3.1.14", "source": { "type": "git", "url": "https://github.com/nette/application.git", - "reference": "83f5144840a1aa38eb7bae58ce58a9d0c5f10177" + "reference": "0729ede7e66fad642046a3eb670d368845272573" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/application/zipball/83f5144840a1aa38eb7bae58ce58a9d0c5f10177", - "reference": "83f5144840a1aa38eb7bae58ce58a9d0c5f10177", + "url": "https://api.github.com/repos/nette/application/zipball/0729ede7e66fad642046a3eb670d368845272573", + "reference": "0729ede7e66fad642046a3eb670d368845272573", "shasum": "" }, "require": { "nette/component-model": "^3.0", "nette/http": "^3.0.2", - "nette/routing": "^3.0.2", + "nette/routing": "^3.0.5", "nette/utils": "^3.2.1 || ~4.0.0", "php": ">=7.2" }, @@ -266,9 +266,9 @@ ], "support": { "issues": "https://github.com/nette/application/issues", - "source": "https://github.com/nette/application/tree/v3.1.13" + "source": "https://github.com/nette/application/tree/v3.1.14" }, - "time": "2023-08-27T10:38:40+00:00" + "time": "2023-10-09T02:45:43+00:00" }, { "name": "nette/bootstrap", @@ -625,16 +625,16 @@ }, { "name": "nette/di", - "version": "v3.1.4", + "version": "v3.1.5", "source": { "type": "git", "url": "https://github.com/nette/di.git", - "reference": "9c8a52dac6d7130e658df5cd819d17e1fde715ea" + "reference": "00ea0afa643b3b4383a5cd1a322656c989ade498" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/di/zipball/9c8a52dac6d7130e658df5cd819d17e1fde715ea", - "reference": "9c8a52dac6d7130e658df5cd819d17e1fde715ea", + "url": "https://api.github.com/repos/nette/di/zipball/00ea0afa643b3b4383a5cd1a322656c989ade498", + "reference": "00ea0afa643b3b4383a5cd1a322656c989ade498", "shasum": "" }, "require": { @@ -691,35 +691,35 @@ ], "support": { "issues": "https://github.com/nette/di/issues", - "source": "https://github.com/nette/di/tree/v3.1.4" + "source": "https://github.com/nette/di/tree/v3.1.5" }, - "time": "2023-09-29T12:04:58+00:00" + "time": "2023-10-02T19:58:38+00:00" }, { "name": "nette/forms", - "version": "v3.1.11", + "version": "v3.1.12", "source": { "type": "git", "url": "https://github.com/nette/forms.git", - "reference": "64cdc2d6796a8fe1265bb21a6ee5e9ff93e2b3a4" + "reference": "6c1db887a4cdaf5679203bfd658bac958fc04d99" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/forms/zipball/64cdc2d6796a8fe1265bb21a6ee5e9ff93e2b3a4", - "reference": "64cdc2d6796a8fe1265bb21a6ee5e9ff93e2b3a4", + "url": "https://api.github.com/repos/nette/forms/zipball/6c1db887a4cdaf5679203bfd658bac958fc04d99", + "reference": "6c1db887a4cdaf5679203bfd658bac958fc04d99", "shasum": "" }, "require": { "nette/component-model": "^3.0", "nette/http": "^3.1", "nette/utils": "^3.2.5 || ~4.0.0", - "php": ">=7.2 <8.3" + "php": "7.2 - 8.3" }, "conflict": { "latte/latte": ">=3.1" }, "require-dev": { - "latte/latte": "^2.10.2 || ^3.0.3", + "latte/latte": "^2.10.2 || ^3.0.8", "nette/application": "^3.0", "nette/di": "^3.0", "nette/tester": "^2.4", @@ -765,9 +765,9 @@ ], "support": { "issues": "https://github.com/nette/forms/issues", - "source": "https://github.com/nette/forms/tree/v3.1.11" + "source": "https://github.com/nette/forms/tree/v3.1.12" }, - "time": "2023-03-08T23:56:24+00:00" + "time": "2023-10-10T00:56:51+00:00" }, { "name": "nette/http", @@ -1123,16 +1123,16 @@ }, { "name": "nette/routing", - "version": "v3.0.4", + "version": "v3.0.5", "source": { "type": "git", "url": "https://github.com/nette/routing.git", - "reference": "eaefe6375303799366f3e43977daaf33f5f89b95" + "reference": "ff709ff9ed38a14c4fe3472534526593a8461ff5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/routing/zipball/eaefe6375303799366f3e43977daaf33f5f89b95", - "reference": "eaefe6375303799366f3e43977daaf33f5f89b95", + "url": "https://api.github.com/repos/nette/routing/zipball/ff709ff9ed38a14c4fe3472534526593a8461ff5", + "reference": "ff709ff9ed38a14c4fe3472534526593a8461ff5", "shasum": "" }, "require": { @@ -1179,22 +1179,22 @@ ], "support": { "issues": "https://github.com/nette/routing/issues", - "source": "https://github.com/nette/routing/tree/v3.0.4" + "source": "https://github.com/nette/routing/tree/v3.0.5" }, - "time": "2023-01-18T04:58:41+00:00" + "time": "2023-10-08T21:37:46+00:00" }, { "name": "nette/schema", - "version": "v1.2.4", + "version": "v1.2.5", "source": { "type": "git", "url": "https://github.com/nette/schema.git", - "reference": "c9ff517a53903b3d4e29ec547fb20feecb05b8ab" + "reference": "0462f0166e823aad657c9224d0f849ecac1ba10a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/schema/zipball/c9ff517a53903b3d4e29ec547fb20feecb05b8ab", - "reference": "c9ff517a53903b3d4e29ec547fb20feecb05b8ab", + "url": "https://api.github.com/repos/nette/schema/zipball/0462f0166e823aad657c9224d0f849ecac1ba10a", + "reference": "0462f0166e823aad657c9224d0f849ecac1ba10a", "shasum": "" }, "require": { @@ -1241,9 +1241,9 @@ ], "support": { "issues": "https://github.com/nette/schema/issues", - "source": "https://github.com/nette/schema/tree/v1.2.4" + "source": "https://github.com/nette/schema/tree/v1.2.5" }, - "time": "2023-08-05T18:56:25+00:00" + "time": "2023-10-05T20:37:59+00:00" }, { "name": "nette/security", @@ -2224,16 +2224,16 @@ }, { "name": "symfony/cache", - "version": "v6.3.4", + "version": "v6.3.5", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "e60d00b4f633efa4c1ef54e77c12762d9073e7b3" + "reference": "6c1a3ea078c4d88ee892530945df63a87981b2da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/e60d00b4f633efa4c1ef54e77c12762d9073e7b3", - "reference": "e60d00b4f633efa4c1ef54e77c12762d9073e7b3", + "url": "https://api.github.com/repos/symfony/cache/zipball/6c1a3ea078c4d88ee892530945df63a87981b2da", + "reference": "6c1a3ea078c4d88ee892530945df63a87981b2da", "shasum": "" }, "require": { @@ -2300,7 +2300,7 @@ "psr6" ], "support": { - "source": "https://github.com/symfony/cache/tree/v6.3.4" + "source": "https://github.com/symfony/cache/tree/v6.3.5" }, "funding": [ { @@ -2316,7 +2316,7 @@ "type": "tidelift" } ], - "time": "2023-08-05T09:10:27+00:00" + "time": "2023-09-26T15:48:55+00:00" }, { "name": "symfony/cache-contracts", @@ -3151,16 +3151,16 @@ }, { "name": "efabrica/phpstan-latte", - "version": "0.16.0", + "version": "0.16.1", "source": { "type": "git", "url": "https://github.com/efabrica-team/phpstan-latte.git", - "reference": "b4a505ff3f2d93f570f914716123e77386aa6dde" + "reference": "af52e65f0d7c5bfd29e4625ebc1f3449f0a2a660" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/efabrica-team/phpstan-latte/zipball/b4a505ff3f2d93f570f914716123e77386aa6dde", - "reference": "b4a505ff3f2d93f570f914716123e77386aa6dde", + "url": "https://api.github.com/repos/efabrica-team/phpstan-latte/zipball/af52e65f0d7c5bfd29e4625ebc1f3449f0a2a660", + "reference": "af52e65f0d7c5bfd29e4625ebc1f3449f0a2a660", "shasum": "" }, "require": { @@ -3175,7 +3175,7 @@ "require-dev": { "efabrica/coding-standard": "^0.5", "nette/application": "^3.1.6", - "nette/forms": "^3.1.11", + "nette/forms": "^3.1.12", "nikic/php-parser": "^4.15", "phpstan/phpstan-strict-rules": "^1.4", "phpunit/phpunit": "^9.5", @@ -3203,9 +3203,9 @@ ], "support": { "issues": "https://github.com/efabrica-team/phpstan-latte/issues", - "source": "https://github.com/efabrica-team/phpstan-latte/tree/0.16.0" + "source": "https://github.com/efabrica-team/phpstan-latte/tree/0.16.1" }, - "time": "2023-08-24T19:50:59+00:00" + "time": "2023-10-11T21:28:12+00:00" }, { "name": "nette/tester", @@ -3440,16 +3440,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.36", + "version": "1.10.38", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "ffa3089511121a672e62969404e4fddc753f9b15" + "reference": "5302bb402c57f00fb3c2c015bac86e0827e4b691" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ffa3089511121a672e62969404e4fddc753f9b15", - "reference": "ffa3089511121a672e62969404e4fddc753f9b15", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/5302bb402c57f00fb3c2c015bac86e0827e4b691", + "reference": "5302bb402c57f00fb3c2c015bac86e0827e4b691", "shasum": "" }, "require": { @@ -3498,7 +3498,7 @@ "type": "tidelift" } ], - "time": "2023-09-29T14:07:45+00:00" + "time": "2023-10-06T14:19:14+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", @@ -3651,12 +3651,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "e20504c9fbbbccaea0de9d07e625c77dd4f7d4ea" + "reference": "efd339340c840237fad050f3ea6fd8bbbbfc7ed6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/e20504c9fbbbccaea0de9d07e625c77dd4f7d4ea", - "reference": "e20504c9fbbbccaea0de9d07e625c77dd4f7d4ea", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/efd339340c840237fad050f3ea6fd8bbbbfc7ed6", + "reference": "efd339340c840237fad050f3ea6fd8bbbbfc7ed6", "shasum": "" }, "conflict": { @@ -3734,8 +3734,8 @@ "codeigniter4/framework": "<4.3.5", "codeigniter4/shield": "<1.0.0.0-beta4", "codiad/codiad": "<=2.8.4", - "composer/composer": "<1.10.26|>=2,<2.2.12|>=2.3,<2.3.5", - "concrete5/concrete5": "<9.2", + "composer/composer": "<1.10.27|>=2,<2.2.22|>=2.3,<2.6.4", + "concrete5/concrete5": "<=9.2.1", "concrete5/core": "<8.5.8|>=9,<9.1", "contao-components/mediaelement": ">=2.14.2,<2.21.1", "contao/contao": ">=4,<4.4.56|>=4.5,<4.9.40|>=4.10,<4.11.7|>=4.13,<4.13.21|>=5.1,<5.1.4", @@ -3767,7 +3767,7 @@ "doctrine/mongodb-odm": ">=1,<1.0.2", "doctrine/mongodb-odm-bundle": ">=2,<3.0.1", "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4", - "dolibarr/dolibarr": "<17.0.1", + "dolibarr/dolibarr": "<18", "dompdf/dompdf": "<2.0.2|==2.0.2", "drupal/core": "<9.4.14|>=9.5,<9.5.8|>=10,<10.0.8", "drupal/drupal": ">=6,<6.38|>=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4", @@ -3873,7 +3873,7 @@ "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", "illuminate/view": "<6.20.42|>=7,<7.30.6|>=8,<8.75", "impresscms/impresscms": "<=1.4.5", - "in2code/femanager": "<5.5.3|>=6,<6.3.4|>=7,<7.1", + "in2code/femanager": "<5.5.3|>=6,<6.3.4|>=7,<7.2.2", "in2code/ipandlanguageredirect": "<5.1.2", "in2code/lux": "<17.6.1|>=18,<24.0.2", "innologi/typo3-appointments": "<2.0.6", @@ -3891,7 +3891,7 @@ "joomla/filter": "<1.4.4|>=2,<2.0.1", "joomla/framework": ">=2.5.4,<=3.8.12", "joomla/input": ">=2,<2.0.2", - "joomla/joomla-cms": "<3.9.12", + "joomla/joomla-cms": ">=2.5,<3.9.12", "joomla/session": "<1.3.1", "joyqi/hyper-down": "<=2.4.27", "jsdecena/laracom": "<2.0.9", @@ -3988,7 +3988,7 @@ "openmage/magento-lts": "<=19.5|>=20,<=20.1", "opensource-workshop/connect-cms": "<1.7.2|>=2,<2.3.2", "orchid/platform": ">=9,<9.4.4|>=14.0.0.0-alpha4,<14.5", - "oro/commerce": ">=4.1,<5.0.6", + "oro/commerce": ">=4.1,<5.0.11|>=5.1,<5.1.1", "oro/crm": ">=1.7,<1.7.4|>=3.1,<4.1.17|>=4.2,<4.2.7", "oro/platform": ">=1.7,<1.7.4|>=3.1,<3.1.29|>=4.1,<4.1.17|>=4.2,<4.2.8", "oxid-esales/oxideshop-ce": "<4.5", @@ -4046,11 +4046,12 @@ "propel/propel": ">=2.0.0.0-alpha1,<=2.0.0.0-alpha7", "propel/propel1": ">=1,<=1.7.1", "pterodactyl/panel": "<1.7", - "ptheofan/yii2-statemachine": ">=2", + "ptheofan/yii2-statemachine": ">=2.0.0.0-RC1-dev,<=2", "ptrofimov/beanstalk_console": "<1.7.14", "pusher/pusher-php-server": "<2.2.1", "pwweb/laravel-core": "<=0.3.6.0-beta", "pyrocms/pyrocms": "<=3.9.1", + "rainlab/blog-plugin": "<1.4.1", "rainlab/debugbar-plugin": "<3.1", "rainlab/user-plugin": "<=1.4.5", "rankmath/seo-by-rank-math": "<=1.0.95", @@ -4108,7 +4109,7 @@ "slim/slim": "<2.6", "slub/slub-events": "<3.0.3", "smarty/smarty": "<3.1.48|>=4,<4.3.1", - "snipe/snipe-it": "<=6.0.14", + "snipe/snipe-it": "<=6.2.2", "socalnick/scn-social-auth": "<1.15.2", "socialiteproviders/steam": "<1.1", "spatie/browsershot": "<3.57.4", @@ -4186,7 +4187,7 @@ "topthink/think": "<=6.1.1", "topthink/thinkphp": "<=3.2.3", "tpwd/ke_search": "<4.0.3|>=4.1,<4.6.6|>=5,<5.0.2", - "tribalsystems/zenario": "<=9.3.57595", + "tribalsystems/zenario": "<=9.4.59197", "truckersmp/phpwhois": "<=4.3.1", "ttskch/pagination-service-provider": "<1", "twig/twig": "<1.44.7|>=2,<2.15.3|>=3,<3.4.3", @@ -4214,7 +4215,7 @@ "vrana/adminer": "<4.8.1", "waldhacker/hcaptcha": "<2.1.2", "wallabag/tcpdf": "<6.2.22", - "wallabag/wallabag": "<=2.6.2", + "wallabag/wallabag": "<2.6.7", "wanglelecc/laracms": "<=1.0.3", "web-auth/webauthn-framework": ">=3.3,<3.3.4", "webbuilders-group/silverstripe-kapost-bridge": "<0.4", @@ -4323,36 +4324,36 @@ "type": "tidelift" } ], - "time": "2023-09-28T17:04:13+00:00" + "time": "2023-10-11T21:04:21+00:00" }, { "name": "slevomat/coding-standard", - "version": "8.13.4", + "version": "8.14.1", "source": { "type": "git", "url": "https://github.com/slevomat/coding-standard.git", - "reference": "4b2af2fb17773656d02fbfb5d18024ebd19fe322" + "reference": "fea1fd6f137cc84f9cba0ae30d549615dbc6a926" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/4b2af2fb17773656d02fbfb5d18024ebd19fe322", - "reference": "4b2af2fb17773656d02fbfb5d18024ebd19fe322", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/fea1fd6f137cc84f9cba0ae30d549615dbc6a926", + "reference": "fea1fd6f137cc84f9cba0ae30d549615dbc6a926", "shasum": "" }, "require": { "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7 || ^1.0", "php": "^7.2 || ^8.0", - "phpstan/phpdoc-parser": "^1.23.0", + "phpstan/phpdoc-parser": "^1.23.1", "squizlabs/php_codesniffer": "^3.7.1" }, "require-dev": { "phing/phing": "2.17.4", "php-parallel-lint/php-parallel-lint": "1.3.2", - "phpstan/phpstan": "1.10.26", - "phpstan/phpstan-deprecation-rules": "1.1.3", - "phpstan/phpstan-phpunit": "1.3.13", + "phpstan/phpstan": "1.10.37", + "phpstan/phpstan-deprecation-rules": "1.1.4", + "phpstan/phpstan-phpunit": "1.3.14", "phpstan/phpstan-strict-rules": "1.5.1", - "phpunit/phpunit": "7.5.20|8.5.21|9.6.8|10.2.6" + "phpunit/phpunit": "8.5.21|9.6.8|10.3.5" }, "type": "phpcodesniffer-standard", "extra": { @@ -4376,7 +4377,7 @@ ], "support": { "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/8.13.4" + "source": "https://github.com/slevomat/coding-standard/tree/8.14.1" }, "funding": [ { @@ -4388,7 +4389,7 @@ "type": "tidelift" } ], - "time": "2023-07-25T10:28:55+00:00" + "time": "2023-10-08T07:28:08+00:00" }, { "name": "spaze/coding-standard", diff --git a/site/vendor/bin/latte-lint b/site/vendor/bin/latte-lint index b55fbece3..df90b8128 100755 --- a/site/vendor/bin/latte-lint +++ b/site/vendor/bin/latte-lint @@ -112,9 +112,8 @@ if (PHP_VERSION_ID < 80000) { (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) ) { - include("phpvfscomposer://" . __DIR__ . '/..'.'/latte/latte/bin/latte-lint'); - exit(0); + return include("phpvfscomposer://" . __DIR__ . '/..'.'/latte/latte/bin/latte-lint'); } } -include __DIR__ . '/..'.'/latte/latte/bin/latte-lint'; +return include __DIR__ . '/..'.'/latte/latte/bin/latte-lint'; diff --git a/site/vendor/composer/autoload_classmap.php b/site/vendor/composer/autoload_classmap.php index b7d6b0a2c..4be37335f 100644 --- a/site/vendor/composer/autoload_classmap.php +++ b/site/vendor/composer/autoload_classmap.php @@ -227,6 +227,7 @@ 'Nette\\Application\\Application' => $vendorDir . '/nette/application/src/Application/Application.php', 'Nette\\Application\\ApplicationException' => $vendorDir . '/nette/application/src/Application/exceptions.php', 'Nette\\Application\\Attributes\\CrossOrigin' => $vendorDir . '/nette/application/src/Application/Attributes/CrossOrigin.php', + 'Nette\\Application\\Attributes\\Parameter' => $vendorDir . '/nette/application/src/Application/Attributes/Parameter.php', 'Nette\\Application\\Attributes\\Persistent' => $vendorDir . '/nette/application/src/Application/Attributes/Persistent.php', 'Nette\\Application\\BadRequestException' => $vendorDir . '/nette/application/src/Application/exceptions.php', 'Nette\\Application\\ForbiddenRequestException' => $vendorDir . '/nette/application/src/Application/exceptions.php', @@ -292,7 +293,7 @@ 'Nette\\Bridges\\ApplicationLatte\\Nodes\\SnippetNode' => $vendorDir . '/nette/application/src/Bridges/ApplicationLatte/Nodes/SnippetNode.php', 'Nette\\Bridges\\ApplicationLatte\\Nodes\\TemplatePrintNode' => $vendorDir . '/nette/application/src/Bridges/ApplicationLatte/Nodes/TemplatePrintNode.php', 'Nette\\Bridges\\ApplicationLatte\\SnippetBridge' => $vendorDir . '/nette/application/src/Bridges/ApplicationLatte/SnippetBridge.php', - 'Nette\\Bridges\\ApplicationLatte\\SnippetDriver' => $vendorDir . '/nette/application/src/Bridges/ApplicationLatte/SnippetDriver.php', + 'Nette\\Bridges\\ApplicationLatte\\SnippetRuntime' => $vendorDir . '/nette/application/src/Bridges/ApplicationLatte/SnippetRuntime.php', 'Nette\\Bridges\\ApplicationLatte\\Template' => $vendorDir . '/nette/application/src/Bridges/ApplicationLatte/Template.php', 'Nette\\Bridges\\ApplicationLatte\\TemplateFactory' => $vendorDir . '/nette/application/src/Bridges/ApplicationLatte/TemplateFactory.php', 'Nette\\Bridges\\ApplicationLatte\\UIExtension' => $vendorDir . '/nette/application/src/Bridges/ApplicationLatte/UIExtension.php', diff --git a/site/vendor/composer/autoload_static.php b/site/vendor/composer/autoload_static.php index f96d8c819..cdc0843c8 100644 --- a/site/vendor/composer/autoload_static.php +++ b/site/vendor/composer/autoload_static.php @@ -417,6 +417,7 @@ class ComposerStaticInit247de957f14f643f393d210a332dd05b 'Nette\\Application\\Application' => __DIR__ . '/..' . '/nette/application/src/Application/Application.php', 'Nette\\Application\\ApplicationException' => __DIR__ . '/..' . '/nette/application/src/Application/exceptions.php', 'Nette\\Application\\Attributes\\CrossOrigin' => __DIR__ . '/..' . '/nette/application/src/Application/Attributes/CrossOrigin.php', + 'Nette\\Application\\Attributes\\Parameter' => __DIR__ . '/..' . '/nette/application/src/Application/Attributes/Parameter.php', 'Nette\\Application\\Attributes\\Persistent' => __DIR__ . '/..' . '/nette/application/src/Application/Attributes/Persistent.php', 'Nette\\Application\\BadRequestException' => __DIR__ . '/..' . '/nette/application/src/Application/exceptions.php', 'Nette\\Application\\ForbiddenRequestException' => __DIR__ . '/..' . '/nette/application/src/Application/exceptions.php', @@ -482,7 +483,7 @@ class ComposerStaticInit247de957f14f643f393d210a332dd05b 'Nette\\Bridges\\ApplicationLatte\\Nodes\\SnippetNode' => __DIR__ . '/..' . '/nette/application/src/Bridges/ApplicationLatte/Nodes/SnippetNode.php', 'Nette\\Bridges\\ApplicationLatte\\Nodes\\TemplatePrintNode' => __DIR__ . '/..' . '/nette/application/src/Bridges/ApplicationLatte/Nodes/TemplatePrintNode.php', 'Nette\\Bridges\\ApplicationLatte\\SnippetBridge' => __DIR__ . '/..' . '/nette/application/src/Bridges/ApplicationLatte/SnippetBridge.php', - 'Nette\\Bridges\\ApplicationLatte\\SnippetDriver' => __DIR__ . '/..' . '/nette/application/src/Bridges/ApplicationLatte/SnippetDriver.php', + 'Nette\\Bridges\\ApplicationLatte\\SnippetRuntime' => __DIR__ . '/..' . '/nette/application/src/Bridges/ApplicationLatte/SnippetRuntime.php', 'Nette\\Bridges\\ApplicationLatte\\Template' => __DIR__ . '/..' . '/nette/application/src/Bridges/ApplicationLatte/Template.php', 'Nette\\Bridges\\ApplicationLatte\\TemplateFactory' => __DIR__ . '/..' . '/nette/application/src/Bridges/ApplicationLatte/TemplateFactory.php', 'Nette\\Bridges\\ApplicationLatte\\UIExtension' => __DIR__ . '/..' . '/nette/application/src/Bridges/ApplicationLatte/UIExtension.php', diff --git a/site/vendor/composer/installed.json b/site/vendor/composer/installed.json index 5f6f5d41c..1188e1c88 100644 --- a/site/vendor/composer/installed.json +++ b/site/vendor/composer/installed.json @@ -173,17 +173,17 @@ }, { "name": "efabrica/phpstan-latte", - "version": "0.16.0", - "version_normalized": "0.16.0.0", + "version": "0.16.1", + "version_normalized": "0.16.1.0", "source": { "type": "git", "url": "https://github.com/efabrica-team/phpstan-latte.git", - "reference": "b4a505ff3f2d93f570f914716123e77386aa6dde" + "reference": "af52e65f0d7c5bfd29e4625ebc1f3449f0a2a660" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/efabrica-team/phpstan-latte/zipball/b4a505ff3f2d93f570f914716123e77386aa6dde", - "reference": "b4a505ff3f2d93f570f914716123e77386aa6dde", + "url": "https://api.github.com/repos/efabrica-team/phpstan-latte/zipball/af52e65f0d7c5bfd29e4625ebc1f3449f0a2a660", + "reference": "af52e65f0d7c5bfd29e4625ebc1f3449f0a2a660", "shasum": "" }, "require": { @@ -198,13 +198,13 @@ "require-dev": { "efabrica/coding-standard": "^0.5", "nette/application": "^3.1.6", - "nette/forms": "^3.1.11", + "nette/forms": "^3.1.12", "nikic/php-parser": "^4.15", "phpstan/phpstan-strict-rules": "^1.4", "phpunit/phpunit": "^9.5", "spaze/phpstan-disallowed-calls": "^2.11" }, - "time": "2023-08-24T19:50:59+00:00", + "time": "2023-10-11T21:28:12+00:00", "type": "library", "extra": { "phpstan": { @@ -228,23 +228,23 @@ ], "support": { "issues": "https://github.com/efabrica-team/phpstan-latte/issues", - "source": "https://github.com/efabrica-team/phpstan-latte/tree/0.16.0" + "source": "https://github.com/efabrica-team/phpstan-latte/tree/0.16.1" }, "install-path": "../efabrica/phpstan-latte" }, { "name": "latte/latte", - "version": "v3.0.9", - "version_normalized": "3.0.9.0", + "version": "v3.0.10", + "version_normalized": "3.0.10.0", "source": { "type": "git", "url": "https://github.com/nette/latte.git", - "reference": "e24c4123659d0177bf28561827e117fe7453c355" + "reference": "794f252da7437499e467766d633eed85e1a437b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/latte/zipball/e24c4123659d0177bf28561827e117fe7453c355", - "reference": "e24c4123659d0177bf28561827e117fe7453c355", + "url": "https://api.github.com/repos/nette/latte/zipball/794f252da7437499e467766d633eed85e1a437b7", + "reference": "794f252da7437499e467766d633eed85e1a437b7", "shasum": "" }, "require": { @@ -270,7 +270,7 @@ "nette/php-generator": "to use tag {templatePrint}", "nette/utils": "to use filter |webalize" }, - "time": "2023-09-08T10:05:30+00:00", + "time": "2023-10-11T13:42:28+00:00", "bin": [ "bin/latte-lint" ], @@ -316,29 +316,29 @@ ], "support": { "issues": "https://github.com/nette/latte/issues", - "source": "https://github.com/nette/latte/tree/v3.0.9" + "source": "https://github.com/nette/latte/tree/v3.0.10" }, "install-path": "../latte/latte" }, { "name": "nette/application", - "version": "v3.1.13", - "version_normalized": "3.1.13.0", + "version": "v3.1.14", + "version_normalized": "3.1.14.0", "source": { "type": "git", "url": "https://github.com/nette/application.git", - "reference": "83f5144840a1aa38eb7bae58ce58a9d0c5f10177" + "reference": "0729ede7e66fad642046a3eb670d368845272573" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/application/zipball/83f5144840a1aa38eb7bae58ce58a9d0c5f10177", - "reference": "83f5144840a1aa38eb7bae58ce58a9d0c5f10177", + "url": "https://api.github.com/repos/nette/application/zipball/0729ede7e66fad642046a3eb670d368845272573", + "reference": "0729ede7e66fad642046a3eb670d368845272573", "shasum": "" }, "require": { "nette/component-model": "^3.0", "nette/http": "^3.0.2", - "nette/routing": "^3.0.2", + "nette/routing": "^3.0.5", "nette/utils": "^3.2.1 || ~4.0.0", "php": ">=7.2" }, @@ -366,7 +366,7 @@ "latte/latte": "Allows using Latte in templates", "nette/forms": "Allows to use Nette\\Application\\UI\\Form" }, - "time": "2023-08-27T10:38:40+00:00", + "time": "2023-10-09T02:45:43+00:00", "type": "library", "extra": { "branch-alias": { @@ -411,7 +411,7 @@ ], "support": { "issues": "https://github.com/nette/application/issues", - "source": "https://github.com/nette/application/tree/v3.1.13" + "source": "https://github.com/nette/application/tree/v3.1.14" }, "install-path": "../nette/application" }, @@ -785,17 +785,17 @@ }, { "name": "nette/di", - "version": "v3.1.4", - "version_normalized": "3.1.4.0", + "version": "v3.1.5", + "version_normalized": "3.1.5.0", "source": { "type": "git", "url": "https://github.com/nette/di.git", - "reference": "9c8a52dac6d7130e658df5cd819d17e1fde715ea" + "reference": "00ea0afa643b3b4383a5cd1a322656c989ade498" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/di/zipball/9c8a52dac6d7130e658df5cd819d17e1fde715ea", - "reference": "9c8a52dac6d7130e658df5cd819d17e1fde715ea", + "url": "https://api.github.com/repos/nette/di/zipball/00ea0afa643b3b4383a5cd1a322656c989ade498", + "reference": "00ea0afa643b3b4383a5cd1a322656c989ade498", "shasum": "" }, "require": { @@ -812,7 +812,7 @@ "phpstan/phpstan": "^1.0", "tracy/tracy": "^2.9" }, - "time": "2023-09-29T12:04:58+00:00", + "time": "2023-10-02T19:58:38+00:00", "type": "library", "extra": { "branch-alias": { @@ -854,43 +854,43 @@ ], "support": { "issues": "https://github.com/nette/di/issues", - "source": "https://github.com/nette/di/tree/v3.1.4" + "source": "https://github.com/nette/di/tree/v3.1.5" }, "install-path": "../nette/di" }, { "name": "nette/forms", - "version": "v3.1.11", - "version_normalized": "3.1.11.0", + "version": "v3.1.12", + "version_normalized": "3.1.12.0", "source": { "type": "git", "url": "https://github.com/nette/forms.git", - "reference": "64cdc2d6796a8fe1265bb21a6ee5e9ff93e2b3a4" + "reference": "6c1db887a4cdaf5679203bfd658bac958fc04d99" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/forms/zipball/64cdc2d6796a8fe1265bb21a6ee5e9ff93e2b3a4", - "reference": "64cdc2d6796a8fe1265bb21a6ee5e9ff93e2b3a4", + "url": "https://api.github.com/repos/nette/forms/zipball/6c1db887a4cdaf5679203bfd658bac958fc04d99", + "reference": "6c1db887a4cdaf5679203bfd658bac958fc04d99", "shasum": "" }, "require": { "nette/component-model": "^3.0", "nette/http": "^3.1", "nette/utils": "^3.2.5 || ~4.0.0", - "php": ">=7.2 <8.3" + "php": "7.2 - 8.3" }, "conflict": { "latte/latte": ">=3.1" }, "require-dev": { - "latte/latte": "^2.10.2 || ^3.0.3", + "latte/latte": "^2.10.2 || ^3.0.8", "nette/application": "^3.0", "nette/di": "^3.0", "nette/tester": "^2.4", "phpstan/phpstan-nette": "^1", "tracy/tracy": "^2.9" }, - "time": "2023-03-08T23:56:24+00:00", + "time": "2023-10-10T00:56:51+00:00", "type": "library", "extra": { "branch-alias": { @@ -931,7 +931,7 @@ ], "support": { "issues": "https://github.com/nette/forms/issues", - "source": "https://github.com/nette/forms/tree/v3.1.11" + "source": "https://github.com/nette/forms/tree/v3.1.12" }, "install-path": "../nette/forms" }, @@ -1304,17 +1304,17 @@ }, { "name": "nette/routing", - "version": "v3.0.4", - "version_normalized": "3.0.4.0", + "version": "v3.0.5", + "version_normalized": "3.0.5.0", "source": { "type": "git", "url": "https://github.com/nette/routing.git", - "reference": "eaefe6375303799366f3e43977daaf33f5f89b95" + "reference": "ff709ff9ed38a14c4fe3472534526593a8461ff5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/routing/zipball/eaefe6375303799366f3e43977daaf33f5f89b95", - "reference": "eaefe6375303799366f3e43977daaf33f5f89b95", + "url": "https://api.github.com/repos/nette/routing/zipball/ff709ff9ed38a14c4fe3472534526593a8461ff5", + "reference": "ff709ff9ed38a14c4fe3472534526593a8461ff5", "shasum": "" }, "require": { @@ -1327,7 +1327,7 @@ "phpstan/phpstan": "^1", "tracy/tracy": "^2.3" }, - "time": "2023-01-18T04:58:41+00:00", + "time": "2023-10-08T21:37:46+00:00", "type": "library", "extra": { "branch-alias": { @@ -1363,23 +1363,23 @@ ], "support": { "issues": "https://github.com/nette/routing/issues", - "source": "https://github.com/nette/routing/tree/v3.0.4" + "source": "https://github.com/nette/routing/tree/v3.0.5" }, "install-path": "../nette/routing" }, { "name": "nette/schema", - "version": "v1.2.4", - "version_normalized": "1.2.4.0", + "version": "v1.2.5", + "version_normalized": "1.2.5.0", "source": { "type": "git", "url": "https://github.com/nette/schema.git", - "reference": "c9ff517a53903b3d4e29ec547fb20feecb05b8ab" + "reference": "0462f0166e823aad657c9224d0f849ecac1ba10a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/schema/zipball/c9ff517a53903b3d4e29ec547fb20feecb05b8ab", - "reference": "c9ff517a53903b3d4e29ec547fb20feecb05b8ab", + "url": "https://api.github.com/repos/nette/schema/zipball/0462f0166e823aad657c9224d0f849ecac1ba10a", + "reference": "0462f0166e823aad657c9224d0f849ecac1ba10a", "shasum": "" }, "require": { @@ -1391,7 +1391,7 @@ "phpstan/phpstan-nette": "^1.0", "tracy/tracy": "^2.7" }, - "time": "2023-08-05T18:56:25+00:00", + "time": "2023-10-05T20:37:59+00:00", "type": "library", "extra": { "branch-alias": { @@ -1428,7 +1428,7 @@ ], "support": { "issues": "https://github.com/nette/schema/issues", - "source": "https://github.com/nette/schema/tree/v1.2.4" + "source": "https://github.com/nette/schema/tree/v1.2.5" }, "install-path": "../nette/schema" }, @@ -2088,17 +2088,17 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.36", - "version_normalized": "1.10.36.0", + "version": "1.10.38", + "version_normalized": "1.10.38.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "ffa3089511121a672e62969404e4fddc753f9b15" + "reference": "5302bb402c57f00fb3c2c015bac86e0827e4b691" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ffa3089511121a672e62969404e4fddc753f9b15", - "reference": "ffa3089511121a672e62969404e4fddc753f9b15", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/5302bb402c57f00fb3c2c015bac86e0827e4b691", + "reference": "5302bb402c57f00fb3c2c015bac86e0827e4b691", "shasum": "" }, "require": { @@ -2107,7 +2107,7 @@ "conflict": { "phpstan/phpstan-shim": "*" }, - "time": "2023-09-29T14:07:45+00:00", + "time": "2023-10-06T14:19:14+00:00", "bin": [ "phpstan", "phpstan.phar" @@ -2473,12 +2473,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "e20504c9fbbbccaea0de9d07e625c77dd4f7d4ea" + "reference": "efd339340c840237fad050f3ea6fd8bbbbfc7ed6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/e20504c9fbbbccaea0de9d07e625c77dd4f7d4ea", - "reference": "e20504c9fbbbccaea0de9d07e625c77dd4f7d4ea", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/efd339340c840237fad050f3ea6fd8bbbbfc7ed6", + "reference": "efd339340c840237fad050f3ea6fd8bbbbfc7ed6", "shasum": "" }, "conflict": { @@ -2556,8 +2556,8 @@ "codeigniter4/framework": "<4.3.5", "codeigniter4/shield": "<1.0.0.0-beta4", "codiad/codiad": "<=2.8.4", - "composer/composer": "<1.10.26|>=2,<2.2.12|>=2.3,<2.3.5", - "concrete5/concrete5": "<9.2", + "composer/composer": "<1.10.27|>=2,<2.2.22|>=2.3,<2.6.4", + "concrete5/concrete5": "<=9.2.1", "concrete5/core": "<8.5.8|>=9,<9.1", "contao-components/mediaelement": ">=2.14.2,<2.21.1", "contao/contao": ">=4,<4.4.56|>=4.5,<4.9.40|>=4.10,<4.11.7|>=4.13,<4.13.21|>=5.1,<5.1.4", @@ -2589,7 +2589,7 @@ "doctrine/mongodb-odm": ">=1,<1.0.2", "doctrine/mongodb-odm-bundle": ">=2,<3.0.1", "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4", - "dolibarr/dolibarr": "<17.0.1", + "dolibarr/dolibarr": "<18", "dompdf/dompdf": "<2.0.2|==2.0.2", "drupal/core": "<9.4.14|>=9.5,<9.5.8|>=10,<10.0.8", "drupal/drupal": ">=6,<6.38|>=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4", @@ -2695,7 +2695,7 @@ "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", "illuminate/view": "<6.20.42|>=7,<7.30.6|>=8,<8.75", "impresscms/impresscms": "<=1.4.5", - "in2code/femanager": "<5.5.3|>=6,<6.3.4|>=7,<7.1", + "in2code/femanager": "<5.5.3|>=6,<6.3.4|>=7,<7.2.2", "in2code/ipandlanguageredirect": "<5.1.2", "in2code/lux": "<17.6.1|>=18,<24.0.2", "innologi/typo3-appointments": "<2.0.6", @@ -2713,7 +2713,7 @@ "joomla/filter": "<1.4.4|>=2,<2.0.1", "joomla/framework": ">=2.5.4,<=3.8.12", "joomla/input": ">=2,<2.0.2", - "joomla/joomla-cms": "<3.9.12", + "joomla/joomla-cms": ">=2.5,<3.9.12", "joomla/session": "<1.3.1", "joyqi/hyper-down": "<=2.4.27", "jsdecena/laracom": "<2.0.9", @@ -2810,7 +2810,7 @@ "openmage/magento-lts": "<=19.5|>=20,<=20.1", "opensource-workshop/connect-cms": "<1.7.2|>=2,<2.3.2", "orchid/platform": ">=9,<9.4.4|>=14.0.0.0-alpha4,<14.5", - "oro/commerce": ">=4.1,<5.0.6", + "oro/commerce": ">=4.1,<5.0.11|>=5.1,<5.1.1", "oro/crm": ">=1.7,<1.7.4|>=3.1,<4.1.17|>=4.2,<4.2.7", "oro/platform": ">=1.7,<1.7.4|>=3.1,<3.1.29|>=4.1,<4.1.17|>=4.2,<4.2.8", "oxid-esales/oxideshop-ce": "<4.5", @@ -2868,11 +2868,12 @@ "propel/propel": ">=2.0.0.0-alpha1,<=2.0.0.0-alpha7", "propel/propel1": ">=1,<=1.7.1", "pterodactyl/panel": "<1.7", - "ptheofan/yii2-statemachine": ">=2", + "ptheofan/yii2-statemachine": ">=2.0.0.0-RC1-dev,<=2", "ptrofimov/beanstalk_console": "<1.7.14", "pusher/pusher-php-server": "<2.2.1", "pwweb/laravel-core": "<=0.3.6.0-beta", "pyrocms/pyrocms": "<=3.9.1", + "rainlab/blog-plugin": "<1.4.1", "rainlab/debugbar-plugin": "<3.1", "rainlab/user-plugin": "<=1.4.5", "rankmath/seo-by-rank-math": "<=1.0.95", @@ -2930,7 +2931,7 @@ "slim/slim": "<2.6", "slub/slub-events": "<3.0.3", "smarty/smarty": "<3.1.48|>=4,<4.3.1", - "snipe/snipe-it": "<=6.0.14", + "snipe/snipe-it": "<=6.2.2", "socalnick/scn-social-auth": "<1.15.2", "socialiteproviders/steam": "<1.1", "spatie/browsershot": "<3.57.4", @@ -3008,7 +3009,7 @@ "topthink/think": "<=6.1.1", "topthink/thinkphp": "<=3.2.3", "tpwd/ke_search": "<4.0.3|>=4.1,<4.6.6|>=5,<5.0.2", - "tribalsystems/zenario": "<=9.3.57595", + "tribalsystems/zenario": "<=9.4.59197", "truckersmp/phpwhois": "<=4.3.1", "ttskch/pagination-service-provider": "<1", "twig/twig": "<1.44.7|>=2,<2.15.3|>=3,<3.4.3", @@ -3036,7 +3037,7 @@ "vrana/adminer": "<4.8.1", "waldhacker/hcaptcha": "<2.1.2", "wallabag/tcpdf": "<6.2.22", - "wallabag/wallabag": "<=2.6.2", + "wallabag/wallabag": "<2.6.7", "wanglelecc/laracms": "<=1.0.3", "web-auth/webauthn-framework": ">=3.3,<3.3.4", "webbuilders-group/silverstripe-kapost-bridge": "<0.4", @@ -3109,7 +3110,7 @@ "zfr/zfr-oauth2-server-module": "<0.1.2", "zoujingli/thinkadmin": "<6.0.22" }, - "time": "2023-09-28T17:04:13+00:00", + "time": "2023-10-11T21:04:21+00:00", "default-branch": true, "type": "metapackage", "notification-url": "https://packagist.org/downloads/", @@ -3150,35 +3151,35 @@ }, { "name": "slevomat/coding-standard", - "version": "8.13.4", - "version_normalized": "8.13.4.0", + "version": "8.14.1", + "version_normalized": "8.14.1.0", "source": { "type": "git", "url": "https://github.com/slevomat/coding-standard.git", - "reference": "4b2af2fb17773656d02fbfb5d18024ebd19fe322" + "reference": "fea1fd6f137cc84f9cba0ae30d549615dbc6a926" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/4b2af2fb17773656d02fbfb5d18024ebd19fe322", - "reference": "4b2af2fb17773656d02fbfb5d18024ebd19fe322", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/fea1fd6f137cc84f9cba0ae30d549615dbc6a926", + "reference": "fea1fd6f137cc84f9cba0ae30d549615dbc6a926", "shasum": "" }, "require": { "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7 || ^1.0", "php": "^7.2 || ^8.0", - "phpstan/phpdoc-parser": "^1.23.0", + "phpstan/phpdoc-parser": "^1.23.1", "squizlabs/php_codesniffer": "^3.7.1" }, "require-dev": { "phing/phing": "2.17.4", "php-parallel-lint/php-parallel-lint": "1.3.2", - "phpstan/phpstan": "1.10.26", - "phpstan/phpstan-deprecation-rules": "1.1.3", - "phpstan/phpstan-phpunit": "1.3.13", + "phpstan/phpstan": "1.10.37", + "phpstan/phpstan-deprecation-rules": "1.1.4", + "phpstan/phpstan-phpunit": "1.3.14", "phpstan/phpstan-strict-rules": "1.5.1", - "phpunit/phpunit": "7.5.20|8.5.21|9.6.8|10.2.6" + "phpunit/phpunit": "8.5.21|9.6.8|10.3.5" }, - "time": "2023-07-25T10:28:55+00:00", + "time": "2023-10-08T07:28:08+00:00", "type": "phpcodesniffer-standard", "extra": { "branch-alias": { @@ -3202,7 +3203,7 @@ ], "support": { "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/8.13.4" + "source": "https://github.com/slevomat/coding-standard/tree/8.14.1" }, "funding": [ { @@ -3894,17 +3895,17 @@ }, { "name": "symfony/cache", - "version": "v6.3.4", - "version_normalized": "6.3.4.0", + "version": "v6.3.5", + "version_normalized": "6.3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "e60d00b4f633efa4c1ef54e77c12762d9073e7b3" + "reference": "6c1a3ea078c4d88ee892530945df63a87981b2da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/e60d00b4f633efa4c1ef54e77c12762d9073e7b3", - "reference": "e60d00b4f633efa4c1ef54e77c12762d9073e7b3", + "url": "https://api.github.com/repos/symfony/cache/zipball/6c1a3ea078c4d88ee892530945df63a87981b2da", + "reference": "6c1a3ea078c4d88ee892530945df63a87981b2da", "shasum": "" }, "require": { @@ -3938,7 +3939,7 @@ "symfony/messenger": "^5.4|^6.0", "symfony/var-dumper": "^5.4|^6.0" }, - "time": "2023-08-05T09:10:27+00:00", + "time": "2023-09-26T15:48:55+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -3973,7 +3974,7 @@ "psr6" ], "support": { - "source": "https://github.com/symfony/cache/tree/v6.3.4" + "source": "https://github.com/symfony/cache/tree/v6.3.5" }, "funding": [ { diff --git a/site/vendor/composer/installed.php b/site/vendor/composer/installed.php index 93c69b2f8..bad9e5b50 100644 --- a/site/vendor/composer/installed.php +++ b/site/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'spaze/michalspacek.cz', 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => 'e95b10f7562d12342698a5368d02b8aa7f8b47c3', + 'reference' => '8eed69ffd2a1e5c27248bc745553fbd1e75e8894', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -35,9 +35,9 @@ ), ), 'efabrica/phpstan-latte' => array( - 'pretty_version' => '0.16.0', - 'version' => '0.16.0.0', - 'reference' => 'b4a505ff3f2d93f570f914716123e77386aa6dde', + 'pretty_version' => '0.16.1', + 'version' => '0.16.1.0', + 'reference' => 'af52e65f0d7c5bfd29e4625ebc1f3449f0a2a660', 'type' => 'library', 'install_path' => __DIR__ . '/../efabrica/phpstan-latte', 'aliases' => array(), @@ -68,18 +68,18 @@ ), ), 'latte/latte' => array( - 'pretty_version' => 'v3.0.9', - 'version' => '3.0.9.0', - 'reference' => 'e24c4123659d0177bf28561827e117fe7453c355', + 'pretty_version' => 'v3.0.10', + 'version' => '3.0.10.0', + 'reference' => '794f252da7437499e467766d633eed85e1a437b7', 'type' => 'library', 'install_path' => __DIR__ . '/../latte/latte', 'aliases' => array(), 'dev_requirement' => false, ), 'nette/application' => array( - 'pretty_version' => 'v3.1.13', - 'version' => '3.1.13.0', - 'reference' => '83f5144840a1aa38eb7bae58ce58a9d0c5f10177', + 'pretty_version' => 'v3.1.14', + 'version' => '3.1.14.0', + 'reference' => '0729ede7e66fad642046a3eb670d368845272573', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/application', 'aliases' => array(), @@ -131,9 +131,9 @@ 'dev_requirement' => false, ), 'nette/di' => array( - 'pretty_version' => 'v3.1.4', - 'version' => '3.1.4.0', - 'reference' => '9c8a52dac6d7130e658df5cd819d17e1fde715ea', + 'pretty_version' => 'v3.1.5', + 'version' => '3.1.5.0', + 'reference' => '00ea0afa643b3b4383a5cd1a322656c989ade498', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/di', 'aliases' => array(), @@ -146,9 +146,9 @@ ), ), 'nette/forms' => array( - 'pretty_version' => 'v3.1.11', - 'version' => '3.1.11.0', - 'reference' => '64cdc2d6796a8fe1265bb21a6ee5e9ff93e2b3a4', + 'pretty_version' => 'v3.1.12', + 'version' => '3.1.12.0', + 'reference' => '6c1db887a4cdaf5679203bfd658bac958fc04d99', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/forms', 'aliases' => array(), @@ -200,18 +200,18 @@ 'dev_requirement' => false, ), 'nette/routing' => array( - 'pretty_version' => 'v3.0.4', - 'version' => '3.0.4.0', - 'reference' => 'eaefe6375303799366f3e43977daaf33f5f89b95', + 'pretty_version' => 'v3.0.5', + 'version' => '3.0.5.0', + 'reference' => 'ff709ff9ed38a14c4fe3472534526593a8461ff5', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/routing', 'aliases' => array(), 'dev_requirement' => false, ), 'nette/schema' => array( - 'pretty_version' => 'v1.2.4', - 'version' => '1.2.4.0', - 'reference' => 'c9ff517a53903b3d4e29ec547fb20feecb05b8ab', + 'pretty_version' => 'v1.2.5', + 'version' => '1.2.5.0', + 'reference' => '0462f0166e823aad657c9224d0f849ecac1ba10a', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/schema', 'aliases' => array(), @@ -320,9 +320,9 @@ 'dev_requirement' => true, ), 'phpstan/phpstan' => array( - 'pretty_version' => '1.10.36', - 'version' => '1.10.36.0', - 'reference' => 'ffa3089511121a672e62969404e4fddc753f9b15', + 'pretty_version' => '1.10.38', + 'version' => '1.10.38.0', + 'reference' => '5302bb402c57f00fb3c2c015bac86e0827e4b691', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpstan', 'aliases' => array(), @@ -397,7 +397,7 @@ 'roave/security-advisories' => array( 'pretty_version' => 'dev-latest', 'version' => 'dev-latest', - 'reference' => 'e20504c9fbbbccaea0de9d07e625c77dd4f7d4ea', + 'reference' => 'efd339340c840237fad050f3ea6fd8bbbbfc7ed6', 'type' => 'metapackage', 'install_path' => NULL, 'aliases' => array( @@ -406,9 +406,9 @@ 'dev_requirement' => true, ), 'slevomat/coding-standard' => array( - 'pretty_version' => '8.13.4', - 'version' => '8.13.4.0', - 'reference' => '4b2af2fb17773656d02fbfb5d18024ebd19fe322', + 'pretty_version' => '8.14.1', + 'version' => '8.14.1.0', + 'reference' => 'fea1fd6f137cc84f9cba0ae30d549615dbc6a926', 'type' => 'phpcodesniffer-standard', 'install_path' => __DIR__ . '/../slevomat/coding-standard', 'aliases' => array(), @@ -453,7 +453,7 @@ 'spaze/michalspacek.cz' => array( 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => 'e95b10f7562d12342698a5368d02b8aa7f8b47c3', + 'reference' => '8eed69ffd2a1e5c27248bc745553fbd1e75e8894', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -532,9 +532,9 @@ 'dev_requirement' => true, ), 'symfony/cache' => array( - 'pretty_version' => 'v6.3.4', - 'version' => '6.3.4.0', - 'reference' => 'e60d00b4f633efa4c1ef54e77c12762d9073e7b3', + 'pretty_version' => 'v6.3.5', + 'version' => '6.3.5.0', + 'reference' => '6c1a3ea078c4d88ee892530945df63a87981b2da', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/cache', 'aliases' => array(), diff --git a/site/vendor/efabrica/phpstan-latte/CHANGELOG.md b/site/vendor/efabrica/phpstan-latte/CHANGELOG.md index 26ca15473..6df32aff0 100644 --- a/site/vendor/efabrica/phpstan-latte/CHANGELOG.md +++ b/site/vendor/efabrica/phpstan-latte/CHANGELOG.md @@ -2,6 +2,12 @@ ## [Unreleased][unreleased] +## [0.16.1] - 2023-10-11 +### Fixed +- Standalone presenter action template is not analysed if presenter dir and template dir are siblings +- Method call __toString() is considered template render call +- Compatibility with nette/application 3.1.14 (SnippetDriver renanamed to SnippetRuntime) + ## [0.16.0] - 2023-08-24 ### Changed - All compiled templates from one run will be stored in one directory within tmpDir @@ -228,7 +234,8 @@ - Transform components to explicit calls - Error mapper for better DX -[unreleased]: https://github.com/efabrica-team/phpstan-latte/compare/0.16.0...HEAD +[unreleased]: https://github.com/efabrica-team/phpstan-latte/compare/0.16.1...HEAD +[0.16.1]: https://github.com/efabrica-team/phpstan-latte/compare/0.16.0...0.16.1 [0.16.0]: https://github.com/efabrica-team/phpstan-latte/compare/0.15.0...0.16.0 [0.15.0]: https://github.com/efabrica-team/phpstan-latte/compare/0.14.0...0.15.0 [0.14.0]: https://github.com/efabrica-team/phpstan-latte/compare/0.13.2...0.14.0 diff --git a/site/vendor/efabrica/phpstan-latte/composer.json b/site/vendor/efabrica/phpstan-latte/composer.json index ce40b9ba0..c497e3cb1 100644 --- a/site/vendor/efabrica/phpstan-latte/composer.json +++ b/site/vendor/efabrica/phpstan-latte/composer.json @@ -16,7 +16,7 @@ "require-dev": { "phpunit/phpunit": "^9.5", "nette/application": "^3.1.6", - "nette/forms": "^3.1.11", + "nette/forms": "^3.1.12", "nikic/php-parser": "^4.15", "efabrica/coding-standard": "^0.5", "phpstan/phpstan-strict-rules": "^1.4", diff --git a/site/vendor/efabrica/phpstan-latte/extension.neon b/site/vendor/efabrica/phpstan-latte/extension.neon index 41801463f..e0847d57e 100644 --- a/site/vendor/efabrica/phpstan-latte/extension.neon +++ b/site/vendor/efabrica/phpstan-latte/extension.neon @@ -165,6 +165,7 @@ services: - addNodeVisitor(200, Efabrica\PHPStanLatte\Compiler\NodeVisitor\TransformForeachWithIteratorNodeVisitor()) - addNodeVisitor(200, Efabrica\PHPStanLatte\Compiler\NodeVisitor\LinkNodeVisitor()) - addNodeVisitor(200, Efabrica\PHPStanLatte\Compiler\NodeVisitor\ChangeNotNullToEqualsNullNodeVisitor()) + - addNodeVisitor(200, Efabrica\PHPStanLatte\Compiler\NodeVisitor\ChangeGetParentNameToCompareWithNullNodeVisitor()) - addNodeVisitor(300, Efabrica\PHPStanLatte\Compiler\NodeVisitor\AddFormClassesNodeVisitor()) - addNodeVisitor(300, Efabrica\PHPStanLatte\Compiler\NodeVisitor\ReportNonExistingFieldOptionNodeVisitor()) - addNodeVisitor(9900, Efabrica\PHPStanLatte\Compiler\NodeVisitor\CleanupNodeVisitor()) diff --git a/site/vendor/efabrica/phpstan-latte/src/Compiler/Compiler/AbstractCompiler.php b/site/vendor/efabrica/phpstan-latte/src/Compiler/Compiler/AbstractCompiler.php index 2db0514c1..53dea5cbb 100644 --- a/site/vendor/efabrica/phpstan-latte/src/Compiler/Compiler/AbstractCompiler.php +++ b/site/vendor/efabrica/phpstan-latte/src/Compiler/Compiler/AbstractCompiler.php @@ -82,7 +82,7 @@ protected function addTypes(string $phpContent, string $className, ?string $actu $providers = $this->engine->getProviders(); $providers['uiControl'] = new ObjectType($actualClass ?? 'Nette\Application\UI\Control'); $providers['uiPresenter'] = new ObjectType($actualClass ?? 'Nette\Application\UI\Presenter'); - $providers['snippetDriver'] = new ObjectType('Nette\Bridges\ApplicationLatte\SnippetDriver'); + $providers['snippetDriver'] = new ObjectType(class_exists('Nette\Bridges\ApplicationLatte\SnippetDriver') ? 'Nette\Bridges\ApplicationLatte\SnippetDriver' : 'Nette\Bridges\ApplicationLatte\SnippetRuntime'); $providers['uiNonce'] = TypeCombinator::addNull(new StringType()); $providers['formsStack'] = new ArrayType(new IntegerType(), new ObjectType('Nette\Forms\Container')); diff --git a/site/vendor/efabrica/phpstan-latte/src/Compiler/NodeVisitor/ChangeGetParentNameToCompareWithNullNodeVisitor.php b/site/vendor/efabrica/phpstan-latte/src/Compiler/NodeVisitor/ChangeGetParentNameToCompareWithNullNodeVisitor.php new file mode 100644 index 000000000..f88395403 --- /dev/null +++ b/site/vendor/efabrica/phpstan-latte/src/Compiler/NodeVisitor/ChangeGetParentNameToCompareWithNullNodeVisitor.php @@ -0,0 +1,66 @@ + + * if ($this->getParentName()) { + * return \get_defined_vars(); + * } + * + * + * to: + * + * if ($this->getParentName() !== null) { + * return \get_defined_vars(); + * } + * + */ +final class ChangeGetParentNameToCompareWithNullNodeVisitor extends NodeVisitorAbstract +{ + private NameResolver $nameResolver; + + public function __construct(NameResolver $nameResolver) + { + $this->nameResolver = $nameResolver; + } + + public function enterNode(Node $node): ?Node + { + if (!$node instanceof If_) { + return null; + } + + if (!$node->cond instanceof MethodCall) { + return null; + } + + if (!$node->cond->var instanceof Variable) { + return null; + } + + if ($node->cond->var->name !== 'this') { + return null; + } + + if ($this->nameResolver->resolve($node->cond->name) !== 'getParentName') { + return null; + } + + $node->cond = new NotIdentical($node->cond, new ConstFetch(new Name('null'))); + return $node; + } +} diff --git a/site/vendor/efabrica/phpstan-latte/src/Compiler/NodeVisitor/NotNullableSnippetDriverNodeVisitor.php b/site/vendor/efabrica/phpstan-latte/src/Compiler/NodeVisitor/NotNullableSnippetDriverNodeVisitor.php index e6f7220bc..f88b2a0a7 100644 --- a/site/vendor/efabrica/phpstan-latte/src/Compiler/NodeVisitor/NotNullableSnippetDriverNodeVisitor.php +++ b/site/vendor/efabrica/phpstan-latte/src/Compiler/NodeVisitor/NotNullableSnippetDriverNodeVisitor.php @@ -23,7 +23,7 @@ public function enterNode(Node $node): ?Node } $callerType = $this->getType($node->var); - if ($callerType !== null && (new ObjectType('Nette\Bridges\ApplicationLatte\SnippetDriver'))->isSuperTypeOf($callerType)->yes()) { + if ($callerType !== null && ((new ObjectType('Nette\Bridges\ApplicationLatte\SnippetDriver'))->isSuperTypeOf($callerType)->yes() || (new ObjectType('Nette\Bridges\ApplicationLatte\SnippetRuntime'))->isSuperTypeOf($callerType)->yes())) { $methodCall = new MethodCall($node->var, $node->name, $node->args); $methodCall->setAttributes($node->getAttributes()); return $methodCall; diff --git a/site/vendor/efabrica/phpstan-latte/src/Error/ErrorBuilder.php b/site/vendor/efabrica/phpstan-latte/src/Error/ErrorBuilder.php index ef4038ed0..d78d6e240 100644 --- a/site/vendor/efabrica/phpstan-latte/src/Error/ErrorBuilder.php +++ b/site/vendor/efabrica/phpstan-latte/src/Error/ErrorBuilder.php @@ -33,6 +33,7 @@ final class ErrorBuilder '/Parameter \#1 \$var_array of function extract is passed by reference, so it expects variables only\./', // we will not test latte compiler itself '/Call to an undefined method Nette\\\\ComponentModel\\\\IComponent::render\(\)\./', # rendering of unknown components '/Parameter #1 \$blocks of method Nette\\\\Bridges\\\\ApplicationLatte\\\\SnippetDriver::renderSnippets\(\) expects .*/', # nette internal error + '/Parameter #1 \$blocks of method Nette\\\\Bridges\\\\ApplicationLatte\\\\SnippetRuntime::renderSnippets\(\) expects .*/', # nette internal error '/Parameter #3 \$blocks of static method Nette\\\\Bridges\\\\ApplicationLatte\\\\UIRuntime::initialize\(\) expects .*/', # nette internal error '/Cannot call method getParent\(\) on Latte\\\\Essential\\\\CachingIterator\|null\./', # latte internal error '/Cannot call method attributes\(\) on Nette\\\\Utils\\\\Html\|null\./', # latte internal error diff --git a/site/vendor/efabrica/phpstan-latte/src/LatteContext/Collector/TemplateRenderCollector/TemplateRenderCallsCollector.php b/site/vendor/efabrica/phpstan-latte/src/LatteContext/Collector/TemplateRenderCollector/TemplateRenderCallsCollector.php index ed7eb5dac..9a192615d 100644 --- a/site/vendor/efabrica/phpstan-latte/src/LatteContext/Collector/TemplateRenderCollector/TemplateRenderCallsCollector.php +++ b/site/vendor/efabrica/phpstan-latte/src/LatteContext/Collector/TemplateRenderCollector/TemplateRenderCallsCollector.php @@ -52,7 +52,7 @@ public function getNodeTypes(): array public function collect(Node $node, Scope $scope): ?array { $calledMethodName = $this->nameResolver->resolve($node); - if (!in_array($calledMethodName, ['render', 'renderToString'], true)) { + if (!in_array($calledMethodName, ['render', 'renderToString', '__toString'], true)) { return null; } diff --git a/site/vendor/efabrica/phpstan-latte/src/LatteTemplateResolver/AbstractClassStandaloneTemplateResolver.php b/site/vendor/efabrica/phpstan-latte/src/LatteTemplateResolver/AbstractClassStandaloneTemplateResolver.php index b87dd9c17..2ae989d02 100644 --- a/site/vendor/efabrica/phpstan-latte/src/LatteTemplateResolver/AbstractClassStandaloneTemplateResolver.php +++ b/site/vendor/efabrica/phpstan-latte/src/LatteTemplateResolver/AbstractClassStandaloneTemplateResolver.php @@ -53,6 +53,7 @@ protected function findStandaloneTemplates(ReflectionClass $reflectionClass): ar return []; } + $dir = $this->adjustDir($dir); $patterns = $this->getTemplatePathPatterns($reflectionClass, $dir); $standaloneTemplates = []; @@ -76,6 +77,11 @@ protected function findStandaloneTemplates(ReflectionClass $reflectionClass): ar return $standaloneTemplates; } + protected function adjustDir(string $dir): string + { + return $dir; + } + /** * @return string[] */ diff --git a/site/vendor/efabrica/phpstan-latte/src/LatteTemplateResolver/Nette/NetteApplicationUIPresenterStandalone.php b/site/vendor/efabrica/phpstan-latte/src/LatteTemplateResolver/Nette/NetteApplicationUIPresenterStandalone.php index 3b040a16c..d5f230a1f 100644 --- a/site/vendor/efabrica/phpstan-latte/src/LatteTemplateResolver/Nette/NetteApplicationUIPresenterStandalone.php +++ b/site/vendor/efabrica/phpstan-latte/src/LatteTemplateResolver/Nette/NetteApplicationUIPresenterStandalone.php @@ -27,14 +27,17 @@ protected function getTemplatePathPatterns(ReflectionClass $reflectionClass, str $shortClassName = $reflectionClass->getShortName(); $presenterName = str_replace('Presenter', '', $shortClassName); - $dir = is_dir("$dir/templates") ? $dir : dirname($dir); - return [ $dir . '/templates/' . $presenterName . '/([a-zA-Z0-9_]+).latte', $dir . '/templates/' . $presenterName . '\.([a-zA-Z0-9_]+).latte', ]; } + protected function adjustDir(string $dir): string + { + return is_dir("$dir/templates") ? $dir : dirname($dir); + } + protected function isStandaloneTemplate(ReflectionClass $reflectionClass, string $templateFile, array $matches): bool { if (!is_string($matches[1])) { diff --git a/site/vendor/latte/latte/bin/latte-lint b/site/vendor/latte/latte/bin/latte-lint index c82223d9e..eecb1c3c7 100755 --- a/site/vendor/latte/latte/bin/latte-lint +++ b/site/vendor/latte/latte/bin/latte-lint @@ -22,8 +22,13 @@ if ($argc < 2) { exit(1); } -$debug = in_array('--debug', $argv, true); -$strict = in_array('--strict', $argv, true); +if ($debug = in_array('--debug', $argv, true)) { + echo "Debug mode\n"; +} +if ($strict = in_array('--strict', $argv, true)) { + echo "Strict mode\n"; +} + $path = $argv[1]; $linter = new Latte\Tools\Linter(debug: $debug, strict: $strict); $ok = $linter->scanDirectory($path); diff --git a/site/vendor/latte/latte/src/Latte/Compiler/Escaper.php b/site/vendor/latte/latte/src/Latte/Compiler/Escaper.php index 8a766bb68..19e9ed74b 100644 --- a/site/vendor/latte/latte/src/Latte/Compiler/Escaper.php +++ b/site/vendor/latte/latte/src/Latte/Compiler/Escaper.php @@ -33,11 +33,52 @@ final class Escaper HtmlText = 'html', HtmlComment = 'html/comment', HtmlBogusTag = 'html/bogus', - HtmlCss = 'html/css', - HtmlJavaScript = 'html/js', + HtmlRawText = 'html/raw', HtmlTag = 'html/tag', HtmlAttribute = 'html/attr'; + private const Convertors = [ + self::Text => [ + self::HtmlText => 'escapeHtmlText', + self::HtmlAttribute => 'escapeHtmlAttr', + self::HtmlAttribute . '/' . self::JavaScript => 'escapeHtmlAttr', + self::HtmlAttribute . '/' . self::Css => 'escapeHtmlAttr', + self::HtmlAttribute . '/' . self::Url => 'escapeHtmlAttr', + self::HtmlComment => 'escapeHtmlComment', + 'xml' => 'escapeXml', + 'xml/attr' => 'escapeXml', + ], + self::JavaScript => [ + self::HtmlText => 'escapeHtmlText', + self::HtmlAttribute => 'escapeHtmlAttr', + self::HtmlAttribute . '/' . self::JavaScript => 'escapeHtmlAttr', + self::HtmlRawText . '/' . self::JavaScript => 'convertJSToHtmlRawText', + self::HtmlComment => 'escapeHtmlComment', + ], + self::Css => [ + self::HtmlText => 'escapeHtmlText', + self::HtmlAttribute => 'escapeHtmlAttr', + self::HtmlAttribute . '/' . self::Css => 'escapeHtmlAttr', + self::HtmlRawText . '/' . self::Css => 'convertJSToHtmlRawText', + self::HtmlComment => 'escapeHtmlComment', + ], + self::HtmlText => [ + self::HtmlAttribute => 'convertHtmlToHtmlAttr', + self::HtmlAttribute . '/' . self::JavaScript => 'convertHtmlToHtmlAttr', + self::HtmlAttribute . '/' . self::Css => 'convertHtmlToHtmlAttr', + self::HtmlAttribute . '/' . self::Url => 'convertHtmlToHtmlAttr', + self::HtmlComment => 'escapeHtmlComment', + self::HtmlRawText . '/' . self::HtmlText => 'convertHtmlToHtmlRawText', + ], + self::HtmlAttribute => [ + self::HtmlText => 'convertHtmlToHtmlAttr', + ], + self::HtmlAttribute . '/' . self::Url => [ + self::HtmlText => 'convertHtmlToHtmlAttr', + self::HtmlAttribute => 'nop', + ], + ]; + private string $state = ''; private string $tag = ''; private string $subType = ''; @@ -74,14 +115,29 @@ public function enterContentType(string $type): void } - public function enterHtmlText(?ElementNode $node): void + public function enterHtmlText(ElementNode $el): void { - $this->state = self::HtmlText; - if ($node->isRawText() - && is_string($attr = $node->getAttribute('type') ?? 'css') - && preg_match('#(java|j|ecma|live)script|module|json|css|plain#i', $attr) - ) { - $this->state = $node->is('script') ? self::HtmlJavaScript : self::HtmlCss; + if ($el->isRawText()) { + $this->state = self::HtmlRawText; + $this->subType = self::Text; + if ($el->is('script')) { + $type = $el->getAttribute('type'); + if ($type === true || $type === null + || is_string($type) && preg_match('#((application|text)/(((x-)?java|ecma|j|live)script|json)|text/plain|module|importmap|)$#Ai', $type) + ) { + $this->subType = self::JavaScript; + + } elseif (is_string($type) && preg_match('#text/((x-)?template|html)$#Ai', $type)) { + $this->subType = self::HtmlText; + } + + } elseif ($el->is('style')) { + $this->subType = self::Css; + } + + } else { + $this->state = self::HtmlText; + $this->subType = ''; } } @@ -139,8 +195,12 @@ public function escape(string $str): string }, self::HtmlComment => 'LR\Filters::escapeHtmlComment(' . $str . ')', self::HtmlBogusTag => 'LR\Filters::escapeHtml(' . $str . ')', - self::HtmlJavaScript => 'LR\Filters::escapeJs(' . $str . ')', - self::HtmlCss => 'LR\Filters::escapeCss(' . $str . ')', + self::HtmlRawText => match ($this->subType) { + self::Text => 'LR\Filters::convertJSToHtmlRawText(' . $str . ')', // sanitization, escaping is not possible + self::HtmlText => 'LR\Filters::escapeHtmlRawTextHtml(' . $str . ')', + self::JavaScript => 'LR\Filters::escapeJs(' . $str . ')', + self::Css => 'LR\Filters::escapeCss(' . $str . ')', + }, default => throw new \LogicException("Unknown context $this->contentType, $this->state."), }, ContentType::Xml => match ($this->state) { @@ -160,6 +220,28 @@ public function escape(string $str): string } + public function escapeMandatory(string $str): string + { + return match ($this->contentType) { + ContentType::Html => match ($this->state) { + self::HtmlAttribute => "LR\\Filters::escapeHtmlQuotes($str)", + self::HtmlRawText => match ($this->subType) { + self::HtmlText => 'LR\Filters::convertHtmlToHtmlRawText(' . $str . ')', + default => "LR\\Filters::convertJSToHtmlRawText($str)", + }, + self::HtmlComment => 'LR\Filters::escapeHtmlComment(' . $str . ')', + default => $str, + }, + ContentType::Xml => match ($this->state) { + self::HtmlAttribute => "LR\\Filters::escapeHtmlQuotes($str)", + self::HtmlComment => 'LR\Filters::escapeHtmlComment(' . $str . ')', + default => $str, + }, + default => $str, + }; + } + + public function check(string $str): string { if ($this->state === self::HtmlAttribute && $this->subType === self::Url) { @@ -171,53 +253,10 @@ public function check(string $str): string public static function getConvertor(string $source, string $dest): ?callable { - $table = [ - self::Text => [ - 'html' => 'escapeHtmlText', - 'html/attr' => 'escapeHtmlAttr', - 'html/attr/js' => 'escapeHtmlAttr', - 'html/attr/css' => 'escapeHtmlAttr', - 'html/attr/url' => 'escapeHtmlAttr', - 'html/comment' => 'escapeHtmlComment', - 'xml' => 'escapeXml', - 'xml/attr' => 'escapeXml', - ], - self::JavaScript => [ - 'html' => 'escapeHtmlText', - 'html/attr' => 'escapeHtmlAttr', - 'html/attr/js' => 'escapeHtmlAttr', - 'html/js' => 'convertJSToHtmlRawText', - 'html/comment' => 'escapeHtmlComment', - ], - self::Css => [ - 'html' => 'escapeHtmlText', - 'html/attr' => 'escapeHtmlAttr', - 'html/attr/css' => 'escapeHtmlAttr', - 'html/css' => 'convertJSToHtmlRawText', - 'html/comment' => 'escapeHtmlComment', - ], - 'html' => [ - 'html/attr' => 'convertHtmlToHtmlAttr', - 'html/attr/js' => 'convertHtmlToHtmlAttr', - 'html/attr/css' => 'convertHtmlToHtmlAttr', - 'html/attr/url' => 'convertHtmlToHtmlAttr', - 'html/comment' => 'escapeHtmlComment', - ], - 'html/attr' => [ - 'html' => 'convertHtmlToHtmlAttr', - ], - 'html/attr/url' => [ - 'html' => 'convertHtmlToHtmlAttr', - 'html/attr' => 'nop', - ], - ]; - - if ($source === $dest) { - return [Filters::class, 'nop']; - } - - return isset($table[$source][$dest]) - ? [Filters::class, $table[$source][$dest]] - : null; + return match (true) { + $source === $dest => [Filters::class, 'nop'], + isset(self::Convertors[$source][$dest]) => [Filters::class, self::Convertors[$source][$dest]], + default => null, + }; } } diff --git a/site/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/ModifierNode.php b/site/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/ModifierNode.php index 340b83b8f..6f71d09e7 100644 --- a/site/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/ModifierNode.php +++ b/site/vendor/latte/latte/src/Latte/Compiler/Nodes/Php/ModifierNode.php @@ -68,9 +68,9 @@ public function printSimple(PrintContext $context, string $expr): string $expr = $escaper->check($expr); } - if ($escape) { - $expr = $escaper->escape($expr); - } + $expr = $escape + ? $escaper->escape($expr) + : $escaper->escapeMandatory($expr); return $expr; } diff --git a/site/vendor/latte/latte/src/Latte/Compiler/TemplateLexer.php b/site/vendor/latte/latte/src/Latte/Compiler/TemplateLexer.php index 7fce6ad46..9dafa084f 100644 --- a/site/vendor/latte/latte/src/Latte/Compiler/TemplateLexer.php +++ b/site/vendor/latte/latte/src/Latte/Compiler/TemplateLexer.php @@ -189,7 +189,7 @@ private function stateHtmlRawText(string $tagName): array (?.+?)?? (?(?<=\n|^)[ \t]+)? ( - (?<)(?/)(?' . preg_quote(strtolower($tagName), '~') . ')| # <)(?/)(?' . preg_quote($tagName, '~') . ')| # ' . $this->openDelimiter . '(?!\*))| # {tag (?' . $this->openDelimiter . '\*)| # {* comment $ diff --git a/site/vendor/latte/latte/src/Latte/Compiler/TemplateParser.php b/site/vendor/latte/latte/src/Latte/Compiler/TemplateParser.php index b10335b20..78a29a41f 100644 --- a/site/vendor/latte/latte/src/Latte/Compiler/TemplateParser.php +++ b/site/vendor/latte/latte/src/Latte/Compiler/TemplateParser.php @@ -38,24 +38,29 @@ final class TemplateParser private TemplateParserHtml $html; private ?TokenStream $stream = null; - private ?TemplateLexer $lexer = null; + private TemplateLexer $lexer; private ?Policy $policy = null; - private string $contentType = ContentType::Html; + private string $contentType; private int $counter = 0; private ?Tag $tag = null; private $lastResolver; + public function __construct() + { + $this->lexer = new TemplateLexer; + $this->setContentType(ContentType::Html); + } + + /** * Parses tokens to nodes. * @throws CompileException */ - public function parse(string $template, TemplateLexer $lexer): Nodes\TemplateNode + public function parse(string $template): Nodes\TemplateNode { - $this->lexer = $lexer; - $this->setContentType($this->contentType); $this->html = new TemplateParserHtml($this, $this->completeAttrParsers()); - $this->stream = new TokenStream($lexer->tokenize($template)); + $this->stream = new TokenStream($this->lexer->tokenize($template)); $headLength = 0; $findLength = function (FragmentNode $fragment) use (&$headLength) { @@ -391,7 +396,7 @@ public function setPolicy(?Policy $policy): static public function setContentType(string $type): static { $this->contentType = $type; - $this->lexer?->setState($type === ContentType::Html || $type === ContentType::Xml + $this->lexer->setState($type === ContentType::Html || $type === ContentType::Xml ? TemplateLexer::StateHtmlText : TemplateLexer::StatePlain); return $this; diff --git a/site/vendor/latte/latte/src/Latte/Engine.php b/site/vendor/latte/latte/src/Latte/Engine.php index 3d6683911..6de457ceb 100644 --- a/site/vendor/latte/latte/src/Latte/Engine.php +++ b/site/vendor/latte/latte/src/Latte/Engine.php @@ -19,8 +19,8 @@ class Engine { use Strict; - public const Version = '3.0.9'; - public const VersionId = 30009; + public const Version = '3.0.10'; + public const VersionId = 30010; /** @deprecated use Engine::Version */ public const @@ -146,7 +146,6 @@ public function compile(string $name): string */ public function parse(string $source): TemplateNode { - $lexer = new Compiler\TemplateLexer; $parser = new Compiler\TemplateParser; $parser->strict = $this->strictParsing; @@ -158,7 +157,7 @@ public function parse(string $source): TemplateNode return $parser ->setContentType($this->contentType) ->setPolicy($this->getPolicy(effective: true)) - ->parse($source, $lexer); + ->parse($source); } diff --git a/site/vendor/latte/latte/src/Latte/Essential/CoreExtension.php b/site/vendor/latte/latte/src/Latte/Essential/CoreExtension.php index 09a490620..dbc4226ba 100644 --- a/site/vendor/latte/latte/src/Latte/Essential/CoreExtension.php +++ b/site/vendor/latte/latte/src/Latte/Essential/CoreExtension.php @@ -15,6 +15,7 @@ use Latte\Compiler\Nodes\TextNode; use Latte\Compiler\Tag; use Latte\Compiler\TemplateParser; +use Latte\Runtime; use Latte\RuntimeException; use Nette; @@ -28,6 +29,7 @@ final class CoreExtension extends Latte\Extension private array $functions; private bool $strict; + private Runtime\Template $template; public function beforeCompile(Latte\Engine $engine): void @@ -37,6 +39,12 @@ public function beforeCompile(Latte\Engine $engine): void } + public function beforeRender(Runtime\Template $template): void + { + $this->template = $template; + } + + public function getTags(): array { return [ @@ -180,6 +188,7 @@ public function getFunctions(): array 'last' => [Filters::class, 'last'], 'odd' => [Filters::class, 'odd'], 'slice' => [Filters::class, 'slice'], + 'hasBlock' => fn(string $name): bool => $this->template->hasBlock($name), ]; } diff --git a/site/vendor/latte/latte/src/Latte/Essential/Filters.php b/site/vendor/latte/latte/src/Latte/Essential/Filters.php index 883d45863..894ecc1dd 100644 --- a/site/vendor/latte/latte/src/Latte/Essential/Filters.php +++ b/site/vendor/latte/latte/src/Latte/Essential/Filters.php @@ -372,9 +372,11 @@ public static function length(array|\Countable|\Traversable|string $val): int private static function strLength(string $s): int { - return function_exists('mb_strlen') - ? mb_strlen($s, 'UTF-8') - : strlen(utf8_decode($s)); + return match (true) { + extension_loaded('mbstring') => mb_strlen($s, 'UTF-8'), + extension_loaded('iconv') => iconv_strlen($s, 'UTF-8'), + default => strlen(@utf8_decode($s)), // deprecated + }; } diff --git a/site/vendor/latte/latte/src/Latte/Essential/Nodes/PrintNode.php b/site/vendor/latte/latte/src/Latte/Essential/Nodes/PrintNode.php index ee1cbcfd0..d08ad40b8 100644 --- a/site/vendor/latte/latte/src/Latte/Essential/Nodes/PrintNode.php +++ b/site/vendor/latte/latte/src/Latte/Essential/Nodes/PrintNode.php @@ -16,7 +16,6 @@ use Latte\Compiler\PrintContext; use Latte\Compiler\Tag; use Latte\Compiler\TemplateParser; -use Latte\ContentType; /** @@ -26,24 +25,17 @@ class PrintNode extends StatementNode { public ExpressionNode $expression; public ModifierNode $modifier; + private ?string $followsQuote = null; public static function create(Tag $tag, TemplateParser $parser): static { $tag->outputMode = $tag::OutputKeepIndentation; - - $stream = $parser->getStream(); - if ( - $tag->isInText() - && $parser->getContentType() === ContentType::Html - && $tag->htmlElement?->is('script') - && preg_match('#["\']#A', $stream->peek()->text) - ) { - throw new CompileException("Do not place {$tag->getNotation(true)} inside quotes in JavaScript.", $tag->position); - } - $tag->expectArguments(); $node = new static; + $node->followsQuote = preg_match('#["\']#A', $parser->getStream()->peek()->text) + ? $tag->getNotation(true) + : null; $node->expression = $tag->parser->parseExpression(); $node->modifier = $tag->parser->parseModifier(); $node->modifier->escape = true; @@ -53,6 +45,9 @@ public static function create(Tag $tag, TemplateParser $parser): static public function print(PrintContext $context): string { + if ($this->followsQuote && $context->getEscaper()->export() === 'html/raw/js') { + throw new CompileException("Do not place {$this->followsQuote} inside quotes in JavaScript.", $this->position); + } return $context->format( "echo %modify(%node) %line;\n", $this->modifier, diff --git a/site/vendor/latte/latte/src/Latte/Runtime/FilterExecutor.php b/site/vendor/latte/latte/src/Latte/Runtime/FilterExecutor.php index 76bc86cf4..2ef3f9be4 100644 --- a/site/vendor/latte/latte/src/Latte/Runtime/FilterExecutor.php +++ b/site/vendor/latte/latte/src/Latte/Runtime/FilterExecutor.php @@ -59,39 +59,10 @@ public function getAll(): array */ public function __get(string $name): callable { - if (isset($this->_static[$name])) { - [$callback, $aware] = $this->prepareFilter($name); - if ($aware) { // FilterInfo aware filter - return $this->$name = function (...$args) use ($callback) { - array_unshift($args, $info = new FilterInfo); - if ($args[1] instanceof HtmlStringable) { - $args[1] = $args[1]->__toString(); - $info->contentType = ContentType::Html; - } - - $res = $callback(...$args); - return $info->contentType === ContentType::Html - ? new Html($res) - : $res; - }; - } else { // classic filter - return $this->$name = $callback; - } - } - - // dynamic filter - foreach ($this->_dynamic as $loader) { - $callback = $loader($name); - if ($callback !== null) { - $this->_static[$name] = [$callback, null]; - return $this->__get($name); - } - } - - $hint = ($t = Helpers::getSuggestion(array_keys($this->_static), $name)) - ? ", did you mean '$t'?" - : '.'; - throw new \LogicException("Filter '$name' is not defined$hint"); + [$callback, $infoAware] = $this->prepareFilter($name); + return $this->$name = $infoAware + ? fn(...$args) => $this->callInfoAwareAsClassic($callback, ...$args) + : $callback; } @@ -100,31 +71,23 @@ public function __get(string $name): callable */ public function filterContent(string $name, FilterInfo $info, mixed ...$args): mixed { - if (!isset($this->_static[$name])) { - $hint = ($t = Helpers::getSuggestion(array_keys($this->_static), $name)) - ? ", did you mean '$t'?" - : '.'; - throw new \LogicException("Filter |$name is not defined$hint"); - } - - [$callback, $aware] = $this->prepareFilter($name); - if ($info->contentType === ContentType::Html && $args[0] instanceof HtmlStringable) { $args[0] = $args[0]->__toString(); } - if ($aware) { // FilterInfo aware filter + [$callback, $infoAware] = $this->prepareFilter($name); + if ($infoAware) { array_unshift($args, $info); return $callback(...$args); } // classic filter if ($info->contentType !== ContentType::Text) { - throw new Latte\RuntimeException("Filter |$name is called with incompatible content type " . strtoupper($info->contentType) + throw new Latte\RuntimeException("Filter |$name is called with incompatible content type " . strtoupper($info->contentType ?? 'NULL') . ($info->contentType === ContentType::Html ? ', try to prepend |stripHtml.' : '.')); } - $res = ($this->$name)(...$args); + $res = $callback(...$args); if ($res instanceof HtmlStringable) { trigger_error("Filter |$name should be changed to content-aware filter."); $info->contentType = ContentType::Html; @@ -140,13 +103,42 @@ public function filterContent(string $name, FilterInfo $info, mixed ...$args): m */ private function prepareFilter(string $name): array { - if (!isset($this->_static[$name][1])) { - $params = Helpers::toReflection($this->_static[$name][0])->getParameters(); - $this->_static[$name][1] = $params - && $params[0]->getType() instanceof \ReflectionNamedType - && $params[0]->getType()->getName() === FilterInfo::class; + if (isset($this->_static[$name])) { + $this->_static[$name][1] ??= $this->isInfoAware($this->_static[$name][0]); + return $this->_static[$name]; + } + + foreach ($this->_dynamic as $loader) { + if ($callback = $loader($name)) { + return $this->_static[$name] = [$callback, $this->isInfoAware($callback)]; + } + } + + $hint = ($t = Helpers::getSuggestion(array_keys($this->_static), $name)) + ? ", did you mean '$t'?" + : '.'; + throw new \LogicException("Filter '$name' is not defined$hint"); + } + + + private function isInfoAware(callable $filter): bool + { + $params = Helpers::toReflection($filter)->getParameters(); + return $params && (string) $params[0]->getType() === FilterInfo::class; + } + + + private function callInfoAwareAsClassic(callable $filter, mixed ...$args): mixed + { + array_unshift($args, $info = new FilterInfo); + if ($args[1] instanceof HtmlStringable) { + $args[1] = $args[1]->__toString(); + $info->contentType = ContentType::Html; } - return $this->_static[$name]; + $res = $filter(...$args); + return $info->contentType === ContentType::Html + ? new Html($res) + : $res; } } diff --git a/site/vendor/latte/latte/src/Latte/Runtime/Filters.php b/site/vendor/latte/latte/src/Latte/Runtime/Filters.php index 503e3067f..19a6df67b 100644 --- a/site/vendor/latte/latte/src/Latte/Runtime/Filters.php +++ b/site/vendor/latte/latte/src/Latte/Runtime/Filters.php @@ -103,6 +103,28 @@ public static function escapeHtmlComment($s): string } + /** + * Escapes HTML for usage in