This commit is contained in:
James Cole
2022-01-02 07:37:53 +01:00
parent 11176fc212
commit f4439778f1
6 changed files with 211 additions and 185 deletions

View File

@@ -1,4 +1,25 @@
<?php <?php
/*
* ActuallyLoggedIn.php
* Copyright (c) 2022 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1); declare(strict_types=1);
/* /*
* ActuallyLoggedIn.php * ActuallyLoggedIn.php

View File

@@ -1,4 +1,25 @@
<?php <?php
/*
* UserDefinedRule.php
* Copyright (c) 2022 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1); declare(strict_types=1);
namespace FireflyIII\Ldap\Rules; namespace FireflyIII\Ldap\Rules;

View File

@@ -1,4 +1,25 @@
<?php <?php
/*
* UserDefinedScope.php
* Copyright (c) 2022 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1); declare(strict_types=1);
namespace FireflyIII\Ldap\Scopes; namespace FireflyIII\Ldap\Scopes;

View File

@@ -106,7 +106,7 @@
"predis/predis": "^1.1", "predis/predis": "^1.1",
"psr/log": "<3", "psr/log": "<3",
"ramsey/uuid": "^4.2", "ramsey/uuid": "^4.2",
"rcrowe/twigbridge": "0.12.3", "rcrowe/twigbridge": "^0.13",
"spatie/data-transfer-object": "^3.1" "spatie/data-transfer-object": "^3.1"
}, },
"require-dev": { "require-dev": {

218
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "65d05df2cf7fcfd42deb02dfc1aa200b", "content-hash": "108bef8f33d7004cea9e9a99a3200787",
"packages": [ "packages": [
{ {
"name": "bacon/bacon-qr-code", "name": "bacon/bacon-qr-code",
@@ -4827,31 +4827,30 @@
}, },
{ {
"name": "rcrowe/twigbridge", "name": "rcrowe/twigbridge",
"version": "v0.12.3", "version": "v0.13.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/rcrowe/TwigBridge.git", "url": "https://github.com/rcrowe/TwigBridge.git",
"reference": "5d6dc0c907c5db476cf0caf3210eb10e44a78369" "reference": "a8a9386dcc572f4fbe146f0ae0fe4d27515d94db"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/rcrowe/TwigBridge/zipball/5d6dc0c907c5db476cf0caf3210eb10e44a78369", "url": "https://api.github.com/repos/rcrowe/TwigBridge/zipball/a8a9386dcc572f4fbe146f0ae0fe4d27515d94db",
"reference": "5d6dc0c907c5db476cf0caf3210eb10e44a78369", "reference": "a8a9386dcc572f4fbe146f0ae0fe4d27515d94db",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"illuminate/support": "^5.5|^6|^7|^8", "illuminate/support": "^5.5 || ^6.0 || ^7.0 || ^8.0",
"illuminate/view": "^5.5|^6|^7|^8", "illuminate/view": "^5.5 || ^6.0 || ^7.0 || ^8.0",
"php": ">=7.1", "php": "^7.2.5 || ^8.0",
"twig/twig": "^2.11" "twig/twig": "~3.0"
}, },
"require-dev": { "require-dev": {
"ext-json": "*", "ext-json": "*",
"laravel/framework": "5.5.*", "laravel/framework": "^5.5 || ^6.0 || ^7.0 || ^8.0",
"mockery/mockery": "0.9.*", "mockery/mockery": "^1.3.1",
"phpunit/phpunit": "~6.0", "phpunit/phpunit": "^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.7",
"satooshi/php-coveralls": "~0.6", "squizlabs/php_codesniffer": "^3.6"
"squizlabs/php_codesniffer": "~1.5"
}, },
"suggest": { "suggest": {
"laravelcollective/html": "For bringing back html/form in Laravel 5.x", "laravelcollective/html": "For bringing back html/form in Laravel 5.x",
@@ -4860,7 +4859,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "0.12-dev" "dev-master": "0.13-dev"
}, },
"laravel": { "laravel": {
"providers": [ "providers": [
@@ -4898,9 +4897,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/rcrowe/TwigBridge/issues", "issues": "https://github.com/rcrowe/TwigBridge/issues",
"source": "https://github.com/rcrowe/TwigBridge/tree/v0.12.3" "source": "https://github.com/rcrowe/TwigBridge/tree/v0.13.0"
}, },
"time": "2020-10-14T18:14:32+00:00" "time": "2021-12-23T12:06:45+00:00"
}, },
{ {
"name": "spatie/data-transfer-object", "name": "spatie/data-transfer-object",
@@ -5046,16 +5045,16 @@
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v5.4.1", "version": "v5.4.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/console.git", "url": "https://github.com/symfony/console.git",
"reference": "9130e1a0fc93cb0faadca4ee917171bd2ca9e5f4" "reference": "a2c6b7ced2eb7799a35375fb9022519282b5405e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/9130e1a0fc93cb0faadca4ee917171bd2ca9e5f4", "url": "https://api.github.com/repos/symfony/console/zipball/a2c6b7ced2eb7799a35375fb9022519282b5405e",
"reference": "9130e1a0fc93cb0faadca4ee917171bd2ca9e5f4", "reference": "a2c6b7ced2eb7799a35375fb9022519282b5405e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -5125,7 +5124,7 @@
"terminal" "terminal"
], ],
"support": { "support": {
"source": "https://github.com/symfony/console/tree/v5.4.1" "source": "https://github.com/symfony/console/tree/v5.4.2"
}, },
"funding": [ "funding": [
{ {
@@ -5141,20 +5140,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-12-09T11:22:43+00:00" "time": "2021-12-20T16:11:12+00:00"
}, },
{ {
"name": "symfony/css-selector", "name": "symfony/css-selector",
"version": "v6.0.1", "version": "v6.0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/css-selector.git", "url": "https://github.com/symfony/css-selector.git",
"reference": "ede53cafe1784b9131a48774b54f281d5d003f65" "reference": "380f86c1a9830226f42a08b5926f18aed4195f25"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/ede53cafe1784b9131a48774b54f281d5d003f65", "url": "https://api.github.com/repos/symfony/css-selector/zipball/380f86c1a9830226f42a08b5926f18aed4195f25",
"reference": "ede53cafe1784b9131a48774b54f281d5d003f65", "reference": "380f86c1a9830226f42a08b5926f18aed4195f25",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -5190,7 +5189,7 @@
"description": "Converts CSS selectors to XPath expressions", "description": "Converts CSS selectors to XPath expressions",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/css-selector/tree/v6.0.1" "source": "https://github.com/symfony/css-selector/tree/v6.0.2"
}, },
"funding": [ "funding": [
{ {
@@ -5206,7 +5205,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-12-08T15:13:44+00:00" "time": "2021-12-16T22:13:01+00:00"
}, },
{ {
"name": "symfony/deprecation-contracts", "name": "symfony/deprecation-contracts",
@@ -5277,16 +5276,16 @@
}, },
{ {
"name": "symfony/error-handler", "name": "symfony/error-handler",
"version": "v5.4.1", "version": "v5.4.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/error-handler.git", "url": "https://github.com/symfony/error-handler.git",
"reference": "1e3cb3565af49cd5f93e5787500134500a29f0d9" "reference": "e0c0dd0f9d4120a20158fc9aec2367d07d38bc56"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/error-handler/zipball/1e3cb3565af49cd5f93e5787500134500a29f0d9", "url": "https://api.github.com/repos/symfony/error-handler/zipball/e0c0dd0f9d4120a20158fc9aec2367d07d38bc56",
"reference": "1e3cb3565af49cd5f93e5787500134500a29f0d9", "reference": "e0c0dd0f9d4120a20158fc9aec2367d07d38bc56",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -5328,7 +5327,7 @@
"description": "Provides tools to manage errors and ease debugging PHP code", "description": "Provides tools to manage errors and ease debugging PHP code",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/error-handler/tree/v5.4.1" "source": "https://github.com/symfony/error-handler/tree/v5.4.2"
}, },
"funding": [ "funding": [
{ {
@@ -5344,20 +5343,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-12-01T15:04:08+00:00" "time": "2021-12-19T20:02:00+00:00"
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
"version": "v6.0.1", "version": "v6.0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/event-dispatcher.git", "url": "https://github.com/symfony/event-dispatcher.git",
"reference": "4f06d19a5f78087061f9de6df3269c139c3d289d" "reference": "7093f25359e2750bfe86842c80c4e4a6a852d05c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/4f06d19a5f78087061f9de6df3269c139c3d289d", "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/7093f25359e2750bfe86842c80c4e4a6a852d05c",
"reference": "4f06d19a5f78087061f9de6df3269c139c3d289d", "reference": "7093f25359e2750bfe86842c80c4e4a6a852d05c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -5411,7 +5410,7 @@
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/event-dispatcher/tree/v6.0.1" "source": "https://github.com/symfony/event-dispatcher/tree/v6.0.2"
}, },
"funding": [ "funding": [
{ {
@@ -5427,7 +5426,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-12-08T15:13:44+00:00" "time": "2021-12-21T10:43:13+00:00"
}, },
{ {
"name": "symfony/event-dispatcher-contracts", "name": "symfony/event-dispatcher-contracts",
@@ -5510,16 +5509,16 @@
}, },
{ {
"name": "symfony/finder", "name": "symfony/finder",
"version": "v5.4.0", "version": "v5.4.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/finder.git", "url": "https://github.com/symfony/finder.git",
"reference": "d2f29dac98e96a98be467627bd49c2efb1bc2590" "reference": "e77046c252be48c48a40816187ed527703c8f76c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/d2f29dac98e96a98be467627bd49c2efb1bc2590", "url": "https://api.github.com/repos/symfony/finder/zipball/e77046c252be48c48a40816187ed527703c8f76c",
"reference": "d2f29dac98e96a98be467627bd49c2efb1bc2590", "reference": "e77046c252be48c48a40816187ed527703c8f76c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -5553,7 +5552,7 @@
"description": "Finds files and directories via an intuitive fluent interface", "description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/finder/tree/v5.4.0" "source": "https://github.com/symfony/finder/tree/v5.4.2"
}, },
"funding": [ "funding": [
{ {
@@ -5569,20 +5568,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-11-28T15:25:38+00:00" "time": "2021-12-15T11:06:13+00:00"
}, },
{ {
"name": "symfony/http-foundation", "name": "symfony/http-foundation",
"version": "v5.4.1", "version": "v5.4.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-foundation.git", "url": "https://github.com/symfony/http-foundation.git",
"reference": "5dad3780023a707f4c24beac7d57aead85c1ce3c" "reference": "ce952af52877eaf3eab5d0c08cc0ea865ed37313"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/5dad3780023a707f4c24beac7d57aead85c1ce3c", "url": "https://api.github.com/repos/symfony/http-foundation/zipball/ce952af52877eaf3eab5d0c08cc0ea865ed37313",
"reference": "5dad3780023a707f4c24beac7d57aead85c1ce3c", "reference": "ce952af52877eaf3eab5d0c08cc0ea865ed37313",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -5626,7 +5625,7 @@
"description": "Defines an object-oriented layer for the HTTP specification", "description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/http-foundation/tree/v5.4.1" "source": "https://github.com/symfony/http-foundation/tree/v5.4.2"
}, },
"funding": [ "funding": [
{ {
@@ -5642,20 +5641,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-12-09T12:46:57+00:00" "time": "2021-12-28T17:15:56+00:00"
}, },
{ {
"name": "symfony/http-kernel", "name": "symfony/http-kernel",
"version": "v5.4.1", "version": "v5.4.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-kernel.git", "url": "https://github.com/symfony/http-kernel.git",
"reference": "2bdace75c9d6a6eec7e318801b7dc87a72375052" "reference": "35b7e9868953e0d1df84320bb063543369e43ef5"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/2bdace75c9d6a6eec7e318801b7dc87a72375052", "url": "https://api.github.com/repos/symfony/http-kernel/zipball/35b7e9868953e0d1df84320bb063543369e43ef5",
"reference": "2bdace75c9d6a6eec7e318801b7dc87a72375052", "reference": "35b7e9868953e0d1df84320bb063543369e43ef5",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -5738,7 +5737,7 @@
"description": "Provides a structured process for converting a Request into a Response", "description": "Provides a structured process for converting a Request into a Response",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/http-kernel/tree/v5.4.1" "source": "https://github.com/symfony/http-kernel/tree/v5.4.2"
}, },
"funding": [ "funding": [
{ {
@@ -5754,20 +5753,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-12-09T13:36:09+00:00" "time": "2021-12-29T13:20:26+00:00"
}, },
{ {
"name": "symfony/mime", "name": "symfony/mime",
"version": "v5.4.0", "version": "v5.4.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/mime.git", "url": "https://github.com/symfony/mime.git",
"reference": "d4365000217b67c01acff407573906ff91bcfb34" "reference": "1bfd938cf9562822c05c4d00e8f92134d3c8e42d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/mime/zipball/d4365000217b67c01acff407573906ff91bcfb34", "url": "https://api.github.com/repos/symfony/mime/zipball/1bfd938cf9562822c05c4d00e8f92134d3c8e42d",
"reference": "d4365000217b67c01acff407573906ff91bcfb34", "reference": "1bfd938cf9562822c05c4d00e8f92134d3c8e42d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -5821,7 +5820,7 @@
"mime-type" "mime-type"
], ],
"support": { "support": {
"source": "https://github.com/symfony/mime/tree/v5.4.0" "source": "https://github.com/symfony/mime/tree/v5.4.2"
}, },
"funding": [ "funding": [
{ {
@@ -5837,7 +5836,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-11-23T10:19:22+00:00" "time": "2021-12-28T17:15:56+00:00"
}, },
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
@@ -6649,16 +6648,16 @@
}, },
{ {
"name": "symfony/process", "name": "symfony/process",
"version": "v5.4.0", "version": "v5.4.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/process.git", "url": "https://github.com/symfony/process.git",
"reference": "5be20b3830f726e019162b26223110c8f47cf274" "reference": "2b3ba8722c4aaf3e88011be5e7f48710088fb5e4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/5be20b3830f726e019162b26223110c8f47cf274", "url": "https://api.github.com/repos/symfony/process/zipball/2b3ba8722c4aaf3e88011be5e7f48710088fb5e4",
"reference": "5be20b3830f726e019162b26223110c8f47cf274", "reference": "2b3ba8722c4aaf3e88011be5e7f48710088fb5e4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -6691,7 +6690,7 @@
"description": "Executes commands in sub-processes", "description": "Executes commands in sub-processes",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/process/tree/v5.4.0" "source": "https://github.com/symfony/process/tree/v5.4.2"
}, },
"funding": [ "funding": [
{ {
@@ -6707,7 +6706,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-11-28T15:25:38+00:00" "time": "2021-12-27T21:01:00+00:00"
}, },
{ {
"name": "symfony/psr-http-message-bridge", "name": "symfony/psr-http-message-bridge",
@@ -6971,16 +6970,16 @@
}, },
{ {
"name": "symfony/string", "name": "symfony/string",
"version": "v6.0.1", "version": "v6.0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/string.git", "url": "https://github.com/symfony/string.git",
"reference": "0cfed595758ec6e0a25591bdc8ca733c1896af32" "reference": "bae261d0c3ac38a1f802b4dfed42094296100631"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/0cfed595758ec6e0a25591bdc8ca733c1896af32", "url": "https://api.github.com/repos/symfony/string/zipball/bae261d0c3ac38a1f802b4dfed42094296100631",
"reference": "0cfed595758ec6e0a25591bdc8ca733c1896af32", "reference": "bae261d0c3ac38a1f802b4dfed42094296100631",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -7036,7 +7035,7 @@
"utf8" "utf8"
], ],
"support": { "support": {
"source": "https://github.com/symfony/string/tree/v6.0.1" "source": "https://github.com/symfony/string/tree/v6.0.2"
}, },
"funding": [ "funding": [
{ {
@@ -7052,20 +7051,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-12-08T15:13:44+00:00" "time": "2021-12-16T22:13:01+00:00"
}, },
{ {
"name": "symfony/translation", "name": "symfony/translation",
"version": "v6.0.1", "version": "v6.0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/translation.git", "url": "https://github.com/symfony/translation.git",
"reference": "b7956e00c6e03546f2ba489fc50f7c47933e76b8" "reference": "a16c33f93e2fd62d259222aebf792158e9a28a77"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/b7956e00c6e03546f2ba489fc50f7c47933e76b8", "url": "https://api.github.com/repos/symfony/translation/zipball/a16c33f93e2fd62d259222aebf792158e9a28a77",
"reference": "b7956e00c6e03546f2ba489fc50f7c47933e76b8", "reference": "a16c33f93e2fd62d259222aebf792158e9a28a77",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -7131,7 +7130,7 @@
"description": "Provides tools to internationalize your application", "description": "Provides tools to internationalize your application",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/translation/tree/v6.0.1" "source": "https://github.com/symfony/translation/tree/v6.0.2"
}, },
"funding": [ "funding": [
{ {
@@ -7147,7 +7146,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-12-08T15:13:44+00:00" "time": "2021-12-25T20:10:03+00:00"
}, },
{ {
"name": "symfony/translation-contracts", "name": "symfony/translation-contracts",
@@ -7229,16 +7228,16 @@
}, },
{ {
"name": "symfony/var-dumper", "name": "symfony/var-dumper",
"version": "v5.4.1", "version": "v5.4.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/var-dumper.git", "url": "https://github.com/symfony/var-dumper.git",
"reference": "2366ac8d8abe0c077844613c1a4f0c0a9f522dcc" "reference": "1b56c32c3679002b3a42384a580e16e2600f41c1"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/2366ac8d8abe0c077844613c1a4f0c0a9f522dcc", "url": "https://api.github.com/repos/symfony/var-dumper/zipball/1b56c32c3679002b3a42384a580e16e2600f41c1",
"reference": "2366ac8d8abe0c077844613c1a4f0c0a9f522dcc", "reference": "1b56c32c3679002b3a42384a580e16e2600f41c1",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -7298,7 +7297,7 @@
"dump" "dump"
], ],
"support": { "support": {
"source": "https://github.com/symfony/var-dumper/tree/v5.4.1" "source": "https://github.com/symfony/var-dumper/tree/v5.4.2"
}, },
"funding": [ "funding": [
{ {
@@ -7314,7 +7313,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-12-01T15:04:08+00:00" "time": "2021-12-29T10:10:35+00:00"
}, },
{ {
"name": "tijsverkoyen/css-to-inline-styles", "name": "tijsverkoyen/css-to-inline-styles",
@@ -7371,16 +7370,16 @@
}, },
{ {
"name": "twig/twig", "name": "twig/twig",
"version": "v2.14.8", "version": "v3.3.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/twigphp/Twig.git", "url": "https://github.com/twigphp/Twig.git",
"reference": "06b450a2326aa879faa2061ff72fe1588b3ab043" "reference": "65cb6f0b956485e1664f13d023c55298a4bb59ca"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/06b450a2326aa879faa2061ff72fe1588b3ab043", "url": "https://api.github.com/repos/twigphp/Twig/zipball/65cb6f0b956485e1664f13d023c55298a4bb59ca",
"reference": "06b450a2326aa879faa2061ff72fe1588b3ab043", "reference": "65cb6f0b956485e1664f13d023c55298a4bb59ca",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -7395,13 +7394,10 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.14-dev" "dev-master": "3.3-dev"
} }
}, },
"autoload": { "autoload": {
"psr-0": {
"Twig_": "lib/"
},
"psr-4": { "psr-4": {
"Twig\\": "src/" "Twig\\": "src/"
} }
@@ -7434,7 +7430,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/twigphp/Twig/issues", "issues": "https://github.com/twigphp/Twig/issues",
"source": "https://github.com/twigphp/Twig/tree/v2.14.8" "source": "https://github.com/twigphp/Twig/tree/v3.3.4"
}, },
"funding": [ "funding": [
{ {
@@ -7446,7 +7442,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-11-25T13:38:06+00:00" "time": "2021-11-25T13:46:55+00:00"
}, },
{ {
"name": "vlucas/phpdotenv", "name": "vlucas/phpdotenv",
@@ -7967,16 +7963,16 @@
}, },
{ {
"name": "composer/composer", "name": "composer/composer",
"version": "2.2.1", "version": "2.2.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/composer/composer.git", "url": "https://github.com/composer/composer.git",
"reference": "bbc265e16561ab8e0f5e7cac395ea72640251f0c" "reference": "3c92ba5cdc7d48b7db2dcd197e6fa0e8fa6d9f4a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/composer/composer/zipball/bbc265e16561ab8e0f5e7cac395ea72640251f0c", "url": "https://api.github.com/repos/composer/composer/zipball/3c92ba5cdc7d48b7db2dcd197e6fa0e8fa6d9f4a",
"reference": "bbc265e16561ab8e0f5e7cac395ea72640251f0c", "reference": "3c92ba5cdc7d48b7db2dcd197e6fa0e8fa6d9f4a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -8046,7 +8042,7 @@
"support": { "support": {
"irc": "ircs://irc.libera.chat:6697/composer", "irc": "ircs://irc.libera.chat:6697/composer",
"issues": "https://github.com/composer/composer/issues", "issues": "https://github.com/composer/composer/issues",
"source": "https://github.com/composer/composer/tree/2.2.1" "source": "https://github.com/composer/composer/tree/2.2.3"
}, },
"funding": [ "funding": [
{ {
@@ -8062,7 +8058,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-12-22T21:21:31+00:00" "time": "2021-12-31T11:18:53+00:00"
}, },
{ {
"name": "composer/metadata-minifier", "name": "composer/metadata-minifier",
@@ -10894,16 +10890,16 @@
}, },
{ {
"name": "symfony/debug", "name": "symfony/debug",
"version": "v4.4.31", "version": "v4.4.36",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/debug.git", "url": "https://github.com/symfony/debug.git",
"reference": "43ede438d4cb52cd589ae5dc070e9323866ba8e0" "reference": "346e1507eeb3f566dcc7a116fefaa407ee84691b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/debug/zipball/43ede438d4cb52cd589ae5dc070e9323866ba8e0", "url": "https://api.github.com/repos/symfony/debug/zipball/346e1507eeb3f566dcc7a116fefaa407ee84691b",
"reference": "43ede438d4cb52cd589ae5dc070e9323866ba8e0", "reference": "346e1507eeb3f566dcc7a116fefaa407ee84691b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -10942,7 +10938,7 @@
"description": "Provides tools to ease debugging PHP code", "description": "Provides tools to ease debugging PHP code",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/debug/tree/v4.4.31" "source": "https://github.com/symfony/debug/tree/v4.4.36"
}, },
"funding": [ "funding": [
{ {
@@ -10958,7 +10954,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-09-24T13:30:14+00:00" "time": "2021-11-29T08:40:48+00:00"
}, },
{ {
"name": "symfony/filesystem", "name": "symfony/filesystem",

View File

@@ -1,7 +1,9 @@
<?php <?php
/* /*
* twigbridge.php * twigbridge.php
* Copyright (c) 2021 james@firefly-iii.org * Copyright (c) 2022 james@firefly-iii.org
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * This file is part of Firefly III (https://github.com/firefly-iii).
* *
@@ -19,8 +21,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
declare(strict_types=1);
/** /**
* This file is part of the TwigBridge package. * This file is part of the TwigBridge package.
* *
@@ -29,83 +29,54 @@ declare(strict_types=1);
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
use FireflyIII\Support\Twig\AmountFormat; use FireflyIII\Support\Twig\AmountFormat;
use FireflyIII\Support\Twig\General; use FireflyIII\Support\Twig\General;
use FireflyIII\Support\Twig\Rule; use FireflyIII\Support\Twig\Rule;
use FireflyIII\Support\Twig\TransactionGroupTwig; use FireflyIII\Support\Twig\TransactionGroupTwig;
use FireflyIII\Support\Twig\Translation; use FireflyIII\Support\Twig\Translation;
use Illuminate\Contracts\Support\Htmlable;
use TwigBridge\Extension\Laravel\Auth;
use TwigBridge\Extension\Laravel\Config;
use TwigBridge\Extension\Laravel\Dump; use TwigBridge\Extension\Laravel\Dump;
use TwigBridge\Extension\Laravel\Event;
use TwigBridge\Extension\Laravel\Input; use TwigBridge\Extension\Laravel\Input;
use TwigBridge\Extension\Laravel\Model; use TwigBridge\Extension\Laravel\Model;
use TwigBridge\Extension\Laravel\Session;
use TwigBridge\Extension\Laravel\Str; use TwigBridge\Extension\Laravel\Str;
use TwigBridge\Extension\Laravel\Translator; use TwigBridge\Extension\Laravel\Translator;
use TwigBridge\Extension\Laravel\Url; use TwigBridge\Extension\Laravel\Url;
use TwigBridge\Extension\Loader\Facades; use TwigBridge\Extension\Loader\Facades;
use TwigBridge\Extension\Loader\Filters; use TwigBridge\Extension\Loader\Filters;
use TwigBridge\Extension\Loader\Functions; use TwigBridge\Extension\Loader\Functions;
use TwigBridge\Extension\Loader\Globals;
/** /**
* Configuration options for Twig. * Configuration options for Twig.
*/ */
return [ return [
'twig' => [ 'twig' => [
/* 'extension' => 'twig',
|--------------------------------------------------------------------------
| Extension
|--------------------------------------------------------------------------
|
| File extension for Twig view files.
|
*/
'extension' => 'twig',
/*
|--------------------------------------------------------------------------
| Accepts all Twig environment configuration options
|--------------------------------------------------------------------------
|
| http://twig.sensiolabs.org/doc/api.html#environment-options
|
*/
'environment' => [ 'environment' => [
'debug' => env('APP_DEBUG', false),
// When set to true, the generated templates have a __toString() method 'charset' => 'utf-8',
// that you can use to display the generated nodes. 'cache' => null,
// default: false 'auto_reload' => true,
'debug' => env('APP_DEBUG', false), 'strict_variables' => false,
'autoescape' => 'html',
// The charset used by the templates. 'optimizations' => -1,
// default: utf-8 ],
'charset' => 'utf-8', /*
|--------------------------------------------------------------------------
// The base template class to use for generated templates. | Safe Classes
// default: TwigBridge\Twig\Template |--------------------------------------------------------------------------
'base_template_class' => 'TwigBridge\Twig\Template', |
| When set, the output of the `__string` method of the following classes will not be escaped.
// An absolute path where to store the compiled templates, or false to disable caching. If null | default: Laravel's Htmlable, which the HtmlString class implements.
// then the cache file path is used. |
// default: cache file storage path */
'cache' => null, 'safe_classes' => [
Htmlable::class => ['html'],
// When developing with Twig, it's useful to recompile the template
// whenever the source code changes. If you don't provide a value
// for the auto_reload option, it will be determined automatically based on the debug value.
'auto_reload' => true,
// If set to false, Twig will silently ignore invalid variables
// (variables and or attributes/methods that do not exist) and
// replace them with a null value. When set to true, Twig throws an exception instead.
// default: false
'strict_variables' => false,
// If set to true, auto-escaping will be enabled by default for all templates.
// default: 'html'
'autoescape' => 'html',
// A flag that indicates which optimizations to apply
// (default to -1 -- all optimizations are enabled; set it to 0 to disable)
'optimizations' => -1,
], ],
/* /*
@@ -117,7 +88,7 @@ return [
| NOTE: these will be overwritten if you pass data into the view with the same key. | NOTE: these will be overwritten if you pass data into the view with the same key.
| |
*/ */
'globals' => [], 'globals' => [],
], ],
'extensions' => [ 'extensions' => [
@@ -132,31 +103,27 @@ return [
| `Twig\Extension\DebugExtension` is enabled automatically if twig.debug is TRUE. | `Twig\Extension\DebugExtension` is enabled automatically if twig.debug is TRUE.
| |
*/ */
'enabled' => [ 'enabled' => [
Facades::class, Facades::class,
Filters::class, Filters::class,
Functions::class, Functions::class,
\TwigBridge\Extension\Laravel\Auth::class, Event::class,
\TwigBridge\Extension\Laravel\Config::class, Globals::class,
Auth::class,
Config::class,
Dump::class, Dump::class,
Input::class, Input::class,
\TwigBridge\Extension\Laravel\Session::class, Session::class,
Str::class, Str::class,
Translator::class, Translator::class,
Url::class, Url::class,
Model::class, Model::class,
// 'TwigBridge\Extension\Laravel\Gate', // Firefly III
// 'TwigBridge\Extension\Laravel\Form',
// 'TwigBridge\Extension\Laravel\Html',
// 'TwigBridge\Extension\Laravel\Legacy\Facades',
AmountFormat::class, AmountFormat::class,
General::class, General::class,
Rule::class, Rule::class,
TransactionGroupTwig::class, TransactionGroupTwig::class,
Translation::class, Translation::class,
], ],
/* /*
@@ -186,7 +153,7 @@ return [
| in order to be marked as safe. | in order to be marked as safe.
| |
*/ */
'facades' => [ 'facades' => [
'Breadcrumbs' => [ 'Breadcrumbs' => [
'is_safe' => [ 'is_safe' => [
'render', 'render',
@@ -294,7 +261,7 @@ return [
| </code> | </code>
| |
*/ */
'filters' => [ 'filters' => [
'get' => 'data_get', 'get' => 'data_get',
], ],
], ],