diff --git a/VERSION b/VERSION index b6bb93f7..1892b926 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.3.0-dev +1.3.2 diff --git a/assets/ckeditor/plugins/special_characters_emoji.js b/assets/ckeditor/plugins/special_characters_emoji.js index 9877e6f6..1d4ec000 100644 --- a/assets/ckeditor/plugins/special_characters_emoji.js +++ b/assets/ckeditor/plugins/special_characters_emoji.js @@ -30,9 +30,73 @@ export default class SpecialCharactersEmoji extends Plugin { const editor = this.editor; const specialCharsPlugin = editor.plugins.get('SpecialCharacters'); + //Add greek characters to special characters + specialCharsPlugin.addItems('Greek', this.getGreek()); + + //Add Emojis to special characters specialCharsPlugin.addItems('Emoji', this.getEmojis()); } + getGreek() { + return [ + { title: 'Alpha', character: 'Α' }, + { title: 'Beta', character: 'Β' }, + { title: 'Gamma', character: 'Γ' }, + { title: 'Delta', character: 'Δ' }, + { title: 'Epsilon', character: 'Ε' }, + { title: 'Zeta', character: 'Ζ' }, + { title: 'Eta', character: 'Η' }, + { title: 'Theta', character: 'Θ' }, + { title: 'Iota', character: 'Ι' }, + { title: 'Kappa', character: 'Κ' }, + { title: 'Lambda', character: 'Λ' }, + { title: 'Mu', character: 'Μ' }, + { title: 'Nu', character: 'Ν' }, + { title: 'Xi', character: 'Ξ' }, + { title: 'Omicron', character: 'Ο' }, + { title: 'Pi', character: 'Π' }, + { title: 'Rho', character: 'Ρ' }, + { title: 'Sigma', character: 'Σ' }, + { title: 'Tau', character: 'Τ' }, + { title: 'Upsilon', character: 'Υ' }, + { title: 'Phi', character: 'Φ' }, + { title: 'Chi', character: 'Χ' }, + { title: 'Psi', character: 'Ψ' }, + { title: 'Omega', character: 'Ω' }, + { title: 'alpha', character: 'α' }, + { title: 'beta', character: 'β' }, + { title: 'gamma', character: 'γ' }, + { title: 'delta', character: 'δ' }, + { title: 'epsilon', character: 'ε' }, + { title: 'zeta', character: 'ζ' }, + { title: 'eta', character: 'η' }, + { title: 'theta', character: 'θ' }, + { title: 'alternate theta', character: 'ϑ' }, + { title: 'iota', character: 'ι' }, + { title: 'kappa', character: 'κ' }, + { title: 'lambda', character: 'λ' }, + { title: 'mu', character: 'μ' }, + { title: 'nu', character: 'ν' }, + { title: 'xi', character: 'ξ' }, + { title: 'omicron', character: 'ο' }, + { title: 'pi', character: 'π' }, + { title: 'rho', character: 'ρ' }, + { title: 'sigma', character: 'σ' }, + { title: 'tau', character: 'τ' }, + { title: 'upsilon', character: 'υ' }, + { title: 'phi', character: 'φ' }, + { title: 'chi', character: 'χ' }, + { title: 'psi', character: 'ψ' }, + { title: 'omega', character: 'ω' }, + { title: 'digamma', character: 'Ϝ' }, + { title: 'stigma', character: 'Ϛ' }, + { title: 'heta', character: 'Ͱ' }, + { title: 'sampi', character: 'Ϡ' }, + { title: 'koppa', character: 'Ϟ' }, + { title: 'san', character: 'Ϻ' }, + ]; + } + getEmojis() { //Map our emoji data to the format the plugin expects return emoji.map(emoji => { diff --git a/assets/controllers/elements/delete_btn_controller.js b/assets/controllers/elements/delete_btn_controller.js index 21a25328..b688605b 100644 --- a/assets/controllers/elements/delete_btn_controller.js +++ b/assets/controllers/elements/delete_btn_controller.js @@ -29,42 +29,16 @@ export default class extends Controller this._confirmed = false; } - click(event) { - //If a user has not already confirmed the deletion, just let turbo do its work - if(this._confirmed) { - this._confirmed = false; - return; - } - - event.preventDefault(); - - const message = this.element.dataset.deleteMessage; - const title = this.element.dataset.deleteTitle; - - const that = this; - - const confirm = bootbox.confirm({ - message: message, title: title, callback: function (result) { - //If the dialog was confirmed, then submit the form. - if (result) { - that._confirmed = true; - event.target.click(); - } else { - that._confirmed = false; - } - } - }); - } - submit(event) { //If a user has not already confirmed the deletion, just let turbo do its work - if(this._confirmed) { + if (this._confirmed) { this._confirmed = false; return; } //Prevent turbo from doing its work event.preventDefault(); + event.stopPropagation(); const message = this.element.dataset.deleteMessage; const title = this.element.dataset.deleteTitle; @@ -72,19 +46,20 @@ export default class extends Controller const form = this.element; const that = this; - //Create a clone of the event with the same submitter, so we can redispatch it if needed - //We need to do this that way, as we need the submitter info, just calling form.submit() would not work - this._our_event = new SubmitEvent('submit', { - submitter: event.submitter, - bubbles: true, //This line is important, otherwise Turbo will not receive the event - }); - const confirm = bootbox.confirm({ message: message, title: title, callback: function (result) { //If the dialog was confirmed, then submit the form. if (result) { + //Set a flag to prevent the dialog from popping up again and allowing turbo to submit the form that._confirmed = true; - form.dispatchEvent(that._our_event); + + //Create a submit button in the form and click it to submit the form + //Before a submit event was dispatched, but this caused weird issues on Firefox causing the delete request being posted twice (and the second time was returning 404). See https://github.com/Part-DB/Part-DB-server/issues/273 + const submit_btn = document.createElement('button'); + submit_btn.type = 'submit'; + submit_btn.style.display = 'none'; + form.appendChild(submit_btn); + submit_btn.click(); } else { that._confirmed = false; } diff --git a/assets/js/register_events.js b/assets/js/register_events.js index 9fcbd6cc..06f48ec1 100644 --- a/assets/js/register_events.js +++ b/assets/js/register_events.js @@ -72,63 +72,223 @@ class RegisterEventHelper { this.registerLoadHandler(() => { //@ts-ignore $("input[type=text], input[type=search]").unbind("keydown").keydown(function (event) { - let greek = event.altKey; + let use_special_char = event.altKey; let greek_char = ""; - if (greek){ + if (use_special_char){ + //Use the key property to determine the greek letter (as it is independent of the keyboard layout) switch(event.key) { - case "w": //Omega - greek_char = '\u2126'; - break; - case "u": - case "m": //Micro - greek_char = "\u00B5"; - break; - case "p": //Phi - greek_char = "\u03C6"; - break; - case "a": //Alpha + //Greek letters + case "a": //Alpha (lowercase) greek_char = "\u03B1"; break; - case "b": //Beta + case "A": //Alpha (uppercase) + greek_char = "\u0391"; + break; + case "b": //Beta (lowercase) greek_char = "\u03B2"; break; - case "c": //Gamma + case "B": //Beta (uppercase) + greek_char = "\u0392"; + break; + case "g": //Gamma (lowercase) greek_char = "\u03B3"; break; - case "d": //Delta + case "G": //Gamma (uppercase) + greek_char = "\u0393"; + break; + case "d": //Delta (lowercase) greek_char = "\u03B4"; break; - case "l": //Pound - greek_char = "\u00A3"; + case "D": //Delta (uppercase) + greek_char = "\u0394"; break; - case "y": //Yen - greek_char = "\u00A5"; + case "e": //Epsilon (lowercase) + greek_char = "\u03B5"; break; - case "o": //Yen - greek_char = "\u00A4"; + case "E": //Epsilon (uppercase) + greek_char = "\u0395"; break; - case "1": //Sum symbol - greek_char = "\u2211"; + case "z": //Zeta (lowercase) + greek_char = "\u03B6"; break; - case "2": //Integral - greek_char = "\u222B"; + case "Z": //Zeta (uppercase) + greek_char = "\u0396"; break; - case "3": //Less-than or equal - greek_char = "\u2264"; + case "h": //Eta (lowercase) + greek_char = "\u03B7"; break; - case "4": //Greater than or equal - greek_char = "\u2265"; + case "H": //Eta (uppercase) + greek_char = "\u0397"; break; - case "5": //PI - greek_char = "\u03c0"; + case "q": //Theta (lowercase) + greek_char = "\u03B8"; break; - case "q": //Copyright - greek_char = "\u00A9"; + case "Q": //Theta (uppercase) + greek_char = "\u0398"; break; - case "e": //Euro - greek_char = "\u20AC"; + case "i": //Iota (lowercase) + greek_char = "\u03B9"; break; + case "I": //Iota (uppercase) + greek_char = "\u0399"; + break; + case "k": //Kappa (lowercase) + greek_char = "\u03BA"; + break; + case "K": //Kappa (uppercase) + greek_char = "\u039A"; + break; + case "l": //Lambda (lowercase) + greek_char = "\u03BB"; + break; + case "L": //Lambda (uppercase) + greek_char = "\u039B"; + break; + case "m": //Mu (lowercase) + greek_char = "\u03BC"; + break; + case "M": //Mu (uppercase) + greek_char = "\u039C"; + break; + case "n": //Nu (lowercase) + greek_char = "\u03BD"; + break; + case "N": //Nu (uppercase) + greek_char = "\u039D"; + break; + case "x": //Xi (lowercase) + greek_char = "\u03BE"; + break; + case "X": //Xi (uppercase) + greek_char = "\u039E"; + break; + case "o": //Omicron (lowercase) + greek_char = "\u03BF"; + break; + case "O": //Omicron (uppercase) + greek_char = "\u039F"; + break; + case "p": //Pi (lowercase) + greek_char = "\u03C0"; + break; + case "P": //Pi (uppercase) + greek_char = "\u03A0"; + break; + case "r": //Rho (lowercase) + greek_char = "\u03C1"; + break; + case "R": //Rho (uppercase) + greek_char = "\u03A1"; + break; + case "s": //Sigma (lowercase) + greek_char = "\u03C3"; + break; + case "S": //Sigma (uppercase) + greek_char = "\u03A3"; + break; + case "t": //Tau (lowercase) + greek_char = "\u03C4"; + break; + case "T": //Tau (uppercase) + greek_char = "\u03A4"; + break; + case "u": //Upsilon (lowercase) + greek_char = "\u03C5"; + break; + case "U": //Upsilon (uppercase) + greek_char = "\u03A5"; + break; + case "f": //Phi (lowercase) + greek_char = "\u03C6"; + break; + case "F": //Phi (uppercase) + greek_char = "\u03A6"; + break; + case "c": //Chi (lowercase) + greek_char = "\u03C7"; + break; + case "C": //Chi (uppercase) + greek_char = "\u03A7"; + break; + case "y": //Psi (lowercase) + greek_char = "\u03C8"; + break; + case "Y": //Psi (uppercase) + greek_char = "\u03A8"; + break; + case "w": //Omega (lowercase) + greek_char = "\u03C9"; + break; + case "W": //Omega (uppercase) + greek_char = "\u03A9"; + break; + } + + //Use keycodes for special characters as the shift char on the number keys are layout dependent + switch (event.keyCode) { + case 49: //1 key + //Product symbol on shift, sum on no shift + greek_char = event.shiftKey ? "\u220F" : "\u2211"; + break; + case 50: //2 key + //Integral on no shift, partial derivative on shift + greek_char = event.shiftKey ? "\u2202" : "\u222B"; + break; + case 51: //3 key + //Less than or equal on no shift, greater than or equal on shift + greek_char = event.shiftKey ? "\u2265" : "\u2264"; + break; + case 52: //4 key + //Empty set on shift, infinity on no shift + greek_char = event.shiftKey ? "\u2205" : "\u221E"; + break; + case 53: //5 key + //Not equal on shift, approx equal on no shift + greek_char = event.shiftKey ? "\u2260" : "\u2248"; + break; + case 54: //6 key + //Element of on no shift, not element of on shift + greek_char = event.shiftKey ? "\u2209" : "\u2208"; + break; + case 55: //7 key + //And on shift, or on no shift + greek_char = event.shiftKey ? "\u2227" : "\u2228"; + break; + case 56: //8 key + //Proportional to on shift, angle on no shift + greek_char = event.shiftKey ? "\u221D" : "\u2220"; + break; + case 57: //9 key + //Cube root on shift, square root on no shift + greek_char = event.shiftKey ? "\u221B" : "\u221A"; + break; + case 48: //0 key + //Minus-Plus on shift, plus-minus on no shift + greek_char = event.shiftKey ? "\u2213" : "\u00B1"; + break; + + //Special characters + case 219: //hyphen (or ß on german layout) + //Copyright on no shift, TM on shift + greek_char = event.shiftKey ? "\u2122" : "\u00A9"; + break; + case 191: //forward slash (or # on german layout) + //Generic currency on no shift, paragraph on shift + greek_char = event.shiftKey ? "\u00B6" : "\u00A4"; + break; + + //Currency symbols + case 192: //: or (ö on german layout) + //Euro on no shift, pound on shift + greek_char = event.shiftKey ? "\u00A3" : "\u20AC"; + break; + case 221: //; or (ä on german layout) + //Yen on no shift, dollar on shift + greek_char = event.shiftKey ? "\u0024" : "\u00A5"; + break; + + } if(greek_char=="") return; diff --git a/composer.lock b/composer.lock index db97b11f..5a995a75 100644 --- a/composer.lock +++ b/composer.lock @@ -667,16 +667,16 @@ }, { "name": "doctrine/dbal", - "version": "3.6.1", + "version": "3.6.2", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "57815c7bbcda3cd18871d253c1dd8cbe56f8526e" + "reference": "b4bd1cfbd2b916951696d82e57d054394d84864c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/57815c7bbcda3cd18871d253c1dd8cbe56f8526e", - "reference": "57815c7bbcda3cd18871d253c1dd8cbe56f8526e", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/b4bd1cfbd2b916951696d82e57d054394d84864c", + "reference": "b4bd1cfbd2b916951696d82e57d054394d84864c", "shasum": "" }, "require": { @@ -692,9 +692,9 @@ "doctrine/coding-standard": "11.1.0", "fig/log-test": "^1", "jetbrains/phpstorm-stubs": "2022.3", - "phpstan/phpstan": "1.10.3", + "phpstan/phpstan": "1.10.9", "phpstan/phpstan-strict-rules": "^1.5", - "phpunit/phpunit": "9.6.4", + "phpunit/phpunit": "9.6.6", "psalm/plugin-phpunit": "0.18.4", "squizlabs/php_codesniffer": "3.7.2", "symfony/cache": "^5.4|^6.0", @@ -759,7 +759,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.6.1" + "source": "https://github.com/doctrine/dbal/tree/3.6.2" }, "funding": [ { @@ -775,7 +775,7 @@ "type": "tidelift" } ], - "time": "2023-03-02T19:26:24+00:00" + "time": "2023-04-14T07:25:38+00:00" }, { "name": "doctrine/deprecations", @@ -822,16 +822,16 @@ }, { "name": "doctrine/doctrine-bundle", - "version": "2.9.0", + "version": "2.9.1", "source": { "type": "git", "url": "https://github.com/doctrine/DoctrineBundle.git", - "reference": "9819c00c2eea750b99902f244309b824911b72b2" + "reference": "7539b3c8bd620f7df6c2c6d510204bd2ce0064e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/9819c00c2eea750b99902f244309b824911b72b2", - "reference": "9819c00c2eea750b99902f244309b824911b72b2", + "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/7539b3c8bd620f7df6c2c6d510204bd2ce0064e3", + "reference": "7539b3c8bd620f7df6c2c6d510204bd2ce0064e3", "shasum": "" }, "require": { @@ -918,7 +918,7 @@ ], "support": { "issues": "https://github.com/doctrine/DoctrineBundle/issues", - "source": "https://github.com/doctrine/DoctrineBundle/tree/2.9.0" + "source": "https://github.com/doctrine/DoctrineBundle/tree/2.9.1" }, "funding": [ { @@ -934,7 +934,7 @@ "type": "tidelift" } ], - "time": "2023-03-23T20:02:57+00:00" + "time": "2023-04-14T05:39:34+00:00" }, { "name": "doctrine/doctrine-migrations-bundle", @@ -1456,16 +1456,16 @@ }, { "name": "doctrine/orm", - "version": "2.14.1", + "version": "2.14.3", "source": { "type": "git", "url": "https://github.com/doctrine/orm.git", - "reference": "de7eee5ed7b1b35c99b118f26f210a8281e6db8e" + "reference": "a64f315dfeae5e50b17f132626fd9e9b4ec8985d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/orm/zipball/de7eee5ed7b1b35c99b118f26f210a8281e6db8e", - "reference": "de7eee5ed7b1b35c99b118f26f210a8281e6db8e", + "url": "https://api.github.com/repos/doctrine/orm/zipball/a64f315dfeae5e50b17f132626fd9e9b4ec8985d", + "reference": "a64f315dfeae5e50b17f132626fd9e9b4ec8985d", "shasum": "" }, "require": { @@ -1494,14 +1494,14 @@ "doctrine/annotations": "^1.13 || ^2", "doctrine/coding-standard": "^9.0.2 || ^11.0", "phpbench/phpbench": "^0.16.10 || ^1.0", - "phpstan/phpstan": "~1.4.10 || 1.9.8", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "phpstan/phpstan": "~1.4.10 || 1.10.6", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6", "psr/log": "^1 || ^2 || ^3", - "squizlabs/php_codesniffer": "3.7.1", + "squizlabs/php_codesniffer": "3.7.2", "symfony/cache": "^4.4 || ^5.4 || ^6.0", "symfony/var-exporter": "^4.4 || ^5.4 || ^6.2", "symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0", - "vimeo/psalm": "4.30.0 || 5.4.0" + "vimeo/psalm": "4.30.0 || 5.9.0" }, "suggest": { "ext-dom": "Provides support for XSD validation for XML mapping files", @@ -1551,9 +1551,9 @@ ], "support": { "issues": "https://github.com/doctrine/orm/issues", - "source": "https://github.com/doctrine/orm/tree/2.14.1" + "source": "https://github.com/doctrine/orm/tree/2.14.3" }, - "time": "2023-01-16T18:36:59+00:00" + "time": "2023-04-20T09:46:32+00:00" }, { "name": "doctrine/persistence", @@ -2429,16 +2429,16 @@ }, { "name": "imagine/imagine", - "version": "1.3.3", + "version": "1.3.4", "source": { "type": "git", "url": "https://github.com/php-imagine/Imagine.git", - "reference": "a6e6da93ea0f76aba33b0e8ed1325523c0413da2" + "reference": "c9ba67d2f1dc0785187261a656cb55ff01f594be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-imagine/Imagine/zipball/a6e6da93ea0f76aba33b0e8ed1325523c0413da2", - "reference": "a6e6da93ea0f76aba33b0e8ed1325523c0413da2", + "url": "https://api.github.com/repos/php-imagine/Imagine/zipball/c9ba67d2f1dc0785187261a656cb55ff01f594be", + "reference": "c9ba67d2f1dc0785187261a656cb55ff01f594be", "shasum": "" }, "require": { @@ -2485,9 +2485,9 @@ ], "support": { "issues": "https://github.com/php-imagine/Imagine/issues", - "source": "https://github.com/php-imagine/Imagine/tree/1.3.3" + "source": "https://github.com/php-imagine/Imagine/tree/1.3.4" }, - "time": "2022-11-16T13:09:11+00:00" + "time": "2023-04-17T15:21:07+00:00" }, { "name": "jbtronics/2fa-webauthn", @@ -3248,26 +3248,24 @@ }, { "name": "masterminds/html5", - "version": "2.7.6", + "version": "2.8.0", "source": { "type": "git", "url": "https://github.com/Masterminds/html5-php.git", - "reference": "897eb517a343a2281f11bc5556d6548db7d93947" + "reference": "3c5d5a56d56f48a1ca08a0670f0f80c1dad368f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/897eb517a343a2281f11bc5556d6548db7d93947", - "reference": "897eb517a343a2281f11bc5556d6548db7d93947", + "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/3c5d5a56d56f48a1ca08a0670f0f80c1dad368f3", + "reference": "3c5d5a56d56f48a1ca08a0670f0f80c1dad368f3", "shasum": "" }, "require": { - "ext-ctype": "*", "ext-dom": "*", - "ext-libxml": "*", "php": ">=5.3.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7" + "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8" }, "type": "library", "extra": { @@ -3311,9 +3309,9 @@ ], "support": { "issues": "https://github.com/Masterminds/html5-php/issues", - "source": "https://github.com/Masterminds/html5-php/tree/2.7.6" + "source": "https://github.com/Masterminds/html5-php/tree/2.8.0" }, - "time": "2022-08-18T16:18:26+00:00" + "time": "2023-04-26T07:27:39+00:00" }, { "name": "monolog/monolog", @@ -3739,38 +3737,39 @@ }, { "name": "nyholm/psr7", - "version": "1.5.1", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/Nyholm/psr7.git", - "reference": "f734364e38a876a23be4d906a2a089e1315be18a" + "reference": "ed7cf98f6562831dbc3c962406b5e49dc8179c8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Nyholm/psr7/zipball/f734364e38a876a23be4d906a2a089e1315be18a", - "reference": "f734364e38a876a23be4d906a2a089e1315be18a", + "url": "https://api.github.com/repos/Nyholm/psr7/zipball/ed7cf98f6562831dbc3c962406b5e49dc8179c8c", + "reference": "ed7cf98f6562831dbc3c962406b5e49dc8179c8c", "shasum": "" }, "require": { - "php": ">=7.1", + "php": ">=7.2", "php-http/message-factory": "^1.0", "psr/http-factory": "^1.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.1 || ^2.0" }, "provide": { + "php-http/message-factory-implementation": "1.0", "psr/http-factory-implementation": "1.0", "psr/http-message-implementation": "1.0" }, "require-dev": { "http-interop/http-factory-tests": "^0.9", - "php-http/psr7-integration-tests": "^1.0", + "php-http/psr7-integration-tests": "^1.0@dev", "phpunit/phpunit": "^7.5 || 8.5 || 9.4", "symfony/error-handler": "^4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.7-dev" } }, "autoload": { @@ -3800,7 +3799,7 @@ ], "support": { "issues": "https://github.com/Nyholm/psr7/issues", - "source": "https://github.com/Nyholm/psr7/tree/1.5.1" + "source": "https://github.com/Nyholm/psr7/tree/1.7.0" }, "funding": [ { @@ -3812,7 +3811,7 @@ "type": "github" } ], - "time": "2022-06-22T07:13:36+00:00" + "time": "2023-04-20T08:38:48+00:00" }, { "name": "omines/datatables-bundle", @@ -4127,16 +4126,16 @@ }, { "name": "php-http/discovery", - "version": "1.15.3", + "version": "1.17.0", "source": { "type": "git", "url": "https://github.com/php-http/discovery.git", - "reference": "3ccd28dd9fb34b52db946abea1b538568e34eae8" + "reference": "bd810d15957cf165230e65d9e1a130793265e3b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/discovery/zipball/3ccd28dd9fb34b52db946abea1b538568e34eae8", - "reference": "3ccd28dd9fb34b52db946abea1b538568e34eae8", + "url": "https://api.github.com/repos/php-http/discovery/zipball/bd810d15957cf165230e65d9e1a130793265e3b7", + "reference": "bd810d15957cf165230e65d9e1a130793265e3b7", "shasum": "" }, "require": { @@ -4144,7 +4143,8 @@ "php": "^7.1 || ^8.0" }, "conflict": { - "nyholm/psr7": "<1.0" + "nyholm/psr7": "<1.0", + "zendframework/zend-diactoros": "*" }, "provide": { "php-http/async-client-implementation": "*", @@ -4169,7 +4169,10 @@ "autoload": { "psr-4": { "Http\\Discovery\\": "src/" - } + }, + "exclude-from-classmap": [ + "src/Composer/Plugin.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -4195,40 +4198,35 @@ ], "support": { "issues": "https://github.com/php-http/discovery/issues", - "source": "https://github.com/php-http/discovery/tree/1.15.3" + "source": "https://github.com/php-http/discovery/tree/1.17.0" }, - "time": "2023-03-31T14:40:37+00:00" + "time": "2023-04-26T15:39:13+00:00" }, { "name": "php-http/httplug", - "version": "2.3.0", + "version": "2.4.0", "source": { "type": "git", "url": "https://github.com/php-http/httplug.git", - "reference": "f640739f80dfa1152533976e3c112477f69274eb" + "reference": "625ad742c360c8ac580fcc647a1541d29e257f67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/httplug/zipball/f640739f80dfa1152533976e3c112477f69274eb", - "reference": "f640739f80dfa1152533976e3c112477f69274eb", + "url": "https://api.github.com/repos/php-http/httplug/zipball/625ad742c360c8ac580fcc647a1541d29e257f67", + "reference": "625ad742c360c8ac580fcc647a1541d29e257f67", "shasum": "" }, "require": { "php": "^7.1 || ^8.0", "php-http/promise": "^1.1", "psr/http-client": "^1.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "require-dev": { - "friends-of-phpspec/phpspec-code-coverage": "^4.1", - "phpspec/phpspec": "^5.1 || ^6.0" + "friends-of-phpspec/phpspec-code-coverage": "^4.1 || ^5.0 || ^6.0", + "phpspec/phpspec": "^5.1 || ^6.0 || ^7.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, "autoload": { "psr-4": { "Http\\Client\\": "src/" @@ -4257,32 +4255,32 @@ ], "support": { "issues": "https://github.com/php-http/httplug/issues", - "source": "https://github.com/php-http/httplug/tree/2.3.0" + "source": "https://github.com/php-http/httplug/tree/2.4.0" }, - "time": "2022-02-21T09:52:22+00:00" + "time": "2023-04-14T15:10:03+00:00" }, { "name": "php-http/message-factory", - "version": "v1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-http/message-factory.git", - "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1" + "reference": "4d8778e1c7d405cbb471574821c1ff5b68cc8f57" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/message-factory/zipball/a478cb11f66a6ac48d8954216cfed9aa06a501a1", - "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1", + "url": "https://api.github.com/repos/php-http/message-factory/zipball/4d8778e1c7d405cbb471574821c1ff5b68cc8f57", + "reference": "4d8778e1c7d405cbb471574821c1ff5b68cc8f57", "shasum": "" }, "require": { "php": ">=5.4", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.x-dev" } }, "autoload": { @@ -4311,9 +4309,9 @@ ], "support": { "issues": "https://github.com/php-http/message-factory/issues", - "source": "https://github.com/php-http/message-factory/tree/master" + "source": "https://github.com/php-http/message-factory/tree/1.1.0" }, - "time": "2015-12-19T14:08:53+00:00" + "time": "2023-04-14T14:16:17+00:00" }, { "name": "php-http/promise", @@ -4771,16 +4769,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.18.1", + "version": "1.20.3", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "22dcdfd725ddf99583bfe398fc624ad6c5004a0f" + "reference": "6c04009f6cae6eda2f040745b6b846080ef069c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/22dcdfd725ddf99583bfe398fc624ad6c5004a0f", - "reference": "22dcdfd725ddf99583bfe398fc624ad6c5004a0f", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/6c04009f6cae6eda2f040745b6b846080ef069c2", + "reference": "6c04009f6cae6eda2f040745b6b846080ef069c2", "shasum": "" }, "require": { @@ -4810,9 +4808,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.18.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.20.3" }, - "time": "2023-04-07T11:51:11+00:00" + "time": "2023-04-25T09:01:03+00:00" }, { "name": "psr/cache", @@ -4963,21 +4961,21 @@ }, { "name": "psr/http-client", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/http-client.git", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" + "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31", "shasum": "" }, "require": { "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -4997,7 +4995,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP clients", @@ -5009,27 +5007,27 @@ "psr-18" ], "support": { - "source": "https://github.com/php-fig/http-client/tree/master" + "source": "https://github.com/php-fig/http-client/tree/1.0.2" }, - "time": "2020-06-29T06:28:15+00:00" + "time": "2023-04-10T20:12:12+00:00" }, { "name": "psr/http-factory", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + "reference": "e616d01114759c4c489f93b099585439f795fe35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", + "reference": "e616d01114759c4c489f93b099585439f795fe35", "shasum": "" }, "require": { "php": ">=7.0.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -5049,7 +5047,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interfaces for PSR-7 HTTP message factories", @@ -5064,9 +5062,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/master" + "source": "https://github.com/php-fig/http-factory/tree/1.0.2" }, - "time": "2019-04-30T12:38:16+00:00" + "time": "2023-04-10T20:10:41+00:00" }, { "name": "psr/http-message", @@ -6520,16 +6518,16 @@ }, { "name": "symfony/cache", - "version": "v5.4.22", + "version": "v5.4.23", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "5ed986c4ef65f0dea5e9753630b5cb1f07f847d6" + "reference": "983c79ff28612cdfd66d8e44e1a06e5afc87e107" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/5ed986c4ef65f0dea5e9753630b5cb1f07f847d6", - "reference": "5ed986c4ef65f0dea5e9753630b5cb1f07f847d6", + "url": "https://api.github.com/repos/symfony/cache/zipball/983c79ff28612cdfd66d8e44e1a06e5afc87e107", + "reference": "983c79ff28612cdfd66d8e44e1a06e5afc87e107", "shasum": "" }, "require": { @@ -6597,7 +6595,7 @@ "psr6" ], "support": { - "source": "https://github.com/symfony/cache/tree/v5.4.22" + "source": "https://github.com/symfony/cache/tree/v5.4.23" }, "funding": [ { @@ -6613,7 +6611,7 @@ "type": "tidelift" } ], - "time": "2023-03-29T20:01:08+00:00" + "time": "2023-04-21T15:38:51+00:00" }, { "name": "symfony/cache-contracts", @@ -6775,16 +6773,16 @@ }, { "name": "symfony/console", - "version": "v5.4.22", + "version": "v5.4.23", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "3cd51fd2e6c461ca678f84d419461281bd87a0a8" + "reference": "90f21e27d0d88ce38720556dd164d4a1e4c3934c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/3cd51fd2e6c461ca678f84d419461281bd87a0a8", - "reference": "3cd51fd2e6c461ca678f84d419461281bd87a0a8", + "url": "https://api.github.com/repos/symfony/console/zipball/90f21e27d0d88ce38720556dd164d4a1e4c3934c", + "reference": "90f21e27d0d88ce38720556dd164d4a1e4c3934c", "shasum": "" }, "require": { @@ -6854,7 +6852,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.22" + "source": "https://github.com/symfony/console/tree/v5.4.23" }, "funding": [ { @@ -6870,7 +6868,7 @@ "type": "tidelift" } ], - "time": "2023-03-25T09:27:28+00:00" + "time": "2023-04-24T18:47:29+00:00" }, { "name": "symfony/css-selector", @@ -6940,16 +6938,16 @@ }, { "name": "symfony/dependency-injection", - "version": "v5.4.22", + "version": "v5.4.23", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "e1b7c1432efb4ad1dd89d62906187271e2601ed9" + "reference": "bb7b7988c898c94f5338e16403c52b5a3cae1d93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/e1b7c1432efb4ad1dd89d62906187271e2601ed9", - "reference": "e1b7c1432efb4ad1dd89d62906187271e2601ed9", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/bb7b7988c898c94f5338e16403c52b5a3cae1d93", + "reference": "bb7b7988c898c94f5338e16403c52b5a3cae1d93", "shasum": "" }, "require": { @@ -7009,7 +7007,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v5.4.22" + "source": "https://github.com/symfony/dependency-injection/tree/v5.4.23" }, "funding": [ { @@ -7025,7 +7023,7 @@ "type": "tidelift" } ], - "time": "2023-03-10T10:02:45+00:00" + "time": "2023-04-21T15:04:16+00:00" }, { "name": "symfony/deprecation-contracts", @@ -7096,16 +7094,16 @@ }, { "name": "symfony/doctrine-bridge", - "version": "v5.4.22", + "version": "v5.4.23", "source": { "type": "git", "url": "https://github.com/symfony/doctrine-bridge.git", - "reference": "decc4801e2ecc4b72334ef472ed82e4d640492ec" + "reference": "32cddf41cf6abfc4c3db68568c785e48eebf3d71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/doctrine-bridge/zipball/decc4801e2ecc4b72334ef472ed82e4d640492ec", - "reference": "decc4801e2ecc4b72334ef472ed82e4d640492ec", + "url": "https://api.github.com/repos/symfony/doctrine-bridge/zipball/32cddf41cf6abfc4c3db68568c785e48eebf3d71", + "reference": "32cddf41cf6abfc4c3db68568c785e48eebf3d71", "shasum": "" }, "require": { @@ -7193,7 +7191,7 @@ "description": "Provides integration for Doctrine with various Symfony components", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/doctrine-bridge/tree/v5.4.22" + "source": "https://github.com/symfony/doctrine-bridge/tree/v5.4.23" }, "funding": [ { @@ -7209,7 +7207,7 @@ "type": "tidelift" } ], - "time": "2023-03-06T21:29:33+00:00" + "time": "2023-04-05T05:19:44+00:00" }, { "name": "symfony/dotenv", @@ -7284,16 +7282,16 @@ }, { "name": "symfony/error-handler", - "version": "v5.4.21", + "version": "v5.4.23", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "56a94aa8cb5a5fbc411551d8d014a296b5456549" + "reference": "218206b4772d9f412d7d277980c020d06e9d8a4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/56a94aa8cb5a5fbc411551d8d014a296b5456549", - "reference": "56a94aa8cb5a5fbc411551d8d014a296b5456549", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/218206b4772d9f412d7d277980c020d06e9d8a4e", + "reference": "218206b4772d9f412d7d277980c020d06e9d8a4e", "shasum": "" }, "require": { @@ -7335,7 +7333,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v5.4.21" + "source": "https://github.com/symfony/error-handler/tree/v5.4.23" }, "funding": [ { @@ -7351,7 +7349,7 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:03:56+00:00" + "time": "2023-04-17T10:03:27+00:00" }, { "name": "symfony/event-dispatcher", @@ -7582,16 +7580,16 @@ }, { "name": "symfony/filesystem", - "version": "v5.4.21", + "version": "v5.4.23", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "e75960b1bbfd2b8c9e483e0d74811d555ca3de9f" + "reference": "b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/e75960b1bbfd2b8c9e483e0d74811d555ca3de9f", - "reference": "e75960b1bbfd2b8c9e483e0d74811d555ca3de9f", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5", + "reference": "b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5", "shasum": "" }, "require": { @@ -7626,7 +7624,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.21" + "source": "https://github.com/symfony/filesystem/tree/v5.4.23" }, "funding": [ { @@ -7642,7 +7640,7 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:03:56+00:00" + "time": "2023-03-02T11:38:35+00:00" }, { "name": "symfony/finder", @@ -7774,16 +7772,16 @@ }, { "name": "symfony/form", - "version": "v5.4.22", + "version": "v5.4.23", "source": { "type": "git", "url": "https://github.com/symfony/form.git", - "reference": "e21648e71c579c9ccf5768e2484f79283c463535" + "reference": "ebdc48d54d82b74230a8aed6458c238ec5788e38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/form/zipball/e21648e71c579c9ccf5768e2484f79283c463535", - "reference": "e21648e71c579c9ccf5768e2484f79283c463535", + "url": "https://api.github.com/repos/symfony/form/zipball/ebdc48d54d82b74230a8aed6458c238ec5788e38", + "reference": "ebdc48d54d82b74230a8aed6458c238ec5788e38", "shasum": "" }, "require": { @@ -7857,7 +7855,7 @@ "description": "Allows to easily create, process and reuse HTML forms", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/form/tree/v5.4.22" + "source": "https://github.com/symfony/form/tree/v5.4.23" }, "funding": [ { @@ -7873,7 +7871,7 @@ "type": "tidelift" } ], - "time": "2023-03-06T21:29:33+00:00" + "time": "2023-04-17T15:04:56+00:00" }, { "name": "symfony/framework-bundle", @@ -8028,16 +8026,16 @@ }, { "name": "symfony/http-client", - "version": "v5.4.22", + "version": "v5.4.23", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "4cd1b7e7ee846c8b22cb47cbc435344af9b2a8bf" + "reference": "617c98e46b54e43ca76945a908b1749bb82f4478" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/4cd1b7e7ee846c8b22cb47cbc435344af9b2a8bf", - "reference": "4cd1b7e7ee846c8b22cb47cbc435344af9b2a8bf", + "url": "https://api.github.com/repos/symfony/http-client/zipball/617c98e46b54e43ca76945a908b1749bb82f4478", + "reference": "617c98e46b54e43ca76945a908b1749bb82f4478", "shasum": "" }, "require": { @@ -8098,7 +8096,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v5.4.22" + "source": "https://github.com/symfony/http-client/tree/v5.4.23" }, "funding": [ { @@ -8114,7 +8112,7 @@ "type": "tidelift" } ], - "time": "2023-03-24T15:16:26+00:00" + "time": "2023-04-20T13:04:04+00:00" }, { "name": "symfony/http-client-contracts", @@ -8196,16 +8194,16 @@ }, { "name": "symfony/http-foundation", - "version": "v5.4.22", + "version": "v5.4.23", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "05cd1acdd0e3ce8473aaba1d86c188321d85f313" + "reference": "af9fbb378f5f956c8f29d4886644c84c193780ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/05cd1acdd0e3ce8473aaba1d86c188321d85f313", - "reference": "05cd1acdd0e3ce8473aaba1d86c188321d85f313", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/af9fbb378f5f956c8f29d4886644c84c193780ac", + "reference": "af9fbb378f5f956c8f29d4886644c84c193780ac", "shasum": "" }, "require": { @@ -8252,7 +8250,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.4.22" + "source": "https://github.com/symfony/http-foundation/tree/v5.4.23" }, "funding": [ { @@ -8268,20 +8266,20 @@ "type": "tidelift" } ], - "time": "2023-03-28T07:28:17+00:00" + "time": "2023-04-18T06:30:11+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.4.22", + "version": "v5.4.23", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "2d3a8be2c756353627398827c409af6f126c096d" + "reference": "48ea17a7c65ef1ede0c3b2dbc35adace99071810" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/2d3a8be2c756353627398827c409af6f126c096d", - "reference": "2d3a8be2c756353627398827c409af6f126c096d", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/48ea17a7c65ef1ede0c3b2dbc35adace99071810", + "reference": "48ea17a7c65ef1ede0c3b2dbc35adace99071810", "shasum": "" }, "require": { @@ -8364,7 +8362,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.4.22" + "source": "https://github.com/symfony/http-kernel/tree/v5.4.23" }, "funding": [ { @@ -8380,20 +8378,20 @@ "type": "tidelift" } ], - "time": "2023-03-31T11:54:37+00:00" + "time": "2023-04-28T13:29:52+00:00" }, { "name": "symfony/intl", - "version": "v5.4.22", + "version": "v5.4.23", "source": { "type": "git", "url": "https://github.com/symfony/intl.git", - "reference": "8afe56b8472888d749ef8955acdc9d38578775d7" + "reference": "962789bbc76c82c266623321ffc24416f574b636" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/intl/zipball/8afe56b8472888d749ef8955acdc9d38578775d7", - "reference": "8afe56b8472888d749ef8955acdc9d38578775d7", + "url": "https://api.github.com/repos/symfony/intl/zipball/962789bbc76c82c266623321ffc24416f574b636", + "reference": "962789bbc76c82c266623321ffc24416f574b636", "shasum": "" }, "require": { @@ -8452,7 +8450,7 @@ "localization" ], "support": { - "source": "https://github.com/symfony/intl/tree/v5.4.22" + "source": "https://github.com/symfony/intl/tree/v5.4.23" }, "funding": [ { @@ -8468,7 +8466,7 @@ "type": "tidelift" } ], - "time": "2023-03-10T09:58:14+00:00" + "time": "2023-04-13T10:36:25+00:00" }, { "name": "symfony/lock", @@ -8627,16 +8625,16 @@ }, { "name": "symfony/mime", - "version": "v5.4.21", + "version": "v5.4.23", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "ef57d9fb9cdd5e6b2ffc567d109865d10b6920cd" + "reference": "ae0a1032a450a3abf305ee44fc55ed423fbf16e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/ef57d9fb9cdd5e6b2ffc567d109865d10b6920cd", - "reference": "ef57d9fb9cdd5e6b2ffc567d109865d10b6920cd", + "url": "https://api.github.com/repos/symfony/mime/zipball/ae0a1032a450a3abf305ee44fc55ed423fbf16e3", + "reference": "ae0a1032a450a3abf305ee44fc55ed423fbf16e3", "shasum": "" }, "require": { @@ -8691,7 +8689,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.4.21" + "source": "https://github.com/symfony/mime/tree/v5.4.23" }, "funding": [ { @@ -8707,7 +8705,7 @@ "type": "tidelift" } ], - "time": "2023-02-21T19:46:44+00:00" + "time": "2023-04-19T09:49:13+00:00" }, { "name": "symfony/monolog-bridge", @@ -9839,16 +9837,16 @@ }, { "name": "symfony/process", - "version": "v5.4.22", + "version": "v5.4.23", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "4b850da0cc3a2a9181c1ed407adbca4733dc839b" + "reference": "4b842fc4b61609e0a155a114082bd94e31e98287" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/4b850da0cc3a2a9181c1ed407adbca4733dc839b", - "reference": "4b850da0cc3a2a9181c1ed407adbca4733dc839b", + "url": "https://api.github.com/repos/symfony/process/zipball/4b842fc4b61609e0a155a114082bd94e31e98287", + "reference": "4b842fc4b61609e0a155a114082bd94e31e98287", "shasum": "" }, "require": { @@ -9881,7 +9879,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.22" + "source": "https://github.com/symfony/process/tree/v5.4.23" }, "funding": [ { @@ -9897,7 +9895,7 @@ "type": "tidelift" } ], - "time": "2023-03-06T21:29:33+00:00" + "time": "2023-04-18T13:50:24+00:00" }, { "name": "symfony/property-access", @@ -9982,16 +9980,16 @@ }, { "name": "symfony/property-info", - "version": "v5.4.22", + "version": "v5.4.23", "source": { "type": "git", "url": "https://github.com/symfony/property-info.git", - "reference": "8454a441d117449abd0d61124e68f93f927ad5ba" + "reference": "ff45ebbfd781eab2571d9d4412d82a9a733fc2b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-info/zipball/8454a441d117449abd0d61124e68f93f927ad5ba", - "reference": "8454a441d117449abd0d61124e68f93f927ad5ba", + "url": "https://api.github.com/repos/symfony/property-info/zipball/ff45ebbfd781eab2571d9d4412d82a9a733fc2b3", + "reference": "ff45ebbfd781eab2571d9d4412d82a9a733fc2b3", "shasum": "" }, "require": { @@ -10053,7 +10051,7 @@ "validator" ], "support": { - "source": "https://github.com/symfony/property-info/tree/v5.4.22" + "source": "https://github.com/symfony/property-info/tree/v5.4.23" }, "funding": [ { @@ -10069,7 +10067,7 @@ "type": "tidelift" } ], - "time": "2023-03-14T14:59:20+00:00" + "time": "2023-04-17T14:20:34+00:00" }, { "name": "symfony/proxy-manager-bridge", @@ -10140,32 +10138,32 @@ }, { "name": "symfony/psr-http-message-bridge", - "version": "v2.1.4", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/symfony/psr-http-message-bridge.git", - "reference": "a125b93ef378c492e274f217874906fb9babdebb" + "reference": "28a732c05bbad801304ad5a5c674cf2970508993" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/a125b93ef378c492e274f217874906fb9babdebb", - "reference": "a125b93ef378c492e274f217874906fb9babdebb", + "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/28a732c05bbad801304ad5a5c674cf2970508993", + "reference": "28a732c05bbad801304ad5a5c674cf2970508993", "shasum": "" }, "require": { - "php": ">=7.1", - "psr/http-message": "^1.0", - "symfony/http-foundation": "^4.4 || ^5.0 || ^6.0" + "php": ">=7.2.5", + "psr/http-message": "^1.0 || ^2.0", + "symfony/http-foundation": "^5.4 || ^6.0" }, "require-dev": { "nyholm/psr7": "^1.1", "psr/log": "^1.1 || ^2 || ^3", - "symfony/browser-kit": "^4.4 || ^5.0 || ^6.0", - "symfony/config": "^4.4 || ^5.0 || ^6.0", - "symfony/event-dispatcher": "^4.4 || ^5.0 || ^6.0", - "symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0", - "symfony/http-kernel": "^4.4 || ^5.0 || ^6.0", - "symfony/phpunit-bridge": "^5.4@dev || ^6.0" + "symfony/browser-kit": "^5.4 || ^6.0", + "symfony/config": "^5.4 || ^6.0", + "symfony/event-dispatcher": "^5.4 || ^6.0", + "symfony/framework-bundle": "^5.4 || ^6.0", + "symfony/http-kernel": "^5.4 || ^6.0", + "symfony/phpunit-bridge": "^6.2" }, "suggest": { "nyholm/psr7": "For a super lightweight PSR-7/17 implementation" @@ -10173,7 +10171,7 @@ "type": "symfony-bridge", "extra": { "branch-alias": { - "dev-main": "2.1-dev" + "dev-main": "2.2-dev" } }, "autoload": { @@ -10208,7 +10206,7 @@ ], "support": { "issues": "https://github.com/symfony/psr-http-message-bridge/issues", - "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.1.4" + "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.2.0" }, "funding": [ { @@ -10224,7 +10222,7 @@ "type": "tidelift" } ], - "time": "2022-11-28T22:46:34+00:00" + "time": "2023-04-21T08:40:19+00:00" }, { "name": "symfony/rate-limiter", @@ -10802,16 +10800,16 @@ }, { "name": "symfony/security-http", - "version": "v5.4.22", + "version": "v5.4.23", "source": { "type": "git", "url": "https://github.com/symfony/security-http.git", - "reference": "428c84954e95f54383d031693fa649f1e466461f" + "reference": "6791856229cc605834d169091981e4eae77dad45" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/security-http/zipball/428c84954e95f54383d031693fa649f1e466461f", - "reference": "428c84954e95f54383d031693fa649f1e466461f", + "url": "https://api.github.com/repos/symfony/security-http/zipball/6791856229cc605834d169091981e4eae77dad45", + "reference": "6791856229cc605834d169091981e4eae77dad45", "shasum": "" }, "require": { @@ -10867,7 +10865,7 @@ "description": "Symfony Security Component - HTTP Integration", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/security-http/tree/v5.4.22" + "source": "https://github.com/symfony/security-http/tree/v5.4.23" }, "funding": [ { @@ -10883,20 +10881,20 @@ "type": "tidelift" } ], - "time": "2023-03-10T10:02:45+00:00" + "time": "2023-04-21T11:34:27+00:00" }, { "name": "symfony/serializer", - "version": "v5.4.22", + "version": "v5.4.23", "source": { "type": "git", "url": "https://github.com/symfony/serializer.git", - "reference": "5b1e0234bb801e6e565771c0cec64551137ea3ef" + "reference": "545da11697153c24c274b9a68cab550b2c0a9860" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/5b1e0234bb801e6e565771c0cec64551137ea3ef", - "reference": "5b1e0234bb801e6e565771c0cec64551137ea3ef", + "url": "https://api.github.com/repos/symfony/serializer/zipball/545da11697153c24c274b9a68cab550b2c0a9860", + "reference": "545da11697153c24c274b9a68cab550b2c0a9860", "shasum": "" }, "require": { @@ -10970,7 +10968,7 @@ "description": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/serializer/tree/v5.4.22" + "source": "https://github.com/symfony/serializer/tree/v5.4.23" }, "funding": [ { @@ -10986,7 +10984,7 @@ "type": "tidelift" } ], - "time": "2023-03-31T09:21:17+00:00" + "time": "2023-04-17T13:59:16+00:00" }, { "name": "symfony/service-contracts", @@ -11701,16 +11699,16 @@ }, { "name": "symfony/validator", - "version": "v5.4.22", + "version": "v5.4.23", "source": { "type": "git", "url": "https://github.com/symfony/validator.git", - "reference": "7c953a48f436bb180d8f5ae471f2665d7dd245da" + "reference": "ca71f5562a3876a153250f638124b6b95452985f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/validator/zipball/7c953a48f436bb180d8f5ae471f2665d7dd245da", - "reference": "7c953a48f436bb180d8f5ae471f2665d7dd245da", + "url": "https://api.github.com/repos/symfony/validator/zipball/ca71f5562a3876a153250f638124b6b95452985f", + "reference": "ca71f5562a3876a153250f638124b6b95452985f", "shasum": "" }, "require": { @@ -11794,7 +11792,7 @@ "description": "Provides tools to validate values", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/validator/tree/v5.4.22" + "source": "https://github.com/symfony/validator/tree/v5.4.23" }, "funding": [ { @@ -11810,20 +11808,20 @@ "type": "tidelift" } ], - "time": "2023-03-17T15:39:32+00:00" + "time": "2023-04-19T07:52:21+00:00" }, { "name": "symfony/var-dumper", - "version": "v5.4.22", + "version": "v5.4.23", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "e2edac9ce47e6df07e38143c7cfa6bdbc1a6dcc4" + "reference": "9a8a5b6d6508928174ded2109e29328a55342a42" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/e2edac9ce47e6df07e38143c7cfa6bdbc1a6dcc4", - "reference": "e2edac9ce47e6df07e38143c7cfa6bdbc1a6dcc4", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/9a8a5b6d6508928174ded2109e29328a55342a42", + "reference": "9a8a5b6d6508928174ded2109e29328a55342a42", "shasum": "" }, "require": { @@ -11883,7 +11881,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.4.22" + "source": "https://github.com/symfony/var-dumper/tree/v5.4.23" }, "funding": [ { @@ -11899,7 +11897,7 @@ "type": "tidelift" } ], - "time": "2023-03-25T09:27:28+00:00" + "time": "2023-04-18T09:26:27+00:00" }, { "name": "symfony/var-exporter", @@ -12136,16 +12134,16 @@ }, { "name": "symfony/yaml", - "version": "v5.4.21", + "version": "v5.4.23", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "3713e20d93e46e681e51605d213027e48dab3469" + "reference": "4cd2e3ea301aadd76a4172756296fe552fb45b0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/3713e20d93e46e681e51605d213027e48dab3469", - "reference": "3713e20d93e46e681e51605d213027e48dab3469", + "url": "https://api.github.com/repos/symfony/yaml/zipball/4cd2e3ea301aadd76a4172756296fe552fb45b0b", + "reference": "4cd2e3ea301aadd76a4172756296fe552fb45b0b", "shasum": "" }, "require": { @@ -12191,7 +12189,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.21" + "source": "https://github.com/symfony/yaml/tree/v5.4.23" }, "funding": [ { @@ -12207,7 +12205,7 @@ "type": "tidelift" } ], - "time": "2023-02-21T19:46:44+00:00" + "time": "2023-04-23T19:33:36+00:00" }, { "name": "tecnickcom/tc-lib-barcode", @@ -14120,16 +14118,16 @@ }, { "name": "doctrine/data-fixtures", - "version": "1.6.5", + "version": "1.6.6", "source": { "type": "git", "url": "https://github.com/doctrine/data-fixtures.git", - "reference": "e6b97f557942ea17564bbc30ae3ebc9bd2209363" + "reference": "4af35dadbfcf4b00abb2a217c4c8c8800cf5fcf4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/data-fixtures/zipball/e6b97f557942ea17564bbc30ae3ebc9bd2209363", - "reference": "e6b97f557942ea17564bbc30ae3ebc9bd2209363", + "url": "https://api.github.com/repos/doctrine/data-fixtures/zipball/4af35dadbfcf4b00abb2a217c4c8c8800cf5fcf4", + "reference": "4af35dadbfcf4b00abb2a217c4c8c8800cf5fcf4", "shasum": "" }, "require": { @@ -14182,7 +14180,7 @@ ], "support": { "issues": "https://github.com/doctrine/data-fixtures/issues", - "source": "https://github.com/doctrine/data-fixtures/tree/1.6.5" + "source": "https://github.com/doctrine/data-fixtures/tree/1.6.6" }, "funding": [ { @@ -14198,20 +14196,20 @@ "type": "tidelift" } ], - "time": "2023-04-03T14:58:58+00:00" + "time": "2023-04-20T13:08:54+00:00" }, { "name": "doctrine/doctrine-fixtures-bundle", - "version": "3.4.2", + "version": "3.4.3", "source": { "type": "git", "url": "https://github.com/doctrine/DoctrineFixturesBundle.git", - "reference": "601988c5b46dbd20a0f886f967210aba378a6fd5" + "reference": "fd39829fed8f090ef6e185d33449d47c2fb59c9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/DoctrineFixturesBundle/zipball/601988c5b46dbd20a0f886f967210aba378a6fd5", - "reference": "601988c5b46dbd20a0f886f967210aba378a6fd5", + "url": "https://api.github.com/repos/doctrine/DoctrineFixturesBundle/zipball/fd39829fed8f090ef6e185d33449d47c2fb59c9c", + "reference": "fd39829fed8f090ef6e185d33449d47c2fb59c9c", "shasum": "" }, "require": { @@ -14265,7 +14263,7 @@ ], "support": { "issues": "https://github.com/doctrine/DoctrineFixturesBundle/issues", - "source": "https://github.com/doctrine/DoctrineFixturesBundle/tree/3.4.2" + "source": "https://github.com/doctrine/DoctrineFixturesBundle/tree/3.4.3" }, "funding": [ { @@ -14281,7 +14279,7 @@ "type": "tidelift" } ], - "time": "2022-04-28T17:58:29+00:00" + "time": "2023-04-11T12:37:36+00:00" }, { "name": "ekino/phpstan-banned-code", @@ -14512,16 +14510,16 @@ }, { "name": "netresearch/jsonmapper", - "version": "v4.1.0", + "version": "v4.2.0", "source": { "type": "git", "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "cfa81ea1d35294d64adb9c68aa4cb9e92400e53f" + "reference": "f60565f8c0566a31acf06884cdaa591867ecc956" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/cfa81ea1d35294d64adb9c68aa4cb9e92400e53f", - "reference": "cfa81ea1d35294d64adb9c68aa4cb9e92400e53f", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/f60565f8c0566a31acf06884cdaa591867ecc956", + "reference": "f60565f8c0566a31acf06884cdaa591867ecc956", "shasum": "" }, "require": { @@ -14557,22 +14555,22 @@ "support": { "email": "cweiske@cweiske.de", "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/cweiske/jsonmapper/tree/v4.1.0" + "source": "https://github.com/cweiske/jsonmapper/tree/v4.2.0" }, - "time": "2022-12-08T20:46:14+00:00" + "time": "2023-04-09T17:37:40+00:00" }, { "name": "phpstan/extension-installer", - "version": "1.2.0", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/phpstan/extension-installer.git", - "reference": "f06dbb052ddc394e7896fcd1cfcd533f9f6ace40" + "reference": "f5e02d40f277d28513001976f444d9ff1dc15e9a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/f06dbb052ddc394e7896fcd1cfcd533f9f6ace40", - "reference": "f06dbb052ddc394e7896fcd1cfcd533f9f6ace40", + "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/f5e02d40f277d28513001976f444d9ff1dc15e9a", + "reference": "f5e02d40f277d28513001976f444d9ff1dc15e9a", "shasum": "" }, "require": { @@ -14587,7 +14585,12 @@ }, "type": "composer-plugin", "extra": { - "class": "PHPStan\\ExtensionInstaller\\Plugin" + "class": "PHPStan\\ExtensionInstaller\\Plugin", + "phpstan/extension-installer": { + "ignore": [ + "phpstan/phpstan-phpunit" + ] + } }, "autoload": { "psr-4": { @@ -14601,22 +14604,22 @@ "description": "Composer plugin for automatic installation of PHPStan extensions", "support": { "issues": "https://github.com/phpstan/extension-installer/issues", - "source": "https://github.com/phpstan/extension-installer/tree/1.2.0" + "source": "https://github.com/phpstan/extension-installer/tree/1.3.0" }, - "time": "2022-10-17T12:59:16+00:00" + "time": "2023-04-18T13:08:02+00:00" }, { "name": "phpstan/phpstan", - "version": "1.10.11", + "version": "1.10.14", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "8aa62e6ea8b58ffb650e02940e55a788cbc3fe21" + "reference": "d232901b09e67538e5c86a724be841bea5768a7c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8aa62e6ea8b58ffb650e02940e55a788cbc3fe21", - "reference": "8aa62e6ea8b58ffb650e02940e55a788cbc3fe21", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d232901b09e67538e5c86a724be841bea5768a7c", + "reference": "d232901b09e67538e5c86a724be841bea5768a7c", "shasum": "" }, "require": { @@ -14665,7 +14668,7 @@ "type": "tidelift" } ], - "time": "2023-04-04T19:17:42+00:00" + "time": "2023-04-19T13:47:27+00:00" }, { "name": "phpstan/phpstan-doctrine", @@ -14739,16 +14742,16 @@ }, { "name": "phpstan/phpstan-symfony", - "version": "1.2.25", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-symfony.git", - "reference": "1da7bf450c6b351fec08ca0aa97298473d4f6ab3" + "reference": "7e78605a699d183f5a6936cf91904f4c16ca79b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/1da7bf450c6b351fec08ca0aa97298473d4f6ab3", - "reference": "1da7bf450c6b351fec08ca0aa97298473d4f6ab3", + "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/7e78605a699d183f5a6936cf91904f4c16ca79b2", + "reference": "7e78605a699d183f5a6936cf91904f4c16ca79b2", "shasum": "" }, "require": { @@ -14804,22 +14807,22 @@ "description": "Symfony Framework extensions and rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-symfony/issues", - "source": "https://github.com/phpstan/phpstan-symfony/tree/1.2.25" + "source": "https://github.com/phpstan/phpstan-symfony/tree/1.3.1" }, - "time": "2023-04-05T12:16:20+00:00" + "time": "2023-04-14T16:59:18+00:00" }, { "name": "psalm/plugin-symfony", - "version": "v5.0.2", + "version": "v5.0.3", "source": { "type": "git", "url": "https://github.com/psalm/psalm-plugin-symfony.git", - "reference": "f017563fa40728a5a40628915774e7d3469a0cbd" + "reference": "a6cef9c701686d17d4254b544d05345e9d3e0b88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/psalm/psalm-plugin-symfony/zipball/f017563fa40728a5a40628915774e7d3469a0cbd", - "reference": "f017563fa40728a5a40628915774e7d3469a0cbd", + "url": "https://api.github.com/repos/psalm/psalm-plugin-symfony/zipball/a6cef9c701686d17d4254b544d05345e9d3e0b88", + "reference": "a6cef9c701686d17d4254b544d05345e9d3e0b88", "shasum": "" }, "require": { @@ -14869,9 +14872,9 @@ "description": "Psalm Plugin for Symfony", "support": { "issues": "https://github.com/psalm/psalm-plugin-symfony/issues", - "source": "https://github.com/psalm/psalm-plugin-symfony/tree/v5.0.2" + "source": "https://github.com/psalm/psalm-plugin-symfony/tree/v5.0.3" }, - "time": "2023-03-22T20:58:14+00:00" + "time": "2023-04-21T15:40:12+00:00" }, { "name": "roave/security-advisories", @@ -14879,12 +14882,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "6efa800243b92a3601e0101b0333d45df35832a4" + "reference": "a31b8b0ce0409fca4e8fcdda046e8d4b603dc739" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/6efa800243b92a3601e0101b0333d45df35832a4", - "reference": "6efa800243b92a3601e0101b0333d45df35832a4", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/a31b8b0ce0409fca4e8fcdda046e8d4b603dc739", + "reference": "a31b8b0ce0409fca4e8fcdda046e8d4b603dc739", "shasum": "" }, "conflict": { @@ -14905,14 +14908,15 @@ "andrewhaine/silverstripe-form-capture": ">=0.2,<=0.2.3|>=1,<=1.0.1|>=2,<=2.2.4", "apereo/phpcas": "<1.6", "api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6|>=2.6,<2.7.10|>=3,<3.0.12|>=3.1,<3.1.3", - "appwrite/server-ce": "<0.11.1|>=0.12,<0.12.2", + "appwrite/server-ce": "<=1.2.1", "arc/web": "<3", "area17/twill": "<1.2.5|>=2,<2.5.3", "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99", "automad/automad": "<1.8", "awesome-support/awesome-support": "<=6.0.7", "aws/aws-sdk-php": ">=3,<3.2.1", - "backdrop/backdrop": "<=1.23", + "azuracast/azuracast": "<0.18", + "backdrop/backdrop": "<1.24.2", "badaso/core": "<2.7", "bagisto/bagisto": "<0.1.5", "barrelstrength/sprout-base-email": "<1.2.7", @@ -14951,15 +14955,15 @@ "codeigniter4/shield": "<1-beta.4|= 1.0.0-beta", "codiad/codiad": "<=2.8.4", "composer/composer": "<1.10.26|>=2-alpha.1,<2.2.12|>=2.3,<2.3.5", - "concrete5/concrete5": "<=9.1.3|>= 9.0.0RC1, < 9.1.3", + "concrete5/concrete5": "<9.2|>= 9.0.0RC1, < 9.1.3", "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.18|>=4.10,<4.11.7|>=4.13,<4.13.3", + "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", "contao/core": ">=2,<3.5.39", - "contao/core-bundle": "<4.9.18|>=4.10,<4.11.7|>=4.13,<4.13.3|= 4.10.0", + "contao/core-bundle": "<4.9.40|>=4.10,<4.11.7|>=4.13,<4.13.21|>=5.1,<5.1.4|= 4.10.0", "contao/listing-bundle": ">=4,<4.4.8", "contao/managed-edition": "<=1.5", - "craftcms/cms": "<3.7.64|>= 4.0.0-RC1, < 4.3.7|>= 4.0.0-RC1, < 4.2.1", + "craftcms/cms": "<3.7.68|>= 4.0.0-RC1, < 4.3.7|>= 4.0.0-RC1, < 4.2.1", "croogo/croogo": "<3.0.7", "cuyz/valinor": "<0.12", "czproject/git-php": "<4.0.3", @@ -14981,7 +14985,7 @@ "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4", "dolibarr/dolibarr": "<16|>=16.0.1,<16.0.3|= 12.0.5|>= 3.3.beta1, < 13.0.2", "dompdf/dompdf": "<2.0.2|= 2.0.2", - "drupal/core": ">=7,<7.91|>=8,<9.3.19|>=9.4,<9.4.3", + "drupal/core": ">=7,<7.96|>=8,<9.4.14|>=9.5,<9.5.8|>=10,<10.0.8", "drupal/drupal": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4", "dweeves/magmi": "<=0.7.24", "ecodev/newsletter": "<=4", @@ -15031,14 +15035,14 @@ "fooman/tcpdf": "<6.2.22", "forkcms/forkcms": "<5.11.1", "fossar/tcpdf-parser": "<6.2.22", - "francoisjacquet/rosariosis": "<10.8.2", + "francoisjacquet/rosariosis": "<10.9.3", "frappant/frp-form-answers": "<3.1.2|>=4,<4.0.2", "friendsofsymfony/oauth2-php": "<1.3", "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", "friendsoftypo3/mediace": ">=7.6.2,<7.6.5", "froala/wysiwyg-editor": "<3.2.7", - "froxlor/froxlor": "<2.0.13", + "froxlor/froxlor": "<2.0.14", "fuel/core": "<1.8.1", "funadmin/funadmin": "<=3.2", "gaoming13/wechat-php-sdk": "<=1.10.2", @@ -15055,13 +15059,14 @@ "gregwar/rst": "<1.0.3", "grumpydictator/firefly-iii": "<6", "guzzlehttp/guzzle": "<6.5.8|>=7,<7.4.5", - "guzzlehttp/psr7": "<1.8.4|>=2,<2.1.1", + "guzzlehttp/psr7": "<1.9.1|>=2,<2.4.5", "harvesthq/chosen": "<1.8.7", "helloxz/imgurl": "= 2.31|<=2.31", "hillelcoren/invoice-ninja": "<5.3.35", "himiklab/yii2-jqgrid-widget": "<1.0.8", "hjue/justwriting": "<=1", "hov/jobfair": "<1.0.13|>=2,<2.0.2", + "httpsoft/http-message": "<1.0.12", "hyn/multi-tenant": ">=5.6,<5.7.2", "ibexa/admin-ui": ">=4.2,<4.2.3", "ibexa/core": ">=4,<4.0.7|>=4.1,<4.1.4|>=4.2,<4.2.3", @@ -15102,7 +15107,7 @@ "krayin/laravel-crm": "<1.2.2", "kreait/firebase-php": ">=3.2,<3.8.1", "la-haute-societe/tcpdf": "<6.2.22", - "laminas/laminas-diactoros": "<2.11.1", + "laminas/laminas-diactoros": "<2.18.1|>=2.24,<2.24.2|>=2.25,<2.25.2|= 2.23.0|= 2.22.0|= 2.21.0|= 2.20.0|= 2.19.0", "laminas/laminas-form": "<2.17.1|>=3,<3.0.2|>=3.1,<3.1.1", "laminas/laminas-http": "<2.14.2", "laravel/fortify": "<1.11.1", @@ -15138,7 +15143,7 @@ "melisplatform/melis-front": "<5.0.1", "mezzio/mezzio-swoole": "<3.7|>=4,<4.3", "mgallegos/laravel-jqgrid": "<=1.3", - "microweber/microweber": "<1.3.3", + "microweber/microweber": "<1.3.4", "miniorange/miniorange-saml": "<1.4.3", "mittwald/typo3_forum": "<1.2.1", "mobiledetect/mobiledetectlib": "<2.8.32", @@ -15157,10 +15162,11 @@ "netgen/tagsbundle": ">=3.4,<3.4.11|>=4,<4.0.15", "nette/application": ">=2,<2.0.19|>=2.1,<2.1.13|>=2.2,<2.2.10|>=2.3,<2.3.14|>=2.4,<2.4.16|>=3,<3.0.6", "nette/nette": ">=2,<2.0.19|>=2.1,<2.1.13", - "nilsteampassnet/teampass": "<3.0.0.23", + "nilsteampassnet/teampass": "<3.0.3", "notrinos/notrinos-erp": "<=0.7", "noumo/easyii": "<=0.9", "nukeviet/nukeviet": "<4.5.2", + "nyholm/psr7": "<1.6.1", "nystudio107/craft-seomatic": "<3.4.12", "nzo/url-encryptor-bundle": ">=4,<4.3.2|>=5,<5.0.1", "october/backend": "<1.1.2", @@ -15191,6 +15197,7 @@ "personnummer/personnummer": "<3.0.2", "phanan/koel": "<5.1.4", "php-mod/curl": "<2.3.2", + "phpbb/phpbb": ">=3.2,<3.2.10|>=3.3,<3.3.1", "phpfastcache/phpfastcache": "<6.1.5|>=7,<7.1.2|>=8,<8.0.7", "phpmailer/phpmailer": "<6.5", "phpmussel/phpmussel": ">=1,<1.6", @@ -15207,7 +15214,7 @@ "phpxmlrpc/phpxmlrpc": "<4.9.2", "pimcore/data-hub": "<1.2.4", "pimcore/perspective-editor": "<1.5.1", - "pimcore/pimcore": "<10.5.20", + "pimcore/pimcore": "<10.5.21", "pixelfed/pixelfed": "<=0.11.4", "pocketmine/bedrock-protocol": "<8.0.2", "pocketmine/pocketmine-mp": "<4.12.5|>= 4.0.0-BETA5, < 4.4.2", @@ -15216,7 +15223,7 @@ "prestashop/blockwishlist": ">=2,<2.1.1", "prestashop/contactform": ">=1.0.1,<4.3", "prestashop/gamification": "<2.3.2", - "prestashop/prestashop": "<8.0.1", + "prestashop/prestashop": "<8.0.4", "prestashop/productcomments": "<5.0.2", "prestashop/ps_emailsubscription": "<2.6.1", "prestashop/ps_facetedsearch": "<3.4.1", @@ -15246,19 +15253,19 @@ "scheb/two-factor-bundle": ">=0,<3.26|>=4,<4.11", "sensiolabs/connect": "<4.2.3", "serluck/phpwhois": "<=4.2.6", - "shopware/core": "<=6.4.18", - "shopware/platform": "<=6.4.18", + "shopware/core": "<=6.4.20", + "shopware/platform": "<=6.4.20", "shopware/production": "<=6.3.5.2", "shopware/shopware": "<=5.7.14", "shopware/storefront": "<=6.4.8.1", "shopxo/shopxo": "<2.2.6", "showdoc/showdoc": "<2.10.4", - "silverstripe/admin": ">=1,<1.11.3", + "silverstripe/admin": "<1.12.7", "silverstripe/assets": ">=1,<1.11.1", "silverstripe/cms": "<4.11.3", "silverstripe/comments": ">=1.3,<1.9.99|>=2,<2.9.99|>=3,<3.1.1", "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3", - "silverstripe/framework": "<4.11.14", + "silverstripe/framework": "<4.12.5", "silverstripe/graphql": "<3.5.2|>=4-alpha.1,<4-alpha.2|>=4.1.1,<4.1.2|>=4.2.2,<4.2.3|= 4.0.0-alpha1", "silverstripe/hybridsessions": ">=1,<2.4.1|>=2.5,<2.5.1", "silverstripe/registry": ">=2.1,<2.1.2|>=2.2,<2.2.1", @@ -15276,6 +15283,7 @@ "simplesamlphp/simplesamlphp-module-openidprovider": "<0.9", "simplito/elliptic-php": "<1.0.6", "sitegeist/fluid-components": "<3.5", + "slim/psr7": "<1.6.1", "slim/slim": "<2.6", "smarty/smarty": "<3.1.48|>=4,<4.3.1", "snipe/snipe-it": "<=6.0.14|>= 6.0.0-RC-1, <= 6.0.0-RC-5", @@ -15337,6 +15345,7 @@ "t3/dce": ">=2.2,<2.6.2", "t3g/svg-sanitizer": "<1.0.3", "tastyigniter/tastyigniter": "<3.3", + "tcg/voyager": "<=1.4", "tecnickcom/tcpdf": "<6.2.22", "terminal42/contao-tablelookupwizard": "<3.3.5", "thelia/backoffice-default-template": ">=2.1,<2.1.2", @@ -15369,7 +15378,7 @@ "unisharp/laravel-filemanager": "<=2.5.1", "userfrosting/userfrosting": ">=0.3.1,<4.6.3", "usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2", - "uvdesk/community-skeleton": "<1.1", + "uvdesk/community-skeleton": "<=1.1.1", "vanilla/safecurl": "<0.9.2", "verot/class.upload.php": "<=1.0.3|>=2,<=2.0.4", "vova07/yii2-fileapi-widget": "<0.1.9", @@ -15471,7 +15480,7 @@ "type": "tidelift" } ], - "time": "2023-04-06T17:04:19+00:00" + "time": "2023-04-28T21:04:09+00:00" }, { "name": "sebastian/diff", @@ -15756,16 +15765,16 @@ }, { "name": "symfony/dom-crawler", - "version": "v5.4.22", + "version": "v5.4.23", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "4c633facee8da59998e0c90e337a586cf07a21e7" + "reference": "4a286c916b74ecfb6e2caf1aa31d3fe2a34b7e08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/4c633facee8da59998e0c90e337a586cf07a21e7", - "reference": "4c633facee8da59998e0c90e337a586cf07a21e7", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/4a286c916b74ecfb6e2caf1aa31d3fe2a34b7e08", + "reference": "4a286c916b74ecfb6e2caf1aa31d3fe2a34b7e08", "shasum": "" }, "require": { @@ -15811,7 +15820,7 @@ "description": "Eases DOM navigation for HTML and XML documents", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dom-crawler/tree/v5.4.22" + "source": "https://github.com/symfony/dom-crawler/tree/v5.4.23" }, "funding": [ { @@ -15827,7 +15836,7 @@ "type": "tidelift" } ], - "time": "2023-03-06T21:29:33+00:00" + "time": "2023-04-08T21:20:19+00:00" }, { "name": "symfony/maker-bundle", @@ -15922,16 +15931,16 @@ }, { "name": "symfony/phpunit-bridge", - "version": "v5.4.21", + "version": "v5.4.23", "source": { "type": "git", "url": "https://github.com/symfony/phpunit-bridge.git", - "reference": "28d8a15a0b4c7186042fa4e0ddea94d561e7ea9e" + "reference": "1572c5b7cad812bdf0414d89a32a33a2dafb38ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/28d8a15a0b4c7186042fa4e0ddea94d561e7ea9e", - "reference": "28d8a15a0b4c7186042fa4e0ddea94d561e7ea9e", + "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/1572c5b7cad812bdf0414d89a32a33a2dafb38ba", + "reference": "1572c5b7cad812bdf0414d89a32a33a2dafb38ba", "shasum": "" }, "require": { @@ -15985,7 +15994,7 @@ "description": "Provides utilities for PHPUnit, especially user deprecation notices management", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/phpunit-bridge/tree/v5.4.21" + "source": "https://github.com/symfony/phpunit-bridge/tree/v5.4.23" }, "funding": [ { @@ -16001,7 +16010,7 @@ "type": "tidelift" } ], - "time": "2023-02-16T09:33:00+00:00" + "time": "2023-04-18T09:42:03+00:00" }, { "name": "symfony/web-profiler-bundle", diff --git a/config/packages/liip_imagine.yaml b/config/packages/liip_imagine.yaml index 18cba87c..51686b58 100644 --- a/config/packages/liip_imagine.yaml +++ b/config/packages/liip_imagine.yaml @@ -3,6 +3,9 @@ liip_imagine: # valid drivers options include "gd" or "gmagick" or "imagick" driver: "gd" + twig: + mode: lazy + default_filter_set_settings: format: webp diff --git a/config/services.yaml b/config/services.yaml index b075684a..360963c3 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -244,6 +244,13 @@ services: tags: - {name: serializer.normalizer, priority: -9000} + # Disable igbinary serialization for cache even when igbinary is available, as it causes issues with the doctrine + # proxy objects (see https://github.com/igbinary/igbinary/issues/377 and https://github.com/igbinary/igbinary/issues/273) + cache.default_marshaller: + class: Symfony\Component\Cache\Marshaller\DefaultMarshaller + arguments: + $useIgbinarySerialize: false + #################################################################################################################### # Miscellaneous diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 6c43dae0..9441d9b9 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -22,6 +22,11 @@ php bin/console doctrine:migrations:migrate If this does not help, please [open an issue on GitHub](https://github.com/Part-DB/Part-DB-symfony). +## Search for user and reset password: +You can list all users with the following command: `php bin/console partdb:users:list` +To reset the password of a user you can use the following command: `php bin/console partdb:users:set-password [username]` + + ## Error logs Detailed error logs can be found in the `var/log` directory. When Part-DB is installed directly, the errors are written to the `var/log/prod.log` file. @@ -35,4 +40,4 @@ docker-compose logs -f Please include the error logs in your issue on GitHub, if you open an issue. ## Report Issue -If an error occurs, or you found a bug, please [open an issue on GitHub](https://github.com/Part-DB/Part-DB-symfony). \ No newline at end of file +If an error occurs, or you found a bug, please [open an issue on GitHub](https://github.com/Part-DB/Part-DB-symfony). diff --git a/docs/usage/keybindings.md b/docs/usage/keybindings.md new file mode 100644 index 00000000..f3224b89 --- /dev/null +++ b/docs/usage/keybindings.md @@ -0,0 +1,119 @@ +--- +title: Keybindings +layout: default +parent: Usage +--- + +# Keybindings + +This page lists all the keybindings of Part-DB. Currently, there are only the special character keybindings. + +## Special characters +Using the keybindings below (Alt + key) you can insert special characters into the text fields of Part-DB. This works on all text and search fields in Part-DB. + +### Greek letters + +| Key | Character | +|---------------------|---------------------| +| **Alt + a** | α (Alpha) | +| **Alt + Shift + A** | Α (Alpha uppercase) | +| **Alt + b** | β (Beta) | +| **Alt + Shift + B** | Β (Beta uppercase) | +| **Alt + g** | γ (Gamma) | +| **Alt + Shift + G** | Γ (Gamma uppercase) | +| **Alt + d** | δ (Delta) | +| **Alt + Shift + D** | Δ (Delta uppercase) | +| **Alt + e** | ε (Epsilon) | +| **Alt + Shift + E** | Ε (Epsilon uppercase) | +| **Alt + z** | ζ (Zeta) | +| **Alt + Shift + Z** | Ζ (Zeta uppercase) | +| **Alt + h** | η (Eta) | +| **Alt + Shift + H** | Η (Eta uppercase) | +| **Alt + q** | θ (Theta) | +| **Alt + Shift + Q** | Θ (Theta uppercase) | +| **Alt + i** | ι (Iota) | +| **Alt + Shift + I** | Ι (Iota uppercase) | +| **Alt + k** | κ (Kappa) | +| **Alt + Shift + K** | Κ (Kappa uppercase) | +| **Alt + l** | λ (Lambda) | +| **Alt + Shift + L** | Λ (Lambda uppercase) | +| **Alt + m** | μ (Mu) | +| **Alt + Shift + M** | Μ (Mu uppercase) | +| **Alt + n** | ν (Nu) | +| **Alt + Shift + N** | Ν (Nu uppercase) | +| **Alt + x** | ξ (Xi) | +| **Alt + Shift + x** | Ξ (Xi uppercase) | +| **Alt + o** | ο (Omicron) | +| **Alt + Shift + O** | Ο (Omicron uppercase) | +| **Alt + p** | π (Pi) | +| **Alt + Shift + P** | Π (Pi uppercase) | +| **Alt + r** | ρ (Rho) | +| **Alt + Shift + R** | Ρ (Rho uppercase) | +| **Alt + s** | σ (Sigma) | +| **Alt + Shift + S** | Σ (Sigma uppercase) | +| **Alt + t** | τ (Tau) | +| **Alt + Shift + T** | Τ (Tau uppercase) | +| **Alt + u** | υ (Upsilon) | +| **Alt + Shift + U** | Υ (Upsilon uppercase) | +| **Alt + f** | φ (Phi) | +| **Alt + Shift + F** | Φ (Phi uppercase) | +| **Alt + y** | ψ (Psi) | +| **Alt + Shift + Y** | Ψ (Psi uppercase) | +| **Alt + c** | χ (Chi) | +| **Alt + Shift + C** | Χ (Chi uppercase) | +| **Alt + w** | ω (Omega) | +| **Alt + Shift + W** | Ω (Omega uppercase) | + +### Mathematical symbols + +| Key | Character | +|----------------------|-------------------------------------------| +| **Alt + 1** | ∑ (Sum symbol) | +| **Alt + Shift + 1** | ∏ (Product symbol) | +| **Alt + 2** | ∫ (Integral symbol) | +| **Alt + Shift + 2** | ∂ (Partial derivation) | +| **Alt + 3** | ≤ (Less or equal symbol) | +| **Alt + Shift + 3** | ≥ (Greater or equal symbol) | +| **Alt + 4** | ∞ (Infinity symbol) | +| **Alt + Shift + 4** | ∅ (Empty set symbol) | +| **Alt + 5** | ≈ (Approximatley) | +| **Alt + Shift + 5** | ≠ (Not equal symbol) | +| **Alt + 6** | ∈ (Element of) | +| **Alt + Shift + 6** | ∉ (Not element of) | +| **Alt + 7** | ∨ (Logical or) | +| **Alt + Shift + 7** | ∧ (Logical and) | +| **Alt + 8** | ∠ (Angle symbol) | +| **Alt + Shift + 8** | ∝ (Proportional to) | +| **Alt + 9** | √ (Square root) | +| **Alt + Shift + 9** | ∛ (Cube root) | +| **Alt + 0** | ± (Plus minus) | +| **Alt + Shift + 0** | ∓ (Minus plus) | + +### Currency symbols + +Please not the following keybindings are bound to a specific keycode. The key character is not the same on all keyboards. +It is given here for a US keyboard layout. + +For a German keyboard layout, replace ; with ö, and ' with ä. + +| Key | Character | +|---------------------------------|---------------------------| +| **Alt + ;** (code 192) | € (Euro currency symbol) | +| **Alt + Shift + ;** (code 192) | £ (Pound currency symbol) | +| **Alt + '** (code 222) | ¥ (Yen currency symbol) | +| **Alt + Shift + '** (code 222) | $ (Dollar currency symbol) | + + +### Others + +Please not the following keybindings are bound to a specific keycode. The key character is not the same on all keyboards. +It is given here for a US keyboard layout. + +For a German keyboard layout, replace `[` with `0`, and `]` with `´`. + +| Key | Character | +|--------------------------------|--------------------| +| **Alt + [** (code 219) | © (Copyright char) | +| **Alt + Shift + [** (code 219) | (Registered char) | +| **Alt + ]** (code 221) | ™ (Trademark char) | +| **Alt + Shift + ]** (code 221) | (Degree char) | diff --git a/migrations/Version20190902140506.php b/migrations/Version20190902140506.php index 9a4697fc..badf3699 100644 --- a/migrations/Version20190902140506.php +++ b/migrations/Version20190902140506.php @@ -216,10 +216,10 @@ final class Version20190902140506 extends AbstractMultiPlatformMigration $this->addSql('CREATE INDEX IDX_C68C4459398D64AA ON pricedetails (id_currency)'); $this->addSql('CREATE INDEX IDX_C68C44594A01DDC7 ON pricedetails (orderdetails_id)'); $this->addSql('DROP INDEX pricedetails_orderdetails_id_k ON pricedetails'); - $this->addSql('DROP INDEX name ON groups'); - $this->addSql('ALTER TABLE groups ADD not_selectable TINYINT(1) NOT NULL, CHANGE name name VARCHAR(255) NOT NULL, CHANGE comment comment LONGTEXT NOT NULL, CHANGE perms_labels perms_labels INT NOT NULL, CHANGE last_modified last_modified DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL'); - $this->addSql('ALTER TABLE groups ADD CONSTRAINT FK_F06D3970727ACA70 FOREIGN KEY (parent_id) REFERENCES `groups` (id)'); - $this->addSql('CREATE INDEX IDX_F06D3970727ACA70 ON groups (parent_id)'); + $this->addSql('DROP INDEX name ON `groups`'); + $this->addSql('ALTER TABLE `groups` ADD not_selectable TINYINT(1) NOT NULL, CHANGE name name VARCHAR(255) NOT NULL, CHANGE comment comment LONGTEXT NOT NULL, CHANGE perms_labels perms_labels INT NOT NULL, CHANGE last_modified last_modified DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL'); + $this->addSql('ALTER TABLE `groups` ADD CONSTRAINT FK_F06D3970727ACA70 FOREIGN KEY (parent_id) REFERENCES `groups` (id)'); + $this->addSql('CREATE INDEX IDX_F06D3970727ACA70 ON `groups` (parent_id)'); //Fill empty timestamps with current date $tables = ['attachments', 'attachment_types', 'categories', 'devices', 'footprints', 'manufacturers', @@ -232,6 +232,10 @@ final class Version20190902140506 extends AbstractMultiPlatformMigration //Set the dbVersion to a high value, to prevent the old Part-DB versions to upgrade DB! $this->addSql("UPDATE `internal` SET `keyValue` = '99' WHERE `internal`.`keyName` = 'dbVersion'"); + + //Migrate theme config to new format + $this->addSql('UPDATE users SET users.config_theme = REPLACE(users.config_theme ,".min.css", "") WHERE users.config_theme LIKE "%.min.css"'); + $this->addSql('UPDATE users SET users.config_theme = REPLACE(users.config_theme ,".css", "") WHERE users.config_theme LIKE "%.css"'); } public function mySQLDown(Schema $schema): void @@ -357,10 +361,6 @@ final class Version20190902140506 extends AbstractMultiPlatformMigration $this->addSql('ALTER TABLE `users` CHANGE name name VARCHAR(32) NOT NULL COLLATE utf8_general_ci, CHANGE need_pw_change need_pw_change TINYINT(1) DEFAULT \'0\' NOT NULL, CHANGE first_name first_name TINYTEXT DEFAULT NULL COLLATE utf8_general_ci, CHANGE last_name last_name TINYTEXT DEFAULT NULL COLLATE utf8_general_ci, CHANGE department department TINYTEXT DEFAULT NULL COLLATE utf8_general_ci, CHANGE email email TINYTEXT DEFAULT NULL COLLATE utf8_general_ci, CHANGE config_language config_language TINYTEXT DEFAULT NULL COLLATE utf8_general_ci, CHANGE config_timezone config_timezone TINYTEXT DEFAULT NULL COLLATE utf8_general_ci, CHANGE config_theme config_theme TINYTEXT DEFAULT NULL COLLATE utf8_general_ci, CHANGE config_currency config_currency TINYTEXT DEFAULT NULL COLLATE utf8_general_ci, CHANGE last_modified last_modified DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, CHANGE perms_labels perms_labels SMALLINT NOT NULL'); $this->addSql('DROP INDEX uniq_1483a5e95e237e06 ON `users`'); $this->addSql('CREATE UNIQUE INDEX name ON `users` (name)'); - - //Migrate theme config to new format - $this->addSql('UPDATE users SET users.config_theme = REPLACE(users.config_theme ,".min.css", "") WHERE users.config_theme LIKE "%.min.css"'); - $this->addSql('UPDATE users SET users.config_theme = REPLACE(users.config_theme ,".css", "") WHERE users.config_theme LIKE "%.css"'); } public function sqLiteUp(Schema $schema): void diff --git a/migrations/Version20230417211732.php b/migrations/Version20230417211732.php new file mode 100644 index 00000000..c60d7c0b --- /dev/null +++ b/migrations/Version20230417211732.php @@ -0,0 +1,51 @@ +addSql('DELETE FROM attachments WHERE class_name = "PartDB\\\\Part" AND NOT EXISTS (SELECT id FROM parts WHERE id = attachments.element_id)'); + $this->addSql('DELETE FROM attachments WHERE class_name = "PartDB\\\\Device" AND NOT EXISTS (SELECT id FROM projects WHERE id = attachments.element_id)'); + + // Replace all attachments where class_name is the legacy "PartDB\Part" with the new version "Part" + //We have to use 4 backslashes here, as PHP reduces them to 2 backslashes, which MySQL interprets as an escaped backslash. + $this->addSql('UPDATE attachments SET class_name = "Part" WHERE class_name = "PartDB\\\\Part"'); + //Do the same with PartDB\Device and Device + $this->addSql('UPDATE attachments SET class_name = "Device" WHERE class_name = "PartDB\\\\Device"'); + + + } + + public function mySQLDown(Schema $schema): void + { + // We can not revert this migration, because we don't know the old class name. + } + + public function sqLiteUp(Schema $schema): void + { + //As legacy database can only be migrated to MySQL, we don't need to implement this method. + $this->skipIf(true, 'Not needed for SQLite'); + } + + public function sqLiteDown(Schema $schema): void + { + //As we done nothing, we don't need to implement this method. + } +} diff --git a/src/Command/BackupCommand.php b/src/Command/BackupCommand.php index 7ee535c6..d12add92 100644 --- a/src/Command/BackupCommand.php +++ b/src/Command/BackupCommand.php @@ -10,7 +10,6 @@ use PhpZip\ZipFile; use Spatie\DbDumper\Databases\MySql; use Spatie\DbDumper\DbDumper; use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\Input; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; diff --git a/src/Command/Migrations/ConvertBBCodeCommand.php b/src/Command/Migrations/ConvertBBCodeCommand.php index 6b2b3fd7..3b861b49 100644 --- a/src/Command/Migrations/ConvertBBCodeCommand.php +++ b/src/Command/Migrations/ConvertBBCodeCommand.php @@ -45,12 +45,12 @@ use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use function count; /** - * This command converts the BBCode used by old Part-DB versions (<1.0), to the current used markdown format. + * This command converts the BBCode used by old Part-DB versions (<1.0), to the current used Markdown format. */ class ConvertBBCodeCommand extends Command { /** - * @var string The LIKE criteria used to detect on SQL server if a entry contains BBCode + * @var string The LIKE criteria used to detect on SQL server if an entry contains BBCode */ protected const BBCODE_CRITERIA = '%[%]%[/%]%'; /** diff --git a/src/Command/Migrations/ImportPartKeeprCommand.php b/src/Command/Migrations/ImportPartKeeprCommand.php index ec5010e4..d436bb1c 100644 --- a/src/Command/Migrations/ImportPartKeeprCommand.php +++ b/src/Command/Migrations/ImportPartKeeprCommand.php @@ -69,7 +69,7 @@ class ImportPartKeeprCommand extends Command $this->addOption('--import-users', null, InputOption::VALUE_NONE, 'Import users (passwords will not be imported).'); } - public function execute(InputInterface $input, OutputInterface $output) + public function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); diff --git a/src/Command/User/UpgradePermissionsSchemaCommand.php b/src/Command/User/UpgradePermissionsSchemaCommand.php index ae5adfff..36e933cc 100644 --- a/src/Command/User/UpgradePermissionsSchemaCommand.php +++ b/src/Command/User/UpgradePermissionsSchemaCommand.php @@ -27,9 +27,7 @@ use App\Services\LogSystem\EventCommentHelper; use App\Services\UserSystem\PermissionSchemaUpdater; use Doctrine\ORM\EntityManagerInterface; use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; @@ -91,12 +89,12 @@ final class UpgradePermissionsSchemaCommand extends Command //List all users and groups that need an update $io->section('Groups that need an update:'); - $io->listing(array_map(function (Group $group) { + $io->listing(array_map(static function (Group $group) { return $group->getName() . ' (ID: '. $group->getID() .', Current version: ' . $group->getPermissions()->getSchemaVersion() . ')'; }, $groups_to_upgrade)); $io->section('Users that need an update:'); - $io->listing(array_map(function (User $user) { + $io->listing(array_map(static function (User $user) { return $user->getUsername() . ' (ID: '. $user->getID() .', Current version: ' . $user->getPermissions()->getSchemaVersion() . ')'; }, $users_to_upgrade)); diff --git a/src/Command/User/UserEnableCommand.php b/src/Command/User/UserEnableCommand.php index 39878a91..2b913e26 100644 --- a/src/Command/User/UserEnableCommand.php +++ b/src/Command/User/UserEnableCommand.php @@ -87,7 +87,7 @@ class UserEnableCommand extends Command $io->note('The following users will be enabled:'); } $io->table(['Username', 'Enabled/Disabled'], - array_map(function(User $user) { + array_map(static function(User $user) { return [$user->getFullName(true), $user->isDisabled() ? 'Disabled' : 'Enabled']; }, $users)); diff --git a/src/Controller/AdminPages/BaseAdminController.php b/src/Controller/AdminPages/BaseAdminController.php index 0921d42a..d5f00767 100644 --- a/src/Controller/AdminPages/BaseAdminController.php +++ b/src/Controller/AdminPages/BaseAdminController.php @@ -269,7 +269,6 @@ abstract class BaseAdminController extends AbstractController protected function _new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?AbstractNamedDBElement $entity = null) { - $master_picture_backup = null; if (null === $entity) { /** @var AbstractStructuralDBElement|User $new_entity */ $new_entity = new $this->entity_class(); @@ -390,7 +389,7 @@ abstract class BaseAdminController extends AbstractController foreach ($errors as $error) { if ($error['entity'] instanceof AbstractStructuralDBElement) { $this->addFlash('error', $error['entity']->getFullPath().':'.$error['violations']); - } else { //When we dont have a structural element, we can only show the name + } else { //When we don't have a structural element, we can only show the name $this->addFlash('error', $error['entity']->getName().':'.$error['violations']); } } @@ -413,11 +412,11 @@ abstract class BaseAdminController extends AbstractController } /** - * Performs checks if the element can be deleted safely. Otherwise an flash message is added. + * Performs checks if the element can be deleted safely. Otherwise, a flash message is added. * * @param AbstractNamedDBElement $entity the element that should be checked * - * @return bool True if the the element can be deleted, false if not + * @return bool True if the element can be deleted, false if not */ protected function deleteCheck(AbstractNamedDBElement $entity): bool { diff --git a/src/Controller/AdminPages/ProjectAdminController.php b/src/Controller/AdminPages/ProjectAdminController.php index ae14ea27..08d088ec 100644 --- a/src/Controller/AdminPages/ProjectAdminController.php +++ b/src/Controller/AdminPages/ProjectAdminController.php @@ -25,7 +25,6 @@ namespace App\Controller\AdminPages; use App\Entity\Attachments\ProjectAttachment; use App\Entity\ProjectSystem\Project; use App\Entity\Parameters\ProjectParameter; -use App\Form\AdminPages\BaseEntityAdminForm; use App\Form\AdminPages\ProjectAdminForm; use App\Services\ImportExportSystem\EntityExporter; use App\Services\ImportExportSystem\EntityImporter; diff --git a/src/Controller/AttachmentFileController.php b/src/Controller/AttachmentFileController.php index 952237d8..8df2a8bc 100644 --- a/src/Controller/AttachmentFileController.php +++ b/src/Controller/AttachmentFileController.php @@ -24,12 +24,8 @@ namespace App\Controller; use App\DataTables\AttachmentDataTable; use App\DataTables\Filters\AttachmentFilter; -use App\DataTables\Filters\PartFilter; -use App\DataTables\PartsDataTable; use App\Entity\Attachments\Attachment; -use App\Entity\Attachments\PartAttachment; use App\Form\Filters\AttachmentFilterType; -use App\Form\Filters\PartFilterType; use App\Services\Attachments\AttachmentManager; use App\Services\Trees\NodesListBuilder; use Omines\DataTablesBundle\DataTableFactory; @@ -106,10 +102,8 @@ class AttachmentFileController extends AbstractController /** * @Route("/attachment/list", name="attachment_list") - * - * @return JsonResponse|Response */ - public function attachmentsTable(Request $request, DataTableFactory $dataTableFactory, NodesListBuilder $nodesListBuilder) + public function attachmentsTable(Request $request, DataTableFactory $dataTableFactory, NodesListBuilder $nodesListBuilder): Response { $this->denyAccessUnlessGranted('@attachments.list_attachments'); diff --git a/src/Controller/GroupController.php b/src/Controller/GroupController.php index 1eb10d76..5aa8a371 100644 --- a/src/Controller/GroupController.php +++ b/src/Controller/GroupController.php @@ -74,9 +74,9 @@ class GroupController extends BaseAdminController //We need to stop the execution here, or our permissions changes will be overwritten by the form values return $this->redirectToRoute('group_edit', ['id' => $entity->getID()]); - } else { - $this->addFlash('danger', 'csfr_invalid'); } + + $this->addFlash('danger', 'csfr_invalid'); } return $this->_edit($entity, $request, $em, $timestamp); diff --git a/src/Controller/LogController.php b/src/Controller/LogController.php index 94e50c5b..a7938b96 100644 --- a/src/Controller/LogController.php +++ b/src/Controller/LogController.php @@ -68,9 +68,9 @@ class LogController extends AbstractController /** * @Route("/", name="log_view") * - * @return JsonResponse|Response + * @return Response */ - public function showLogs(Request $request, DataTableFactory $dataTable) + public function showLogs(Request $request, DataTableFactory $dataTable): Response { $this->denyAccessUnlessGranted('@system.show_logs'); diff --git a/src/Controller/PartController.php b/src/Controller/PartController.php index f0d6fdfe..b7a3fd0e 100644 --- a/src/Controller/PartController.php +++ b/src/Controller/PartController.php @@ -53,7 +53,6 @@ use Symfony\Component\Form\FormInterface; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Security\Core\Exception\AccessDeniedException; use Symfony\Contracts\Translation\TranslatorInterface; @@ -351,8 +350,10 @@ class PartController extends AbstractController if($partLot->getPart() !== $part) { throw new \RuntimeException("The origin partlot does not belong to the part!"); } - //Try to determine the target lot (used for move actions) - $targetLot = $em->find(PartLot::class, $request->request->get('target_id')); + + //Try to determine the target lot (used for move actions), if the parameter is existing + $targetId = $request->request->get('target_id', null); + $targetLot = $targetId ? $em->find(PartLot::class, $targetId) : null; if ($targetLot && $targetLot->getPart() !== $part) { throw new \RuntimeException("The target partlot does not belong to the part!"); } @@ -396,7 +397,7 @@ class PartController extends AbstractController } err: - //If an redirect was passed, then redirect there + //If a redirect was passed, then redirect there if($request->request->get('_redirect')) { return $this->redirect($request->request->get('_redirect')); } diff --git a/src/Controller/PartImportExportController.php b/src/Controller/PartImportExportController.php index 22b5b528..81754b3b 100644 --- a/src/Controller/PartImportExportController.php +++ b/src/Controller/PartImportExportController.php @@ -26,8 +26,6 @@ use App\Services\ImportExportSystem\EntityExporter; use App\Services\ImportExportSystem\EntityImporter; use App\Services\LogSystem\EventCommentHelper; use App\Services\Parts\PartsTableActionHandler; -use Doctrine\ORM\EntityManagerInterface; -use InvalidArgumentException; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\File\UploadedFile; use Symfony\Component\HttpFoundation\Request; diff --git a/src/Controller/PartListsController.php b/src/Controller/PartListsController.php index ab23c0f2..e544c481 100644 --- a/src/Controller/PartListsController.php +++ b/src/Controller/PartListsController.php @@ -158,7 +158,7 @@ class PartListsController extends AbstractController * * @return JsonResponse|Response */ - public function showCategory(Category $category, Request $request) + public function showCategory(Category $category, Request $request): Response { $this->denyAccessUnlessGranted('@categories.read'); @@ -180,7 +180,7 @@ class PartListsController extends AbstractController * * @return JsonResponse|Response */ - public function showFootprint(Footprint $footprint, Request $request) + public function showFootprint(Footprint $footprint, Request $request): Response { $this->denyAccessUnlessGranted('@footprints.read'); @@ -202,7 +202,7 @@ class PartListsController extends AbstractController * * @return JsonResponse|Response */ - public function showManufacturer(Manufacturer $manufacturer, Request $request) + public function showManufacturer(Manufacturer $manufacturer, Request $request): Response { $this->denyAccessUnlessGranted('@manufacturers.read'); @@ -224,7 +224,7 @@ class PartListsController extends AbstractController * * @return JsonResponse|Response */ - public function showStorelocation(Storelocation $storelocation, Request $request) + public function showStorelocation(Storelocation $storelocation, Request $request): Response { $this->denyAccessUnlessGranted('@storelocations.read'); @@ -246,7 +246,7 @@ class PartListsController extends AbstractController * * @return JsonResponse|Response */ - public function showSupplier(Supplier $supplier, Request $request) + public function showSupplier(Supplier $supplier, Request $request): Response { $this->denyAccessUnlessGranted('@suppliers.read'); @@ -268,7 +268,7 @@ class PartListsController extends AbstractController * * @return JsonResponse|Response */ - public function showTag(string $tag, Request $request, DataTableFactory $dataTable) + public function showTag(string $tag, Request $request): Response { $tag = trim($tag); @@ -291,6 +291,7 @@ class PartListsController extends AbstractController $filter->setName($request->query->getBoolean('name', true)); $filter->setCategory($request->query->getBoolean('category', true)); $filter->setDescription($request->query->getBoolean('description', true)); + $filter->setMpn($request->query->getBoolean('mpn', true)); $filter->setTags($request->query->getBoolean('tags', true)); $filter->setStorelocation($request->query->getBoolean('storelocation', true)); $filter->setComment($request->query->getBoolean('comment', true)); @@ -300,6 +301,7 @@ class PartListsController extends AbstractController $filter->setManufacturer($request->query->getBoolean('manufacturer', false)); $filter->setFootprint($request->query->getBoolean('footprint', false)); + $filter->setRegex($request->query->getBoolean('regex', false)); return $filter; @@ -310,7 +312,7 @@ class PartListsController extends AbstractController * * @return JsonResponse|Response */ - public function showSearch(Request $request, DataTableFactory $dataTable) + public function showSearch(Request $request, DataTableFactory $dataTable): Response { $searchFilter = $this->searchRequestToFilter($request); @@ -331,9 +333,9 @@ class PartListsController extends AbstractController /** * @Route("/parts", name="parts_show_all") * - * @return JsonResponse|Response + * @return Response */ - public function showAll(Request $request, DataTableFactory $dataTable) + public function showAll(Request $request): Response { return $this->showListWithFilter($request,'parts/lists/all_list.html.twig'); } diff --git a/src/Controller/ProjectController.php b/src/Controller/ProjectController.php index 81833f82..56ba6b7d 100644 --- a/src/Controller/ProjectController.php +++ b/src/Controller/ProjectController.php @@ -32,10 +32,8 @@ use App\Services\ImportExportSystem\BOMImporter; use App\Services\ProjectSystem\ProjectBuildHelper; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ORM\EntityManagerInterface; -use League\Csv\Exception; use League\Csv\SyntaxError; use Omines\DataTablesBundle\DataTableFactory; -use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; @@ -64,7 +62,7 @@ class ProjectController extends AbstractController /** * @Route("/{id}/info", name="project_info", requirements={"id"="\d+"}) */ - public function info(Project $project, Request $request, ProjectBuildHelper $buildHelper) + public function info(Project $project, Request $request, ProjectBuildHelper $buildHelper): Response { $this->denyAccessUnlessGranted('read', $project); @@ -114,9 +112,9 @@ class ProjectController extends AbstractController $request->get('_redirect', $this->generateUrl('project_info', ['id' => $project->getID()] ))); - } else { - $this->addFlash('error', 'project.build.flash.invalid_input'); } + + $this->addFlash('error', 'project.build.flash.invalid_input'); } return $this->renderForm('projects/build/build.html.twig', [ diff --git a/src/Controller/RedirectController.php b/src/Controller/RedirectController.php index 632399c1..811ab135 100644 --- a/src/Controller/RedirectController.php +++ b/src/Controller/RedirectController.php @@ -28,20 +28,17 @@ use function in_array; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Contracts\Translation\TranslatorInterface; class RedirectController extends AbstractController { protected string $default_locale; protected TranslatorInterface $translator; - protected SessionInterface $session; protected bool $enforce_index_php; - public function __construct(string $default_locale, TranslatorInterface $translator, SessionInterface $session, bool $enforce_index_php) + public function __construct(string $default_locale, TranslatorInterface $translator, bool $enforce_index_php) { $this->default_locale = $default_locale; - $this->session = $session; $this->translator = $translator; $this->enforce_index_php = $enforce_index_php; } @@ -52,7 +49,7 @@ class RedirectController extends AbstractController */ public function addLocalePart(Request $request): RedirectResponse { - //By default we use the global default locale + //By default, we use the global default locale $locale = $this->default_locale; //Check if a user has set a preferred language setting: @@ -61,7 +58,6 @@ class RedirectController extends AbstractController $locale = $user->getLanguage(); } - //$new_url = str_replace($request->getPathInfo(), '/' . $locale . $request->getPathInfo(), $request->getUri()); $new_url = $request->getUriForPath('/'.$locale.$request->getPathInfo()); //If either mod_rewrite is not enabled or the index.php version is enforced, add index.php to the string @@ -71,6 +67,9 @@ class RedirectController extends AbstractController $new_url = $request->getSchemeAndHttpHost().$request->getBaseUrl().'/index.php/'.$locale.$request->getPathInfo(); } + //Add the query string + $new_url .= $request->getQueryString() ? '?'.$request->getQueryString() : ''; + return $this->redirect($new_url); } diff --git a/src/Controller/SelectAPIController.php b/src/Controller/SelectAPIController.php index 1b7784e4..f01f03ca 100644 --- a/src/Controller/SelectAPIController.php +++ b/src/Controller/SelectAPIController.php @@ -22,7 +22,6 @@ namespace App\Controller; use App\Entity\Base\AbstractNamedDBElement; use App\Entity\Base\AbstractStructuralDBElement; -use App\Entity\Contracts\NamedElementInterface; use App\Entity\LabelSystem\LabelProfile; use App\Entity\Parts\Category; use App\Entity\Parts\Footprint; @@ -106,7 +105,7 @@ class SelectAPIController extends AbstractController 3 => $this->translator->trans('export.level.full'), ]; - return $this->json(array_map(function ($key, $value) { + return $this->json(array_map(static function ($key, $value) { return [ 'text' => $value, 'value' => $key, @@ -198,7 +197,7 @@ class SelectAPIController extends AbstractController ]); //Remove the data-* prefix for each key $data = array_combine( - array_map(function ($key) { + array_map(static function ($key) { if (strpos($key, 'data-') === 0) { return substr($key, 5); } diff --git a/src/Controller/TypeaheadController.php b/src/Controller/TypeaheadController.php index 37ff6ec1..c5d440d2 100644 --- a/src/Controller/TypeaheadController.php +++ b/src/Controller/TypeaheadController.php @@ -95,7 +95,7 @@ class TypeaheadController extends AbstractController } /** - * This functions map the parameter type to the class, so we can access its repository + * This function map the parameter type to the class, so we can access its repository * @param string $type * @return class-string */ diff --git a/src/Controller/UserController.php b/src/Controller/UserController.php index 9949b8c7..9669a3a6 100644 --- a/src/Controller/UserController.php +++ b/src/Controller/UserController.php @@ -25,7 +25,6 @@ namespace App\Controller; use App\DataTables\LogDataTable; use App\Entity\Attachments\UserAttachment; use App\Entity\Base\AbstractNamedDBElement; -use App\Entity\Parameters\AbstractParameter; use App\Entity\UserSystem\User; use App\Events\SecurityEvent; use App\Events\SecurityEvents; @@ -62,11 +61,11 @@ class UserController extends AdminPages\BaseAdminController protected function additionalActionEdit(FormInterface $form, AbstractNamedDBElement $entity): bool { - //Check if we editing a user and if we need to change the password of it + //Check if we're editing a user and if we need to change the password of it if ($entity instanceof User && !empty($form['new_password']->getData())) { $password = $this->passwordEncoder->hashPassword($entity, $form['new_password']->getData()); $entity->setPassword($password); - //By default the user must change the password afterwards + //By default, the user must change the password afterward $entity->setNeedPwChange(true); $event = new SecurityEvent($entity); @@ -129,9 +128,9 @@ class UserController extends AdminPages\BaseAdminController //We need to stop the execution here, or our permissions changes will be overwritten by the form values return $this->redirectToRoute('user_edit', ['id' => $entity->getID()]); - } else { - $this->addFlash('danger', 'csfr_invalid'); } + + $this->addFlash('danger', 'csfr_invalid'); } return $this->_edit($entity, $request, $em, $timestamp); @@ -142,7 +141,7 @@ class UserController extends AdminPages\BaseAdminController if ($entity instanceof User && !empty($form['new_password']->getData())) { $password = $this->passwordEncoder->hashPassword($entity, $form['new_password']->getData()); $entity->setPassword($password); - //By default the user must change the password afterwards + //By default, the user must change the password afterward $entity->setNeedPwChange(true); } diff --git a/src/Controller/UserSettingsController.php b/src/Controller/UserSettingsController.php index 80353ac9..c1c38d6b 100644 --- a/src/Controller/UserSettingsController.php +++ b/src/Controller/UserSettingsController.php @@ -225,7 +225,7 @@ class UserSettingsController extends AbstractController */ public function userSettings(Request $request, EntityManagerInterface $em, UserPasswordHasherInterface $passwordEncoder, GoogleAuthenticator $googleAuthenticator, BackupCodeManager $backupCodeManager, FormFactoryInterface $formFactory, UserAvatarHelper $avatarHelper) { - /** @var User */ + /** @var User $user */ $user = $this->getUser(); $page_need_reload = false; @@ -261,7 +261,7 @@ class UserSettingsController extends AbstractController $page_need_reload = true; } - /** @var Form $form We need an form implementation for the next calls */ + /** @var Form $form We need a form implementation for the next calls */ if ($form->getClickedButton() && 'remove_avatar' === $form->getClickedButton()->getName()) { //Remove the avatar attachment from the user if requested if ($user->getMasterPictureAttachment() !== null) { @@ -327,7 +327,7 @@ class UserSettingsController extends AbstractController $pw_form->handleRequest($request); - //Check if password if everything was correct, then save it to User and DB + //Check if everything was correct, then save it to User and DB if (!$this->demo_mode && $pw_form->isSubmitted() && $pw_form->isValid()) { $password = $passwordEncoder->hashPassword($user, $pw_form['new_password']->getData()); $user->setPassword($password); diff --git a/src/DataTables/Adapters/CustomFetchJoinORMAdapter.php b/src/DataTables/Adapters/CustomFetchJoinORMAdapter.php index 052e2e28..9f6d83d0 100644 --- a/src/DataTables/Adapters/CustomFetchJoinORMAdapter.php +++ b/src/DataTables/Adapters/CustomFetchJoinORMAdapter.php @@ -20,7 +20,6 @@ namespace App\DataTables\Adapters; -use Doctrine\ORM\Query; use Doctrine\ORM\QueryBuilder; use Doctrine\ORM\Tools\Pagination\Paginator; use Omines\DataTablesBundle\Adapter\Doctrine\FetchJoinORMAdapter; @@ -38,7 +37,7 @@ use Omines\DataTablesBundle\Adapter\Doctrine\FetchJoinORMAdapter; */ class CustomFetchJoinORMAdapter extends FetchJoinORMAdapter { - public function getCount(QueryBuilder $queryBuilder, $identifier) + public function getCount(QueryBuilder $queryBuilder, $identifier): ?int { $qb_without_group_by = clone $queryBuilder; diff --git a/src/DataTables/Column/EntityColumn.php b/src/DataTables/Column/EntityColumn.php index 4ccc2ce4..df3bf3d2 100644 --- a/src/DataTables/Column/EntityColumn.php +++ b/src/DataTables/Column/EntityColumn.php @@ -22,9 +22,7 @@ declare(strict_types=1); namespace App\DataTables\Column; -use App\Entity\Base\AbstractDBElement; use App\Entity\Base\AbstractNamedDBElement; -use App\Entity\Parts\Part; use App\Services\EntityURLGenerator; use Omines\DataTablesBundle\Column\AbstractColumn; use Symfony\Component\OptionsResolver\Options; diff --git a/src/DataTables/Column/LocaleDateTimeColumn.php b/src/DataTables/Column/LocaleDateTimeColumn.php index 3904a4cd..733c0b6c 100644 --- a/src/DataTables/Column/LocaleDateTimeColumn.php +++ b/src/DataTables/Column/LocaleDateTimeColumn.php @@ -31,7 +31,7 @@ use Omines\DataTablesBundle\Column\AbstractColumn; use Symfony\Component\OptionsResolver\OptionsResolver; /** - * Similar to the built in DateTimeColumn, but the datetime is formatted using a IntlDateFormatter, + * Similar to the built-in DateTimeColumn, but the datetime is formatted using a IntlDateFormatter, * to get prettier locale based formatting. */ class LocaleDateTimeColumn extends AbstractColumn @@ -45,7 +45,9 @@ class LocaleDateTimeColumn extends AbstractColumn { if (null === $value) { return $this->options['nullValue']; - } elseif (!$value instanceof DateTimeInterface) { + } + + if (!$value instanceof DateTimeInterface) { $value = new DateTime((string) $value); } diff --git a/src/DataTables/Column/PrettyBoolColumn.php b/src/DataTables/Column/PrettyBoolColumn.php index 3a74db6e..a6f74c3c 100644 --- a/src/DataTables/Column/PrettyBoolColumn.php +++ b/src/DataTables/Column/PrettyBoolColumn.php @@ -41,7 +41,7 @@ class PrettyBoolColumn extends AbstractColumn return (bool) $value; } - public function render($value, $context) + public function render($value, $context): string { if ($value === true) { return ' ' diff --git a/src/DataTables/Column/RowClassColumn.php b/src/DataTables/Column/RowClassColumn.php index 4ac61c02..c583cf2f 100644 --- a/src/DataTables/Column/RowClassColumn.php +++ b/src/DataTables/Column/RowClassColumn.php @@ -27,7 +27,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; class RowClassColumn extends AbstractColumn { - public function configureOptions(OptionsResolver $resolver) + public function configureOptions(OptionsResolver $resolver): self { parent::configureOptions($resolver); @@ -48,6 +48,9 @@ class RowClassColumn extends AbstractColumn parent::initialize('$$rowClass', $index, $options, $dataTable); // TODO: Change the autogenerated stub } + /** + * @return mixed + */ public function normalize($value) { return $value; diff --git a/src/DataTables/Column/SIUnitNumberColumn.php b/src/DataTables/Column/SIUnitNumberColumn.php index bc9d866f..fa09e227 100644 --- a/src/DataTables/Column/SIUnitNumberColumn.php +++ b/src/DataTables/Column/SIUnitNumberColumn.php @@ -33,7 +33,7 @@ class SIUnitNumberColumn extends AbstractColumn $this->formatter = $formatter; } - public function configureOptions(OptionsResolver $resolver) + public function configureOptions(OptionsResolver $resolver): self { parent::configureOptions($resolver); @@ -43,7 +43,7 @@ class SIUnitNumberColumn extends AbstractColumn return $this; } - public function normalize($value) + public function normalize($value): string { //Ignore null values if ($value === null) { diff --git a/src/DataTables/Column/SelectColumn.php b/src/DataTables/Column/SelectColumn.php index 218f022d..c26e916c 100644 --- a/src/DataTables/Column/SelectColumn.php +++ b/src/DataTables/Column/SelectColumn.php @@ -28,7 +28,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; */ class SelectColumn extends AbstractColumn { - public function configureOptions(OptionsResolver $resolver) + public function configureOptions(OptionsResolver $resolver): self { parent::configureOptions($resolver); @@ -43,12 +43,15 @@ class SelectColumn extends AbstractColumn return $this; } + /** + * @return mixed + */ public function normalize($value) { return $value; } - public function render($value, $context) + public function render($value, $context): string { //Return empty string, as it this column is filled by datatables on client side return ''; diff --git a/src/DataTables/Filters/Constraints/AbstractConstraint.php b/src/DataTables/Filters/Constraints/AbstractConstraint.php index 0a888214..d57b6add 100644 --- a/src/DataTables/Filters/Constraints/AbstractConstraint.php +++ b/src/DataTables/Filters/Constraints/AbstractConstraint.php @@ -21,7 +21,6 @@ namespace App\DataTables\Filters\Constraints; use App\DataTables\Filters\FilterInterface; -use Doctrine\ORM\QueryBuilder; abstract class AbstractConstraint implements FilterInterface { diff --git a/src/DataTables/Filters/Constraints/BooleanConstraint.php b/src/DataTables/Filters/Constraints/BooleanConstraint.php index b180f6aa..ea3cfd6a 100644 --- a/src/DataTables/Filters/Constraints/BooleanConstraint.php +++ b/src/DataTables/Filters/Constraints/BooleanConstraint.php @@ -20,7 +20,6 @@ namespace App\DataTables\Filters\Constraints; -use App\DataTables\Filters\FilterInterface; use Doctrine\ORM\QueryBuilder; class BooleanConstraint extends AbstractConstraint diff --git a/src/DataTables/Filters/Constraints/FilterTrait.php b/src/DataTables/Filters/Constraints/FilterTrait.php index 988890ba..733a2217 100644 --- a/src/DataTables/Filters/Constraints/FilterTrait.php +++ b/src/DataTables/Filters/Constraints/FilterTrait.php @@ -20,7 +20,6 @@ namespace App\DataTables\Filters\Constraints; -use Doctrine\DBAL\ParameterType; use Doctrine\ORM\QueryBuilder; trait FilterTrait @@ -51,7 +50,7 @@ trait FilterTrait protected function generateParameterIdentifier(string $property): string { //Replace all special characters with underscores - $property = preg_replace('/[^a-zA-Z0-9_]/', '_', $property); + $property = preg_replace('/\W/', '_', $property); //Add a random number to the end of the property name for uniqueness return $property . '_' . uniqid("", false); } diff --git a/src/DataTables/Filters/Constraints/InstanceOfConstraint.php b/src/DataTables/Filters/Constraints/InstanceOfConstraint.php index 6efe8cce..e339ecc1 100644 --- a/src/DataTables/Filters/Constraints/InstanceOfConstraint.php +++ b/src/DataTables/Filters/Constraints/InstanceOfConstraint.php @@ -98,7 +98,7 @@ class InstanceOfConstraint extends AbstractConstraint if ($this->operator === 'ANY' || $this->operator === 'NONE') { foreach($this->value as $value) { - //We cannnot use an paramater here, as this is the only way to pass the FCQN to the query (via binded params, we would need to use ClassMetaData). See: https://github.com/doctrine/orm/issues/4462 + //We can not use a parameter here, as this is the only way to pass the FCQN to the query (via binded params, we would need to use ClassMetaData). See: https://github.com/doctrine/orm/issues/4462 $expressions[] = ($queryBuilder->expr()->isInstanceOf($this->property, $value)); } diff --git a/src/DataTables/Filters/Constraints/NumberConstraint.php b/src/DataTables/Filters/Constraints/NumberConstraint.php index e8382723..d5066f46 100644 --- a/src/DataTables/Filters/Constraints/NumberConstraint.php +++ b/src/DataTables/Filters/Constraints/NumberConstraint.php @@ -20,7 +20,6 @@ namespace App\DataTables\Filters\Constraints; -use Doctrine\DBAL\ParameterType; use Doctrine\ORM\QueryBuilder; use RuntimeException; @@ -42,7 +41,7 @@ class NumberConstraint extends AbstractConstraint protected $value2; /** - * @var string The operator to use + * @var string|null The operator to use */ protected ?string $operator; diff --git a/src/DataTables/Filters/Constraints/Part/ParameterConstraint.php b/src/DataTables/Filters/Constraints/Part/ParameterConstraint.php index 76e39cdf..ed29653b 100644 --- a/src/DataTables/Filters/Constraints/Part/ParameterConstraint.php +++ b/src/DataTables/Filters/Constraints/Part/ParameterConstraint.php @@ -24,7 +24,6 @@ use App\DataTables\Filters\Constraints\AbstractConstraint; use App\DataTables\Filters\Constraints\TextConstraint; use App\Entity\Parameters\PartParameter; use Doctrine\ORM\QueryBuilder; -use Svg\Tag\Text; class ParameterConstraint extends AbstractConstraint { diff --git a/src/DataTables/Filters/Constraints/TextConstraint.php b/src/DataTables/Filters/Constraints/TextConstraint.php index 3cd53973..2b4ecea4 100644 --- a/src/DataTables/Filters/Constraints/TextConstraint.php +++ b/src/DataTables/Filters/Constraints/TextConstraint.php @@ -101,7 +101,7 @@ class TextConstraint extends AbstractConstraint return; } - //The CONTAINS, LIKE, STARTS and ENDS operators use the LIKE operator but we have to build the value string differently + //The CONTAINS, LIKE, STARTS and ENDS operators use the LIKE operator, but we have to build the value string differently $like_value = null; if ($this->operator === 'LIKE') { $like_value = $this->value; diff --git a/src/DataTables/Filters/PartFilter.php b/src/DataTables/Filters/PartFilter.php index 14ab1a9c..2e9bdeae 100644 --- a/src/DataTables/Filters/PartFilter.php +++ b/src/DataTables/Filters/PartFilter.php @@ -38,11 +38,9 @@ use App\Entity\Parts\MeasurementUnit; use App\Entity\Parts\Storelocation; use App\Entity\Parts\Supplier; use App\Entity\UserSystem\User; -use App\Form\Filters\Constraints\UserEntityConstraintType; use App\Services\Trees\NodesListBuilder; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ORM\QueryBuilder; -use Svg\Tag\Text; class PartFilter implements FilterInterface { @@ -148,9 +146,9 @@ class PartFilter implements FilterInterface /** - * @return BooleanConstraint|false + * @return BooleanConstraint */ - public function getFavorite() + public function getFavorite(): BooleanConstraint { return $this->favorite; } diff --git a/src/DataTables/Filters/PartSearchFilter.php b/src/DataTables/Filters/PartSearchFilter.php index b3f1cafd..ff19b53e 100644 --- a/src/DataTables/Filters/PartSearchFilter.php +++ b/src/DataTables/Filters/PartSearchFilter.php @@ -96,7 +96,7 @@ class PartSearchFilter implements FilterInterface $fields_to_search[] = 'orderdetails.supplierpartnr'; } if($this->mpn) { - $fields_to_search[] = 'part.manufacturer_product_url'; + $fields_to_search[] = 'part.manufacturer_product_number'; } if($this->supplier) { $fields_to_search[] = 'suppliers.name'; diff --git a/src/DataTables/LogDataTable.php b/src/DataTables/LogDataTable.php index 554861b5..b94d3c57 100644 --- a/src/DataTables/LogDataTable.php +++ b/src/DataTables/LogDataTable.php @@ -28,7 +28,6 @@ use App\DataTables\Column\LogEntryExtraColumn; use App\DataTables\Column\LogEntryTargetColumn; use App\DataTables\Column\RevertLogColumn; use App\DataTables\Column\RowClassColumn; -use App\DataTables\Filters\AttachmentFilter; use App\DataTables\Filters\LogFilter; use App\Entity\Base\AbstractDBElement; use App\Entity\Contracts\TimeTravelInterface; @@ -60,8 +59,6 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Component\Security\Core\Security; use Symfony\Contracts\Translation\TranslatorInterface; -use function Symfony\Component\Translation\t; - class LogDataTable implements DataTableTypeInterface { protected ElementTypeNameGenerator $elementTypeNameGenerator; diff --git a/src/DataTables/PartsDataTable.php b/src/DataTables/PartsDataTable.php index 011c4a8e..8dc94ba0 100644 --- a/src/DataTables/PartsDataTable.php +++ b/src/DataTables/PartsDataTable.php @@ -36,22 +36,14 @@ use App\DataTables\Column\TagsColumn; use App\DataTables\Filters\PartFilter; use App\DataTables\Filters\PartSearchFilter; use App\DataTables\Helpers\PartDataTableHelper; -use App\Entity\Parts\Category; -use App\Entity\Parts\Footprint; -use App\Entity\Parts\Manufacturer; use App\Entity\Parts\Part; use App\Entity\Parts\PartLot; -use App\Entity\Parts\Storelocation; -use App\Entity\Parts\Supplier; use App\Services\Formatters\AmountFormatter; use App\Services\Attachments\AttachmentURLGenerator; -use App\Services\Attachments\PartPreviewGenerator; use App\Services\EntityURLGenerator; use App\Services\Trees\NodesListBuilder; use Doctrine\ORM\QueryBuilder; -use Omines\DataTablesBundle\Adapter\Doctrine\FetchJoinORMAdapter; use Omines\DataTablesBundle\Adapter\Doctrine\ORM\SearchCriteriaProvider; -use Omines\DataTablesBundle\Column\BoolColumn; use Omines\DataTablesBundle\Column\MapColumn; use Omines\DataTablesBundle\Column\TextColumn; use Omines\DataTablesBundle\DataTable; @@ -63,27 +55,19 @@ use Symfony\Contracts\Translation\TranslatorInterface; final class PartsDataTable implements DataTableTypeInterface { private TranslatorInterface $translator; - private NodesListBuilder $treeBuilder; private AmountFormatter $amountFormatter; - private AttachmentURLGenerator $attachmentURLGenerator; private Security $security; private PartDataTableHelper $partDataTableHelper; - /** - * @var EntityURLGenerator - */ - private $urlGenerator; + private EntityURLGenerator $urlGenerator; public function __construct(EntityURLGenerator $urlGenerator, TranslatorInterface $translator, - NodesListBuilder $treeBuilder, AmountFormatter $amountFormatter,PartDataTableHelper $partDataTableHelper, - AttachmentURLGenerator $attachmentURLGenerator, Security $security) + AmountFormatter $amountFormatter,PartDataTableHelper $partDataTableHelper, Security $security) { $this->urlGenerator = $urlGenerator; $this->translator = $translator; - $this->treeBuilder = $treeBuilder; $this->amountFormatter = $amountFormatter; - $this->attachmentURLGenerator = $attachmentURLGenerator; $this->security = $security; $this->partDataTableHelper = $partDataTableHelper; } @@ -168,6 +152,7 @@ final class PartsDataTable implements DataTableTypeInterface if ($this->security->isGranted('@storelocations.read')) { $dataTable->add('storelocation', TextColumn::class, [ 'label' => $this->translator->trans('part.table.storeLocations'), + 'orderField' => 'storelocations.name', 'render' => function ($value, Part $context) { $tmp = []; foreach ($context->getPartLots() as $lot) { @@ -193,7 +178,22 @@ final class PartsDataTable implements DataTableTypeInterface $amount = $context->getAmountSum(); $expiredAmount = $context->getExpiredAmountSum(); - $ret = htmlspecialchars($this->amountFormatter->format($amount, $context->getPartUnit())); + $ret = ''; + + if ($context->isAmountUnknown()) { + //When all amounts are unknown, we show a question mark + if ($amount === 0.0) { + $ret .= sprintf('?', + $this->translator->trans('part_lots.instock_unknown')); + } else { //Otherwise mark it with greater equal and the (known) amount + $ret .= sprintf('', + $this->translator->trans('part_lots.instock_unknown') + ); + $ret .= htmlspecialchars($this->amountFormatter->format($amount, $context->getPartUnit())); + } + } else { + $ret .= htmlspecialchars($this->amountFormatter->format($amount, $context->getPartUnit())); + } //If we have expired lots, we show them in parentheses behind if ($expiredAmount > 0) { diff --git a/src/Doctrine/Purger/ResetAutoIncrementORMPurger.php b/src/Doctrine/Purger/ResetAutoIncrementORMPurger.php index 811facf6..58a3522a 100644 --- a/src/Doctrine/Purger/ResetAutoIncrementORMPurger.php +++ b/src/Doctrine/Purger/ResetAutoIncrementORMPurger.php @@ -27,7 +27,6 @@ use Doctrine\Common\DataFixtures\Purger\PurgerInterface; use Doctrine\Common\DataFixtures\Sorter\TopologicalSorter; use Doctrine\DBAL\Platforms\AbstractMySQLPlatform; use Doctrine\DBAL\Platforms\AbstractPlatform; -use Doctrine\DBAL\Platforms\MySQLPlatform; use Doctrine\DBAL\Schema\Identifier; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\Mapping\ClassMetadata; @@ -35,7 +34,6 @@ use Doctrine\ORM\Mapping\ClassMetadata; use Doctrine\ORM\Mapping\ClassMetadataInfo; use function array_reverse; -use function array_search; use function assert; use function count; use function is_callable; @@ -53,21 +51,21 @@ class ResetAutoIncrementORMPurger implements PurgerInterface, ORMPurgerInterface public const PURGE_MODE_TRUNCATE = 2; /** @var EntityManagerInterface|null */ - private $em; + private ?EntityManagerInterface $em; /** * If the purge should be done through DELETE or TRUNCATE statements * * @var int */ - private $purgeMode = self::PURGE_MODE_DELETE; + private int $purgeMode = self::PURGE_MODE_DELETE; /** * Table/view names to be excluded from purge * * @var string[] */ - private $excluded; + private array $excluded; /** * Construct new purger instance. diff --git a/src/Doctrine/SQLiteRegexExtension.php b/src/Doctrine/SQLiteRegexExtension.php index f1bca465..1cdab603 100644 --- a/src/Doctrine/SQLiteRegexExtension.php +++ b/src/Doctrine/SQLiteRegexExtension.php @@ -49,7 +49,7 @@ class SQLiteRegexExtension implements EventSubscriberInterface } } - public function getSubscribedEvents() + public function getSubscribedEvents(): array { return[ Events::postConnect diff --git a/src/Doctrine/SetSQLMode/SetSQLModeMiddlewareWrapper.php b/src/Doctrine/SetSQLMode/SetSQLModeMiddlewareWrapper.php index 0ff670ba..20632b56 100644 --- a/src/Doctrine/SetSQLMode/SetSQLModeMiddlewareWrapper.php +++ b/src/Doctrine/SetSQLMode/SetSQLModeMiddlewareWrapper.php @@ -24,7 +24,7 @@ use Doctrine\DBAL\Driver; use Doctrine\DBAL\Driver\Middleware; /** - * This class wraps the Doctrine DBAL driver and wraps it into an Midleware driver so we can change the SQL mode + * This class wraps the Doctrine DBAL driver and wraps it into a Midleware driver, so we can change the SQL mode */ class SetSQLModeMiddlewareWrapper implements Middleware { diff --git a/src/Doctrine/Types/TinyIntType.php b/src/Doctrine/Types/TinyIntType.php index 817b87f1..951417db 100644 --- a/src/Doctrine/Types/TinyIntType.php +++ b/src/Doctrine/Types/TinyIntType.php @@ -29,17 +29,17 @@ use Doctrine\DBAL\Types\Type; class TinyIntType extends Type { - public function getSQLDeclaration(array $column, AbstractPlatform $platform) + public function getSQLDeclaration(array $column, AbstractPlatform $platform): string { return 'TINYINT'; } - public function getName() + public function getName(): string { return 'tinyint'; } - public function requiresSQLCommentHint(AbstractPlatform $platform) + public function requiresSQLCommentHint(AbstractPlatform $platform): bool { //We use the comment, so that doctrine migrations can properly detect, that nothing has changed and no migration is needed. return true; diff --git a/src/Entity/Attachments/Attachment.php b/src/Entity/Attachments/Attachment.php index 98565fe9..35c07571 100644 --- a/src/Entity/Attachments/Attachment.php +++ b/src/Entity/Attachments/Attachment.php @@ -59,7 +59,7 @@ abstract class Attachment extends AbstractNamedDBElement /** * A list of file extensions, that browsers can show directly as image. * Based on: https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types - * It will be used to determine if a attachment is a picture and therefore will be shown to user as preview. + * It will be used to determine if an attachment is a picture and therefore will be shown to user as preview. */ public const PICTURE_EXTS = ['apng', 'bmp', 'gif', 'ico', 'cur', 'jpg', 'jpeg', 'jfif', 'pjpeg', 'pjp', 'png', 'svg', 'webp', ]; @@ -70,7 +70,7 @@ abstract class Attachment extends AbstractNamedDBElement public const MODEL_EXTS = ['x3d']; /** - * When the path begins with one of this placeholders. + * When the path begins with one of the placeholders. */ public const INTERNAL_PLACEHOLDER = ['%BASE%', '%MEDIA%', '%SECURE%']; @@ -105,7 +105,7 @@ abstract class Attachment extends AbstractNamedDBElement protected string $name = ''; /** - * ORM mapping is done in sub classes (like PartAttachment). + * ORM mapping is done in subclasses (like PartAttachment). */ protected ?AttachmentContainingDBElement $element = null; @@ -116,7 +116,7 @@ abstract class Attachment extends AbstractNamedDBElement protected bool $show_in_table = false; /** - * @var AttachmentType + * @var AttachmentType|null * @ORM\ManyToOne(targetEntity="AttachmentType", inversedBy="attachments_with_type") * @ORM\JoinColumn(name="type_id", referencedColumnName="id", nullable=false) * @Selectable() @@ -153,7 +153,7 @@ abstract class Attachment extends AbstractNamedDBElement */ public function isPicture(): bool { - //We can not check if a external link is a picture, so just assume this is false + //We can not check if an external link is a picture, so just assume this is false if ($this->isExternal()) { return true; } @@ -215,7 +215,7 @@ abstract class Attachment extends AbstractNamedDBElement * Checks if the attachment file is using a builtin file. (see BUILTIN_PLACEHOLDERS const for possible placeholders) * If a file is built in, the path is shown to user in url field (no sensitive infos are provided). * - * @return bool true if the attachment is using an builtin file + * @return bool true if the attachment is using a builtin file */ public function isBuiltIn(): bool { @@ -259,7 +259,7 @@ abstract class Attachment extends AbstractNamedDBElement } /** - * The URL to the external file, or the path to the built in file. + * The URL to the external file, or the path to the built-in file. * Returns null, if the file is not external (and not builtin). */ public function getURL(): ?string @@ -455,9 +455,9 @@ abstract class Attachment extends AbstractNamedDBElement * @param string $string The string which should be checked * @param bool $path_required If true, the string must contain a path to be valid. (e.g. foo.bar would be invalid, foo.bar/test.php would be valid). * @param bool $only_http Set this to true, if only HTTPS or HTTP schemata should be allowed. - * *Caution: When this is set to false, a attacker could use the file:// schema, to get internal server files, like /etc/passwd.* + * *Caution: When this is set to false, an attacker could use the file:// schema, to get internal server files, like /etc/passwd.* * - * @return bool True if the string is a valid URL. False, if the string is not an URL or invalid. + * @return bool True if the string is a valid URL. False, if the string is not a URL or invalid. */ public static function isValidURL(string $string, bool $path_required = true, bool $only_http = true): bool { diff --git a/src/Entity/Attachments/AttachmentContainingDBElement.php b/src/Entity/Attachments/AttachmentContainingDBElement.php index b550394e..e74d7cb6 100644 --- a/src/Entity/Attachments/AttachmentContainingDBElement.php +++ b/src/Entity/Attachments/AttachmentContainingDBElement.php @@ -46,7 +46,7 @@ abstract class AttachmentContainingDBElement extends AbstractNamedDBElement impl * Mapping is done in sub classes like part * @Groups({"full"}) */ - protected $attachments; + protected Collection $attachments; public function __construct() { diff --git a/src/Entity/Attachments/AttachmentType.php b/src/Entity/Attachments/AttachmentType.php index ad7a0e61..683c7be5 100644 --- a/src/Entity/Attachments/AttachmentType.php +++ b/src/Entity/Attachments/AttachmentType.php @@ -45,13 +45,13 @@ class AttachmentType extends AbstractStructuralDBElement * @ORM\OneToMany(targetEntity="AttachmentType", mappedBy="parent", cascade={"persist"}) * @ORM\OrderBy({"name" = "ASC"}) */ - protected $children; + protected Collection $children; /** * @ORM\ManyToOne(targetEntity="AttachmentType", inversedBy="children") * @ORM\JoinColumn(name="parent_id", referencedColumnName="id") */ - protected $parent; + protected ?AbstractStructuralDBElement $parent; /** * @var string @@ -65,14 +65,14 @@ class AttachmentType extends AbstractStructuralDBElement * @ORM\OrderBy({"name" = "ASC"}) * @Assert\Valid() */ - protected $attachments; + protected Collection $attachments; /** @var Collection * @ORM\OneToMany(targetEntity="App\Entity\Parameters\AttachmentTypeParameter", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true) * @ORM\OrderBy({"group" = "ASC" ,"name" = "ASC"}) * @Assert\Valid() */ - protected $parameters; + protected Collection $parameters; /** * @var Collection @@ -99,7 +99,7 @@ class AttachmentType extends AbstractStructuralDBElement } /** - * Gets an filter, which file types are allowed for attachment files. + * Gets a filter, which file types are allowed for attachment files. * Must be in the format of accept attribute * (See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#Unique_file_type_specifiers). */ diff --git a/src/Entity/Attachments/AttachmentTypeAttachment.php b/src/Entity/Attachments/AttachmentTypeAttachment.php index 2a21405c..8cc3e5d6 100644 --- a/src/Entity/Attachments/AttachmentTypeAttachment.php +++ b/src/Entity/Attachments/AttachmentTypeAttachment.php @@ -35,7 +35,7 @@ class AttachmentTypeAttachment extends Attachment { public const ALLOWED_ELEMENT_CLASS = AttachmentType::class; /** - * @var AttachmentType the element this attachment is associated with + * @var AttachmentContainingDBElement|null the element this attachment is associated with * @ORM\ManyToOne(targetEntity="App\Entity\Attachments\AttachmentType", inversedBy="attachments") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ diff --git a/src/Entity/Attachments/CategoryAttachment.php b/src/Entity/Attachments/CategoryAttachment.php index e4d38137..bfc54af0 100644 --- a/src/Entity/Attachments/CategoryAttachment.php +++ b/src/Entity/Attachments/CategoryAttachment.php @@ -27,7 +27,7 @@ use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; /** - * A attachment attached to a category element. + * An attachment attached to a category element. * * @ORM\Entity() * @UniqueEntity({"name", "attachment_type", "element"}) @@ -36,7 +36,7 @@ class CategoryAttachment extends Attachment { public const ALLOWED_ELEMENT_CLASS = Category::class; /** - * @var Category the element this attachment is associated with + * @var AttachmentContainingDBElement|null the element this attachment is associated with * @ORM\ManyToOne(targetEntity="App\Entity\Parts\Category", inversedBy="attachments") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ diff --git a/src/Entity/Attachments/CurrencyAttachment.php b/src/Entity/Attachments/CurrencyAttachment.php index 73ad1145..ebfef170 100644 --- a/src/Entity/Attachments/CurrencyAttachment.php +++ b/src/Entity/Attachments/CurrencyAttachment.php @@ -36,7 +36,7 @@ class CurrencyAttachment extends Attachment { public const ALLOWED_ELEMENT_CLASS = Currency::class; /** - * @var Currency the element this attachment is associated with + * @var Currency|null the element this attachment is associated with * @ORM\ManyToOne(targetEntity="App\Entity\PriceInformations\Currency", inversedBy="attachments") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ diff --git a/src/Entity/Attachments/FootprintAttachment.php b/src/Entity/Attachments/FootprintAttachment.php index 84ba3fb7..7eb65db1 100644 --- a/src/Entity/Attachments/FootprintAttachment.php +++ b/src/Entity/Attachments/FootprintAttachment.php @@ -27,7 +27,7 @@ use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; /** - * A attachment attached to a footprint element. + * An attachment attached to a footprint element. * * @ORM\Entity() * @UniqueEntity({"name", "attachment_type", "element"}) @@ -36,7 +36,7 @@ class FootprintAttachment extends Attachment { public const ALLOWED_ELEMENT_CLASS = Footprint::class; /** - * @var Footprint the element this attachment is associated with + * @var Footprint|null the element this attachment is associated with * @ORM\ManyToOne(targetEntity="App\Entity\Parts\Footprint", inversedBy="attachments") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ diff --git a/src/Entity/Attachments/GroupAttachment.php b/src/Entity/Attachments/GroupAttachment.php index e64c5745..b6ab93f4 100644 --- a/src/Entity/Attachments/GroupAttachment.php +++ b/src/Entity/Attachments/GroupAttachment.php @@ -27,7 +27,7 @@ use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; /** - * A attachment attached to a Group element. + * An attachment attached to a Group element. * * @ORM\Entity() * @UniqueEntity({"name", "attachment_type", "element"}) @@ -35,8 +35,9 @@ use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; class GroupAttachment extends Attachment { public const ALLOWED_ELEMENT_CLASS = Group::class; + /** - * @var Group the element this attachment is associated with + * @var Group|null the element this attachment is associated with * @ORM\ManyToOne(targetEntity="App\Entity\UserSystem\Group", inversedBy="attachments") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ diff --git a/src/Entity/Attachments/ManufacturerAttachment.php b/src/Entity/Attachments/ManufacturerAttachment.php index 0d113977..25451b7c 100644 --- a/src/Entity/Attachments/ManufacturerAttachment.php +++ b/src/Entity/Attachments/ManufacturerAttachment.php @@ -27,7 +27,7 @@ use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; /** - * A attachment attached to a manufacturer element. + * An attachment attached to a manufacturer element. * * @ORM\Entity() * @UniqueEntity({"name", "attachment_type", "element"}) @@ -35,8 +35,9 @@ use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; class ManufacturerAttachment extends Attachment { public const ALLOWED_ELEMENT_CLASS = Manufacturer::class; + /** - * @var Manufacturer the element this attachment is associated with + * @var Manufacturer|null the element this attachment is associated with * @ORM\ManyToOne(targetEntity="App\Entity\Parts\Manufacturer", inversedBy="attachments") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ diff --git a/src/Entity/Attachments/MeasurementUnitAttachment.php b/src/Entity/Attachments/MeasurementUnitAttachment.php index 0c24f649..8a007101 100644 --- a/src/Entity/Attachments/MeasurementUnitAttachment.php +++ b/src/Entity/Attachments/MeasurementUnitAttachment.php @@ -28,7 +28,7 @@ use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; /** - * A attachment attached to a measurement unit element. + * An attachment attached to a measurement unit element. * * @ORM\Entity() * @UniqueEntity({"name", "attachment_type", "element"}) @@ -37,7 +37,7 @@ class MeasurementUnitAttachment extends Attachment { public const ALLOWED_ELEMENT_CLASS = MeasurementUnit::class; /** - * @var Manufacturer the element this attachment is associated with + * @var Manufacturer|null the element this attachment is associated with * @ORM\ManyToOne(targetEntity="App\Entity\Parts\MeasurementUnit", inversedBy="attachments") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ diff --git a/src/Entity/Attachments/ProjectAttachment.php b/src/Entity/Attachments/ProjectAttachment.php index 1fab6bc8..3f2d36d9 100644 --- a/src/Entity/Attachments/ProjectAttachment.php +++ b/src/Entity/Attachments/ProjectAttachment.php @@ -36,7 +36,7 @@ class ProjectAttachment extends Attachment { public const ALLOWED_ELEMENT_CLASS = Project::class; /** - * @var Project the element this attachment is associated with + * @var Project|null the element this attachment is associated with * @ORM\ManyToOne(targetEntity="App\Entity\ProjectSystem\Project", inversedBy="attachments") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ diff --git a/src/Entity/Attachments/StorelocationAttachment.php b/src/Entity/Attachments/StorelocationAttachment.php index e2b9025a..71e5672e 100644 --- a/src/Entity/Attachments/StorelocationAttachment.php +++ b/src/Entity/Attachments/StorelocationAttachment.php @@ -27,7 +27,7 @@ use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; /** - * A attachment attached to a measurement unit element. + * An attachment attached to a measurement unit element. * * @ORM\Entity() * @UniqueEntity({"name", "attachment_type", "element"}) @@ -35,8 +35,9 @@ use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; class StorelocationAttachment extends Attachment { public const ALLOWED_ELEMENT_CLASS = Storelocation::class; + /** - * @var Storelocation the element this attachment is associated with + * @var Storelocation|null the element this attachment is associated with * @ORM\ManyToOne(targetEntity="App\Entity\Parts\Storelocation", inversedBy="attachments") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ diff --git a/src/Entity/Attachments/SupplierAttachment.php b/src/Entity/Attachments/SupplierAttachment.php index 59893b74..a6058ccc 100644 --- a/src/Entity/Attachments/SupplierAttachment.php +++ b/src/Entity/Attachments/SupplierAttachment.php @@ -35,8 +35,9 @@ use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; class SupplierAttachment extends Attachment { public const ALLOWED_ELEMENT_CLASS = Supplier::class; + /** - * @var Supplier the element this attachment is associated with + * @var Supplier|null the element this attachment is associated with * @ORM\ManyToOne(targetEntity="App\Entity\Parts\Supplier", inversedBy="attachments") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ diff --git a/src/Entity/Attachments/UserAttachment.php b/src/Entity/Attachments/UserAttachment.php index 84a04c17..65cd8730 100644 --- a/src/Entity/Attachments/UserAttachment.php +++ b/src/Entity/Attachments/UserAttachment.php @@ -27,7 +27,7 @@ use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; /** - * A attachment attached to a user element. + * An attachment attached to a user element. * * @ORM\Entity() * @UniqueEntity({"name", "attachment_type", "element"}) @@ -35,8 +35,9 @@ use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; class UserAttachment extends Attachment { public const ALLOWED_ELEMENT_CLASS = User::class; + /** - * @var User the element this attachment is associated with + * @var User|null the element this attachment is associated with * @ORM\ManyToOne(targetEntity="App\Entity\UserSystem\User", inversedBy="attachments") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ diff --git a/src/Entity/Base/AbstractPartsContainingDBElement.php b/src/Entity/Base/AbstractPartsContainingDBElement.php index be0b230a..52326907 100644 --- a/src/Entity/Base/AbstractPartsContainingDBElement.php +++ b/src/Entity/Base/AbstractPartsContainingDBElement.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace App\Entity\Base; +use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Serializer\Annotation\Groups; @@ -33,5 +34,5 @@ use Symfony\Component\Serializer\Annotation\Groups; abstract class AbstractPartsContainingDBElement extends AbstractStructuralDBElement { /** @Groups({"full"}) */ - protected $parameters; + protected Collection $parameters; } diff --git a/src/Entity/Base/AbstractStructuralDBElement.php b/src/Entity/Base/AbstractStructuralDBElement.php index 629669e9..1353448d 100644 --- a/src/Entity/Base/AbstractStructuralDBElement.php +++ b/src/Entity/Base/AbstractStructuralDBElement.php @@ -81,22 +81,22 @@ abstract class AbstractStructuralDBElement extends AttachmentContainingDBElement protected int $level = 0; /** - * We can not define the mapping here or we will get an exception. Unfortunately we have to do the mapping in the + * We can not define the mapping here, or we will get an exception. Unfortunately we have to do the mapping in the * subclasses. * * @var AbstractStructuralDBElement[]|Collection * @Groups({"include_children"}) */ - protected $children; + protected Collection $children; /** * @var AbstractStructuralDBElement * @NoneOfItsChildren() * @Groups({"include_parents", "import"}) */ - protected $parent = null; + protected ?AbstractStructuralDBElement $parent = null; - /** @var string[] all names of all parent elements as a array of strings, + /** @var string[] all names of all parent elements as an array of strings, * the last array element is the name of the element itself */ private array $full_path_strings = []; @@ -106,6 +106,7 @@ abstract class AbstractStructuralDBElement extends AttachmentContainingDBElement parent::__construct(); $this->children = new ArrayCollection(); $this->parameters = new ArrayCollection(); + $this->parent = null; } public function __clone() @@ -155,10 +156,8 @@ abstract class AbstractStructuralDBElement extends AttachmentContainingDBElement if ($this->getParent() === $another_element) { return true; } - } else { //If the IDs are defined, we can compare the IDs - if ($this->getParent()->getID() === $another_element->getID()) { - return true; - } + } elseif ($this->getParent()->getID() === $another_element->getID()) { + return true; } //Otherwise, check recursively @@ -168,7 +167,7 @@ abstract class AbstractStructuralDBElement extends AttachmentContainingDBElement /** * Checks if this element is an root element (has no parent). * - * @return bool true if the this element is an root element + * @return bool true if this element is a root element */ public function isRoot(): bool { diff --git a/src/Entity/Base/MasterAttachmentTrait.php b/src/Entity/Base/MasterAttachmentTrait.php index f9dd26aa..b6c5657f 100644 --- a/src/Entity/Base/MasterAttachmentTrait.php +++ b/src/Entity/Base/MasterAttachmentTrait.php @@ -27,12 +27,12 @@ use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; /** - * A entity with this class has a master attachment, which is used as a preview image for this object. + * An entity with this class has a master attachment, which is used as a preview image for this object. */ trait MasterAttachmentTrait { /** - * @var Attachment + * @var Attachment|null * @ORM\ManyToOne(targetEntity="App\Entity\Attachments\Attachment") * @ORM\JoinColumn(name="id_preview_attachment", referencedColumnName="id", onDelete="SET NULL", nullable=true) * @Assert\Expression("value == null or value.isPicture()", message="part.master_attachment.must_be_picture") diff --git a/src/Entity/Contracts/TimeTravelInterface.php b/src/Entity/Contracts/TimeTravelInterface.php index 6324d75f..22841cc8 100644 --- a/src/Entity/Contracts/TimeTravelInterface.php +++ b/src/Entity/Contracts/TimeTravelInterface.php @@ -27,9 +27,9 @@ use DateTime; interface TimeTravelInterface { /** - * Checks if this entry has informations which data has changed. + * Checks if this entry has information which data has changed. * - * @return bool true if this entry has informations about the changed data + * @return bool true if this entry has information about the changed data */ public function hasOldDataInformations(): bool; @@ -39,7 +39,7 @@ interface TimeTravelInterface public function getOldData(): array; /** - * Returns the the timestamp associated with this change. + * Returns the timestamp associated with this change. */ public function getTimestamp(): DateTime; } diff --git a/src/Entity/LabelSystem/LabelProfile.php b/src/Entity/LabelSystem/LabelProfile.php index 46c478ee..12f6d659 100644 --- a/src/Entity/LabelSystem/LabelProfile.php +++ b/src/Entity/LabelSystem/LabelProfile.php @@ -61,7 +61,7 @@ class LabelProfile extends AttachmentContainingDBElement * @ORM\OneToMany(targetEntity="App\Entity\Attachments\LabelAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true) * @ORM\OrderBy({"name" = "ASC"}) */ - protected $attachments; + protected Collection $attachments; /** * @var LabelOptions diff --git a/src/Entity/LogSystem/AbstractLogEntry.php b/src/Entity/LogSystem/AbstractLogEntry.php index 13906da3..703049e8 100644 --- a/src/Entity/LogSystem/AbstractLogEntry.php +++ b/src/Entity/LogSystem/AbstractLogEntry.php @@ -48,7 +48,7 @@ use InvalidArgumentException; use Psr\Log\LogLevel; /** - * This entity describes a entry in the event log. + * This entity describes an entry in the event log. * * @ORM\Entity(repositoryClass="App\Repository\LogEntryRepository") * @ORM\Table("log", indexes={ @@ -142,7 +142,7 @@ abstract class AbstractLogEntry extends AbstractDBElement self::TARGET_TYPE_LABEL_PROFILE => LabelProfile::class, ]; - /** @var User The user which has caused this log entry + /** @var User|null The user which has caused this log entry * @ORM\ManyToOne(targetEntity="App\Entity\UserSystem\User", fetch="EAGER") * @ORM\JoinColumn(name="id_user", nullable=true, onDelete="SET NULL") */ @@ -183,7 +183,7 @@ abstract class AbstractLogEntry extends AbstractDBElement /** @var array The extra data in raw (short form) saved in the DB * @ORM\Column(name="extra", type="json") */ - protected $extra = []; + protected array $extra = []; public function __construct() { @@ -340,7 +340,7 @@ abstract class AbstractLogEntry extends AbstractDBElement /** * Returns the class name of the target element associated with this log entry. - * Returns null, if this log entry is not associated with an log entry. + * Returns null, if this log entry is not associated with a log entry. * * @return string|null the class name of the target class */ @@ -355,7 +355,7 @@ abstract class AbstractLogEntry extends AbstractDBElement /** * Returns the ID of the target element associated with this log entry. - * Returns null, if this log entry is not associated with an log entry. + * Returns null, if this log entry is not associated with a log entry. * * @return int|null the ID of the associated element */ @@ -451,7 +451,7 @@ abstract class AbstractLogEntry extends AbstractDBElement } /** - * Converts an target type id to an full qualified class name. + * Converts a target type id to a full qualified class name. * * @param int $type_id The target type ID */ diff --git a/src/Entity/LogSystem/CollectionElementDeleted.php b/src/Entity/LogSystem/CollectionElementDeleted.php index 5b12119a..9e646cca 100644 --- a/src/Entity/LogSystem/CollectionElementDeleted.php +++ b/src/Entity/LogSystem/CollectionElementDeleted.php @@ -81,13 +81,12 @@ use App\Entity\Parts\Supplier; use App\Entity\PriceInformations\Currency; use App\Entity\UserSystem\Group; use App\Entity\UserSystem\User; -use App\Repository\Parts\ManufacturerRepository; use Doctrine\ORM\Mapping as ORM; use InvalidArgumentException; /** * @ORM\Entity() - * This log entry is created when an element is deleted, that is used in a collection of an other entity. + * This log entry is created when an element is deleted, that is used in a collection of another entity. * This is needed to signal time travel, that it has to undelete the deleted entity. */ class CollectionElementDeleted extends AbstractLogEntry implements LogWithEventUndoInterface diff --git a/src/Entity/LogSystem/DatabaseUpdatedLogEntry.php b/src/Entity/LogSystem/DatabaseUpdatedLogEntry.php index 9c600365..0f85ba11 100644 --- a/src/Entity/LogSystem/DatabaseUpdatedLogEntry.php +++ b/src/Entity/LogSystem/DatabaseUpdatedLogEntry.php @@ -43,7 +43,7 @@ class DatabaseUpdatedLogEntry extends AbstractLogEntry */ public function isSuccessful(): bool { - //We dont save unsuccessful updates now, so just assume it to save space. + //We don't save unsuccessful updates now, so just assume it to save space. return $this->extra['s'] ?? true; } diff --git a/src/Entity/LogSystem/LegacyInstockChangedLogEntry.php b/src/Entity/LogSystem/LegacyInstockChangedLogEntry.php index 35d58592..9af3dd69 100644 --- a/src/Entity/LogSystem/LegacyInstockChangedLogEntry.php +++ b/src/Entity/LogSystem/LegacyInstockChangedLogEntry.php @@ -56,7 +56,7 @@ class LegacyInstockChangedLogEntry extends AbstractLogEntry } /** - * Returns the price that has to be payed for the change (in the base currency). + * Returns the price that has to be paid for the change (in the base currency). * * @param bool $absolute Set this to true, if you want only get the absolute value of the price (without minus) */ @@ -92,9 +92,9 @@ class LegacyInstockChangedLogEntry extends AbstractLogEntry } /** - * Checks if the Change was an withdrawal of parts. + * Checks if the Change was a withdrawal of parts. * - * @return bool true if the change was an withdrawal, false if not + * @return bool true if the change was a withdrawal, false if not */ public function isWithdrawal(): bool { diff --git a/src/Entity/LogSystem/SecurityEventLogEntry.php b/src/Entity/LogSystem/SecurityEventLogEntry.php index 7d497e55..2113beb9 100644 --- a/src/Entity/LogSystem/SecurityEventLogEntry.php +++ b/src/Entity/LogSystem/SecurityEventLogEntry.php @@ -117,7 +117,7 @@ class SecurityEventLogEntry extends AbstractLogEntry } /** - * Return the (anonymized) IP address used to login the user. + * Return the (anonymized) IP address used to log in the user. */ public function getIPAddress(): string { @@ -125,9 +125,9 @@ class SecurityEventLogEntry extends AbstractLogEntry } /** - * Sets the IP address used to login the user. + * Sets the IP address used to log in the user. * - * @param string $ip the IP address used to login the user + * @param string $ip the IP address used to log in the user * @param bool $anonymize Anonymize the IP address (remove last block) to be GPDR compliant * * @return $this diff --git a/src/Entity/LogSystem/UserLoginLogEntry.php b/src/Entity/LogSystem/UserLoginLogEntry.php index 5d1733ac..d1acaa6e 100644 --- a/src/Entity/LogSystem/UserLoginLogEntry.php +++ b/src/Entity/LogSystem/UserLoginLogEntry.php @@ -42,7 +42,7 @@ class UserLoginLogEntry extends AbstractLogEntry } /** - * Return the (anonymized) IP address used to login the user. + * Return the (anonymized) IP address used to log in the user. */ public function getIPAddress(): string { @@ -50,9 +50,9 @@ class UserLoginLogEntry extends AbstractLogEntry } /** - * Sets the IP address used to login the user. + * Sets the IP address used to log in the user. * - * @param string $ip the IP address used to login the user + * @param string $ip the IP address used to log in the user * @param bool $anonymize Anonymize the IP address (remove last block) to be GPDR compliant * * @return $this diff --git a/src/Entity/LogSystem/UserLogoutLogEntry.php b/src/Entity/LogSystem/UserLogoutLogEntry.php index d3abb931..43a98fb6 100644 --- a/src/Entity/LogSystem/UserLogoutLogEntry.php +++ b/src/Entity/LogSystem/UserLogoutLogEntry.php @@ -40,7 +40,7 @@ class UserLogoutLogEntry extends AbstractLogEntry } /** - * Return the (anonymized) IP address used to login the user. + * Return the (anonymized) IP address used to log in the user. */ public function getIPAddress(): string { @@ -48,9 +48,9 @@ class UserLogoutLogEntry extends AbstractLogEntry } /** - * Sets the IP address used to login the user. + * Sets the IP address used to log in the user. * - * @param string $ip the IP address used to login the user + * @param string $ip the IP address used to log in the user * @param bool $anonymize Anonymize the IP address (remove last block) to be GPDR compliant * * @return $this diff --git a/src/Entity/Parameters/AbstractParameter.php b/src/Entity/Parameters/AbstractParameter.php index 01aca08a..9281970c 100644 --- a/src/Entity/Parameters/AbstractParameter.php +++ b/src/Entity/Parameters/AbstractParameter.php @@ -139,11 +139,11 @@ abstract class AbstractParameter extends AbstractNamedDBElement protected string $group = ''; /** - * Mapping is done in sub classes. + * Mapping is done in subclasses. * * @var AbstractDBElement|null the element to which this parameter belongs to */ - protected $element; + protected ?AbstractDBElement $element = null; public function __construct() { diff --git a/src/Entity/Parameters/AttachmentTypeParameter.php b/src/Entity/Parameters/AttachmentTypeParameter.php index aa39a9a6..8a161883 100644 --- a/src/Entity/Parameters/AttachmentTypeParameter.php +++ b/src/Entity/Parameters/AttachmentTypeParameter.php @@ -42,6 +42,7 @@ declare(strict_types=1); namespace App\Entity\Parameters; use App\Entity\Attachments\AttachmentType; +use App\Entity\Base\AbstractDBElement; use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; @@ -57,5 +58,5 @@ class AttachmentTypeParameter extends AbstractParameter * @ORM\ManyToOne(targetEntity="App\Entity\Attachments\AttachmentType", inversedBy="parameters") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ - protected $element; + protected ?AbstractDBElement $element = null; } diff --git a/src/Entity/Parameters/CategoryParameter.php b/src/Entity/Parameters/CategoryParameter.php index f2ce3807..cce90a86 100644 --- a/src/Entity/Parameters/CategoryParameter.php +++ b/src/Entity/Parameters/CategoryParameter.php @@ -41,6 +41,7 @@ declare(strict_types=1); namespace App\Entity\Parameters; +use App\Entity\Base\AbstractDBElement; use App\Entity\Parts\Category; use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; @@ -57,5 +58,5 @@ class CategoryParameter extends AbstractParameter * @ORM\ManyToOne(targetEntity="App\Entity\Parts\Category", inversedBy="parameters") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ - protected $element; + protected ?AbstractDBElement $element = null; } diff --git a/src/Entity/Parameters/CurrencyParameter.php b/src/Entity/Parameters/CurrencyParameter.php index c5fa1e2a..cb5fad26 100644 --- a/src/Entity/Parameters/CurrencyParameter.php +++ b/src/Entity/Parameters/CurrencyParameter.php @@ -41,12 +41,13 @@ declare(strict_types=1); namespace App\Entity\Parameters; +use App\Entity\Base\AbstractDBElement; use App\Entity\PriceInformations\Currency; use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; /** - * A attachment attached to a category element. + * An attachment attached to a category element. * * @ORM\Entity(repositoryClass="App\Repository\ParameterRepository") * @UniqueEntity(fields={"name", "group", "element"}) @@ -60,5 +61,5 @@ class CurrencyParameter extends AbstractParameter * @ORM\ManyToOne(targetEntity="App\Entity\PriceInformations\Currency", inversedBy="parameters") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ - protected $element; + protected ?AbstractDBElement $element = null; } diff --git a/src/Entity/Parameters/FootprintParameter.php b/src/Entity/Parameters/FootprintParameter.php index 9c682720..cb1dd185 100644 --- a/src/Entity/Parameters/FootprintParameter.php +++ b/src/Entity/Parameters/FootprintParameter.php @@ -41,6 +41,7 @@ declare(strict_types=1); namespace App\Entity\Parameters; +use App\Entity\Base\AbstractDBElement; use App\Entity\Parts\Footprint; use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; @@ -58,5 +59,5 @@ class FootprintParameter extends AbstractParameter * @ORM\ManyToOne(targetEntity="App\Entity\Parts\Footprint", inversedBy="parameters") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ - protected $element; + protected ?AbstractDBElement $element = null; } diff --git a/src/Entity/Parameters/GroupParameter.php b/src/Entity/Parameters/GroupParameter.php index aa15edb8..81a0d39c 100644 --- a/src/Entity/Parameters/GroupParameter.php +++ b/src/Entity/Parameters/GroupParameter.php @@ -41,6 +41,7 @@ declare(strict_types=1); namespace App\Entity\Parameters; +use App\Entity\Base\AbstractDBElement; use App\Entity\UserSystem\Group; use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; @@ -58,5 +59,5 @@ class GroupParameter extends AbstractParameter * @ORM\ManyToOne(targetEntity="App\Entity\UserSystem\Group", inversedBy="parameters") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ - protected $element; + protected ?AbstractDBElement $element = null; } diff --git a/src/Entity/Parameters/ManufacturerParameter.php b/src/Entity/Parameters/ManufacturerParameter.php index 1f01ce4d..56d785f2 100644 --- a/src/Entity/Parameters/ManufacturerParameter.php +++ b/src/Entity/Parameters/ManufacturerParameter.php @@ -41,6 +41,7 @@ declare(strict_types=1); namespace App\Entity\Parameters; +use App\Entity\Base\AbstractDBElement; use App\Entity\Parts\Manufacturer; use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; @@ -58,5 +59,5 @@ class ManufacturerParameter extends AbstractParameter * @ORM\ManyToOne(targetEntity="App\Entity\Parts\Manufacturer", inversedBy="parameters") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ - protected $element; + protected ?AbstractDBElement $element = null; } diff --git a/src/Entity/Parameters/MeasurementUnitParameter.php b/src/Entity/Parameters/MeasurementUnitParameter.php index 7ca4b1c5..e4980431 100644 --- a/src/Entity/Parameters/MeasurementUnitParameter.php +++ b/src/Entity/Parameters/MeasurementUnitParameter.php @@ -41,6 +41,7 @@ declare(strict_types=1); namespace App\Entity\Parameters; +use App\Entity\Base\AbstractDBElement; use App\Entity\Parts\MeasurementUnit; use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; @@ -58,5 +59,5 @@ class MeasurementUnitParameter extends AbstractParameter * @ORM\ManyToOne(targetEntity="App\Entity\Parts\MeasurementUnit", inversedBy="parameters") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ - protected $element; + protected ?AbstractDBElement $element = null; } diff --git a/src/Entity/Parameters/ParametersTrait.php b/src/Entity/Parameters/ParametersTrait.php index c7ccbddf..f8ac8e78 100644 --- a/src/Entity/Parameters/ParametersTrait.php +++ b/src/Entity/Parameters/ParametersTrait.php @@ -52,7 +52,7 @@ trait ParametersTrait * @var Collection * @Assert\Valid() */ - protected $parameters; + protected Collection $parameters; /** * Return all associated specifications. diff --git a/src/Entity/Parameters/PartParameter.php b/src/Entity/Parameters/PartParameter.php index 45c566d9..a3845e55 100644 --- a/src/Entity/Parameters/PartParameter.php +++ b/src/Entity/Parameters/PartParameter.php @@ -41,6 +41,7 @@ declare(strict_types=1); namespace App\Entity\Parameters; +use App\Entity\Base\AbstractDBElement; use App\Entity\Parts\Part; use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; @@ -58,5 +59,5 @@ class PartParameter extends AbstractParameter * @ORM\ManyToOne(targetEntity="App\Entity\Parts\Part", inversedBy="parameters") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ - protected $element; + protected ?AbstractDBElement $element = null; } diff --git a/src/Entity/Parameters/ProjectParameter.php b/src/Entity/Parameters/ProjectParameter.php index 2961a843..d4f8cd1a 100644 --- a/src/Entity/Parameters/ProjectParameter.php +++ b/src/Entity/Parameters/ProjectParameter.php @@ -41,6 +41,7 @@ declare(strict_types=1); namespace App\Entity\Parameters; +use App\Entity\Base\AbstractDBElement; use App\Entity\ProjectSystem\Project; use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; @@ -58,5 +59,5 @@ class ProjectParameter extends AbstractParameter * @ORM\ManyToOne(targetEntity="App\Entity\ProjectSystem\Project", inversedBy="parameters") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ - protected $element; + protected ?AbstractDBElement $element = null; } diff --git a/src/Entity/Parameters/StorelocationParameter.php b/src/Entity/Parameters/StorelocationParameter.php index 2a7aa202..6c7d430b 100644 --- a/src/Entity/Parameters/StorelocationParameter.php +++ b/src/Entity/Parameters/StorelocationParameter.php @@ -41,6 +41,7 @@ declare(strict_types=1); namespace App\Entity\Parameters; +use App\Entity\Base\AbstractDBElement; use App\Entity\Parts\Storelocation; use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; @@ -58,5 +59,5 @@ class StorelocationParameter extends AbstractParameter * @ORM\ManyToOne(targetEntity="App\Entity\Parts\Storelocation", inversedBy="parameters") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ - protected $element; + protected ?AbstractDBElement $element = null; } diff --git a/src/Entity/Parameters/SupplierParameter.php b/src/Entity/Parameters/SupplierParameter.php index a40e3e92..6acac705 100644 --- a/src/Entity/Parameters/SupplierParameter.php +++ b/src/Entity/Parameters/SupplierParameter.php @@ -41,6 +41,7 @@ declare(strict_types=1); namespace App\Entity\Parameters; +use App\Entity\Base\AbstractDBElement; use App\Entity\Parts\Supplier; use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; @@ -58,5 +59,5 @@ class SupplierParameter extends AbstractParameter * @ORM\ManyToOne(targetEntity="App\Entity\Parts\Supplier", inversedBy="parameters") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ - protected $element; + protected ?AbstractDBElement $element = null; } diff --git a/src/Entity/Parts/Category.php b/src/Entity/Parts/Category.php index 8bcf32d2..8a79d871 100644 --- a/src/Entity/Parts/Category.php +++ b/src/Entity/Parts/Category.php @@ -24,6 +24,7 @@ namespace App\Entity\Parts; use App\Entity\Attachments\CategoryAttachment; use App\Entity\Base\AbstractPartsContainingDBElement; +use App\Entity\Base\AbstractStructuralDBElement; use App\Entity\Parameters\CategoryParameter; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; @@ -46,13 +47,13 @@ class Category extends AbstractPartsContainingDBElement * @ORM\OrderBy({"name" = "ASC"}) * @var Collection */ - protected $children; + protected Collection $children; /** * @ORM\ManyToOne(targetEntity="Category", inversedBy="children") * @ORM\JoinColumn(name="parent_id", referencedColumnName="id") */ - protected $parent; + protected ?AbstractStructuralDBElement $parent = null; /** * @var string @@ -109,6 +110,7 @@ class Category extends AbstractPartsContainingDBElement * @Groups({"full", "import"}) */ protected string $default_comment = ''; + /** * @var Collection * @ORM\OneToMany(targetEntity="App\Entity\Attachments\CategoryAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true) @@ -116,7 +118,7 @@ class Category extends AbstractPartsContainingDBElement * @Assert\Valid() * @Groups({"full"}) */ - protected $attachments; + protected Collection $attachments; /** @var Collection * @ORM\OneToMany(targetEntity="App\Entity\Parameters\CategoryParameter", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true) @@ -124,7 +126,7 @@ class Category extends AbstractPartsContainingDBElement * @Assert\Valid() * @Groups({"full"}) */ - protected $parameters; + protected Collection $parameters; public function getPartnameHint(): string { diff --git a/src/Entity/Parts/Footprint.php b/src/Entity/Parts/Footprint.php index cac63fe2..09a4f4d0 100644 --- a/src/Entity/Parts/Footprint.php +++ b/src/Entity/Parts/Footprint.php @@ -44,14 +44,14 @@ class Footprint extends AbstractPartsContainingDBElement * @ORM\ManyToOne(targetEntity="Footprint", inversedBy="children") * @ORM\JoinColumn(name="parent_id", referencedColumnName="id") */ - protected $parent; + protected ?\App\Entity\Base\AbstractStructuralDBElement $parent; /** * @ORM\OneToMany(targetEntity="Footprint", mappedBy="parent") * @ORM\OrderBy({"name" = "ASC"}) * @var Collection */ - protected $children; + protected Collection $children; /** * @var Collection @@ -59,7 +59,7 @@ class Footprint extends AbstractPartsContainingDBElement * @ORM\OrderBy({"name" = "ASC"}) * @Assert\Valid() */ - protected $attachments; + protected Collection $attachments; /** * @var FootprintAttachment|null @@ -73,7 +73,7 @@ class Footprint extends AbstractPartsContainingDBElement * @ORM\OrderBy({"group" = "ASC" ,"name" = "ASC"}) * @Assert\Valid() */ - protected $parameters; + protected Collection $parameters; /**************************************** * Getters diff --git a/src/Entity/Parts/Manufacturer.php b/src/Entity/Parts/Manufacturer.php index 45e4d140..74d0e308 100644 --- a/src/Entity/Parts/Manufacturer.php +++ b/src/Entity/Parts/Manufacturer.php @@ -44,14 +44,14 @@ class Manufacturer extends AbstractCompany * @ORM\ManyToOne(targetEntity="Manufacturer", inversedBy="children") * @ORM\JoinColumn(name="parent_id", referencedColumnName="id") */ - protected $parent; + protected ?\App\Entity\Base\AbstractStructuralDBElement $parent; /** * @ORM\OneToMany(targetEntity="Manufacturer", mappedBy="parent") * @ORM\OrderBy({"name" = "ASC"}) * @var Collection */ - protected $children; + protected Collection $children; /** * @var Collection @@ -59,12 +59,12 @@ class Manufacturer extends AbstractCompany * @ORM\OrderBy({"name" = "ASC"}) * @Assert\Valid() */ - protected $attachments; + protected Collection $attachments; /** @var Collection * @ORM\OneToMany(targetEntity="App\Entity\Parameters\ManufacturerParameter", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true) * @ORM\OrderBy({"group" = "ASC" ,"name" = "ASC"}) * @Assert\Valid() */ - protected $parameters; + protected Collection $parameters; } diff --git a/src/Entity/Parts/MeasurementUnit.php b/src/Entity/Parts/MeasurementUnit.php index 5ff9cef4..b33d47fc 100644 --- a/src/Entity/Parts/MeasurementUnit.php +++ b/src/Entity/Parts/MeasurementUnit.php @@ -75,13 +75,13 @@ class MeasurementUnit extends AbstractPartsContainingDBElement * @ORM\OrderBy({"name" = "ASC"}) * @var Collection */ - protected $children; + protected Collection $children; /** * @ORM\ManyToOne(targetEntity="MeasurementUnit", inversedBy="children") * @ORM\JoinColumn(name="parent_id", referencedColumnName="id") */ - protected $parent; + protected ?\App\Entity\Base\AbstractStructuralDBElement $parent; /** * @var Collection @@ -89,14 +89,14 @@ class MeasurementUnit extends AbstractPartsContainingDBElement * @ORM\OrderBy({"name" = "ASC"}) * @Assert\Valid() */ - protected $attachments; + protected Collection $attachments; /** @var Collection * @ORM\OneToMany(targetEntity="App\Entity\Parameters\MeasurementUnitParameter", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true) * @ORM\OrderBy({"group" = "ASC" ,"name" = "ASC"}) * @Assert\Valid() */ - protected $parameters; + protected Collection $parameters; /** * @return string diff --git a/src/Entity/Parts/Part.php b/src/Entity/Parts/Part.php index c345302c..d9b7e601 100644 --- a/src/Entity/Parts/Part.php +++ b/src/Entity/Parts/Part.php @@ -26,7 +26,6 @@ use App\Entity\Attachments\Attachment; use App\Entity\Attachments\AttachmentContainingDBElement; use App\Entity\Attachments\PartAttachment; use App\Entity\Parts\PartTraits\ProjectTrait; -use App\Entity\ProjectSystem\Project; use App\Entity\Parameters\ParametersTrait; use App\Entity\Parameters\PartParameter; use App\Entity\Parts\PartTraits\AdvancedPropertyTrait; @@ -34,7 +33,6 @@ use App\Entity\Parts\PartTraits\BasicPropertyTrait; use App\Entity\Parts\PartTraits\InstockTrait; use App\Entity\Parts\PartTraits\ManufacturerTrait; use App\Entity\Parts\PartTraits\OrderTrait; -use App\Entity\ProjectSystem\ProjectBOMEntry; use DateTime; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; @@ -48,7 +46,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface; * Part class. * * The class properties are split over various traits in directory PartTraits. - * Otherwise this class would be too big, to be maintained. + * Otherwise, this class would be too big, to be maintained. * * @ORM\Entity(repositoryClass="App\Repository\PartRepository") * @ORM\Table("`parts`", indexes={ @@ -75,7 +73,7 @@ class Part extends AttachmentContainingDBElement * @ORM\OrderBy({"group" = "ASC" ,"name" = "ASC"}) * @Groups({"full"}) */ - protected $parameters; + protected Collection $parameters; /** * @ORM\Column(type="datetime", name="datetime_added", options={"default":"CURRENT_TIMESTAMP"}) @@ -100,16 +98,16 @@ class Part extends AttachmentContainingDBElement * @Assert\Valid() * @Groups({"full"}) */ - protected $attachments; + protected Collection $attachments; /** - * @var DateTime the date when this element was modified the last time + * @var DateTime|null the date when this element was modified the last time * @ORM\Column(type="datetime", name="last_modified", options={"default":"CURRENT_TIMESTAMP"}) */ protected ?DateTime $lastModified = null; /** - * @var Attachment + * @var Attachment|null * @ORM\ManyToOne(targetEntity="App\Entity\Attachments\Attachment") * @ORM\JoinColumn(name="id_preview_attachment", referencedColumnName="id", onDelete="SET NULL", nullable=true) * @Assert\Expression("value == null or value.isPicture()", message="part.master_attachment.must_be_picture") diff --git a/src/Entity/Parts/PartLot.php b/src/Entity/Parts/PartLot.php index 32db4828..cd69651f 100644 --- a/src/Entity/Parts/PartLot.php +++ b/src/Entity/Parts/PartLot.php @@ -130,7 +130,7 @@ class PartLot extends AbstractDBElement implements TimeStampableInterface, Named /** * Check if the current part lot is expired. - * This is the case, if the expiration date is greater the the current date. + * This is the case, if the expiration date is greater the current date. * * @return bool|null True, if the part lot is expired. Returns null, if no expiration date was set. * @@ -195,7 +195,7 @@ class PartLot extends AbstractDBElement implements TimeStampableInterface, Named } /** - * Sets the expiration date for the part lot. Set to null, if the part lot does not expires. + * Sets the expiration date for the part lot. Set to null, if the part lot does not expire. * * @param DateTime|null $expiration_date * diff --git a/src/Entity/Parts/PartTraits/AdvancedPropertyTrait.php b/src/Entity/Parts/PartTraits/AdvancedPropertyTrait.php index 482004b0..50935fd3 100644 --- a/src/Entity/Parts/PartTraits/AdvancedPropertyTrait.php +++ b/src/Entity/Parts/PartTraits/AdvancedPropertyTrait.php @@ -55,7 +55,7 @@ trait AdvancedPropertyTrait protected ?float $mass = null; /** - * @var string The internal part number of the part + * @var string|null The internal part number of the part * @ORM\Column(type="string", length=100, nullable=true, unique=true) * @Assert\Length(max="100") * @Groups({"extended", "full", "import"}) diff --git a/src/Entity/Parts/PartTraits/BasicPropertyTrait.php b/src/Entity/Parts/PartTraits/BasicPropertyTrait.php index 0f88787f..f675dc72 100644 --- a/src/Entity/Parts/PartTraits/BasicPropertyTrait.php +++ b/src/Entity/Parts/PartTraits/BasicPropertyTrait.php @@ -46,7 +46,7 @@ trait BasicPropertyTrait protected string $comment = ''; /** - * @var bool Kept for compatibility (it is not used now, and I dont think it was used in old versions) + * @var bool Kept for compatibility (it is not used now, and I don't think it was used in old versions) * @ORM\Column(type="boolean") */ protected bool $visible = true; @@ -59,7 +59,7 @@ trait BasicPropertyTrait protected bool $favorite = false; /** - * @var Category The category this part belongs too (e.g. Resistors). Use tags, for more complex grouping. + * @var Category|null The category this part belongs too (e.g. Resistors). Use tags, for more complex grouping. * Every part must have a category. * @ORM\ManyToOne(targetEntity="Category") * @ORM\JoinColumn(name="id_category", referencedColumnName="id", nullable=false) @@ -136,7 +136,7 @@ trait BasicPropertyTrait /** * Gets the Footprint of this part (e.g. DIP8). * - * @return Footprint|null The footprint of this part. Null if this part should no have a footprint. + * @return Footprint|null The footprint of this part. Null if this part should not have a footprint. */ public function getFootprint(): ?Footprint { diff --git a/src/Entity/Parts/PartTraits/InstockTrait.php b/src/Entity/Parts/PartTraits/InstockTrait.php index d7b59469..8ab300b5 100644 --- a/src/Entity/Parts/PartTraits/InstockTrait.php +++ b/src/Entity/Parts/PartTraits/InstockTrait.php @@ -122,7 +122,7 @@ trait InstockTrait /** * Get the count of parts which must be in stock at least. - * If a integer-based part unit is selected, the value will be rounded to integers. + * If an integer-based part unit is selected, the value will be rounded to integers. * * @return float count of parts which must be in stock at least */ @@ -160,9 +160,25 @@ trait InstockTrait return $this->getAmountSum() < $this->getMinAmount(); } + /** + * Returns true, if at least one of the part lots has an unknown amount. + * It is possible that other part lots have a known amount, then getAmountSum() will return sum of all known amounts. + * @return bool True if at least one part lot has an unknown amount. + */ + public function isAmountUnknown(): bool + { + foreach ($this->getPartLots() as $lot) { + if ($lot->isInstockUnknown()) { + return true; + } + } + + return false; + } + /** * Returns the summed amount of this part (over all part lots) - * Part Lots that have unknown value or are expired, are not used for this value. + * Part Lots that have unknown value or are expired, are not used for this value (counted as 0). * * @return float The amount of parts given in partUnit */ @@ -171,7 +187,7 @@ trait InstockTrait //TODO: Find a method to do this natively in SQL, the current method could be a bit slow $sum = 0; foreach ($this->getPartLots() as $lot) { - //Dont use the instock value, if it is unkown + //Don't use the in stock value, if it is unknown if ($lot->isInstockUnknown() || $lot->isExpired() ?? false) { continue; } diff --git a/src/Entity/Parts/PartTraits/ManufacturerTrait.php b/src/Entity/Parts/PartTraits/ManufacturerTrait.php index d87e11cc..de4bd940 100644 --- a/src/Entity/Parts/PartTraits/ManufacturerTrait.php +++ b/src/Entity/Parts/PartTraits/ManufacturerTrait.php @@ -59,7 +59,7 @@ trait ManufacturerTrait protected string $manufacturer_product_number = ''; /** - * @var string The production status of this part. Can be one of the specified ones. + * @var string|null The production status of this part. Can be one of the specified ones. * @ORM\Column(type="string", length=255, nullable=true) * @Assert\Choice({"announced", "active", "nrfnd", "eol", "discontinued", ""}) * @Groups({"extended", "full", "import"}) diff --git a/src/Entity/Parts/PartTraits/OrderTrait.php b/src/Entity/Parts/PartTraits/OrderTrait.php index 79721443..d92ab762 100644 --- a/src/Entity/Parts/PartTraits/OrderTrait.php +++ b/src/Entity/Parts/PartTraits/OrderTrait.php @@ -23,7 +23,6 @@ declare(strict_types=1); namespace App\Entity\Parts\PartTraits; use App\Entity\PriceInformations\Orderdetail; -use Doctrine\Common\Collections\ArrayCollection; use Symfony\Component\Serializer\Annotation\Groups; use Symfony\Component\Validator\Constraints as Assert; use function count; @@ -57,7 +56,7 @@ trait OrderTrait protected bool $manual_order = false; /** - * @var Orderdetail + * @var Orderdetail|null * @ORM\OneToOne(targetEntity="App\Entity\PriceInformations\Orderdetail") * @ORM\JoinColumn(name="order_orderdetails_id", referencedColumnName="id") */ diff --git a/src/Entity/Parts/PartTraits/ProjectTrait.php b/src/Entity/Parts/PartTraits/ProjectTrait.php index 58697427..e0d646d2 100644 --- a/src/Entity/Parts/PartTraits/ProjectTrait.php +++ b/src/Entity/Parts/PartTraits/ProjectTrait.php @@ -41,7 +41,7 @@ trait ProjectTrait } /** - * Returns the project that this part represents the builds of, or null if it doesnt + * Returns the project that this part represents the builds of, or null if it doesn't * @return Project|null */ public function getBuiltProject(): ?Project diff --git a/src/Entity/Parts/Storelocation.php b/src/Entity/Parts/Storelocation.php index e7a7dfb7..03c5951f 100644 --- a/src/Entity/Parts/Storelocation.php +++ b/src/Entity/Parts/Storelocation.php @@ -24,6 +24,7 @@ namespace App\Entity\Parts; use App\Entity\Attachments\StorelocationAttachment; use App\Entity\Base\AbstractPartsContainingDBElement; +use App\Entity\Base\AbstractStructuralDBElement; use App\Entity\Parameters\StorelocationParameter; use App\Entity\UserSystem\User; use Doctrine\Common\Collections\Collection; @@ -47,13 +48,13 @@ class Storelocation extends AbstractPartsContainingDBElement * @ORM\OrderBy({"name" = "ASC"}) * @var Collection */ - protected $children; + protected Collection $children; /** * @ORM\ManyToOne(targetEntity="Storelocation", inversedBy="children") * @ORM\JoinColumn(name="parent_id", referencedColumnName="id") */ - protected $parent; + protected ?AbstractStructuralDBElement $parent; /** * @var MeasurementUnit|null The measurement unit, which parts can be stored in here @@ -67,7 +68,7 @@ class Storelocation extends AbstractPartsContainingDBElement * @ORM\OrderBy({"group" = "ASC" ,"name" = "ASC"}) * @Assert\Valid() */ - protected $parameters; + protected Collection $parameters; /** * @var bool @@ -109,7 +110,7 @@ class Storelocation extends AbstractPartsContainingDBElement * @ORM\OneToMany(targetEntity="App\Entity\Attachments\StorelocationAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true) * @Assert\Valid() */ - protected $attachments; + protected Collection $attachments; /******************************************************************************** * diff --git a/src/Entity/Parts/Supplier.php b/src/Entity/Parts/Supplier.php index ae1e4ca1..f8ab4202 100644 --- a/src/Entity/Parts/Supplier.php +++ b/src/Entity/Parts/Supplier.php @@ -24,6 +24,7 @@ namespace App\Entity\Parts; use App\Entity\Attachments\SupplierAttachment; use App\Entity\Base\AbstractCompany; +use App\Entity\Base\AbstractStructuralDBElement; use App\Entity\Parameters\SupplierParameter; use App\Entity\PriceInformations\Currency; use App\Validator\Constraints\BigDecimal\BigDecimalPositiveOrZero; @@ -50,18 +51,18 @@ class Supplier extends AbstractCompany * @ORM\OrderBy({"name" = "ASC"}) * @var Collection */ - protected $children; + protected Collection $children; /** * @ORM\ManyToOne(targetEntity="Supplier", inversedBy="children") * @ORM\JoinColumn(name="parent_id", referencedColumnName="id") */ - protected $parent; + protected ?AbstractStructuralDBElement $parent; /** * @ORM\OneToMany(targetEntity="App\Entity\PriceInformations\Orderdetail", mappedBy="supplier") */ - protected $orderdetails; + protected Collection $orderdetails; /** * @var Currency|null The currency that should be used by default for order informations with this supplier. @@ -86,14 +87,14 @@ class Supplier extends AbstractCompany * @ORM\OrderBy({"name" = "ASC"}) * @Assert\Valid() */ - protected $attachments; + protected Collection $attachments; /** @var Collection * @ORM\OneToMany(targetEntity="App\Entity\Parameters\SupplierParameter", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true) * @ORM\OrderBy({"group" = "ASC" ,"name" = "ASC"}) * @Assert\Valid() */ - protected $parameters; + protected Collection $parameters; /** * Gets the currency that should be used by default, when creating a orderdetail with this supplier. diff --git a/src/Entity/PriceInformations/Currency.php b/src/Entity/PriceInformations/Currency.php index f2c44504..6b78de19 100644 --- a/src/Entity/PriceInformations/Currency.php +++ b/src/Entity/PriceInformations/Currency.php @@ -69,13 +69,13 @@ class Currency extends AbstractStructuralDBElement * @ORM\OneToMany(targetEntity="Currency", mappedBy="parent", cascade={"persist"}) * @ORM\OrderBy({"name" = "ASC"}) */ - protected $children; + protected Collection $children; /** * @ORM\ManyToOne(targetEntity="Currency", inversedBy="children") * @ORM\JoinColumn(name="parent_id", referencedColumnName="id") */ - protected $parent; + protected ?AbstractStructuralDBElement $parent; /** * @var Collection @@ -83,19 +83,19 @@ class Currency extends AbstractStructuralDBElement * @ORM\OrderBy({"name" = "ASC"}) * @Assert\Valid() */ - protected $attachments; + protected Collection $attachments; /** @var Collection * @ORM\OneToMany(targetEntity="App\Entity\Parameters\CurrencyParameter", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true) * @ORM\OrderBy({"group" = "ASC" ,"name" = "ASC"}) * @Assert\Valid() */ - protected $parameters; + protected Collection $parameters; /** @var Collection * @ORM\OneToMany(targetEntity="App\Entity\PriceInformations\Pricedetail", mappedBy="currency") */ - protected $pricedetails; + protected Collection $pricedetails; public function __construct() { diff --git a/src/Entity/PriceInformations/Orderdetail.php b/src/Entity/PriceInformations/Orderdetail.php index 82b59b1f..c1d182a2 100644 --- a/src/Entity/PriceInformations/Orderdetail.php +++ b/src/Entity/PriceInformations/Orderdetail.php @@ -57,7 +57,7 @@ class Orderdetail extends AbstractDBElement implements TimeStampableInterface, N * @ORM\OrderBy({"min_discount_quantity" = "ASC"}) * @Groups({"extended", "full", "import"}) */ - protected $pricedetails; + protected Collection $pricedetails; /** * @var string @@ -82,7 +82,7 @@ class Orderdetail extends AbstractDBElement implements TimeStampableInterface, N protected string $supplier_product_url = ''; /** - * @var Part + * @var Part|null * @ORM\ManyToOne(targetEntity="App\Entity\Parts\Part", inversedBy="orderdetails") * @ORM\JoinColumn(name="part_id", referencedColumnName="id", nullable=false, onDelete="CASCADE") * @Assert\NotNull() @@ -90,7 +90,7 @@ class Orderdetail extends AbstractDBElement implements TimeStampableInterface, N protected ?Part $part = null; /** - * @var Supplier + * @var Supplier|null * @ORM\ManyToOne(targetEntity="App\Entity\Parts\Supplier", inversedBy="orderdetails") * @ORM\JoinColumn(name="id_supplier", referencedColumnName="id") * @Assert\NotNull(message="validator.orderdetail.supplier_must_not_be_null") diff --git a/src/Entity/PriceInformations/Pricedetail.php b/src/Entity/PriceInformations/Pricedetail.php index b1ac5155..49d01730 100644 --- a/src/Entity/PriceInformations/Pricedetail.php +++ b/src/Entity/PriceInformations/Pricedetail.php @@ -266,9 +266,9 @@ class Pricedetail extends AbstractDBElement implements TimeStampableInterface * * @param BigDecimal $new_price the new price as a float number * - * * This is the price for "price_related_quantity" parts!! - * * Example: if "price_related_quantity" is '10', - * you have to set here the price for 10 parts! + * This is the price for "price_related_quantity" parts!! + * Example: if "price_related_quantity" is 10, + * you have to set here the price for 10 parts! * * @return $this */ diff --git a/src/Entity/ProjectSystem/Project.php b/src/Entity/ProjectSystem/Project.php index f6089687..ce55b50a 100644 --- a/src/Entity/ProjectSystem/Project.php +++ b/src/Entity/ProjectSystem/Project.php @@ -47,20 +47,20 @@ class Project extends AbstractStructuralDBElement * @ORM\OrderBy({"name" = "ASC"}) * @var Collection */ - protected $children; + protected Collection $children; /** * @ORM\ManyToOne(targetEntity="Project", inversedBy="children") * @ORM\JoinColumn(name="parent_id", referencedColumnName="id") */ - protected $parent; + protected ?AbstractStructuralDBElement $parent; /** * @ORM\OneToMany(targetEntity="ProjectBOMEntry", mappedBy="project", cascade={"persist", "remove"}, orphanRemoval=true) * @Assert\Valid() * @Groups({"extended", "full"}) */ - protected $bom_entries; + protected Collection $bom_entries; /** * @ORM\Column(type="integer") @@ -68,7 +68,7 @@ class Project extends AbstractStructuralDBElement protected int $order_quantity = 0; /** - * @var string The current status of the project + * @var string|null The current status of the project * @ORM\Column(type="string", length=64, nullable=true) * @Assert\Choice({"draft","planning","in_production","finished","archived"}) * @Groups({"extended", "full"}) @@ -98,13 +98,13 @@ class Project extends AbstractStructuralDBElement * @ORM\OneToMany(targetEntity="App\Entity\Attachments\ProjectAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true) * @ORM\OrderBy({"name" = "ASC"}) */ - protected $attachments; + protected Collection $attachments; /** @var Collection * @ORM\OneToMany(targetEntity="App\Entity\Parameters\ProjectParameter", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true) * @ORM\OrderBy({"group" = "ASC" ,"name" = "ASC"}) */ - protected $parameters; + protected Collection $parameters; /******************************************************************************** * @@ -116,6 +116,7 @@ class Project extends AbstractStructuralDBElement { parent::__construct(); $this->bom_entries = new ArrayCollection(); + $this->children = new ArrayCollection(); } public function __clone() diff --git a/src/Entity/ProjectSystem/ProjectBOMEntry.php b/src/Entity/ProjectSystem/ProjectBOMEntry.php index b48b3f50..a14f5f2d 100644 --- a/src/Entity/ProjectSystem/ProjectBOMEntry.php +++ b/src/Entity/ProjectSystem/ProjectBOMEntry.php @@ -61,7 +61,7 @@ class ProjectBOMEntry extends AbstractDBElement protected string $mountnames = ''; /** - * @var string An optional name describing this BOM entry (useful for non-part entries) + * @var string|null An optional name describing this BOM entry (useful for non-part entries) * @ORM\Column(type="string", nullable=true) * @Assert\Expression( * "this.getPart() !== null or this.getName() !== null", @@ -77,7 +77,7 @@ class ProjectBOMEntry extends AbstractDBElement protected string $comment; /** - * @var Project + * @var Project|null * @ORM\ManyToOne(targetEntity="Project", inversedBy="bom_entries") * @ORM\JoinColumn(name="id_device", referencedColumnName="id") */ @@ -91,7 +91,7 @@ class ProjectBOMEntry extends AbstractDBElement protected ?Part $part = null; /** - * @var BigDecimal The price of this non-part BOM entry + * @var BigDecimal|null The price of this non-part BOM entry * @ORM\Column(type="big_decimal", precision=11, scale=5, nullable=true) * @Assert\AtLeastOneOf({ * @BigDecimalPositive(), diff --git a/src/Entity/UserSystem/Group.php b/src/Entity/UserSystem/Group.php index 30bec19c..74a600fe 100644 --- a/src/Entity/UserSystem/Group.php +++ b/src/Entity/UserSystem/Group.php @@ -34,7 +34,7 @@ use Symfony\Component\Serializer\Annotation\Groups; use Symfony\Component\Validator\Constraints as Assert; /** - * This entity represents an user group. + * This entity represents a user group. * * @ORM\Entity() * @ORM\Table("`groups`", indexes={ @@ -47,35 +47,35 @@ class Group extends AbstractStructuralDBElement implements HasPermissionsInterfa /** * @ORM\OneToMany(targetEntity="Group", mappedBy="parent") * @ORM\OrderBy({"name" = "ASC"}) - * @var Collection + * @var Collection */ - protected $children; + protected Collection $children; /** * @ORM\ManyToOne(targetEntity="Group", inversedBy="children") * @ORM\JoinColumn(name="parent_id", referencedColumnName="id") */ - protected $parent; + protected ?AbstractStructuralDBElement $parent; /** * @ORM\OneToMany(targetEntity="User", mappedBy="group") - * @var Collection + * @var Collection */ - protected $users; + protected Collection $users; /** - * @var bool If true all users associated with this group must have enabled some kind of 2 factor authentication + * @var bool If true all users associated with this group must have enabled some kind of two-factor authentication * @ORM\Column(type="boolean", name="enforce_2fa") * @Groups({"extended", "full", "import"}) */ - protected $enforce2FA = false; + protected bool $enforce2FA = false; /** * @var Collection * @ORM\OneToMany(targetEntity="App\Entity\Attachments\GroupAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true) * @ORM\OrderBy({"name" = "ASC"}) * @Assert\Valid() */ - protected $attachments; + protected Collection $attachments; /** * @var PermissionData|null @@ -90,13 +90,14 @@ class Group extends AbstractStructuralDBElement implements HasPermissionsInterfa * @ORM\OrderBy({"group" = "ASC" ,"name" = "ASC"}) * @Assert\Valid() */ - protected $parameters; + protected Collection $parameters; public function __construct() { parent::__construct(); $this->permissions = new PermissionData(); $this->users = new ArrayCollection(); + $this->children = new ArrayCollection(); } /** diff --git a/src/Entity/UserSystem/PermissionData.php b/src/Entity/UserSystem/PermissionData.php index 121e7f5f..bac73282 100644 --- a/src/Entity/UserSystem/PermissionData.php +++ b/src/Entity/UserSystem/PermissionData.php @@ -43,7 +43,7 @@ final class PermissionData implements \JsonSerializable public const CURRENT_SCHEMA_VERSION = 2; /** - * @var array This array contains the permission values for each permission + * @var array|null This array contains the permission values for each permission * This array contains the permission values for each permission, in the form of: * permission => [ * operation => value, @@ -57,7 +57,7 @@ final class PermissionData implements \JsonSerializable /** * Creates a new Permission Data Instance using the given data. - * By default, a empty array is used, meaning + * By default, an empty array is used, meaning */ public function __construct(array $data = []) { @@ -203,9 +203,9 @@ final class PermissionData implements \JsonSerializable /** * Returns an JSON encodable representation of this object. - * @return array|mixed + * @return array */ - public function jsonSerialize() + public function jsonSerialize(): array { $ret = []; @@ -216,7 +216,7 @@ final class PermissionData implements \JsonSerializable continue; } - $ret[$permission] = array_filter($operations, function ($value) { + $ret[$permission] = array_filter($operations, static function ($value) { return $value !== null; }); diff --git a/src/Entity/UserSystem/User.php b/src/Entity/UserSystem/User.php index 6c8aef60..7c271c6c 100644 --- a/src/Entity/UserSystem/User.php +++ b/src/Entity/UserSystem/User.php @@ -53,7 +53,7 @@ use Jbtronics\TFAWebauthn\Model\TwoFactorInterface as WebauthnTwoFactorInterface /** * This entity represents a user, which can log in and have permissions. - * Also this entity is able to save some informations about the user, like the names, email-address and other info. + * Also, this entity is able to save some information about the user, like the names, email-address and other info. * * @ORM\Entity(repositoryClass="App\Repository\UserRepository") * @ORM\Table("`users`", indexes={ @@ -130,7 +130,7 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe /** * @var Group|null the group this user belongs to - * DO NOT PUT A fetch eager here! Otherwise you can not unset the group of a user! This seems to be some kind of bug in doctrine. Maybe this is fixed in future versions. + * DO NOT PUT A fetch eager here! Otherwise, you can not unset the group of a user! This seems to be some kind of bug in doctrine. Maybe this is fixed in future versions. * @ORM\ManyToOne(targetEntity="Group", inversedBy="users") * @ORM\JoinColumn(name="group_id", referencedColumnName="id") * @Selectable() @@ -139,7 +139,7 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe protected ?Group $group = null; /** - * @var string|null The secret used for google authenticator + * @var string|null The secret used for Google authenticator * @ORM\Column(name="google_authenticator_secret", type="string", nullable=true) */ protected ?string $googleAuthenticatorSecret = null; @@ -216,7 +216,7 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe protected string $name = ''; /** - * @var array + * @var array|null * @ORM\Column(type="json") */ protected ?array $settings = []; @@ -226,7 +226,7 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe * @ORM\OneToMany(targetEntity="App\Entity\Attachments\UserAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true) * @ORM\OrderBy({"name" = "ASC"}) */ - protected $attachments; + protected Collection $attachments; /** @var DateTime|null The time when the backup codes were generated * @ORM\Column(type="datetime", nullable=true) @@ -237,13 +237,13 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe /** @var Collection * @ORM\OneToMany(targetEntity="App\Entity\UserSystem\U2FKey", mappedBy="user", cascade={"REMOVE"}, orphanRemoval=true) */ - protected $u2fKeys; + protected Collection $u2fKeys; /** * @var Collection * @ORM\OneToMany(targetEntity="App\Entity\UserSystem\WebauthnKey", mappedBy="user", cascade={"REMOVE"}, orphanRemoval=true) */ - protected $webauthn_keys; + protected Collection $webauthn_keys; /** * @var Currency|null The currency the user wants to see prices in. @@ -255,10 +255,10 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe * @Selectable() * @Groups({"extended", "full", "import"}) */ - protected $currency; + protected ?Currency $currency; /** - * @var PermissionData + * @var PermissionData|null * @ValidPermission() * @ORM\Embedded(class="PermissionData", columnPrefix="permissions_") * @Groups({"simple", "extended", "full", "import"}) @@ -266,10 +266,10 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe protected ?PermissionData $permissions = null; /** - * @var DateTime the time until the password reset token is valid + * @var DateTime|null the time until the password reset token is valid * @ORM\Column(type="datetime", nullable=true, options={"default": null}) */ - protected $pw_reset_expires; + protected ?DateTime $pw_reset_expires; /** * @var bool True if the user was created by a SAML provider (and therefore cannot change its password) @@ -409,7 +409,7 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe } /** - * Checks if this user is disabled (user cannot login any more). + * Checks if this user is disabled (user cannot log in any more). * * @return bool true, if the user is disabled */ @@ -516,7 +516,7 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe public function getFullName(bool $including_username = false): string { $tmp = $this->getFirstName(); - //Dont add a space, if the name has only one part (it would look strange) + //Don't add a space, if the name has only one part (it would look strange) if (!empty($this->getFirstName()) && !empty($this->getLastName())) { $tmp .= ' '; } @@ -683,9 +683,9 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe /** - * Gets the language the user prefers (as 2 letter ISO code). + * Gets the language the user prefers (as 2-letter ISO code). * - * @return string|null The 2 letter ISO code of the preferred language (e.g. 'en' or 'de'). + * @return string|null The 2-letter ISO code of the preferred language (e.g. 'en' or 'de'). * If null is returned, the user has not specified a language and the server wide language should be used. */ public function getLanguage(): ?string @@ -696,8 +696,8 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe /** * Change the language the user prefers. * - * @param string|null $language The new language as 2 letter ISO code (e.g. 'en' or 'de'). - * Set to null, to use the system wide language. + * @param string|null $language The new language as 2-letter ISO code (e.g. 'en' or 'de'). + * Set to null, to use the system-wide language. * * @return User */ @@ -744,8 +744,8 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe /** * Change the theme the user wants to see. * - * @param string|null $theme The name of the theme (See See self::AVAILABLE_THEMES for valid values). Set to null - * if the system wide theme should be used. + * @param string|null $theme The name of the theme (See self::AVAILABLE_THEMES for valid values). Set to null + * if the system-wide theme should be used. * * @return $this */ @@ -789,7 +789,7 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe } /** - * Return the user name that should be shown in Google Authenticator. + * Return the username that should be shown in Google Authenticator. */ public function getGoogleAuthenticatorUsername(): string { @@ -893,7 +893,7 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe /** * Invalidate all trusted device tokens at once, by incrementing the token version. - * You have to flush the changes to database afterwards. + * You have to flush the changes to database afterward. */ public function invalidateTrustedDeviceTokens(): void { diff --git a/src/EntityListeners/AttachmentDeleteListener.php b/src/EntityListeners/AttachmentDeleteListener.php index edf68e25..84d588c7 100644 --- a/src/EntityListeners/AttachmentDeleteListener.php +++ b/src/EntityListeners/AttachmentDeleteListener.php @@ -27,7 +27,6 @@ use App\Services\Attachments\AttachmentManager; use App\Services\Attachments\AttachmentPathResolver; use App\Services\Attachments\AttachmentReverseSearch; use Doctrine\ORM\EntityManagerInterface; -use Doctrine\ORM\Event\LifecycleEventArgs; use Doctrine\ORM\Event\PostRemoveEventArgs; use Doctrine\ORM\Event\PreRemoveEventArgs; use Doctrine\ORM\Event\PreUpdateEventArgs; @@ -38,7 +37,7 @@ use SplFileInfo; /** * This listener watches for changes on attachments and deletes the files associated with an attachment, that are not - * used any more. This can happens after an attachment is delteted or the path is changed. + * used anymore. This can happen after an attachment is deleted or the path is changed. */ class AttachmentDeleteListener { diff --git a/src/EventSubscriber/LogSystem/EventLoggerSubscriber.php b/src/EventSubscriber/LogSystem/EventLoggerSubscriber.php index 1f38c66c..d9c1173d 100644 --- a/src/EventSubscriber/LogSystem/EventLoggerSubscriber.php +++ b/src/EventSubscriber/LogSystem/EventLoggerSubscriber.php @@ -47,12 +47,12 @@ use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\Serializer\SerializerInterface; /** - * This event subscriber write to event log when entities are changed, removed, created. + * This event subscriber writes to the event log when entities are changed, removed, created. */ class EventLoggerSubscriber implements EventSubscriber { /** - * @var array The given fields will not be saved, because they contain sensitive informations + * @var array The given fields will not be saved, because they contain sensitive information */ protected const FIELD_BLACKLIST = [ User::class => ['password', 'need_pw_change', 'googleAuthenticatorSecret', 'backupCodes', 'trustedDeviceCookieVersion', 'pw_reset_token', 'backupCodesGenerationDate'], @@ -97,7 +97,7 @@ class EventLoggerSubscriber implements EventSubscriber public function onFlush(OnFlushEventArgs $eventArgs): void { - $em = $eventArgs->getEntityManager(); + $em = $eventArgs->getObjectManager(); $uow = $em->getUnitOfWork(); /* @@ -128,7 +128,7 @@ class EventLoggerSubscriber implements EventSubscriber public function postPersist(LifecycleEventArgs $args): void { - //Create an log entry, we have to do this post persist, cause we have to know the ID + //Create a log entry, we have to do this post persist, because we have to know the ID /** @var AbstractDBElement $entity */ $entity = $args->getObject(); @@ -156,9 +156,9 @@ class EventLoggerSubscriber implements EventSubscriber public function postFlush(PostFlushEventArgs $args): void { - $em = $args->getEntityManager(); + $em = $args->getObjectManager(); $uow = $em->getUnitOfWork(); - // If the we have added any ElementCreatedLogEntries added in postPersist, we flush them here. + // If we have added any ElementCreatedLogEntries added in postPersist, we flush them here. $uow->computeChangeSets(); if ($uow->hasPendingInsertions() || !empty($uow->getScheduledEntityUpdates())) { $em->flush(); @@ -196,7 +196,7 @@ class EventLoggerSubscriber implements EventSubscriber } } - //By default allow every field. + //By default, allow every field. return true; } diff --git a/src/EventSubscriber/LogSystem/LogAccessDeniedSubscriber.php b/src/EventSubscriber/LogSystem/LogAccessDeniedSubscriber.php index a2b9f1ff..45dbe61b 100644 --- a/src/EventSubscriber/LogSystem/LogAccessDeniedSubscriber.php +++ b/src/EventSubscriber/LogSystem/LogAccessDeniedSubscriber.php @@ -49,7 +49,7 @@ use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; use Symfony\Component\Security\Core\Exception\AccessDeniedException; /** - * Write to event log when a user tries to access an forbidden page and recevies an 403 Access Denied message. + * Write to event log when a user tries to access a forbidden page and receives an 403 Access Denied message. */ class LogAccessDeniedSubscriber implements EventSubscriberInterface { diff --git a/src/EventSubscriber/LogSystem/SecurityEventLoggerSubscriber.php b/src/EventSubscriber/LogSystem/SecurityEventLoggerSubscriber.php index 78402633..88eeef2c 100644 --- a/src/EventSubscriber/LogSystem/SecurityEventLoggerSubscriber.php +++ b/src/EventSubscriber/LogSystem/SecurityEventLoggerSubscriber.php @@ -49,7 +49,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\RequestStack; /** - * This subscriber writes entries to log if an security related event happens (e.g. the user changes its password). + * This subscriber writes entries to log if a security related event happens (e.g. the user changes its password). */ final class SecurityEventLoggerSubscriber implements EventSubscriberInterface { @@ -133,7 +133,7 @@ final class SecurityEventLoggerSubscriber implements EventSubscriberInterface $ip = $request->getClientIp() ?? 'unknown'; } else { $ip = 'Console'; - //Dont try to apply IP filter rules to non numeric string + //Don't try to apply IP filter rules to non-numeric string $anonymize = false; } diff --git a/src/EventSubscriber/SymfonyDebugToolbarSubscriber.php b/src/EventSubscriber/SymfonyDebugToolbarSubscriber.php index f6f4fc25..d2aab142 100644 --- a/src/EventSubscriber/SymfonyDebugToolbarSubscriber.php +++ b/src/EventSubscriber/SymfonyDebugToolbarSubscriber.php @@ -26,7 +26,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpKernel\Event\ResponseEvent; /** - * This subscriber sets an Header in Debug mode that signals the Symfony Profiler to also update on Ajax requests. + * This subscriber sets a Header in Debug mode that signals the Symfony Profiler to also update on Ajax requests. */ final class SymfonyDebugToolbarSubscriber implements EventSubscriberInterface { diff --git a/src/EventSubscriber/UserSystem/LoginSuccessSubscriber.php b/src/EventSubscriber/UserSystem/LoginSuccessSubscriber.php index 5e18826b..cce88d82 100644 --- a/src/EventSubscriber/UserSystem/LoginSuccessSubscriber.php +++ b/src/EventSubscriber/UserSystem/LoginSuccessSubscriber.php @@ -26,28 +26,26 @@ use App\Entity\LogSystem\UserLoginLogEntry; use App\Entity\UserSystem\User; use App\Services\LogSystem\EventLogger; use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface; +use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\Session\Session; -use Symfony\Component\HttpFoundation\Session\SessionInterface; use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; use Symfony\Component\Security\Http\SecurityEvents; use Symfony\Contracts\Translation\TranslatorInterface; /** - * This event listener shows an login successful flash to the user after login and write the login to event log. + * This event listener shows a login successful flash to the user after login and write the login to event log. */ final class LoginSuccessSubscriber implements EventSubscriberInterface { private TranslatorInterface $translator; - private FlashBagInterface $flashBag; + private RequestStack $requestStack; private EventLogger $eventLogger; private bool $gpdr_compliance; - public function __construct(TranslatorInterface $translator, SessionInterface $session, EventLogger $eventLogger, bool $gpdr_compliance) + public function __construct(TranslatorInterface $translator, RequestStack $requestStack, EventLogger $eventLogger, bool $gpdr_compliance) { - /** @var Session $session */ $this->translator = $translator; - $this->flashBag = $session->getFlashBag(); + $this->requestStack = $requestStack; $this->eventLogger = $eventLogger; $this->gpdr_compliance = $gpdr_compliance; } @@ -62,8 +60,11 @@ final class LoginSuccessSubscriber implements EventSubscriberInterface $this->eventLogger->logAndFlush($log); } + /** @var Session $session */ + $session = $this->requestStack->getSession(); + $flashBag = $session->getFlashBag(); - $this->flashBag->add('notice', $this->translator->trans('flash.login_successful')); + $flashBag->add('notice', $this->translator->trans('flash.login_successful')); } /** diff --git a/src/EventSubscriber/UserSystem/LogoutDisabledUserSubscriber.php b/src/EventSubscriber/UserSystem/LogoutDisabledUserSubscriber.php index 2ab3f8f7..a668828c 100644 --- a/src/EventSubscriber/UserSystem/LogoutDisabledUserSubscriber.php +++ b/src/EventSubscriber/UserSystem/LogoutDisabledUserSubscriber.php @@ -31,8 +31,8 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Component\Security\Core\Security; /** - * This subscriber is used to log out a disabled user, as soon as he to do an request. - * It is not possible for him to login again, afterwards. + * This subscriber is used to log out a disabled user, as soon as he to do a request. + * It is not possible for him to login again, afterward. */ final class LogoutDisabledUserSubscriber implements EventSubscriberInterface { @@ -50,7 +50,7 @@ final class LogoutDisabledUserSubscriber implements EventSubscriberInterface { $user = $this->security->getUser(); if ($user instanceof User && $user->isDisabled()) { - //Redirect to login + //Redirect to log in $response = new RedirectResponse($this->urlGenerator->generate('logout')); $event->setResponse($response); } diff --git a/src/EventSubscriber/UserSystem/PasswordChangeNeededSubscriber.php b/src/EventSubscriber/UserSystem/PasswordChangeNeededSubscriber.php index 98020f03..ef7da6a9 100644 --- a/src/EventSubscriber/UserSystem/PasswordChangeNeededSubscriber.php +++ b/src/EventSubscriber/UserSystem/PasswordChangeNeededSubscriber.php @@ -56,14 +56,11 @@ final class PasswordChangeNeededSubscriber implements EventSubscriberInterface */ public const REDIRECT_TARGET = 'user_settings'; private Security $security; - private FlashBagInterface $flashBag; private HttpUtils $httpUtils; - public function __construct(Security $security, SessionInterface $session, HttpUtils $httpUtils) + public function __construct(Security $security, HttpUtils $httpUtils) { - /** @var Session $session */ $this->security = $security; - $this->flashBag = $session->getFlashBag(); $this->httpUtils = $httpUtils; } @@ -103,13 +100,17 @@ final class PasswordChangeNeededSubscriber implements EventSubscriberInterface return; } + /** @var Session $session */ + $session = $request->getSession(); + $flashBag = $session->getFlashBag(); + //Show appropriate message to user about the reason he was redirected if ($user->isNeedPwChange()) { - $this->flashBag->add('warning', 'user.pw_change_needed.flash'); + $flashBag->add('warning', 'user.pw_change_needed.flash'); } if (static::TFARedirectNeeded($user)) { - $this->flashBag->add('warning', 'user.2fa_needed.flash'); + $flashBag->add('warning', 'user.2fa_needed.flash'); } $event->setResponse($this->httpUtils->createRedirectResponse($request, static::REDIRECT_TARGET)); diff --git a/src/EventSubscriber/UserSystem/UpgradePermissionsSchemaSubscriber.php b/src/EventSubscriber/UserSystem/UpgradePermissionsSchemaSubscriber.php index 7d891df0..1d03cb83 100644 --- a/src/EventSubscriber/UserSystem/UpgradePermissionsSchemaSubscriber.php +++ b/src/EventSubscriber/UserSystem/UpgradePermissionsSchemaSubscriber.php @@ -25,28 +25,26 @@ use App\Services\LogSystem\EventCommentHelper; use App\Services\UserSystem\PermissionSchemaUpdater; use Doctrine\ORM\EntityManagerInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface; +use Symfony\Component\HttpFoundation\Session\Session; use Symfony\Component\HttpKernel\Event\RequestEvent; use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\Security\Core\Security; /** - * The purpose of this event subscriber is to check if the permission schema of the current user is up to date and upgrade it automatically if needed. + * The purpose of this event subscriber is to check if the permission schema of the current user is up-to-date and upgrade it automatically if needed. */ class UpgradePermissionsSchemaSubscriber implements EventSubscriberInterface { private Security $security; private PermissionSchemaUpdater $permissionSchemaUpdater; private EntityManagerInterface $entityManager; - private FlashBagInterface $flashBag; private EventCommentHelper $eventCommentHelper; - public function __construct(Security $security, PermissionSchemaUpdater $permissionSchemaUpdater, EntityManagerInterface $entityManager, FlashBagInterface $flashBag, EventCommentHelper $eventCommentHelper) + public function __construct(Security $security, PermissionSchemaUpdater $permissionSchemaUpdater, EntityManagerInterface $entityManager, EventCommentHelper $eventCommentHelper) { $this->security = $security; $this->permissionSchemaUpdater = $permissionSchemaUpdater; $this->entityManager = $entityManager; - $this->flashBag = $flashBag; $this->eventCommentHelper = $eventCommentHelper; } @@ -62,11 +60,15 @@ class UpgradePermissionsSchemaSubscriber implements EventSubscriberInterface $user = $this->entityManager->getRepository(User::class)->getAnonymousUser(); } + /** @var Session $session */ + $session = $event->getRequest()->getSession(); + $flashBag = $session->getFlashBag(); + if ($this->permissionSchemaUpdater->isSchemaUpdateNeeded($user)) { $this->eventCommentHelper->setMessage('Automatic permission schema update'); $this->permissionSchemaUpdater->userUpgradeSchemaRecursively($user); $this->entityManager->flush(); - $this->flashBag->add('notice', 'user.permissions_schema_updated'); + $flashBag->add('notice', 'user.permissions_schema_updated'); } } diff --git a/src/Events/SecurityEvent.php b/src/Events/SecurityEvent.php index bf8056d3..68f277c5 100644 --- a/src/Events/SecurityEvent.php +++ b/src/Events/SecurityEvent.php @@ -46,7 +46,7 @@ use Symfony\Contracts\EventDispatcher\Event; /** * This event is triggered when something security related to a user happens. - * For example when the password is reset or the an two factor authentication method was disabled. + * For example when the password is reset or the two-factor authentication method was disabled. */ class SecurityEvent extends Event { diff --git a/src/Form/AdminPages/BaseEntityAdminForm.php b/src/Form/AdminPages/BaseEntityAdminForm.php index 1a95a119..31dd39f0 100644 --- a/src/Form/AdminPages/BaseEntityAdminForm.php +++ b/src/Form/AdminPages/BaseEntityAdminForm.php @@ -25,14 +25,12 @@ namespace App\Form\AdminPages; use App\Entity\Base\AbstractNamedDBElement; use App\Entity\Base\AbstractStructuralDBElement; use App\Entity\LabelSystem\LabelProfile; -use App\Entity\Parameters\AbstractParameter; use App\Form\AttachmentFormType; use App\Form\ParameterType; use App\Form\Type\MasterPictureAttachmentType; use App\Form\Type\RichTextEditorType; use App\Form\Type\StructuralEntityType; use App\Services\LogSystem\EventCommentNeededHelper; -use FOS\CKEditorBundle\Form\Type\CKEditorType; use function get_class; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; diff --git a/src/Form/AdminPages/ProjectAdminForm.php b/src/Form/AdminPages/ProjectAdminForm.php index 3547d094..ebe01599 100644 --- a/src/Form/AdminPages/ProjectAdminForm.php +++ b/src/Form/AdminPages/ProjectAdminForm.php @@ -22,10 +22,8 @@ namespace App\Form\AdminPages; use App\Entity\Base\AbstractNamedDBElement; use App\Form\ProjectSystem\ProjectBOMEntryCollectionType; -use App\Form\ProjectSystem\ProjectBOMEntryType; use App\Form\Type\RichTextEditorType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; -use Symfony\Component\Form\Extension\Core\Type\CollectionType; use Symfony\Component\Form\FormBuilderInterface; class ProjectAdminForm extends BaseEntityAdminForm diff --git a/src/Form/AdminPages/StorelocationAdminForm.php b/src/Form/AdminPages/StorelocationAdminForm.php index 9e24dcd3..c5c76b16 100644 --- a/src/Form/AdminPages/StorelocationAdminForm.php +++ b/src/Form/AdminPages/StorelocationAdminForm.php @@ -24,7 +24,6 @@ namespace App\Form\AdminPages; use App\Entity\Base\AbstractNamedDBElement; use App\Entity\Parts\MeasurementUnit; -use App\Entity\UserSystem\User; use App\Form\Type\StructuralEntityType; use App\Form\Type\UserSelectType; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; diff --git a/src/Form/AttachmentFormType.php b/src/Form/AttachmentFormType.php index 6f33fde0..454f34b0 100644 --- a/src/Form/AttachmentFormType.php +++ b/src/Form/AttachmentFormType.php @@ -27,7 +27,6 @@ use App\Entity\Attachments\AttachmentType; use App\Form\Type\StructuralEntityType; use App\Services\Attachments\AttachmentManager; use App\Services\Attachments\AttachmentSubmitHandler; -use App\Validator\Constraints\AllowedFileExtension; use App\Validator\Constraints\UrlOrBuiltin; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; @@ -44,7 +43,6 @@ use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Component\Security\Core\Security; use Symfony\Component\Validator\Constraints\File; -use Symfony\Component\Validator\Constraints\NotBlank; use Symfony\Component\Validator\Constraints\Url; use Symfony\Contracts\Translation\TranslatorInterface; diff --git a/src/Form/CollectionTypeExtension.php b/src/Form/CollectionTypeExtension.php index 3947f9d4..1c0c8d63 100644 --- a/src/Form/CollectionTypeExtension.php +++ b/src/Form/CollectionTypeExtension.php @@ -44,7 +44,6 @@ namespace App\Form; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use ReflectionClass; -use ReflectionException; use Symfony\Component\Form\AbstractTypeExtension; use Symfony\Component\Form\Event\PreSubmitEvent; use Symfony\Component\Form\Extension\Core\Type\CollectionType; @@ -167,7 +166,7 @@ class CollectionTypeExtension extends AbstractTypeExtension /** * Set the option of the form. - * This a bit hacky cause we access private properties.... + * This a bit hacky because we access private properties.... * */ public function setOption(FormConfigInterface $builder, string $option, $value): void @@ -176,7 +175,7 @@ class CollectionTypeExtension extends AbstractTypeExtension throw new \RuntimeException('This method only works with FormConfigBuilder instances.'); } - //We have to use FormConfigBuilder::class here, because options is private and not available in sub classes + //We have to use FormConfigBuilder::class here, because options is private and not available in subclasses $reflection = new ReflectionClass(FormConfigBuilder::class); $property = $reflection->getProperty('options'); $property->setAccessible(true); diff --git a/src/Form/Filters/AttachmentFilterType.php b/src/Form/Filters/AttachmentFilterType.php index 57967be7..1b4967f5 100644 --- a/src/Form/Filters/AttachmentFilterType.php +++ b/src/Form/Filters/AttachmentFilterType.php @@ -35,14 +35,11 @@ use App\Entity\Attachments\SupplierAttachment; use App\Entity\Attachments\UserAttachment; use App\Entity\Parts\Manufacturer; use App\Entity\Parts\MeasurementUnit; -use App\Entity\Parts\Supplier; -use App\Form\AdminPages\FootprintAdminForm; use App\Form\Filters\Constraints\BooleanConstraintType; use App\Form\Filters\Constraints\DateTimeConstraintType; use App\Form\Filters\Constraints\InstanceOfConstraintType; use App\Form\Filters\Constraints\NumberConstraintType; use App\Form\Filters\Constraints\StructuralEntityConstraintType; -use App\Form\Filters\Constraints\UserEntityConstraintType; use App\Form\Filters\Constraints\TextConstraintType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ResetType; diff --git a/src/Form/Filters/Constraints/DateTimeConstraintType.php b/src/Form/Filters/Constraints/DateTimeConstraintType.php index f476f0ed..b24346ee 100644 --- a/src/Form/Filters/Constraints/DateTimeConstraintType.php +++ b/src/Form/Filters/Constraints/DateTimeConstraintType.php @@ -21,11 +21,9 @@ namespace App\Form\Filters\Constraints; use App\DataTables\Filters\Constraints\DateTimeConstraint; -use App\DataTables\Filters\Constraints\NumberConstraint; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\Extension\Core\Type\DateTimeType; -use Symfony\Component\Form\Extension\Core\Type\NumberType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormView; diff --git a/src/Form/Filters/Constraints/InstanceOfConstraintType.php b/src/Form/Filters/Constraints/InstanceOfConstraintType.php index 4a53e0f5..4a776cd6 100644 --- a/src/Form/Filters/Constraints/InstanceOfConstraintType.php +++ b/src/Form/Filters/Constraints/InstanceOfConstraintType.php @@ -23,8 +23,6 @@ namespace App\Form\Filters\Constraints; use App\DataTables\Filters\Constraints\InstanceOfConstraint; use Doctrine\ORM\EntityManagerInterface; use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Extension\Core\Type\ChoiceType; -use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; class InstanceOfConstraintType extends AbstractType @@ -41,7 +39,7 @@ class InstanceOfConstraintType extends AbstractType $resolver->setDefault('data_class', InstanceOfConstraint::class); } - public function getParent() + public function getParent(): string { return ChoiceConstraintType::class; } diff --git a/src/Form/Filters/Constraints/NumberConstraintType.php b/src/Form/Filters/Constraints/NumberConstraintType.php index cbfd6897..a04fc9a1 100644 --- a/src/Form/Filters/Constraints/NumberConstraintType.php +++ b/src/Form/Filters/Constraints/NumberConstraintType.php @@ -47,7 +47,7 @@ class NumberConstraintType extends AbstractType $resolver->setDefaults([ 'compound' => true, 'data_class' => NumberConstraint::class, - 'text_suffix' => '', // An suffix which is attached as text-append to the input group. This can for example be used for units + 'text_suffix' => '', // A suffix which is attached as text-append to the input group. This can for example be used for units 'min' => null, 'max' => null, diff --git a/src/Form/Filters/Constraints/ParameterConstraintType.php b/src/Form/Filters/Constraints/ParameterConstraintType.php index f9f2b311..10c58429 100644 --- a/src/Form/Filters/Constraints/ParameterConstraintType.php +++ b/src/Form/Filters/Constraints/ParameterConstraintType.php @@ -21,7 +21,6 @@ namespace App\Form\Filters\Constraints; use App\DataTables\Filters\Constraints\Part\ParameterConstraint; -use Svg\Tag\Text; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\SearchType; use Symfony\Component\Form\Extension\Core\Type\TextType; @@ -69,7 +68,6 @@ class ParameterConstraintType extends AbstractType * Ensure that the data is never null, but use an empty ParameterConstraint instead */ $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { - $form = $event->getForm(); $data = $event->getData(); if ($data === null) { diff --git a/src/Form/Filters/Constraints/StructuralEntityConstraintType.php b/src/Form/Filters/Constraints/StructuralEntityConstraintType.php index c9d6f25a..1ef6a333 100644 --- a/src/Form/Filters/Constraints/StructuralEntityConstraintType.php +++ b/src/Form/Filters/Constraints/StructuralEntityConstraintType.php @@ -36,7 +36,7 @@ class StructuralEntityConstraintType extends AbstractType $resolver->setDefaults([ 'compound' => true, 'data_class' => EntityConstraint::class, - 'text_suffix' => '', // An suffix which is attached as text-append to the input group. This can for example be used for units + 'text_suffix' => '', // A suffix which is attached as text-append to the input group. This can for example be used for units ]); $resolver->setRequired('entity_class'); diff --git a/src/Form/Filters/Constraints/UserEntityConstraintType.php b/src/Form/Filters/Constraints/UserEntityConstraintType.php index 706d7cea..86c9eb97 100644 --- a/src/Form/Filters/Constraints/UserEntityConstraintType.php +++ b/src/Form/Filters/Constraints/UserEntityConstraintType.php @@ -21,16 +21,12 @@ namespace App\Form\Filters\Constraints; use App\DataTables\Filters\Constraints\EntityConstraint; -use App\Entity\UserSystem\User; -use App\Form\Type\StructuralEntityType; use App\Form\Type\UserSelectType; -use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormView; -use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; class UserEntityConstraintType extends AbstractType @@ -40,7 +36,7 @@ class UserEntityConstraintType extends AbstractType $resolver->setDefaults([ 'compound' => true, 'data_class' => EntityConstraint::class, - 'text_suffix' => '', // An suffix which is attached as text-append to the input group. This can for example be used for units + 'text_suffix' => '', //A suffix which is attached as text-append to the input group. This can for example be used for units ]); } diff --git a/src/Form/Filters/LogFilterType.php b/src/Form/Filters/LogFilterType.php index f7b460b6..ad1082b7 100644 --- a/src/Form/Filters/LogFilterType.php +++ b/src/Form/Filters/LogFilterType.php @@ -56,7 +56,6 @@ use App\Form\Filters\Constraints\ChoiceConstraintType; use App\Form\Filters\Constraints\DateTimeConstraintType; use App\Form\Filters\Constraints\InstanceOfConstraintType; use App\Form\Filters\Constraints\NumberConstraintType; -use App\Form\Filters\Constraints\StructuralEntityConstraintType; use App\Form\Filters\Constraints\UserEntityConstraintType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ResetType; diff --git a/src/Form/Part/OrderdetailType.php b/src/Form/Part/OrderdetailType.php index 8489bc73..ece78af5 100644 --- a/src/Form/Part/OrderdetailType.php +++ b/src/Form/Part/OrderdetailType.php @@ -27,7 +27,6 @@ use App\Entity\Parts\Supplier; use App\Entity\PriceInformations\Orderdetail; use App\Entity\PriceInformations\Pricedetail; use App\Form\Type\StructuralEntityType; -use App\Form\WorkaroundCollectionType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; use Symfony\Component\Form\Extension\Core\Type\CollectionType; diff --git a/src/Form/Part/PartBaseType.php b/src/Form/Part/PartBaseType.php index ef9bd60c..141b5eca 100644 --- a/src/Form/Part/PartBaseType.php +++ b/src/Form/Part/PartBaseType.php @@ -36,7 +36,6 @@ use App\Form\Type\MasterPictureAttachmentType; use App\Form\Type\RichTextEditorType; use App\Form\Type\SIUnitType; use App\Form\Type\StructuralEntityType; -use App\Form\WorkaroundCollectionType; use App\Services\LogSystem\EventCommentNeededHelper; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; diff --git a/src/Form/ProjectSystem/ProjectBOMEntryCollectionType.php b/src/Form/ProjectSystem/ProjectBOMEntryCollectionType.php index 71c745c7..606f23f0 100644 --- a/src/Form/ProjectSystem/ProjectBOMEntryCollectionType.php +++ b/src/Form/ProjectSystem/ProjectBOMEntryCollectionType.php @@ -8,7 +8,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; class ProjectBOMEntryCollectionType extends AbstractType { - public function getParent() + public function getParent(): string { return CollectionType::class; } @@ -28,7 +28,7 @@ class ProjectBOMEntryCollectionType extends AbstractType ]); } - public function getBlockPrefix() + public function getBlockPrefix(): string { return 'project_bom_entry_collection'; } diff --git a/src/Form/ProjectSystem/ProjectBOMEntryType.php b/src/Form/ProjectSystem/ProjectBOMEntryType.php index 49292235..bac8d679 100644 --- a/src/Form/ProjectSystem/ProjectBOMEntryType.php +++ b/src/Form/ProjectSystem/ProjectBOMEntryType.php @@ -2,18 +2,14 @@ namespace App\Form\ProjectSystem; -use App\Entity\Parts\Part; use App\Entity\ProjectSystem\ProjectBOMEntry; use App\Form\Type\BigDecimalNumberType; use App\Form\Type\CurrencyEntityType; use App\Form\Type\PartSelectType; use App\Form\Type\RichTextEditorType; use App\Form\Type\SIUnitType; -use Svg\Tag\Text; -use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Event\PreSetDataEvent; -use Symfony\Component\Form\Extension\Core\Type\NumberType; use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormEvents; @@ -93,7 +89,7 @@ class ProjectBOMEntryType extends AbstractType } - public function getBlockPrefix() + public function getBlockPrefix(): string { return 'project_bom_entry'; } diff --git a/src/Form/Type/CurrencyEntityType.php b/src/Form/Type/CurrencyEntityType.php index 856acc9e..46aeac66 100644 --- a/src/Form/Type/CurrencyEntityType.php +++ b/src/Form/Type/CurrencyEntityType.php @@ -22,14 +22,10 @@ declare(strict_types=1); namespace App\Form\Type; -use App\Entity\Attachments\AttachmentType; -use App\Entity\Base\AbstractStructuralDBElement; use App\Entity\PriceInformations\Currency; use App\Form\Type\Helper\StructuralEntityChoiceHelper; -use App\Services\Attachments\AttachmentURLGenerator; use App\Services\Trees\NodesListBuilder; use Doctrine\ORM\EntityManagerInterface; -use RuntimeException; use Symfony\Component\Intl\Currencies; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -67,7 +63,7 @@ class CurrencyEntityType extends StructuralEntityType }); $resolver->setDefault('empty_message', function (Options $options) { - //By default we use the global base currency: + //By default, we use the global base currency: $iso_code = $this->base_currency; if ($options['base_currency']) { //Allow to override it @@ -79,7 +75,7 @@ class CurrencyEntityType extends StructuralEntityType $resolver->setDefault('used_to_select_parent', false); - //If short is set to true, then the name of the entity will only shown in the dropdown list not in the selected value. + //If short is set to true, then the name of the entity will only show in the dropdown list not in the selected value. $resolver->setDefault('short', false); } } diff --git a/src/Form/Type/Helper/StructuralEntityChoiceHelper.php b/src/Form/Type/Helper/StructuralEntityChoiceHelper.php index 6448a734..da52b83e 100644 --- a/src/Form/Type/Helper/StructuralEntityChoiceHelper.php +++ b/src/Form/Type/Helper/StructuralEntityChoiceHelper.php @@ -26,10 +26,7 @@ use App\Entity\Base\AbstractNamedDBElement; use App\Entity\Base\AbstractStructuralDBElement; use App\Entity\Contracts\HasMasterAttachmentInterface; use App\Entity\PriceInformations\Currency; -use App\Entity\UserSystem\User; -use App\Form\Type\MasterPictureAttachmentType; use App\Services\Attachments\AttachmentURLGenerator; -use RuntimeException; use Symfony\Component\Intl\Currencies; use Symfony\Component\OptionsResolver\Options; use Symfony\Contracts\Translation\TranslatorInterface; @@ -150,8 +147,8 @@ class StructuralEntityChoiceHelper /** * Do not change the structure below, even when inspection says it can be replaced with a null coalescing operator. - * It is important that the value returned here for a existing element is an int, and for a new element a string. - * I dont really understand why, but it seems to be important for the choice_loader to work correctly. + * It is important that the value returned here for an existing element is an int, and for a new element a string. + * I don't really understand why, but it seems to be important for the choice_loader to work correctly. * So please do not change this! */ if ($element->getID() === null) { diff --git a/src/Form/Type/Helper/StructuralEntityChoiceLoader.php b/src/Form/Type/Helper/StructuralEntityChoiceLoader.php index 6bca91b4..4f5347ad 100644 --- a/src/Form/Type/Helper/StructuralEntityChoiceLoader.php +++ b/src/Form/Type/Helper/StructuralEntityChoiceLoader.php @@ -20,8 +20,6 @@ namespace App\Form\Type\Helper; -use App\Entity\Base\AbstractDBElement; -use App\Entity\Base\AbstractStructuralDBElement; use App\Repository\StructuralDBElementRepository; use App\Services\Trees\NodesListBuilder; use Doctrine\ORM\EntityManagerInterface; diff --git a/src/Form/Type/PartLotSelectType.php b/src/Form/Type/PartLotSelectType.php index 61e119b0..76e31ecb 100644 --- a/src/Form/Type/PartLotSelectType.php +++ b/src/Form/Type/PartLotSelectType.php @@ -31,7 +31,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; class PartLotSelectType extends AbstractType { - public function getParent() + public function getParent(): string { return EntityType::class; } @@ -43,12 +43,12 @@ class PartLotSelectType extends AbstractType $resolver->setDefaults([ 'class' => PartLot::class, - 'choice_label' => ChoiceList::label($this, function (PartLot $part_lot) { + 'choice_label' => ChoiceList::label($this, static function (PartLot $part_lot) { return ($part_lot->getStorageLocation() ? $part_lot->getStorageLocation()->getFullPath() : '') . ' (' . $part_lot->getName() . '): ' . $part_lot->getAmount(); }), 'query_builder' => function (Options $options) { - return function (EntityRepository $er) use ($options) { + return static function (EntityRepository $er) use ($options) { return $er->createQueryBuilder('l') ->where('l.part = :part') ->setParameter('part', $options['part']); diff --git a/src/Form/Type/PartSelectType.php b/src/Form/Type/PartSelectType.php index 5ca543f7..08cf688c 100644 --- a/src/Form/Type/PartSelectType.php +++ b/src/Form/Type/PartSelectType.php @@ -35,7 +35,7 @@ class PartSelectType extends AbstractType implements DataMapperInterface public function buildForm(FormBuilderInterface $builder, array $options) { - //At initialization we have to fill the form element with our selected data, so the user can see it + //At initialization, we have to fill the form element with our selected data, so the user can see it $builder->addEventListener(FormEvents::PRE_SET_DATA, function (PreSetDataEvent $event) { $form = $event->getForm(); $config = $form->getConfig()->getOptions(); @@ -117,7 +117,7 @@ class PartSelectType extends AbstractType implements DataMapperInterface ]); } - public function getBlockPrefix() + public function getBlockPrefix(): string { return 'part_select'; } diff --git a/src/Form/Type/StructuralEntityType.php b/src/Form/Type/StructuralEntityType.php index b58caef7..9c489b47 100644 --- a/src/Form/Type/StructuralEntityType.php +++ b/src/Form/Type/StructuralEntityType.php @@ -22,29 +22,19 @@ declare(strict_types=1); namespace App\Form\Type; -use App\Entity\Attachments\AttachmentType; use App\Entity\Base\AbstractNamedDBElement; -use App\Entity\Base\AbstractStructuralDBElement; use App\Form\Type\Helper\StructuralEntityChoiceHelper; use App\Form\Type\Helper\StructuralEntityChoiceLoader; -use App\Services\Attachments\AttachmentURLGenerator; use App\Services\Trees\NodesListBuilder; use Doctrine\ORM\EntityManagerInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\CallbackTransformer; -use Symfony\Component\Form\ChoiceList\Loader\CallbackChoiceLoader; -use Symfony\Component\Form\Event\PostSubmitEvent; use Symfony\Component\Form\Event\PreSubmitEvent; -use Symfony\Component\Form\Exception\TransformationFailedException; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormEvents; -use Symfony\Component\Form\FormInterface; -use Symfony\Component\Form\FormView; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\Validator\Constraints\AtLeastOneOf; -use Symfony\Component\Validator\Constraints\IsNull; use Symfony\Component\Validator\Constraints\Valid; use Symfony\Contracts\Translation\TranslatorInterface; @@ -128,7 +118,7 @@ class StructuralEntityType extends AbstractType 'choice_translation_domain' => false, //Don't translate the entity names ]); - //Set the constraints for the case that allow add is enabled (we then have to check that the new element is valid) + //Set the constraints for the case that allow to add is enabled (we then have to check that the new element is valid) $resolver->setNormalizer('constraints', function (Options $options, $value) { if ($options['allow_add']) { $value[] = new Valid(); @@ -169,8 +159,8 @@ class StructuralEntityType extends AbstractType public function modelReverseTransform($value, array $options) { /* This step is important in combination with the caching! - The elements deserialized from cache, are not known to Doctrinte ORM any more, so doctrine thinks, - that the entity has changed (and so throws an exception about non-persited entities). + The elements deserialized from cache, are not known to Doctrine ORM anymore, so doctrine thinks, + that the entity has changed (and so throws an exception about non-persisted entities). This function just retrieves a fresh copy of the entity from database, so doctrine detect correctly that no change happened. The performance impact of this should be very small in comparison of the boost, caused by the caching. diff --git a/src/Form/Type/ThemeChoiceType.php b/src/Form/Type/ThemeChoiceType.php index 88843903..96b47510 100644 --- a/src/Form/Type/ThemeChoiceType.php +++ b/src/Form/Type/ThemeChoiceType.php @@ -20,7 +20,6 @@ namespace App\Form\Type; -use App\Entity\UserSystem\User; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -34,7 +33,7 @@ class ThemeChoiceType extends AbstractType $this->available_themes = $available_themes; } - public function getParent() + public function getParent(): string { return ChoiceType::class; } diff --git a/src/Form/Type/UserSelectType.php b/src/Form/Type/UserSelectType.php index c9c0830c..97d8e26d 100644 --- a/src/Form/Type/UserSelectType.php +++ b/src/Form/Type/UserSelectType.php @@ -40,7 +40,7 @@ class UserSelectType extends AbstractType ]); } - public function getParent() + public function getParent(): string { return StructuralEntityType::class; } diff --git a/src/Form/UserAdminForm.php b/src/Form/UserAdminForm.php index ce9cab04..06347306 100644 --- a/src/Form/UserAdminForm.php +++ b/src/Form/UserAdminForm.php @@ -23,7 +23,6 @@ declare(strict_types=1); namespace App\Form; use App\Entity\Base\AbstractNamedDBElement; -use App\Entity\Base\AbstractStructuralDBElement; use App\Entity\UserSystem\Group; use App\Entity\UserSystem\User; use App\Form\Permissions\PermissionsType; @@ -34,7 +33,6 @@ use App\Form\Type\StructuralEntityType; use App\Form\Type\ThemeChoiceType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; -use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\Extension\Core\Type\CollectionType; use Symfony\Component\Form\Extension\Core\Type\LanguageType; use Symfony\Component\Form\Extension\Core\Type\PasswordType; diff --git a/src/Form/UserSettingsType.php b/src/Form/UserSettingsType.php index cf75b0f8..37f7b7e0 100644 --- a/src/Form/UserSettingsType.php +++ b/src/Form/UserSettingsType.php @@ -29,7 +29,6 @@ use App\Form\Type\ThemeChoiceType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Event\PreSetDataEvent; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; -use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\Extension\Core\Type\EmailType; use Symfony\Component\Form\Extension\Core\Type\FileType; use Symfony\Component\Form\Extension\Core\Type\LanguageType; diff --git a/src/Helpers/BBCodeToMarkdownConverter.php b/src/Helpers/BBCodeToMarkdownConverter.php index 9ee4dff1..f800006b 100644 --- a/src/Helpers/BBCodeToMarkdownConverter.php +++ b/src/Helpers/BBCodeToMarkdownConverter.php @@ -24,7 +24,6 @@ namespace App\Helpers; use League\HTMLToMarkdown\HtmlConverter; use s9e\TextFormatter\Bundles\Forum as TextFormatter; -use SebastianBergmann\CodeCoverage\Report\Text; class BBCodeToMarkdownConverter { diff --git a/src/Helpers/Projects/ProjectBuildRequest.php b/src/Helpers/Projects/ProjectBuildRequest.php index 093581f4..4cb942d1 100644 --- a/src/Helpers/Projects/ProjectBuildRequest.php +++ b/src/Helpers/Projects/ProjectBuildRequest.php @@ -175,7 +175,7 @@ final class ProjectBuildRequest /** * Returns the amount of parts that should be withdrawn from the given lot for the corresponding BOM entry. - * @param PartLot|int $lot The part lot (or the ID of the part lot) for which the withdraw amount should be get + * @param PartLot|int $lot The part lot (or the ID of the part lot) for which the withdrawal amount should be got * @return float */ public function getLotWithdrawAmount($lot): float @@ -197,7 +197,7 @@ final class ProjectBuildRequest /** * Sets the amount of parts that should be withdrawn from the given lot for the corresponding BOM entry. - * @param PartLot|int $lot The part lot (or the ID of the part lot) for which the withdraw amount should be get + * @param PartLot|int $lot The part lot (or the ID of the part lot) for which the withdrawal amount should be got * @param float $amount * @return $this */ @@ -267,7 +267,7 @@ final class ProjectBuildRequest } /** - * Returns the list of all bom entries that have to be build. + * Returns the list of all bom entries that have to be built. * @return ProjectBOMEntry[] */ public function getBomEntries(): array @@ -276,7 +276,7 @@ final class ProjectBuildRequest } /** - * Returns the all part bom entries that have to be build. + * Returns the all part bom entries that have to be built. * @return ProjectBOMEntry[] */ public function getPartBomEntries(): array diff --git a/src/Helpers/Trees/TreeViewNode.php b/src/Helpers/Trees/TreeViewNode.php index 89e4a02e..85053239 100644 --- a/src/Helpers/Trees/TreeViewNode.php +++ b/src/Helpers/Trees/TreeViewNode.php @@ -30,17 +30,17 @@ use JsonSerializable; */ final class TreeViewNode implements JsonSerializable { - private $text; - private $href; - private $nodes; + private string $text; + private ?string $href; + private ?array $nodes; - private $state = null; + private ?TreeViewNodeState $state = null; - private $tags; + private ?array $tags = null; - private $id; + private ?int $id = null; - private $icon; + private ?string $icon = null; /** * Creates a new TreeView node with the given parameters. diff --git a/src/Helpers/Trees/TreeViewNodeState.php b/src/Helpers/Trees/TreeViewNodeState.php index 92b4611c..727135bc 100644 --- a/src/Helpers/Trees/TreeViewNodeState.php +++ b/src/Helpers/Trees/TreeViewNodeState.php @@ -29,17 +29,17 @@ final class TreeViewNodeState implements JsonSerializable /** * @var bool|null */ - private $disabled = null; + private ?bool $disabled = null; /** * @var bool|null */ - private $expanded = null; + private ?bool $expanded = null; /** * @var bool|null */ - private $selected = null; + private ?bool $selected = null; public function getDisabled(): ?bool { diff --git a/src/Migration/AbstractMultiPlatformMigration.php b/src/Migration/AbstractMultiPlatformMigration.php index 38b86644..324eeb8d 100644 --- a/src/Migration/AbstractMultiPlatformMigration.php +++ b/src/Migration/AbstractMultiPlatformMigration.php @@ -21,13 +21,8 @@ namespace App\Migration; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\DBALException; -use Doctrine\DBAL\Driver\AbstractMySQLDriver; -use Doctrine\DBAL\Driver\AbstractSQLiteDriver; use Doctrine\DBAL\Exception; use Doctrine\DBAL\Platforms\AbstractMySQLPlatform; -use Doctrine\DBAL\Platforms\MariaDBPlatform; -use Doctrine\DBAL\Platforms\MySQLPlatform; use Doctrine\DBAL\Platforms\SqlitePlatform; use Doctrine\DBAL\Schema\Schema; use Doctrine\Migrations\AbstractMigration; @@ -43,7 +38,7 @@ abstract class AbstractMultiPlatformMigration extends AbstractMigration public function __construct(Connection $connection, LoggerInterface $logger) { $this->logger = $logger; - AbstractMigration::__construct($connection, $logger); + parent::__construct($connection, $logger); } public function up(Schema $schema): void @@ -81,7 +76,7 @@ abstract class AbstractMultiPlatformMigration extends AbstractMigration } /** - * Gets the legacy Part-DB version number. Returns 0, if target database is not an legacy Part-DB database. + * Gets the legacy Part-DB version number. Returns 0, if target database is not a legacy Part-DB database. */ public function getOldDBVersion(): int { @@ -116,7 +111,7 @@ abstract class AbstractMultiPlatformMigration extends AbstractMigration } } - //As we dont have access to container, just use the default PHP pw hash function + //As we don't have access to container, just use the default PHP pw hash function return password_hash($this->admin_pw, PASSWORD_DEFAULT); } diff --git a/src/Repository/AbstractPartsContainingRepository.php b/src/Repository/AbstractPartsContainingRepository.php index 1bf4c31c..b42d075f 100644 --- a/src/Repository/AbstractPartsContainingRepository.php +++ b/src/Repository/AbstractPartsContainingRepository.php @@ -27,6 +27,7 @@ use InvalidArgumentException; abstract class AbstractPartsContainingRepository extends StructuralDBElementRepository implements PartsContainingRepositoryInterface { + /** @var int The maximum number of levels for which we can recurse before throwing an error */ private const RECURSION_LIMIT = 50; /** @@ -55,6 +56,24 @@ abstract class AbstractPartsContainingRepository extends StructuralDBElementRepo */ public function getPartsCountRecursive(AbstractPartsContainingDBElement $element): int { + return $this->getPartsCountRecursiveWithDepthN($element, self::RECURSION_LIMIT); + } + + /** + * The implementation of the recursive function to get the parts count. + * This function is used to limit the recursion depth (remaining_depth is decreased on each call). + * If the recursion limit is reached (remaining_depth <= 0), a RuntimeException is thrown. + * @internal This function is not intended to be called directly, use getPartsCountRecursive() instead. + * @param AbstractPartsContainingDBElement $element + * @param int $remaining_depth + * @return int + */ + protected function getPartsCountRecursiveWithDepthN(AbstractPartsContainingDBElement $element, int $remaining_depth): int + { + if ($remaining_depth <= 0) { + throw new \RuntimeException('Recursion limit reached!'); + } + $count = $this->getPartsCount($element); //If the element is its own parent, we have a loop in the tree, so we stop here. @@ -62,12 +81,8 @@ abstract class AbstractPartsContainingRepository extends StructuralDBElementRepo return 0; } - $n = 0; foreach ($element->getChildren() as $child) { - $count += $this->getPartsCountRecursive($child); - if ($n++ > self::RECURSION_LIMIT) { - throw new \RuntimeException('Recursion limit reached!'); - } + $count += $this->getPartsCountRecursiveWithDepthN($child, $remaining_depth - 1); } return $count; diff --git a/src/Repository/AttachmentRepository.php b/src/Repository/AttachmentRepository.php index 9ad9191b..69842352 100644 --- a/src/Repository/AttachmentRepository.php +++ b/src/Repository/AttachmentRepository.php @@ -61,7 +61,7 @@ class AttachmentRepository extends DBElementRepository } /** - * Gets the count of all external attachments (attachments only containing an URL). + * Gets the count of all external attachments (attachments only containing a URL). * * @throws NoResultException * @throws NonUniqueResultException @@ -80,7 +80,7 @@ class AttachmentRepository extends DBElementRepository } /** - * Gets the count of all attachments where an user uploaded an file. + * Gets the count of all attachments where a user uploaded a file. * * @throws NoResultException * @throws NonUniqueResultException diff --git a/src/Repository/LogEntryRepository.php b/src/Repository/LogEntryRepository.php index 857aac5b..16ada41b 100644 --- a/src/Repository/LogEntryRepository.php +++ b/src/Repository/LogEntryRepository.php @@ -100,7 +100,7 @@ class LogEntryRepository extends DBElementRepository * Gets all log entries that are related to time travelling. * * @param AbstractDBElement $element The element for which the time travel data should be retrieved - * @param DateTime $until Back to which timestamp should the data be get (including the timestamp) + * @param DateTime $until Back to which timestamp should the data be got (including the timestamp) * * @return AbstractLogEntry[] */ diff --git a/src/Repository/NamedDBElementRepository.php b/src/Repository/NamedDBElementRepository.php index 8387d47c..8485d50a 100644 --- a/src/Repository/NamedDBElementRepository.php +++ b/src/Repository/NamedDBElementRepository.php @@ -47,7 +47,7 @@ class NamedDBElementRepository extends DBElementRepository if ($entity instanceof User) { if ($entity->isDisabled()) { - //If this is an user, then add a badge when it is disabled + //If this is a user, then add a badge when it is disabled $node->setIcon('fa-fw fa-treeview fa-solid fa-user-lock text-muted'); } if ($entity->isSamlUser()) { diff --git a/src/Repository/PartRepository.php b/src/Repository/PartRepository.php index 5dfb8f45..fff8461a 100644 --- a/src/Repository/PartRepository.php +++ b/src/Repository/PartRepository.php @@ -30,7 +30,7 @@ use Doctrine\ORM\QueryBuilder; class PartRepository extends NamedDBElementRepository { /** - * Gets the summed up instock of all parts (only parts without an measurent unit). + * Gets the summed up instock of all parts (only parts without a measurement unit). * * @throws NoResultException * @throws NonUniqueResultException @@ -49,7 +49,7 @@ class PartRepository extends NamedDBElementRepository } /** - * Gets the number of parts that has price informations. + * Gets the number of parts that has price information. * * @throws NoResultException * @throws NonUniqueResultException diff --git a/src/Repository/Parts/DeviceRepository.php b/src/Repository/Parts/DeviceRepository.php index dc5d5acc..e7555f2b 100644 --- a/src/Repository/Parts/DeviceRepository.php +++ b/src/Repository/Parts/DeviceRepository.php @@ -21,11 +21,7 @@ namespace App\Repository\Parts; -use App\Entity\Base\AbstractPartsContainingDBElement; use App\Entity\ProjectSystem\Project; -use App\Entity\Parts\Category; -use App\Entity\Parts\Part; -use App\Repository\AbstractPartsContainingRepository; use App\Repository\StructuralDBElementRepository; use InvalidArgumentException; diff --git a/src/Repository/StructuralDBElementRepository.php b/src/Repository/StructuralDBElementRepository.php index d7dae474..442c5860 100644 --- a/src/Repository/StructuralDBElementRepository.php +++ b/src/Repository/StructuralDBElementRepository.php @@ -88,7 +88,7 @@ class StructuralDBElementRepository extends NamedDBElementRepository $recursiveIterator = new RecursiveIteratorIterator($elementIterator, RecursiveIteratorIterator::SELF_FIRST); //$result = iterator_to_array($recursiveIterator); - //We can not use iterator_to_array here or we get only the parent elements + //We can not use iterator_to_array here, or we get only the parent elements foreach ($recursiveIterator as $item) { $result[] = $item; } diff --git a/src/Repository/UserRepository.php b/src/Repository/UserRepository.php index b0ccd964..3cc29788 100644 --- a/src/Repository/UserRepository.php +++ b/src/Repository/UserRepository.php @@ -35,7 +35,7 @@ use Symfony\Component\Security\Core\User\UserInterface; */ final class UserRepository extends NamedDBElementRepository implements PasswordUpgraderInterface { - protected $anonymous_user; + protected ?User $anonymous_user = null; /** * Returns the anonymous user. diff --git a/src/Security/EnsureSAMLUserForSAMLLoginChecker.php b/src/Security/EnsureSAMLUserForSAMLLoginChecker.php index 1d4c3cfe..bba13c01 100644 --- a/src/Security/EnsureSAMLUserForSAMLLoginChecker.php +++ b/src/Security/EnsureSAMLUserForSAMLLoginChecker.php @@ -37,7 +37,7 @@ class EnsureSAMLUserForSAMLLoginChecker implements EventSubscriberInterface $this->translator = $translator; } - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { return [ AuthenticationSuccessEvent::class => 'onAuthenticationSuccess', diff --git a/src/Security/UserChecker.php b/src/Security/UserChecker.php index ae8e3f34..f64fb50e 100644 --- a/src/Security/UserChecker.php +++ b/src/Security/UserChecker.php @@ -25,7 +25,6 @@ namespace App\Security; use App\Entity\UserSystem\User; use Symfony\Component\Security\Core\Exception\AccountStatusException; use Symfony\Component\Security\Core\Exception\CustomUserMessageAccountStatusException; -use Symfony\Component\Security\Core\Exception\DisabledException; use Symfony\Component\Security\Core\User\UserCheckerInterface; use Symfony\Component\Security\Core\User\UserInterface; use Symfony\Contracts\Translation\TranslatorInterface; @@ -60,7 +59,7 @@ final class UserChecker implements UserCheckerInterface return; } - //Check if user is disabled. Then dont allow login + //Check if user is disabled. Then don't allow login if ($user->isDisabled()) { //throw new DisabledException(); throw new CustomUserMessageAccountStatusException($this->translator->trans('user.login_error.user_disabled', [], 'security')); diff --git a/src/Security/Voter/AttachmentVoter.php b/src/Security/Voter/AttachmentVoter.php index 135ba57f..25a856a8 100644 --- a/src/Security/Voter/AttachmentVoter.php +++ b/src/Security/Voter/AttachmentVoter.php @@ -32,7 +32,7 @@ use function in_array; class AttachmentVoter extends ExtendedVoter { - protected $security; + protected Security $security; public function __construct(PermissionManager $resolver, EntityManagerInterface $entityManager, Security $security) { diff --git a/src/Security/Voter/ParameterVoter.php b/src/Security/Voter/ParameterVoter.php index 525a75b6..352c405d 100644 --- a/src/Security/Voter/ParameterVoter.php +++ b/src/Security/Voter/ParameterVoter.php @@ -118,7 +118,7 @@ class ParameterVoter extends ExtendedVoter return $this->resolver->inherit($user, $param, $attribute) ?? false; } - protected function supports(string $attribute, $subject) + protected function supports(string $attribute, $subject): bool { if (is_a($subject, AbstractParameter::class, true)) { //These are the allowed attributes diff --git a/src/Security/Voter/StructureVoter.php b/src/Security/Voter/StructureVoter.php index df88e113..a37083ea 100644 --- a/src/Security/Voter/StructureVoter.php +++ b/src/Security/Voter/StructureVoter.php @@ -69,7 +69,7 @@ class StructureVoter extends ExtendedVoter } /** - * Maps a instance type to the permission name. + * Maps an instance type to the permission name. * * @param object|string $subject The subject for which the permission name should be generated * diff --git a/src/Security/Voter/UserVoter.php b/src/Security/Voter/UserVoter.php index a311e4db..5e34b8cc 100644 --- a/src/Security/Voter/UserVoter.php +++ b/src/Security/Voter/UserVoter.php @@ -80,7 +80,7 @@ class UserVoter extends ExtendedVoter } } - //Else just check users permission: + //Else just check user permission: if ($this->resolver->isValidOperation('users', $attribute)) { return $this->resolver->inherit($user, 'users', $attribute) ?? false; } diff --git a/src/Serializer/BigNumberNormalizer.php b/src/Serializer/BigNumberNormalizer.php index fc352cf1..89826962 100644 --- a/src/Serializer/BigNumberNormalizer.php +++ b/src/Serializer/BigNumberNormalizer.php @@ -20,10 +20,8 @@ namespace App\Serializer; -use Brick\Math\BigDecimal; use Brick\Math\BigNumber; use Symfony\Component\Serializer\Normalizer\CacheableSupportsMethodInterface; -use Symfony\Component\Serializer\Normalizer\ContextAwareNormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; class BigNumberNormalizer implements NormalizerInterface, CacheableSupportsMethodInterface diff --git a/src/Serializer/PartNormalizer.php b/src/Serializer/PartNormalizer.php index ef844acf..ce910d8c 100644 --- a/src/Serializer/PartNormalizer.php +++ b/src/Serializer/PartNormalizer.php @@ -58,7 +58,7 @@ class PartNormalizer implements NormalizerInterface, DenormalizerInterface, Cach return $data instanceof Part; } - public function normalize($object, string $format = null, array $context = []) + public function normalize($object, string $format = null, array $context = []): array { if (!$object instanceof Part) { throw new \InvalidArgumentException('This normalizer only supports Part objects!'); @@ -94,7 +94,7 @@ class PartNormalizer implements NormalizerInterface, DenormalizerInterface, Cach return $data; } - public function denormalize($data, string $type, string $format = null, array $context = []) + public function denormalize($data, string $type, string $format = null, array $context = []): ?Part { $this->normalizeKeys($data); diff --git a/src/Serializer/StructuralElementDenormalizer.php b/src/Serializer/StructuralElementDenormalizer.php index bd832f1f..c4cfb09d 100644 --- a/src/Serializer/StructuralElementDenormalizer.php +++ b/src/Serializer/StructuralElementDenormalizer.php @@ -26,7 +26,6 @@ use Doctrine\ORM\EntityManagerInterface; use Symfony\Component\Serializer\Normalizer\CacheableSupportsMethodInterface; use Symfony\Component\Serializer\Normalizer\ContextAwareDenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; -use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; class StructuralElementDenormalizer implements ContextAwareDenormalizerInterface, CacheableSupportsMethodInterface @@ -43,15 +42,15 @@ class StructuralElementDenormalizer implements ContextAwareDenormalizerInterface $this->entityManager = $entityManager; } - public function supportsDenormalization($data, string $type, string $format = null, array $context = []) + public function supportsDenormalization($data, string $type, string $format = null, array $context = []): bool { return is_array($data) && is_subclass_of($type, AbstractStructuralDBElement::class) - //Only denormalize if we are doing an file import operation - && in_array('import', $context['groups'] ?? []); + //Only denormalize if we are doing a file import operation + && in_array('import', $context['groups'] ?? [], true); } - public function denormalize($data, string $type, string $format = null, array $context = []) + public function denormalize($data, string $type, string $format = null, array $context = []): ?AbstractStructuralDBElement { /** @var AbstractStructuralDBElement $deserialized_entity */ $deserialized_entity = $this->normalizer->denormalize($data, $type, $format, $context); @@ -70,7 +69,7 @@ class StructuralElementDenormalizer implements ContextAwareDenormalizerInterface //Check if we have created the entity in this request before (so we don't create multiple entities for the same path) //Entities get saved in the cache by type and path - //We use a different cache for this then the objects created by a string value (saved in repo). However that should not be a problem + //We use a different cache for this then the objects created by a string value (saved in repo). However, that should not be a problem //unless the user data has mixed structure between json data and a string path if (isset($this->object_cache[$type][$path])) { return $this->object_cache[$type][$path]; diff --git a/src/Serializer/StructuralElementFromNameDenormalizer.php b/src/Serializer/StructuralElementFromNameDenormalizer.php index ac035946..8516c951 100644 --- a/src/Serializer/StructuralElementFromNameDenormalizer.php +++ b/src/Serializer/StructuralElementFromNameDenormalizer.php @@ -21,11 +21,9 @@ namespace App\Serializer; use App\Entity\Base\AbstractStructuralDBElement; -use App\Form\Type\StructuralEntityType; use App\Repository\StructuralDBElementRepository; use Doctrine\ORM\EntityManagerInterface; use Symfony\Component\Serializer\Normalizer\CacheableSupportsMethodInterface; -use Symfony\Component\Serializer\Normalizer\ContextAwareDenormalizerInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; class StructuralElementFromNameDenormalizer implements DenormalizerInterface, CacheableSupportsMethodInterface @@ -37,12 +35,12 @@ class StructuralElementFromNameDenormalizer implements DenormalizerInterface, Ca $this->em = $em; } - public function supportsDenormalization($data, string $type, string $format = null) + public function supportsDenormalization($data, string $type, string $format = null): bool { return is_string($data) && is_subclass_of($type, AbstractStructuralDBElement::class); } - public function denormalize($data, string $type, string $format = null, array $context = []) + public function denormalize($data, string $type, string $format = null, array $context = []): ?AbstractStructuralDBElement { //Retrieve the repository for the given type /** @var StructuralDBElementRepository $repo */ @@ -71,7 +69,7 @@ class StructuralElementFromNameDenormalizer implements DenormalizerInterface, Ca public function hasCacheableSupportsMethod(): bool { - //Must be false, because we do a is_string check on data in supportsDenormalization + //Must be false, because we do an is_string check on data in supportsDenormalization return false; } } \ No newline at end of file diff --git a/src/Serializer/StructuralElementNormalizer.php b/src/Serializer/StructuralElementNormalizer.php index c412fabd..060fecaf 100644 --- a/src/Serializer/StructuralElementNormalizer.php +++ b/src/Serializer/StructuralElementNormalizer.php @@ -22,8 +22,6 @@ namespace App\Serializer; use App\Entity\Base\AbstractStructuralDBElement; use Symfony\Component\Serializer\Normalizer\CacheableSupportsMethodInterface; -use Symfony\Component\Serializer\Normalizer\ContextAwareDenormalizerInterface; -use Symfony\Component\Serializer\Normalizer\ContextAwareNormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; @@ -41,7 +39,7 @@ class StructuralElementNormalizer implements NormalizerInterface, CacheableSuppo return $data instanceof AbstractStructuralDBElement; } - public function normalize($object, string $format = null, array $context = []) + public function normalize($object, string $format = null, array $context = []): array { if (!$object instanceof AbstractStructuralDBElement) { throw new \InvalidArgumentException('This normalizer only supports AbstractStructural objects!'); diff --git a/src/Services/Attachments/AttachmentManager.php b/src/Services/Attachments/AttachmentManager.php index bddea30b..81b1334f 100644 --- a/src/Services/Attachments/AttachmentManager.php +++ b/src/Services/Attachments/AttachmentManager.php @@ -140,7 +140,7 @@ class AttachmentManager } /** - * Returns a human readable version of the attachment file size. + * Returns a human-readable version of the attachment file size. * For external attachments, null is returned. * * @param int $decimals The number of decimals numbers that should be printed diff --git a/src/Services/Attachments/AttachmentReverseSearch.php b/src/Services/Attachments/AttachmentReverseSearch.php index 34a6b929..efcbb5bd 100644 --- a/src/Services/Attachments/AttachmentReverseSearch.php +++ b/src/Services/Attachments/AttachmentReverseSearch.php @@ -30,7 +30,7 @@ use SplFileInfo; use Symfony\Component\Filesystem\Filesystem; /** - * This service provides functions to find attachments via an reverse search based on a file. + * This service provides functions to find attachments via a reverse search based on a file. */ class AttachmentReverseSearch { @@ -53,7 +53,7 @@ class AttachmentReverseSearch * * @param SplFileInfo $file The file for which is searched * - * @return Attachment[] an list of attachments that use the given file + * @return Attachment[] a list of attachments that use the given file */ public function findAttachmentsByFile(SplFileInfo $file): array { @@ -75,11 +75,11 @@ class AttachmentReverseSearch * @param SplFileInfo $file The file that should be removed * @param int $threshold the threshold used, to determine if a file should be deleted or not * - * @return bool True, if the file was delete. False if not. + * @return bool True, if the file was deleted. False if not. */ public function deleteIfNotUsed(SplFileInfo $file, int $threshold = 1): bool { - /* When the file is used more then $threshold times, don't delete it */ + /* When the file is used more than $threshold times, don't delete it */ if (count($this->findAttachmentsByFile($file)) > $threshold) { return false; } diff --git a/src/Services/Attachments/AttachmentSubmitHandler.php b/src/Services/Attachments/AttachmentSubmitHandler.php index 65e5c7db..4dca3c4c 100644 --- a/src/Services/Attachments/AttachmentSubmitHandler.php +++ b/src/Services/Attachments/AttachmentSubmitHandler.php @@ -108,7 +108,7 @@ class AttachmentSubmitHandler */ public function isValidFileExtension(AttachmentType $attachment_type, UploadedFile $uploadedFile): bool { - //Only validate if the attachment type has specified an filetype filter: + //Only validate if the attachment type has specified a filetype filter: if (empty($attachment_type->getFiletypeFilter())) { return true; } @@ -121,10 +121,10 @@ class AttachmentSubmitHandler /** * Generates a filename for the given attachment and extension. - * The filename contains a random id, so every time this function is called you get an unique name. + * The filename contains a random id, so every time this function is called you get a unique name. * * @param Attachment $attachment The attachment that should be used for generating an attachment - * @param string $extension The extension that the new file should have (must only contain chars allowed in pathes) + * @param string $extension The extension that the new file should have (must only contain chars allowed in paths) * * @return string the new filename */ @@ -136,7 +136,7 @@ class AttachmentSubmitHandler $extension ); - //Use the (sanatized) attachment name as an filename part + //Use the (sanatized) attachment name as a filename part $safeName = transliterator_transliterate( 'Any-Latin; Latin-ASCII; [^A-Za-z0-9_] remove; Lower()', $attachment->getName() @@ -177,12 +177,12 @@ class AttachmentSubmitHandler } /** - * Handle the submit of an attachment form. + * Handle submission of an attachment form. * This function will move the uploaded file or download the URL file to server, if needed. * * @param Attachment $attachment the attachment that should be used for handling * @param UploadedFile|null $file If given, that file will be moved to the right location - * @param array $options The options to use with the upload. Here you can specify that an URL should be downloaded, + * @param array $options The options to use with the upload. Here you can specify that a URL should be downloaded, * or an file should be moved to a secure location. * * @return Attachment The attachment with the new filename (same instance as passed $attachment) @@ -219,7 +219,7 @@ class AttachmentSubmitHandler } /** - * Rename attachments with an unsafe extension (meaning files which would be runned by a to a safe one. + * Rename attachments with an unsafe extension (meaning files which would be run by a to a safe one). * @param Attachment $attachment * @return Attachment */ @@ -261,7 +261,7 @@ class AttachmentSubmitHandler $resolver->setDefaults([ //If no preview image was set yet, the new uploaded file will become the preview image 'become_preview_if_empty' => true, - //When an URL is given download the URL + //When a URL is given download the URL 'download_url' => false, 'secure_attachment' => false, ]); @@ -357,17 +357,17 @@ class AttachmentSubmitHandler //File download should be finished here, so determine the new filename and extension $headers = $response->getHeaders(); - //Try to determine an filename + //Try to determine a filename $filename = ''; - //If an content disposition header was set try to extract the filename out of it + //If a content disposition header was set try to extract the filename out of it if (isset($headers['content-disposition'])) { $tmp = []; preg_match('/[^;\\n=]*=([\'\"])*(.*)(?(1)\1|)/', $headers['content-disposition'][0], $tmp); $filename = $tmp[2]; } - //If we dont know filename yet, try to determine it out of url + //If we don't know filename yet, try to determine it out of url if ('' === $filename) { $filename = basename(parse_url($url, PHP_URL_PATH)); } @@ -375,7 +375,7 @@ class AttachmentSubmitHandler //Set original file $attachment->setFilename($filename); - //Check if we have a extension given + //Check if we have an extension given $pathinfo = pathinfo($filename); if (!empty($pathinfo['extension'])) { $new_ext = $pathinfo['extension']; @@ -443,11 +443,13 @@ class AttachmentSubmitHandler ]; if (ctype_digit((string) $maxSize)) { return (int) $maxSize; - } elseif (preg_match('/^(\d++)('.implode('|', array_keys($factors)).')$/i', $maxSize, $matches)) { - return (((int) $matches[1]) * $factors[strtolower($matches[2])]); - } else { - throw new RuntimeException(sprintf('"%s" is not a valid maximum size.', $maxSize)); } + + if (preg_match('/^(\d++)('.implode('|', array_keys($factors)).')$/i', $maxSize, $matches)) { + return (((int) $matches[1]) * $factors[strtolower($matches[2])]); + } + + throw new RuntimeException(sprintf('"%s" is not a valid maximum size.', $maxSize)); } /* diff --git a/src/Services/Attachments/AttachmentURLGenerator.php b/src/Services/Attachments/AttachmentURLGenerator.php index 1aa37904..742cce81 100644 --- a/src/Services/Attachments/AttachmentURLGenerator.php +++ b/src/Services/Attachments/AttachmentURLGenerator.php @@ -25,12 +25,7 @@ namespace App\Services\Attachments; use App\Entity\Attachments\Attachment; use InvalidArgumentException; use Liip\ImagineBundle\Imagine\Cache\CacheManager; -use Liip\ImagineBundle\Service\FilterService; use Psr\Log\LoggerInterface; -use RuntimeException; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\UrlHelper; -use Symfony\Component\Routing\Generator\UrlGenerator; use function strlen; use Symfony\Component\Asset\Packages; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; @@ -62,7 +57,7 @@ class AttachmentURLGenerator } /** - * Converts the absolute file path to a version relative to the public folder, that can be passed to asset + * Converts the absolute file path to a version relative to the public folder, that can be passed to the * Asset Component functions. * * @param string $absolute_path the absolute path that should be converted @@ -82,7 +77,7 @@ class AttachmentURLGenerator $public_path = $this->public_path; } - //Our absolute path must begin with public path or we can not use it for asset pathes. + //Our absolute path must begin with public path, or we can not use it for asset pathes. if (0 !== strpos($absolute_path, $public_path)) { return null; } @@ -92,7 +87,7 @@ class AttachmentURLGenerator } /** - * Converts a placeholder path to a path to a image path. + * Converts a placeholder path to a path to an image path. * * @param string $placeholder_path the placeholder path that should be converted */ @@ -125,7 +120,7 @@ class AttachmentURLGenerator } /** - * Returns a URL to an thumbnail of the attachment file. + * Returns a URL to a thumbnail of the attachment file. * @return string|null The URL or null if the attachment file is not existing */ public function getThumbnailURL(Attachment $attachment, string $filter_name = 'thumbnail_sm'): ?string @@ -160,7 +155,7 @@ class AttachmentURLGenerator //So we remove the schema manually return preg_replace('/^https?:/', '', $tmp); } catch (\Imagine\Exception\RuntimeException $e) { - //If the filter fails, we can not serve the thumbnail and fall back to the original image and log an warning + //If the filter fails, we can not serve the thumbnail and fall back to the original image and log a warning $this->logger->warning('Could not open thumbnail for attachment with ID ' . $attachment->getID() . ': ' . $e->getMessage()); return $this->assets->getUrl($asset_path); } diff --git a/src/Services/Attachments/FileTypeFilterTools.php b/src/Services/Attachments/FileTypeFilterTools.php index bf44cbe1..6fc0a162 100644 --- a/src/Services/Attachments/FileTypeFilterTools.php +++ b/src/Services/Attachments/FileTypeFilterTools.php @@ -29,7 +29,7 @@ use Symfony\Contracts\Cache\CacheInterface; use Symfony\Contracts\Cache\ItemInterface; /** - * An servive that helps working with filetype filters (based on the format accept uses. + * A service that helps to work with filetype filters (based on the format accept uses). * See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#Unique_file_type_specifiers for * more details. */ diff --git a/src/Services/ElementTypeNameGenerator.php b/src/Services/ElementTypeNameGenerator.php index be325320..12c7f0d0 100644 --- a/src/Services/ElementTypeNameGenerator.php +++ b/src/Services/ElementTypeNameGenerator.php @@ -80,7 +80,7 @@ class ElementTypeNameGenerator } /** - * Gets an localized label for the type of the entity. + * Gets a localized label for the type of the entity. * A part element becomes "Part" ("Bauteil" in german) and a category object becomes "Category". * Useful when the type should be shown to user. * Throws an exception if the class is not supported. @@ -95,7 +95,7 @@ class ElementTypeNameGenerator { $class = is_string($entity) ? $entity : get_class($entity); - //Check if we have an direct array entry for our entity class, then we can use it + //Check if we have a direct array entry for our entity class, then we can use it if (isset($this->mapping[$class])) { return $this->mapping[$class]; } diff --git a/src/Services/Formatters/AmountFormatter.php b/src/Services/Formatters/AmountFormatter.php index 18d52a44..ccc4c4b3 100644 --- a/src/Services/Formatters/AmountFormatter.php +++ b/src/Services/Formatters/AmountFormatter.php @@ -23,13 +23,12 @@ declare(strict_types=1); namespace App\Services\Formatters; use App\Entity\Parts\MeasurementUnit; -use App\Services\Formatters\SIFormatter; use InvalidArgumentException; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; /** - * This service formats an part amout using a Measurement Unit. + * This service formats a part amount using a Measurement Unit. */ class AmountFormatter { @@ -77,7 +76,7 @@ class AmountFormatter //Otherwise just output it if (!empty($options['unit'])) { $format_string = '%.'.$options['decimals'].'f '.$options['unit']; - } else { //Dont add space after number if no unit was specified + } else { //Don't add space after number if no unit was specified $format_string = '%.'.$options['decimals'].'f'; } @@ -127,7 +126,7 @@ class AmountFormatter $resolver->setAllowedTypes('decimals', 'int'); $resolver->setNormalizer('decimals', static function (Options $options, $value) { - // If the unit is integer based, then dont show any decimals + // If the unit is integer based, then don't show any decimals if ($options['is_integer']) { return 0; } diff --git a/src/Services/Formatters/MarkdownParser.php b/src/Services/Formatters/MarkdownParser.php index 805fd4bf..1c1d8ff8 100644 --- a/src/Services/Formatters/MarkdownParser.php +++ b/src/Services/Formatters/MarkdownParser.php @@ -25,7 +25,7 @@ namespace App\Services\Formatters; use Symfony\Contracts\Translation\TranslatorInterface; /** - * This class allows you to convert markdown text to HTML. + * This class allows you to convert Markdown text to HTML. */ class MarkdownParser { @@ -40,7 +40,7 @@ class MarkdownParser * Mark the markdown for rendering. * The rendering of markdown is done on client side. * - * @param string $markdown the markdown text that should be parsed to html + * @param string $markdown the Markdown text that should be parsed to html * @param bool $inline_mode When true, p blocks will have no margins behind them * * @return string the markdown in a version that can be parsed on client side diff --git a/src/Services/Formatters/MoneyFormatter.php b/src/Services/Formatters/MoneyFormatter.php index ee8a189a..1907fe90 100644 --- a/src/Services/Formatters/MoneyFormatter.php +++ b/src/Services/Formatters/MoneyFormatter.php @@ -38,7 +38,7 @@ class MoneyFormatter } /** - * Format the the given value in the given currency. + * Format the given value in the given currency. * * @param string|float $value the value that should be formatted * @param Currency|null $currency The currency that should be used for formatting. If null the global one is used diff --git a/src/Services/Formatters/SIFormatter.php b/src/Services/Formatters/SIFormatter.php index 288641a3..619c2de3 100644 --- a/src/Services/Formatters/SIFormatter.php +++ b/src/Services/Formatters/SIFormatter.php @@ -45,7 +45,7 @@ class SIFormatter * * @param int $magnitude the magnitude for which the prefix should be determined * - * @return array A array, containing the divisor in first element, and the prefix symbol in second. For example, [1000, "k"]. + * @return array An array, containing the divisor in first element, and the prefix symbol in second. For example, [1000, "k"]. */ public function getPrefixByMagnitude(int $magnitude): array { diff --git a/src/Services/ImportExportSystem/BOMImporter.php b/src/Services/ImportExportSystem/BOMImporter.php index d3fa4b9c..72fa84d5 100644 --- a/src/Services/ImportExportSystem/BOMImporter.php +++ b/src/Services/ImportExportSystem/BOMImporter.php @@ -26,8 +26,6 @@ use InvalidArgumentException; use League\Csv\Reader; use Symfony\Component\HttpFoundation\File\File; use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\Serializer\SerializerInterface; -use Symfony\Component\Validator\Validator\ValidatorInterface; class BOMImporter { @@ -114,7 +112,7 @@ class BOMImporter foreach ($csv->getRecords() as $offset => $entry) { //Translate the german field names to english - $entry = array_combine(array_map(function ($key) { + $entry = array_combine(array_map(static function ($key) { return self::MAP_KICAD_PCB_FIELDS[$key] ?? $key; }, array_keys($entry)), $entry); diff --git a/src/Services/ImportExportSystem/EntityExporter.php b/src/Services/ImportExportSystem/EntityExporter.php index 2b84b115..a4825869 100644 --- a/src/Services/ImportExportSystem/EntityExporter.php +++ b/src/Services/ImportExportSystem/EntityExporter.php @@ -24,7 +24,6 @@ namespace App\Services\ImportExportSystem; use App\Entity\Base\AbstractNamedDBElement; use Symfony\Component\OptionsResolver\OptionsResolver; -use function in_array; use InvalidArgumentException; use function is_array; use ReflectionClass; @@ -75,7 +74,6 @@ class EntityExporter } //Ensure that all entities are of type AbstractNamedDBElement - $entity_type = null; foreach ($entities as $entity) { if (!$entity instanceof AbstractNamedDBElement) { throw new InvalidArgumentException('All entities must be of type AbstractNamedDBElement!'); diff --git a/src/Services/ImportExportSystem/PartKeeprImporter/PKImportHelperTrait.php b/src/Services/ImportExportSystem/PartKeeprImporter/PKImportHelperTrait.php index 8941502f..a5006f51 100644 --- a/src/Services/ImportExportSystem/PartKeeprImporter/PKImportHelperTrait.php +++ b/src/Services/ImportExportSystem/PartKeeprImporter/PKImportHelperTrait.php @@ -50,7 +50,7 @@ trait PKImportHelperTrait */ protected function convertAttachmentDataToEntity(array $attachment_row, string $target_class, string $type): Attachment { - //By default we use the cached version + //By default, we use the cached version if (!$this->import_attachment_type) { //Get the import attachment type $this->import_attachment_type = $this->em->getRepository(AttachmentType::class)->findOneBy([ @@ -103,7 +103,7 @@ trait PKImportHelperTrait /** * Imports the attachments from the given data * @param array $data The PartKeepr database - * @param string $table_name The table name for the attachments (if it contain "image", it will be treated as an image) + * @param string $table_name The table name for the attachments (if it contains "image", it will be treated as an image) * @param string $target_class The target class (e.g. Part) * @param string $target_id_field The field name where the target ID is stored * @param string $attachment_class The attachment class (e.g. PartAttachment) diff --git a/src/Services/ImportExportSystem/PartKeeprImporter/PKOptionalImporter.php b/src/Services/ImportExportSystem/PartKeeprImporter/PKOptionalImporter.php index a19422e1..4d3af4f4 100644 --- a/src/Services/ImportExportSystem/PartKeeprImporter/PKOptionalImporter.php +++ b/src/Services/ImportExportSystem/PartKeeprImporter/PKOptionalImporter.php @@ -30,7 +30,7 @@ use Doctrine\ORM\EntityManagerInterface; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; /** - * This service is used to other non mandatory data from a PartKeepr export. + * This service is used to other non-mandatory data from a PartKeepr export. * You have to import the datastructures and parts first to use project import! */ class PKOptionalImporter diff --git a/src/Services/LabelSystem/BarcodeGenerator.php b/src/Services/LabelSystem/BarcodeGenerator.php index a192abf2..d88210ca 100644 --- a/src/Services/LabelSystem/BarcodeGenerator.php +++ b/src/Services/LabelSystem/BarcodeGenerator.php @@ -41,13 +41,12 @@ declare(strict_types=1); namespace App\Services\LabelSystem; +use App\Entity\Base\AbstractDBElement; +use App\Entity\Base\AbstractStructuralDBElement; use App\Entity\LabelSystem\LabelOptions; use App\Services\LabelSystem\Barcodes\BarcodeContentGenerator; use Com\Tecnick\Barcode\Barcode; use InvalidArgumentException; -use PhpParser\Node\Stmt\Label; -use Symfony\Component\Mime\MimeTypes; -use Twig\Extra\Html\HtmlExtension; final class BarcodeGenerator { @@ -125,7 +124,7 @@ final class BarcodeGenerator return $bobj->getSvgCode(); } - public function getContent(LabelOptions $options, object $target): ?string + public function getContent(LabelOptions $options, AbstractDBElement $target): ?string { switch ($options->getBarcodeType()) { case 'qr': diff --git a/src/Services/LabelSystem/LabelGenerator.php b/src/Services/LabelSystem/LabelGenerator.php index 3244875f..4afb20ae 100644 --- a/src/Services/LabelSystem/LabelGenerator.php +++ b/src/Services/LabelSystem/LabelGenerator.php @@ -106,7 +106,7 @@ final class LabelGenerator } /** - * Converts width and height given in mm to an size array, that can be used by DOMPDF for page size. + * Converts width and height given in mm to a size array, that can be used by DOMPDF for page size. * * @param float $width The width of the paper * @param float $height The height of the paper diff --git a/src/Services/LabelSystem/LabelProfileDropdownHelper.php b/src/Services/LabelSystem/LabelProfileDropdownHelper.php index 662922f6..8245c062 100644 --- a/src/Services/LabelSystem/LabelProfileDropdownHelper.php +++ b/src/Services/LabelSystem/LabelProfileDropdownHelper.php @@ -70,7 +70,7 @@ final class LabelProfileDropdownHelper $repo = $this->entityManager->getRepository(LabelProfile::class); return $this->cache->get($key, function (ItemInterface $item) use ($repo, $type, $secure_class_name) { - // Invalidate when groups, a element with the class or the user changes + // Invalidate when groups, an element with the class or the user changes $item->tag(['groups', 'tree_treeview', $this->keyGenerator->generateKey(), $secure_class_name]); return $repo->getDropdownProfiles($type); diff --git a/src/Services/LabelSystem/PlaceholderProviders/BarcodeProvider.php b/src/Services/LabelSystem/PlaceholderProviders/BarcodeProvider.php index 9fbcd293..06144831 100644 --- a/src/Services/LabelSystem/PlaceholderProviders/BarcodeProvider.php +++ b/src/Services/LabelSystem/PlaceholderProviders/BarcodeProvider.php @@ -21,7 +21,6 @@ namespace App\Services\LabelSystem\PlaceholderProviders; use App\Entity\LabelSystem\LabelOptions; -use App\Entity\LabelSystem\LabelProfile; use App\Services\LabelSystem\BarcodeGenerator; use App\Services\LabelSystem\Barcodes\BarcodeContentGenerator; diff --git a/src/Services/LabelSystem/PlaceholderProviders/GlobalProviders.php b/src/Services/LabelSystem/PlaceholderProviders/GlobalProviders.php index 1dd7188a..dae87fd4 100644 --- a/src/Services/LabelSystem/PlaceholderProviders/GlobalProviders.php +++ b/src/Services/LabelSystem/PlaceholderProviders/GlobalProviders.php @@ -45,7 +45,6 @@ use App\Entity\UserSystem\User; use DateTime; use IntlDateFormatter; use Locale; -use Symfony\Component\Routing\Generator\UrlGenerator; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Component\Security\Core\Security; diff --git a/src/Services/LogSystem/EventLogger.php b/src/Services/LogSystem/EventLogger.php index 8155819b..0216cc3a 100644 --- a/src/Services/LogSystem/EventLogger.php +++ b/src/Services/LogSystem/EventLogger.php @@ -101,12 +101,12 @@ class EventLogger return true; } - //If the normal log function does not added the log entry, we just do nothing + //If the normal log function does not get added to the log entry, we just do nothing return false; } /** - * Adds the given log entry to the Log, if the entry fullfills the global configured criterias and flush afterwards. + * Adds the given log entry to the Log, if the entry fulfills the global configured criteria and flush afterward. * * @return bool returns true, if the event was added to log */ @@ -129,12 +129,12 @@ class EventLogger $blacklist = $blacklist ?? $this->blacklist; $whitelist = $whitelist ?? $this->whitelist; - //Dont add the entry if it does not reach the minimum level + //Don't add the entry if it does not reach the minimum level if ($logEntry->getLevel() > $minimum_log_level) { return false; } - //Check if the event type is black listed + //Check if the event type is blacklisted if (!empty($blacklist) && $this->isObjectClassInArray($logEntry, $blacklist)) { return false; } @@ -144,7 +144,7 @@ class EventLogger return false; } - // By default all things should be added + // By default, all things should be added return true; } diff --git a/src/Services/LogSystem/EventUndoHelper.php b/src/Services/LogSystem/EventUndoHelper.php index 3dd65eb1..f2328cbc 100644 --- a/src/Services/LogSystem/EventUndoHelper.php +++ b/src/Services/LogSystem/EventUndoHelper.php @@ -91,7 +91,7 @@ class EventUndoHelper } /** - * Clear the currently the set undone event. + * Clear the currently set undone event. */ public function clearUndoneEvent(): void { @@ -99,7 +99,7 @@ class EventUndoHelper } /** - * Check if a event is undone. + * Check if an event is undone. */ public function isUndo(): bool { diff --git a/src/Services/LogSystem/LogEntryExtraFormatter.php b/src/Services/LogSystem/LogEntryExtraFormatter.php index 74eded48..2950842b 100644 --- a/src/Services/LogSystem/LogEntryExtraFormatter.php +++ b/src/Services/LogSystem/LogEntryExtraFormatter.php @@ -58,7 +58,7 @@ class LogEntryExtraFormatter } /** - * Return an user viewable representation of the extra data in a log entry, styled for console output. + * Return a user viewable representation of the extra data in a log entry, styled for console output. */ public function formatConsole(AbstractLogEntry $logEntry): string { @@ -81,7 +81,7 @@ class LogEntryExtraFormatter } /** - * Return a HTML formatted string containing a user viewable form of the Extra data. + * Return an HTML formatted string containing a user viewable form of the Extra data. */ public function format(AbstractLogEntry $context): string { diff --git a/src/Services/LogSystem/TimeTravel.php b/src/Services/LogSystem/TimeTravel.php index 9933d235..99bda007 100644 --- a/src/Services/LogSystem/TimeTravel.php +++ b/src/Services/LogSystem/TimeTravel.php @@ -35,10 +35,8 @@ use Brick\Math\BigDecimal; use DateTime; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\EntityManagerInterface; -use Doctrine\ORM\Mapping\ClassMetadata; use Doctrine\ORM\Mapping\ClassMetadataInfo; use Doctrine\ORM\Mapping\MappingException; -use DoctrineExtensions\Query\Mysql\Date; use Exception; use InvalidArgumentException; use ReflectionClass; @@ -138,7 +136,7 @@ class TimeTravel continue; } - //Revert many to one association (one element in property) + //Revert many-to-one association (one element in property) if ( ClassMetadataInfo::MANY_TO_ONE === $mapping['type'] || ClassMetadataInfo::ONE_TO_ONE === $mapping['type'] @@ -158,7 +156,7 @@ class TimeTravel } foreach ($target_elements as $target_element) { if (null !== $target_element && $element->getLastModified() >= $timestamp) { - //Remove the element from collection, if it did not existed at $timestamp + //Remove the element from collection, if it did not exist at $timestamp if (!$this->repo->getElementExistedAtTimestamp( $target_element, $timestamp diff --git a/src/Services/Parameters/ParameterExtractor.php b/src/Services/Parameters/ParameterExtractor.php index de5ecb51..a5c6a0c0 100644 --- a/src/Services/Parameters/ParameterExtractor.php +++ b/src/Services/Parameters/ParameterExtractor.php @@ -93,7 +93,7 @@ class ParameterExtractor [, $name, $value] = $matches; $value = trim($value); - //Dont allow empty names or values (these are a sign of an invalid extracted string) + //Don't allow empty names or values (these are a sign of an invalid extracted string) if (empty($name) || empty($value)) { return null; } diff --git a/src/Services/Parts/PartLotWithdrawAddHelper.php b/src/Services/Parts/PartLotWithdrawAddHelper.php index 80403dd4..a6f7060c 100644 --- a/src/Services/Parts/PartLotWithdrawAddHelper.php +++ b/src/Services/Parts/PartLotWithdrawAddHelper.php @@ -3,7 +3,6 @@ namespace App\Services\Parts; use App\Entity\LogSystem\PartStockChangedLogEntry; -use App\Entity\Parts\Part; use App\Entity\Parts\PartLot; use App\Services\LogSystem\EventCommentHelper; use App\Services\LogSystem\EventLogger; diff --git a/src/Services/Parts/PricedetailHelper.php b/src/Services/Parts/PricedetailHelper.php index f9902a98..a270c622 100644 --- a/src/Services/Parts/PricedetailHelper.php +++ b/src/Services/Parts/PricedetailHelper.php @@ -153,13 +153,13 @@ class PricedetailHelper foreach ($orderdetails as $orderdetail) { $pricedetail = $orderdetail->findPriceForQty($amount); - //When we dont have informations about this amount, ignore it + //When we don't have information about this amount, ignore it if (null === $pricedetail) { continue; } $converted = $this->convertMoneyToCurrency($pricedetail->getPricePerUnit(), $pricedetail->getCurrency(), $currency); - //Ignore price informations that can not be converted to base currency. + //Ignore price information that can not be converted to base currency. if (null !== $converted) { $avg = $avg->plus($converted); ++$count; diff --git a/src/Services/ProjectSystem/ProjectBuildHelper.php b/src/Services/ProjectSystem/ProjectBuildHelper.php index 8eee0772..0e091547 100644 --- a/src/Services/ProjectSystem/ProjectBuildHelper.php +++ b/src/Services/ProjectSystem/ProjectBuildHelper.php @@ -79,7 +79,7 @@ class ProjectBuildHelper } /** - * Checks if the given project can be build with the current stock. + * Checks if the given project can be built with the current stock. * This means that the maximum buildable count is greater or equal than the requested $number_of_projects * @param Project $project * @parm int $number_of_builds @@ -91,7 +91,7 @@ class ProjectBuildHelper } /** - * Check if the given BOM entry can be build with the current stock. + * Check if the given BOM entry can be built with the current stock. * This means that the maximum buildable count is greater or equal than the requested $number_of_projects * @param ProjectBOMEntry $bom_entry * @param int $number_of_builds @@ -137,7 +137,7 @@ class ProjectBuildHelper /** * Withdraw the parts from the stock using the given ProjectBuildRequest and create the build parts entries, if needed. * The ProjectBuildRequest has to be validated before!! - * You have to flush changes to DB afterwards + * You have to flush changes to DB afterward * @param ProjectBuildRequest $buildRequest * @return void */ diff --git a/src/Services/Tools/StatisticsHelper.php b/src/Services/Tools/StatisticsHelper.php index 60ed568d..f31cb440 100644 --- a/src/Services/Tools/StatisticsHelper.php +++ b/src/Services/Tools/StatisticsHelper.php @@ -93,7 +93,7 @@ class StatisticsHelper } /** - * Returns the number of all parts which have price informations. + * Returns the number of all parts which have price information. * * @throws NoResultException * @throws NonUniqueResultException @@ -147,7 +147,7 @@ class StatisticsHelper } /** - * Gets the count of all external (only containing an URL) attachments. + * Gets the count of all external (only containing a URL) attachments. * * @throws NoResultException * @throws NonUniqueResultException @@ -158,7 +158,7 @@ class StatisticsHelper } /** - * Gets the count of all attachments where the user uploaded an file. + * Gets the count of all attachments where the user uploaded a file. * * @throws NoResultException * @throws NonUniqueResultException diff --git a/src/Services/Tools/TagFinder.php b/src/Services/Tools/TagFinder.php index aa0d02bd..d52b3008 100644 --- a/src/Services/Tools/TagFinder.php +++ b/src/Services/Tools/TagFinder.php @@ -59,7 +59,7 @@ class TagFinder $options = $resolver->resolve($options); - //If the keyword is too short we will get to much results, which takes too much time... + //If the keyword is too short we will get too much results, which takes too much time... if (mb_strlen($keyword) < $options['min_keyword_length']) { return []; } diff --git a/src/Services/TranslationExtractor/PermissionExtractor.php b/src/Services/TranslationExtractor/PermissionExtractor.php index 4994e054..03acd5db 100644 --- a/src/Services/TranslationExtractor/PermissionExtractor.php +++ b/src/Services/TranslationExtractor/PermissionExtractor.php @@ -81,7 +81,7 @@ final class PermissionExtractor implements ExtractorInterface } /** - * Sets the prefix that should be used for new found messages. + * Sets the prefix that should be used for new-found messages. * * @param string $prefix The prefix */ diff --git a/src/Services/Trees/NodesListBuilder.php b/src/Services/Trees/NodesListBuilder.php index a7b70793..66ec2d40 100644 --- a/src/Services/Trees/NodesListBuilder.php +++ b/src/Services/Trees/NodesListBuilder.php @@ -62,7 +62,7 @@ class NodesListBuilder $key = 'list_'.$this->keyGenerator->generateKey().'_'.$secure_class_name.$parent_id; return $this->cache->get($key, function (ItemInterface $item) use ($class_name, $parent, $secure_class_name) { - // Invalidate when groups, a element with the class or the user changes + // Invalidate when groups, an element with the class or the user changes $item->tag(['groups', 'tree_list', $this->keyGenerator->generateKey(), $secure_class_name]); /** @var StructuralDBElementRepository $repo */ $repo = $this->em->getRepository($class_name); diff --git a/src/Services/Trees/StructuralElementRecursionHelper.php b/src/Services/Trees/StructuralElementRecursionHelper.php index 4038798f..3096740c 100644 --- a/src/Services/Trees/StructuralElementRecursionHelper.php +++ b/src/Services/Trees/StructuralElementRecursionHelper.php @@ -35,7 +35,7 @@ class StructuralElementRecursionHelper } /** - * Executes an function (callable) recursivly for $element and every of its children. + * Executes a function (callable) recursivly for $element and every of its children. * * @param AbstractStructuralDBElement $element The element on which the func should be executed * @param callable $func The function which should be executed for each element. diff --git a/src/Services/Trees/ToolsTreeBuilder.php b/src/Services/Trees/ToolsTreeBuilder.php index 841c2bd4..b146d694 100644 --- a/src/Services/Trees/ToolsTreeBuilder.php +++ b/src/Services/Trees/ToolsTreeBuilder.php @@ -23,7 +23,6 @@ declare(strict_types=1); namespace App\Services\Trees; use App\Entity\Attachments\AttachmentType; -use App\Entity\Attachments\PartAttachment; use App\Entity\ProjectSystem\Project; use App\Entity\LabelSystem\LabelProfile; use App\Entity\Parts\Category; @@ -46,7 +45,7 @@ use Symfony\Contracts\Translation\TranslatorInterface; /** * This Service generates the tree structure for the tools. - * Whenever you change something here, you has to clear the cache, because the results are cached for performance reasons. + * Whenever you change something here, you have to clear the cache, because the results are cached for performance reasons. */ class ToolsTreeBuilder { @@ -71,7 +70,7 @@ class ToolsTreeBuilder } /** - * Generates the tree for the tools menu. + * Generates the tree for the tools' menu. * The result is cached. * * @return TreeViewNode[] the array containing all Nodes for the tools menu diff --git a/src/Services/Trees/TreeViewGenerator.php b/src/Services/Trees/TreeViewGenerator.php index bc66ba47..29d09f9b 100644 --- a/src/Services/Trees/TreeViewGenerator.php +++ b/src/Services/Trees/TreeViewGenerator.php @@ -33,10 +33,8 @@ use App\Entity\Parts\Storelocation; use App\Entity\Parts\Supplier; use App\Helpers\Trees\TreeViewNode; use App\Helpers\Trees\TreeViewNodeIterator; -use App\Helpers\Trees\TreeViewNodeState; use App\Repository\StructuralDBElementRepository; use App\Services\EntityURLGenerator; -use App\Services\Formatters\MarkdownParser; use App\Services\UserSystem\UserCacheKeyGenerator; use Doctrine\ORM\EntityManagerInterface; use InvalidArgumentException; @@ -49,14 +47,14 @@ use function count; class TreeViewGenerator { - protected $urlGenerator; - protected $em; - protected $cache; - protected $keyGenerator; - protected $translator; + protected EntityURLGenerator $urlGenerator; + protected EntityManagerInterface $em; + protected TagAwareCacheInterface $cache; + protected UserCacheKeyGenerator $keyGenerator; + protected TranslatorInterface $translator; - protected $rootNodeExpandedByDefault; - protected $rootNodeEnabled; + protected bool $rootNodeExpandedByDefault; + protected bool $rootNodeEnabled; public function __construct(EntityURLGenerator $URLGenerator, EntityManagerInterface $em, TagAwareCacheInterface $treeCache, UserCacheKeyGenerator $keyGenerator, TranslatorInterface $translator, bool $rootNodeExpandedByDefault, bool $rootNodeEnabled) @@ -211,7 +209,7 @@ class TreeViewGenerator /** @var StructuralDBElementRepository $repo */ $repo = $this->em->getRepository($class); - //If we just want a part of a tree, dont cache it + //If we just want a part of a tree, don't cache it if (null !== $parent) { return $repo->getGenericNodeTree($parent); } @@ -220,7 +218,7 @@ class TreeViewGenerator $key = 'treeview_'.$this->keyGenerator->generateKey().'_'.$secure_class_name; return $this->cache->get($key, function (ItemInterface $item) use ($repo, $parent, $secure_class_name) { - // Invalidate when groups, a element with the class or the user changes + // Invalidate when groups, an element with the class or the user changes $item->tag(['groups', 'tree_treeview', $this->keyGenerator->generateKey(), $secure_class_name]); return $repo->getGenericNodeTree($parent); diff --git a/src/Services/UserSystem/PermissionManager.php b/src/Services/UserSystem/PermissionManager.php index 618e473a..1e3209fa 100644 --- a/src/Services/UserSystem/PermissionManager.php +++ b/src/Services/UserSystem/PermissionManager.php @@ -114,7 +114,7 @@ class PermissionManager /** @var Group $parent */ $parent = $user->getGroup(); while (null !== $parent) { //The top group, has parent == null - //Check if our current element gives a info about disallow/allow + //Check if our current element gives an info about disallow/allow $allowed = $this->dontInherit($parent, $permission, $operation); if (null !== $allowed) { return $allowed; @@ -123,7 +123,7 @@ class PermissionManager $parent = $parent->getParent(); } - return null; //The inherited value is never resolved. Should be treat as false, in Voters. + return null; //The inherited value is never resolved. Should be treated as false, in Voters. } /** @@ -150,7 +150,7 @@ class PermissionManager /** * Lists the names of all operations that is supported for the given permission. * - * If the Permission is not existing at all, a exception is thrown. + * If the Permission is not existing at all, an exception is thrown. * * This function is useful for the support() function of the voters. * @@ -203,7 +203,6 @@ class PermissionManager { //If we have changed anything on the permission structure due to the alsoSet value, this becomes true, so we //redo the whole process, to ensure that all alsoSet values are set recursively. - $anything_changed = false; do { $anything_changed = false; //Reset the variable for the next iteration diff --git a/src/Services/UserSystem/PermissionPresetsHelper.php b/src/Services/UserSystem/PermissionPresetsHelper.php index 3340f9bb..7f7dc405 100644 --- a/src/Services/UserSystem/PermissionPresetsHelper.php +++ b/src/Services/UserSystem/PermissionPresetsHelper.php @@ -48,7 +48,7 @@ class PermissionPresetsHelper */ public function applyPreset(HasPermissionsInterface $perm_holder, string $preset_name): HasPermissionsInterface { - //We need to reset the permission data first (afterwards all values are inherit) + //We need to reset the permission data first (afterward all values are inherit) $perm_holder->getPermissions()->resetPermissions(); switch($preset_name) { diff --git a/src/Services/UserSystem/PermissionSchemaUpdater.php b/src/Services/UserSystem/PermissionSchemaUpdater.php index e8ebc6d0..f182c018 100644 --- a/src/Services/UserSystem/PermissionSchemaUpdater.php +++ b/src/Services/UserSystem/PermissionSchemaUpdater.php @@ -36,11 +36,7 @@ class PermissionSchemaUpdater { $perm_data = $holder->getPermissions(); - if ($perm_data->getSchemaVersion() < PermissionData::CURRENT_SCHEMA_VERSION) { - return true; - } - - return false; + return $perm_data->getSchemaVersion() < PermissionData::CURRENT_SCHEMA_VERSION; } /** diff --git a/src/Services/UserSystem/TFA/BackupCodeGenerator.php b/src/Services/UserSystem/TFA/BackupCodeGenerator.php index bc47cab8..942dd050 100644 --- a/src/Services/UserSystem/TFA/BackupCodeGenerator.php +++ b/src/Services/UserSystem/TFA/BackupCodeGenerator.php @@ -26,7 +26,7 @@ use Exception; use RuntimeException; /** - * This class generates random backup codes for two factor authentication. + * This class generates random backup codes for two-factor authentication. */ class BackupCodeGenerator { diff --git a/src/Services/UserSystem/TFA/BackupCodeManager.php b/src/Services/UserSystem/TFA/BackupCodeManager.php index 9a422aa3..fb98a33e 100644 --- a/src/Services/UserSystem/TFA/BackupCodeManager.php +++ b/src/Services/UserSystem/TFA/BackupCodeManager.php @@ -25,7 +25,7 @@ namespace App\Services\UserSystem\TFA; use App\Entity\UserSystem\User; /** - * This services offers methods to manage backup codes for two factor authentication. + * This services offers methods to manage backup codes for two-factor authentication. */ class BackupCodeManager { @@ -38,7 +38,7 @@ class BackupCodeManager /** * Enable backup codes for the given user, by generating a set of backup codes. - * If the backup codes were already enabled before, they a. + * If the backup codes were already enabled before, nothing happens. */ public function enableBackupCodes(User $user): void { @@ -48,7 +48,7 @@ class BackupCodeManager } /** - * Disable (remove) the backup codes when no other 2 factor authentication methods are enabled. + * Disable (remove) the backup codes when no other two-factor authentication methods are enabled. */ public function disableBackupCodesIfUnused(User $user): void { diff --git a/src/Twig/BarcodeExtension.php b/src/Twig/BarcodeExtension.php index 051995f6..6020b65e 100644 --- a/src/Twig/BarcodeExtension.php +++ b/src/Twig/BarcodeExtension.php @@ -22,7 +22,6 @@ namespace App\Twig; use Com\Tecnick\Barcode\Barcode; use Twig\Extension\AbstractExtension; -use Twig\TwigFilter; use Twig\TwigFunction; final class BarcodeExtension extends AbstractExtension diff --git a/src/Twig/FormatExtension.php b/src/Twig/FormatExtension.php index 36a8dad4..775a3fe4 100644 --- a/src/Twig/FormatExtension.php +++ b/src/Twig/FormatExtension.php @@ -22,38 +22,15 @@ declare(strict_types=1); namespace App\Twig; -use App\Entity\Attachments\Attachment; -use App\Entity\Base\AbstractDBElement; -use App\Entity\ProjectSystem\Project; -use App\Entity\LabelSystem\LabelProfile; -use App\Entity\Parts\Category; -use App\Entity\Parts\Footprint; -use App\Entity\Parts\Manufacturer; use App\Entity\Parts\MeasurementUnit; -use App\Entity\Parts\Part; -use App\Entity\Parts\Storelocation; -use App\Entity\Parts\Supplier; use App\Entity\PriceInformations\Currency; -use App\Entity\UserSystem\Group; -use App\Entity\UserSystem\User; use App\Services\Formatters\AmountFormatter; -use App\Services\Attachments\AttachmentURLGenerator; -use App\Services\EntityURLGenerator; -use App\Services\Misc\FAIconGenerator; use App\Services\Formatters\MarkdownParser; use App\Services\Formatters\MoneyFormatter; use App\Services\Formatters\SIFormatter; -use App\Services\Trees\TreeViewGenerator; use Brick\Math\BigDecimal; -use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; -use Symfony\Component\Serializer\SerializerInterface; -use Symfony\Contracts\Translation\TranslatorInterface; use Twig\Extension\AbstractExtension; use Twig\TwigFilter; -use Twig\TwigFunction; -use Twig\TwigTest; - -use function get_class; final class FormatExtension extends AbstractExtension { @@ -86,7 +63,7 @@ final class FormatExtension extends AbstractExtension new TwigFilter('format_si', [$this, 'siFormat']), /** Format the given amount using the given MeasurementUnit */ new TwigFilter('format_amount', [$this, 'amountFormat']), - /** Format the given number of bytes as human readable number */ + /** Format the given number of bytes as human-readable number */ new TwigFilter('format_bytes', [$this, 'formatBytes']), ]; } diff --git a/src/Twig/MiscExtension.php b/src/Twig/MiscExtension.php index e154ccf8..6181e9cd 100644 --- a/src/Twig/MiscExtension.php +++ b/src/Twig/MiscExtension.php @@ -32,7 +32,7 @@ final class MiscExtension extends AbstractExtension $this->eventCommentNeededHelper = $eventCommentNeededHelper; } - public function getFunctions() + public function getFunctions(): array { return [ new \Twig\TwigFunction('event_comment_needed', diff --git a/src/Twig/Sandbox/InheritanceSecurityPolicy.php b/src/Twig/Sandbox/InheritanceSecurityPolicy.php index 052366c0..b70be7a5 100644 --- a/src/Twig/Sandbox/InheritanceSecurityPolicy.php +++ b/src/Twig/Sandbox/InheritanceSecurityPolicy.php @@ -112,7 +112,7 @@ final class InheritanceSecurityPolicy implements SecurityPolicyInterface if ($obj instanceof $class) { $allowed = in_array($method, $methods, true); - //CHANGED: Only break if we the method is allowed, otherwise try it on the other methods + //CHANGED: Only break if the method is allowed, otherwise try it on the other methods if ($allowed) { break; } @@ -133,7 +133,7 @@ final class InheritanceSecurityPolicy implements SecurityPolicyInterface if ($obj instanceof $class) { $allowed = in_array($property, is_array($properties) ? $properties : [$properties], true); - //CHANGED: Only break if we the method is allowed, otherwise try it on the other methods + //CHANGED: Only break if the method is allowed, otherwise try it on the other methods if ($allowed) { break; } diff --git a/src/Twig/TwigCoreExtension.php b/src/Twig/TwigCoreExtension.php index aecbdd17..6b12299a 100644 --- a/src/Twig/TwigCoreExtension.php +++ b/src/Twig/TwigCoreExtension.php @@ -20,7 +20,6 @@ namespace App\Twig; -use App\Entity\Base\AbstractDBElement; use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; use Twig\Extension\AbstractExtension; use Twig\TwigFilter; @@ -54,7 +53,7 @@ final class TwigCoreExtension extends AbstractExtension ]; } - public function getFilters() + public function getFilters(): array { return [ /* Converts the given object to an array representation of the public/accessible properties */ diff --git a/src/Twig/UserExtension.php b/src/Twig/UserExtension.php index 869bea84..3b0ec75c 100644 --- a/src/Twig/UserExtension.php +++ b/src/Twig/UserExtension.php @@ -75,7 +75,7 @@ final class UserExtension extends AbstractExtension } /** - * This function/filter generates an path. + * This function/filter generates a path. */ public function removeLocaleFromPath(string $path): string { diff --git a/src/Validator/Constraints/Misc/ValidRange.php b/src/Validator/Constraints/Misc/ValidRange.php index eb14cf0d..15781498 100644 --- a/src/Validator/Constraints/Misc/ValidRange.php +++ b/src/Validator/Constraints/Misc/ValidRange.php @@ -48,5 +48,5 @@ use Symfony\Component\Validator\Constraint; */ class ValidRange extends Constraint { - public $message = 'validator.invalid_range'; + public string $message = 'validator.invalid_range'; } diff --git a/src/Validator/Constraints/NoLockout.php b/src/Validator/Constraints/NoLockout.php index 1a515e4d..323dddb4 100644 --- a/src/Validator/Constraints/NoLockout.php +++ b/src/Validator/Constraints/NoLockout.php @@ -31,5 +31,5 @@ use Symfony\Component\Validator\Constraint; */ class NoLockout extends Constraint { - public $message = 'validator.noLockout'; + public string $message = 'validator.noLockout'; } diff --git a/src/Validator/Constraints/NoLockoutValidator.php b/src/Validator/Constraints/NoLockoutValidator.php index 4622d7fe..fece2852 100644 --- a/src/Validator/Constraints/NoLockoutValidator.php +++ b/src/Validator/Constraints/NoLockoutValidator.php @@ -68,7 +68,7 @@ class NoLockoutValidator extends ConstraintValidator $user = $this->entityManager->getRepository(User::class)->getAnonymousUser(); } - //Check if we the change_permission permission has changed from allow to disallow + //Check if the change_permission permission has changed from allow to disallow if (($user instanceof User) && false === ($this->resolver->inherit( $user, 'users', diff --git a/src/Validator/Constraints/NoneOfItsChildren.php b/src/Validator/Constraints/NoneOfItsChildren.php index e3bed2f8..b8e92faa 100644 --- a/src/Validator/Constraints/NoneOfItsChildren.php +++ b/src/Validator/Constraints/NoneOfItsChildren.php @@ -25,7 +25,7 @@ namespace App\Validator\Constraints; use Symfony\Component\Validator\Constraint; /** - * Constraints the parent property on StructuralDBElement objects in the way, that neither the object self or any + * Constraints the parent property on StructuralDBElement objects in the way, that neither the object self nor any * of its children can be assigned. * * @Annotation @@ -33,11 +33,11 @@ use Symfony\Component\Validator\Constraint; class NoneOfItsChildren extends Constraint { /** - * @var string The message used if it is tried to assign a object as its own parent + * @var string The message used if it is tried to assign an object as its own parent */ - public $self_message = 'validator.noneofitschild.self'; + public string $self_message = 'validator.noneofitschild.self'; /** * @var string The message used if it is tried to use one of the children for as parent */ - public $children_message = 'validator.noneofitschild.children'; + public string $children_message = 'validator.noneofitschild.children'; } diff --git a/src/Validator/Constraints/UrlOrBuiltin.php b/src/Validator/Constraints/UrlOrBuiltin.php index d2c5715f..20b71871 100644 --- a/src/Validator/Constraints/UrlOrBuiltin.php +++ b/src/Validator/Constraints/UrlOrBuiltin.php @@ -26,7 +26,7 @@ use App\Entity\Attachments\Attachment; use Symfony\Component\Validator\Constraints\Url; /** - * Constraints the field that way that the content is either a url or a path to a builtin ressource (like %FOOTPRINTS%). + * Constraints the field that way that the content is either an url or a path to a builtin ressource (like %FOOTPRINTS%). * * @Annotation */ @@ -35,5 +35,5 @@ class UrlOrBuiltin extends Url /** * @var array A list of the placeholders that are treated as builtin */ - public $allowed_placeholders = Attachment::BUILTIN_PLACEHOLDER; + public array $allowed_placeholders = Attachment::BUILTIN_PLACEHOLDER; } diff --git a/templates/parts/info/_main_infos.html.twig b/templates/parts/info/_main_infos.html.twig index e8ecd95c..99c20126 100644 --- a/templates/parts/info/_main_infos.html.twig +++ b/templates/parts/info/_main_infos.html.twig @@ -41,8 +41,17 @@ {{ helper.structural_entity_link(part.category) }}
- - {{ part.amountSum | format_amount(part.partUnit) }} + + {% if not part.amountUnknown %} + {# For known instock we can just show the label as normal #} + {{ part.amountSum | format_amount(part.partUnit) }} + {% else %} + {% if part.amountSum == 0.0 %} + ? + {% else %} + ≥{{ part.amountSum | format_amount(part.partUnit) }} + {% endif %} + {% endif %} {% if part.expiredAmountSum > 0 %} (+{{ part.expiredAmountSum }}) {% endif %} diff --git a/tests/Controller/AdminPages/AbstractAdminControllerTest.php b/tests/Controller/AdminPages/AbstractAdminControllerTest.php index 532f0e92..ef0195c6 100644 --- a/tests/Controller/AdminPages/AbstractAdminControllerTest.php +++ b/tests/Controller/AdminPages/AbstractAdminControllerTest.php @@ -31,8 +31,8 @@ use Symfony\Component\Security\Core\Exception\AccessDeniedException; */ abstract class AbstractAdminControllerTest extends WebTestCase { - protected static $base_path = 'not_valid'; - protected static $entity_class = 'not valid'; + protected static string $base_path = 'not_valid'; + protected static string $entity_class = 'not valid'; public function readDataProvider(): array { @@ -76,7 +76,7 @@ abstract class AbstractAdminControllerTest extends WebTestCase /** * @dataProvider readDataProvider * @group slow - * Tests if it possible to access an specific entity. Checks if permissions are working. + * Tests if it is possible to access a specific entity. Checks if permissions are working. */ public function testReadEntity(string $user, bool $read): void { diff --git a/tests/Controller/AdminPages/AttachmentTypeControllerTest.php b/tests/Controller/AdminPages/AttachmentTypeControllerTest.php index 12233942..e4b47069 100644 --- a/tests/Controller/AdminPages/AttachmentTypeControllerTest.php +++ b/tests/Controller/AdminPages/AttachmentTypeControllerTest.php @@ -30,6 +30,6 @@ use App\Entity\Attachments\AttachmentType; */ class AttachmentTypeControllerTest extends AbstractAdminControllerTest { - protected static $base_path = '/en'.'/attachment_type'; - protected static $entity_class = AttachmentType::class; + protected static string $base_path = '/en'.'/attachment_type'; + protected static string $entity_class = AttachmentType::class; } diff --git a/tests/Controller/AdminPages/CategoryControllerTest.php b/tests/Controller/AdminPages/CategoryControllerTest.php index 1a9efee7..df4de1bd 100644 --- a/tests/Controller/AdminPages/CategoryControllerTest.php +++ b/tests/Controller/AdminPages/CategoryControllerTest.php @@ -30,6 +30,6 @@ use App\Entity\Parts\Category; */ class CategoryControllerTest extends AbstractAdminControllerTest { - protected static $base_path = '/en'.'/category'; - protected static $entity_class = Category::class; + protected static string $base_path = '/en'.'/category'; + protected static string $entity_class = Category::class; } diff --git a/tests/Controller/AdminPages/FootprintControllerTest.php b/tests/Controller/AdminPages/FootprintControllerTest.php index ac5d8242..972248c9 100644 --- a/tests/Controller/AdminPages/FootprintControllerTest.php +++ b/tests/Controller/AdminPages/FootprintControllerTest.php @@ -30,6 +30,6 @@ use App\Entity\Parts\Footprint; */ class FootprintControllerTest extends AbstractAdminControllerTest { - protected static $base_path = '/en'.'/footprint'; - protected static $entity_class = Footprint::class; + protected static string $base_path = '/en'.'/footprint'; + protected static string $entity_class = Footprint::class; } diff --git a/tests/Controller/AdminPages/LabelProfileControllerTest.php b/tests/Controller/AdminPages/LabelProfileControllerTest.php index 80cf8348..0a59ffcc 100644 --- a/tests/Controller/AdminPages/LabelProfileControllerTest.php +++ b/tests/Controller/AdminPages/LabelProfileControllerTest.php @@ -46,8 +46,8 @@ use Symfony\Component\Security\Core\Exception\AccessDeniedException; class LabelProfileControllerTest extends AbstractAdminControllerTest { - protected static $base_path = '/en'.'/label_profile'; - protected static $entity_class = LabelProfile::class; + protected static string $base_path = '/en'.'/label_profile'; + protected static string $entity_class = LabelProfile::class; /** * Tests if deleting an entity is working. diff --git a/tests/Controller/AdminPages/ManufacturerControllerTest.php b/tests/Controller/AdminPages/ManufacturerControllerTest.php index 56b2cd1a..d66441c9 100644 --- a/tests/Controller/AdminPages/ManufacturerControllerTest.php +++ b/tests/Controller/AdminPages/ManufacturerControllerTest.php @@ -30,6 +30,6 @@ use App\Entity\Parts\Manufacturer; */ class ManufacturerControllerTest extends AbstractAdminControllerTest { - protected static $base_path = '/en'.'/manufacturer'; - protected static $entity_class = Manufacturer::class; + protected static string $base_path = '/en'.'/manufacturer'; + protected static string $entity_class = Manufacturer::class; } diff --git a/tests/Controller/AdminPages/MeasurementUnitControllerTest.php b/tests/Controller/AdminPages/MeasurementUnitControllerTest.php index 53302e22..62a90cc4 100644 --- a/tests/Controller/AdminPages/MeasurementUnitControllerTest.php +++ b/tests/Controller/AdminPages/MeasurementUnitControllerTest.php @@ -30,6 +30,6 @@ use App\Entity\Parts\MeasurementUnit; */ class MeasurementUnitControllerTest extends AbstractAdminControllerTest { - protected static $base_path = '/en'.'/measurement_unit'; - protected static $entity_class = MeasurementUnit::class; + protected static string $base_path = '/en'.'/measurement_unit'; + protected static string $entity_class = MeasurementUnit::class; } diff --git a/tests/Controller/AdminPages/ProjectControllerTest.php b/tests/Controller/AdminPages/ProjectControllerTest.php index 586c1b93..01588e52 100644 --- a/tests/Controller/AdminPages/ProjectControllerTest.php +++ b/tests/Controller/AdminPages/ProjectControllerTest.php @@ -31,6 +31,6 @@ use App\Entity\ProjectSystem\Project; */ class ProjectControllerTest extends AbstractAdminControllerTest { - protected static $base_path = '/en'.'/project'; - protected static $entity_class = Project::class; + protected static string $base_path = '/en'.'/project'; + protected static string $entity_class = Project::class; } diff --git a/tests/Controller/AdminPages/StorelocationControllerTest.php b/tests/Controller/AdminPages/StorelocationControllerTest.php index 1844c75e..bcfd3212 100644 --- a/tests/Controller/AdminPages/StorelocationControllerTest.php +++ b/tests/Controller/AdminPages/StorelocationControllerTest.php @@ -30,6 +30,6 @@ use App\Entity\Parts\Storelocation; */ class StorelocationControllerTest extends AbstractAdminControllerTest { - protected static $base_path = '/en'.'/store_location'; - protected static $entity_class = Storelocation::class; + protected static string $base_path = '/en'.'/store_location'; + protected static string $entity_class = Storelocation::class; } diff --git a/tests/Controller/AdminPages/SupplierControllerTest.php b/tests/Controller/AdminPages/SupplierControllerTest.php index de6f8d7c..f2c3e066 100644 --- a/tests/Controller/AdminPages/SupplierControllerTest.php +++ b/tests/Controller/AdminPages/SupplierControllerTest.php @@ -30,6 +30,6 @@ use App\Entity\Parts\Supplier; */ class SupplierControllerTest extends AbstractAdminControllerTest { - protected static $base_path = '/en'.'/supplier'; - protected static $entity_class = Supplier::class; + protected static string $base_path = '/en'.'/supplier'; + protected static string $entity_class = Supplier::class; } diff --git a/tests/Controller/RedirectControllerTest.php b/tests/Controller/RedirectControllerTest.php index 69b197e3..70dd6f14 100644 --- a/tests/Controller/RedirectControllerTest.php +++ b/tests/Controller/RedirectControllerTest.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace App\Tests\Controller; use App\Entity\UserSystem\User; +use App\Repository\UserRepository; use Doctrine\ORM\EntityManagerInterface; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -32,9 +33,9 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; */ class RedirectControllerTest extends WebTestCase { - protected $em; - protected $userRepo; - protected $client; + protected EntityManagerInterface $em; + protected UserRepository $userRepo; + protected \Symfony\Bundle\FrameworkBundle\KernelBrowser $client; protected function setUp(): void { @@ -88,9 +89,12 @@ class RedirectControllerTest extends WebTestCase ['en', '/', '/en/'], ['en', '/category/new', '/en/category/new'], ['en_US', '/part/3', '/en_US/part/3'], - //Without an explicit set value, the user should be redirect to english version + //Without an explicit set value, the user should be redirected to english version [null, '/', '/en/'], ['en_US', '/part/3', '/en_US/part/3'], + //Test that query parameters work + ['de', '/dialog?target_id=133&target_type=part', '/de/dialog?target_id=133&target_type=part'], + ['en', '/dialog?storelocation=1', '/en/dialog?storelocation=1'], ]; } @@ -99,13 +103,13 @@ class RedirectControllerTest extends WebTestCase * * @dataProvider urlAddLocaleDataProvider * @group slow - * @depends testUrlMatch + * @depends testUrlMatch * - * @param $user_locale - * @param $input_path - * @param $redirect_path + * @param string|null $user_locale + * @param string $input_path + * @param string $redirect_path */ - public function testAddLocale($user_locale, $input_path, $redirect_path): void + public function testAddLocale(?string $user_locale, string $input_path, string $redirect_path): void { //Redirect path is absolute $redirect_path = 'http://localhost'.$redirect_path; diff --git a/tests/DataTables/Filters/Constraints/FilterTraitTest.php b/tests/DataTables/Filters/Constraints/FilterTraitTest.php index 5d6442ec..baec64ed 100644 --- a/tests/DataTables/Filters/Constraints/FilterTraitTest.php +++ b/tests/DataTables/Filters/Constraints/FilterTraitTest.php @@ -21,7 +21,6 @@ namespace App\Tests\DataTables\Filters\Constraints; use App\DataTables\Filters\Constraints\FilterTrait; -use App\Entity\Parts\MeasurementUnit; use PHPUnit\Framework\TestCase; class FilterTraitTest extends TestCase diff --git a/tests/Entity/Attachments/AttachmentTest.php b/tests/Entity/Attachments/AttachmentTest.php index 91a3cb53..3ef8f4da 100644 --- a/tests/Entity/Attachments/AttachmentTest.php +++ b/tests/Entity/Attachments/AttachmentTest.php @@ -105,7 +105,7 @@ class AttachmentTest extends TestCase } /** - * Test that all attachment subclasses like PartAttachment or similar returns an exception, when an not allowed + * Test that all attachment subclasses like PartAttachment or similar returns an exception, when a not allowed * element is passed. * * @dataProvider subClassesDataProvider @@ -282,7 +282,7 @@ class AttachmentTest extends TestCase * @param string $property - property on instance being modified * @param mixed $value - new value of the property being modified */ - public function setProtectedProperty($object, $property, $value): void + public function setProtectedProperty(object $object, string $property, $value): void { $reflection = new ReflectionClass($object); $reflection_property = $reflection->getProperty($property); diff --git a/tests/Entity/Base/AbstractStructuralDBElementTest.php b/tests/Entity/Base/AbstractStructuralDBElementTest.php index 9a4104e5..dca3f25b 100644 --- a/tests/Entity/Base/AbstractStructuralDBElementTest.php +++ b/tests/Entity/Base/AbstractStructuralDBElementTest.php @@ -33,12 +33,12 @@ use PHPUnit\Framework\TestCase; */ class AbstractStructuralDBElementTest extends TestCase { - protected $root; - protected $child1; - protected $child2; - protected $child3; - protected $child1_1; - protected $child1_2; + protected AttachmentType $root; + protected AttachmentType $child1; + protected AttachmentType $child2; + protected AttachmentType $child3; + protected AttachmentType $child1_1; + protected AttachmentType $child1_2; protected function setUp(): void { @@ -151,7 +151,7 @@ class AbstractStructuralDBElementTest extends TestCase $this->assertSame([$this->child1_1, $this->child1_2], $this->child1->getSubelements()->toArray()); $this->assertSame([], $this->child1_1->getSubelements()->toArray()); - //If a element is set as its own parent, it should not be returned as a subelement + //If an element is set as its own parent, it should not be returned as a subelement $this->child1->setParent($this->child1); $this->assertSame([], $this->child1->getSubelements()->toArray()); } diff --git a/tests/Entity/LogSystem/AbstractLogEntryTest.php b/tests/Entity/LogSystem/AbstractLogEntryTest.php index 243895aa..cc1dc74b 100644 --- a/tests/Entity/LogSystem/AbstractLogEntryTest.php +++ b/tests/Entity/LogSystem/AbstractLogEntryTest.php @@ -166,7 +166,7 @@ class AbstractLogEntryTest extends TestCase { $log = new UserLoginLogEntry('1.1.1.1'); - //By default no no CLI username is set + //By default, no CLI username is set $this->assertNull($log->getCLIUsername()); $this->assertFalse($log->isCLIEntry()); diff --git a/tests/Entity/Parts/PartTest.php b/tests/Entity/Parts/PartTest.php index 11a9ae19..2adc264c 100644 --- a/tests/Entity/Parts/PartTest.php +++ b/tests/Entity/Parts/PartTest.php @@ -53,11 +53,11 @@ class PartTest extends TestCase $part = new Part(); $measurement_unit = new MeasurementUnit(); - //Without an set measurement unit the part must return an int + //Without a set measurement unit the part must return an int $part->setMinAmount(1.345); $this->assertSame(1.0, $part->getMinAmount()); - //If an non int-based unit is assigned, an float is returned + //If a non-int-based unit is assigned, a float is returned $part->setPartUnit($measurement_unit); $this->assertSame(1.345, $part->getMinAmount()); diff --git a/tests/Entity/PriceSystem/CurrencyTest.php b/tests/Entity/PriceSystem/CurrencyTest.php index 0274e5a0..0058d501 100644 --- a/tests/Entity/PriceSystem/CurrencyTest.php +++ b/tests/Entity/PriceSystem/CurrencyTest.php @@ -32,7 +32,7 @@ class CurrencyTest extends TestCase { $currency = new Currency(); - //By default the inverse exchange rate is not set: + //By default, the inverse exchange rate is not set: $this->assertNull($currency->getInverseExchangeRate()); $currency->setExchangeRate(BigDecimal::zero()); diff --git a/tests/Entity/PriceSystem/PricedetailTest.php b/tests/Entity/PriceSystem/PricedetailTest.php index 75009029..dd5abb25 100644 --- a/tests/Entity/PriceSystem/PricedetailTest.php +++ b/tests/Entity/PriceSystem/PricedetailTest.php @@ -69,7 +69,7 @@ class PricedetailTest extends TestCase $pricedetail->setPriceRelatedQuantity(0.23); $this->assertSame(1.0, $pricedetail->getPriceRelatedQuantity()); - //With an part that has an float amount unit, also values like 0.23 can be returned + //With a part that has a float amount unit, also values like 0.23 can be returned $pricedetail->setOrderdetail($orderdetail2); $this->assertSame(0.23, $pricedetail->getPriceRelatedQuantity()); } @@ -97,7 +97,7 @@ class PricedetailTest extends TestCase $pricedetail->setMinDiscountQuantity(0.23); $this->assertSame(1.0, $pricedetail->getMinDiscountQuantity()); - //With an part that has an float amount unit, also values like 0.23 can be returned + //With a part that has a float amount unit, also values like 0.23 can be returned $pricedetail->setOrderdetail($orderdetail2); $this->assertSame(0.23, $pricedetail->getMinDiscountQuantity()); } diff --git a/tests/Entity/UserSystem/PermissionDataTest.php b/tests/Entity/UserSystem/PermissionDataTest.php index 5107c2a0..0536cd5b 100644 --- a/tests/Entity/UserSystem/PermissionDataTest.php +++ b/tests/Entity/UserSystem/PermissionDataTest.php @@ -26,7 +26,7 @@ use PHPUnit\Framework\TestCase; class PermissionDataTest extends TestCase { - public function testGetSetIs() + public function testGetSetIs(): void { $perm_data = new PermissionData(); @@ -60,7 +60,7 @@ class PermissionDataTest extends TestCase $this->assertFalse($perm_data->isPermissionSet('p1', 'op1')); } - public function testJSONSerialization() + public function testJSONSerialization(): void { $perm_data = new PermissionData(); @@ -99,7 +99,7 @@ class PermissionDataTest extends TestCase } - public function testFromJSON() + public function testFromJSON(): void { $json = json_encode([ 'perm1' => [ @@ -120,7 +120,7 @@ class PermissionDataTest extends TestCase $this->assertFalse($perm_data->getPermissionValue('perm2', 'op2')); } - public function testResetPermissions() + public function testResetPermissions(): void { $data = new PermissionData(); @@ -147,7 +147,7 @@ class PermissionDataTest extends TestCase $this->assertFalse($data->isPermissionSet('perm1', 'op3')); } - public function testGetSchemaVersion() + public function testGetSchemaVersion(): void { $data = new PermissionData(); @@ -159,7 +159,7 @@ class PermissionDataTest extends TestCase $this->assertEquals(12345, $data->getSchemaVersion()); } - public function testIsAnyOperationOfPermissionSet() + public function testIsAnyOperationOfPermissionSet(): void { $data = new PermissionData(); @@ -170,7 +170,7 @@ class PermissionDataTest extends TestCase $this->assertTrue($data->isAnyOperationOfPermissionSet('perm1')); } - public function testGetAllDefinedOperationsOfPermission() + public function testGetAllDefinedOperationsOfPermission(): void { $data = new PermissionData(); @@ -185,7 +185,7 @@ class PermissionDataTest extends TestCase $data->getAllDefinedOperationsOfPermission('perm1')); } - public function testSetAllOperationsOfPermission() + public function testSetAllOperationsOfPermission(): void { $data = new PermissionData(); @@ -200,7 +200,7 @@ class PermissionDataTest extends TestCase $data->getAllDefinedOperationsOfPermission('perm1')); } - public function testRemovePermission() + public function testRemovePermission(): void { $data = new PermissionData(); diff --git a/tests/Entity/UserSystem/UserTest.php b/tests/Entity/UserSystem/UserTest.php index 456457a4..822e09b0 100644 --- a/tests/Entity/UserSystem/UserTest.php +++ b/tests/Entity/UserSystem/UserTest.php @@ -22,10 +22,8 @@ declare(strict_types=1); namespace App\Tests\Entity\UserSystem; -use App\Entity\UserSystem\U2FKey; use App\Entity\UserSystem\User; use App\Entity\UserSystem\WebauthnKey; -use DateTime; use Doctrine\Common\Collections\Collection; use PHPUnit\Framework\TestCase; use Ramsey\Uuid\Uuid; @@ -108,12 +106,12 @@ class UserTest extends TestCase //Ensure the code is valid $this->assertTrue($user->isBackupCode('aaaa')); $this->assertTrue($user->isBackupCode('bbbb')); - //Invalidate code, afterwards the code has to be invalid! + //Invalidate code, afterward the code has to be invalid! $user->invalidateBackupCode('bbbb'); $this->assertFalse($user->isBackupCode('bbbb')); $this->assertTrue($user->isBackupCode('aaaa')); - //No exception must happen, when we try to invalidate an not existing backup key! + //No exception must happen, when we try to invalidate a not existing backup key! $user->invalidateBackupCode('zzzz'); } diff --git a/tests/EventSubscriber/PasswordChangeNeededSubscriberTest.php b/tests/EventSubscriber/PasswordChangeNeededSubscriberTest.php index 491b01ff..5cdca507 100644 --- a/tests/EventSubscriber/PasswordChangeNeededSubscriberTest.php +++ b/tests/EventSubscriber/PasswordChangeNeededSubscriberTest.php @@ -23,7 +23,6 @@ declare(strict_types=1); namespace App\Tests\EventSubscriber; use App\Entity\UserSystem\Group; -use App\Entity\UserSystem\U2FKey; use App\Entity\UserSystem\User; use App\Entity\UserSystem\WebauthnKey; use App\EventSubscriber\UserSystem\PasswordChangeNeededSubscriber; @@ -46,15 +45,15 @@ class PasswordChangeNeededSubscriberTest extends TestCase $user->setGroup($group); $this->assertFalse(PasswordChangeNeededSubscriber::TFARedirectNeeded($user)); - //The user must be redirected if the group enforces 2FA and it does not have a method + //The user must be redirected if the group enforces 2FA, and it does not have a method $group->setEnforce2FA(true); $this->assertTrue(PasswordChangeNeededSubscriber::TFARedirectNeeded($user)); - //User must not be redirect if google authenticator is setup + //User must not be redirect if google authenticator is set up $user->setGoogleAuthenticatorSecret('abcd'); $this->assertFalse(PasswordChangeNeededSubscriber::TFARedirectNeeded($user)); - //User must not be redirect if 2FA is setup + //User must not be redirect if 2FA is set up $user->setGoogleAuthenticatorSecret(null); $user->addWebauthnKey(new WebauthnKey( "Test", diff --git a/tests/Helpers/BBCodeToMarkdownConverterTest.php b/tests/Helpers/BBCodeToMarkdownConverterTest.php index 35dea60d..a4703d95 100644 --- a/tests/Helpers/BBCodeToMarkdownConverterTest.php +++ b/tests/Helpers/BBCodeToMarkdownConverterTest.php @@ -27,7 +27,7 @@ use PHPUnit\Framework\TestCase; class BBCodeToMarkdownConverterTest extends TestCase { - protected $converter; + protected BBCodeToMarkdownConverter $converter; protected function setUp(): void { diff --git a/tests/Helpers/Projects/ProjectBuildRequestTest.php b/tests/Helpers/Projects/ProjectBuildRequestTest.php index 0af0aa72..ad14035c 100644 --- a/tests/Helpers/Projects/ProjectBuildRequestTest.php +++ b/tests/Helpers/Projects/ProjectBuildRequestTest.php @@ -35,24 +35,24 @@ class ProjectBuildRequestTest extends TestCase private MeasurementUnit $float_unit; /** @var Project */ - private $project1; + private Project $project1; /** @var ProjectBOMEntry */ - private $bom_entry1a; + private ProjectBOMEntry $bom_entry1a; /** @var ProjectBOMEntry */ - private $bom_entry1b; + private ProjectBOMEntry $bom_entry1b; /** @var ProjectBOMEntry */ - private $bom_entry1c; + private ProjectBOMEntry $bom_entry1c; /** @var PartLot $lot1a */ private $lot1a; /** @var PartLot $lot1b */ private $lot1b; - private $lot2; + private PartLot $lot2; /** @var Part */ - private $part1; + private Part $part1; /** @var Part */ - private $part2; + private Part $part2; public function setUp(): void @@ -115,7 +115,7 @@ class ProjectBuildRequestTest extends TestCase $this->project1->addBomEntry($this->bom_entry1c); } - public function testInitialization() + public function testInitialization(): void { //The values should be already prefilled correctly $request = new ProjectBuildRequest($this->project1, 10); @@ -127,19 +127,19 @@ class ProjectBuildRequestTest extends TestCase $this->assertEquals(2.5, $request->getLotWithdrawAmount($this->lot2)); } - public function testGetNumberOfBuilds() + public function testGetNumberOfBuilds(): void { $build_request = new ProjectBuildRequest($this->project1, 5); $this->assertEquals(5, $build_request->getNumberOfBuilds()); } - public function testGetProject() + public function testGetProject(): void { $build_request = new ProjectBuildRequest($this->project1, 5); $this->assertEquals($this->project1, $build_request->getProject()); } - public function testGetNeededAmountForBOMEntry() + public function testGetNeededAmountForBOMEntry(): void { $build_request = new ProjectBuildRequest($this->project1, 5); $this->assertEquals(10, $build_request->getNeededAmountForBOMEntry($this->bom_entry1a)); @@ -147,7 +147,7 @@ class ProjectBuildRequestTest extends TestCase $this->assertEquals(20, $build_request->getNeededAmountForBOMEntry($this->bom_entry1c)); } - public function testGetSetLotWithdrawAmount() + public function testGetSetLotWithdrawAmount(): void { $build_request = new ProjectBuildRequest($this->project1, 5); @@ -160,7 +160,7 @@ class ProjectBuildRequestTest extends TestCase $this->assertEquals(3, $build_request->getLotWithdrawAmount($this->lot1b)); } - public function testGetWithdrawAmountSum() + public function testGetWithdrawAmountSum(): void { //The sum of all withdraw amounts for an BOM entry (over all lots of the associated part) should be correct $build_request = new ProjectBuildRequest($this->project1, 5); diff --git a/tests/Helpers/TreeViewNodeTest.php b/tests/Helpers/TreeViewNodeTest.php index d7ee81f9..9005651d 100644 --- a/tests/Helpers/TreeViewNodeTest.php +++ b/tests/Helpers/TreeViewNodeTest.php @@ -30,11 +30,11 @@ class TreeViewNodeTest extends TestCase /** * @var TreeViewNode */ - protected $node1; + protected TreeViewNode $node1; /** * @var TreeViewNode */ - protected $node2; + protected TreeViewNode $node2; protected function setUp(): void { diff --git a/tests/Security/EnsureSAMLUserForSAMLLoginCheckerTest.php b/tests/Security/EnsureSAMLUserForSAMLLoginCheckerTest.php index 5751de07..ae4065b6 100644 --- a/tests/Security/EnsureSAMLUserForSAMLLoginCheckerTest.php +++ b/tests/Security/EnsureSAMLUserForSAMLLoginCheckerTest.php @@ -23,7 +23,6 @@ namespace App\Tests\Security; use App\Entity\UserSystem\User; use App\Security\EnsureSAMLUserForSAMLLoginChecker; use Hslavich\OneloginSamlBundle\Security\Http\Authenticator\Token\SamlToken; -use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; use Symfony\Component\Security\Core\Event\AuthenticationSuccessEvent; diff --git a/tests/Security/SamlUserFactoryTest.php b/tests/Security/SamlUserFactoryTest.php index f7dd15d7..cb6fbfac 100644 --- a/tests/Security/SamlUserFactoryTest.php +++ b/tests/Security/SamlUserFactoryTest.php @@ -22,7 +22,6 @@ namespace App\Tests\Security; use App\Entity\UserSystem\User; use App\Security\SamlUserFactory; -use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; class SamlUserFactoryTest extends WebTestCase @@ -37,7 +36,7 @@ class SamlUserFactoryTest extends WebTestCase $this->service = self::getContainer()->get(SamlUserFactory::class); } - public function testCreateUser() + public function testCreateUser(): void { $user = $this->service->createUser('sso_user', [ 'email' => ['j.doe@invalid.invalid'], @@ -63,7 +62,7 @@ class SamlUserFactoryTest extends WebTestCase $this->assertEquals('j.doe@invalid.invalid', $user->getEmail()); } - public function testMapSAMLRolesToLocalGroupID() + public function testMapSAMLRolesToLocalGroupID(): void { $mapping = [ 'admin' => 2, //This comes first, as this should have higher priority @@ -80,7 +79,7 @@ class SamlUserFactoryTest extends WebTestCase $this->assertSame(2, $this->service->mapSAMLRolesToLocalGroupID(['does_not_matter', 'admin', 'employee'], $mapping)); $this->assertSame(1, $this->service->mapSAMLRolesToLocalGroupID(['employee', 'does_not_matter', 'manager'], $mapping)); $this->assertSame(3, $this->service->mapSAMLRolesToLocalGroupID(['administrator', 'does_not_matter', 'manager'], $mapping)); - //Test if mapping is case sensitive + //Test if mapping is case-sensitive $this->assertEquals(4, $this->service->mapSAMLRolesToLocalGroupID(['ADMIN'], $mapping)); //Test that wildcard mapping works diff --git a/tests/Security/UserCheckerTest.php b/tests/Security/UserCheckerTest.php index 97d7e412..35c2e1e5 100644 --- a/tests/Security/UserCheckerTest.php +++ b/tests/Security/UserCheckerTest.php @@ -24,10 +24,8 @@ namespace App\Tests\Security; use App\Entity\UserSystem\User; use App\Security\UserChecker; -use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\Security\Core\Exception\CustomUserMessageAccountStatusException; -use Symfony\Component\Security\Core\Exception\DisabledException; class UserCheckerTest extends WebTestCase { @@ -44,10 +42,10 @@ class UserCheckerTest extends WebTestCase $user = new User(); $user->setDisabled(false); - //An user that is not disabled should not throw an exception + //A user that is not disabled should not throw an exception $this->service->checkPostAuth($user); - //An disabled user must throw an exception + //A disabled user must throw an exception $user->setDisabled(true); $this->expectException(CustomUserMessageAccountStatusException::class); $this->service->checkPostAuth($user); diff --git a/tests/Serializer/BigNumberNormalizerTest.php b/tests/Serializer/BigNumberNormalizerTest.php index 1c05dc19..b98968fe 100644 --- a/tests/Serializer/BigNumberNormalizerTest.php +++ b/tests/Serializer/BigNumberNormalizerTest.php @@ -39,13 +39,13 @@ class BigNumberNormalizerTest extends WebTestCase $this->service = self::getContainer()->get(BigNumberNormalizer::class); } - public function testNormalize() + public function testNormalize(): void { $bigDecimal = BigDecimal::of('1.23456789'); $this->assertSame('1.23456789', $this->service->normalize($bigDecimal)); } - public function testSupportsNormalization() + public function testSupportsNormalization(): void { //Normalizer must only support BigNumber objects (and child classes) $this->assertFalse($this->service->supportsNormalization(new \stdClass())); diff --git a/tests/Serializer/PartNormalizerTest.php b/tests/Serializer/PartNormalizerTest.php index 21f86990..e9abca16 100644 --- a/tests/Serializer/PartNormalizerTest.php +++ b/tests/Serializer/PartNormalizerTest.php @@ -25,7 +25,6 @@ use App\Entity\Parts\PartLot; use App\Entity\PriceInformations\Orderdetail; use App\Entity\PriceInformations\Pricedetail; use App\Serializer\PartNormalizer; -use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; class PartNormalizerTest extends WebTestCase @@ -36,19 +35,19 @@ class PartNormalizerTest extends WebTestCase protected function setUp(): void { parent::setUp(); - //Get an service instance. + //Get a service instance. self::bootKernel(); $this->service = self::getContainer()->get(PartNormalizer::class); } - public function testSupportsNormalization() + public function testSupportsNormalization(): void { //Normalizer must only support Part objects (and child classes) $this->assertFalse($this->service->supportsNormalization(new \stdClass())); $this->assertTrue($this->service->supportsNormalization(new Part())); } - public function testNormalize() + public function testNormalize(): void { $part = new Part(); $part->setName('Test Part'); @@ -70,7 +69,7 @@ class PartNormalizerTest extends WebTestCase $this->assertArrayNotHasKey('type', $data); } - public function testSupportsDenormalization() + public function testSupportsDenormalization(): void { //Normalizer must only support Part type with array as input $this->assertFalse($this->service->supportsDenormalization(new \stdClass(), Part::class)); @@ -79,7 +78,7 @@ class PartNormalizerTest extends WebTestCase $this->assertTrue($this->service->supportsDenormalization(['a' => 'b'], Part::class)); } - public function testDenormalize() + public function testDenormalize(): void { $input = [ 'name' => 'Test Part', diff --git a/tests/Serializer/StructuralElementDenormalizerTest.php b/tests/Serializer/StructuralElementDenormalizerTest.php index 609eb3a5..d9000fb9 100644 --- a/tests/Serializer/StructuralElementDenormalizerTest.php +++ b/tests/Serializer/StructuralElementDenormalizerTest.php @@ -22,7 +22,6 @@ namespace App\Tests\Serializer; use App\Entity\Parts\Category; use App\Serializer\StructuralElementDenormalizer; -use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; class StructuralElementDenormalizerTest extends WebTestCase @@ -34,7 +33,7 @@ class StructuralElementDenormalizerTest extends WebTestCase protected function setUp(): void { parent::setUp(); - //Get an service instance. + //Get a service instance. self::bootKernel(); $this->service = self::getContainer()->get(StructuralElementDenormalizer::class); } diff --git a/tests/Serializer/StructuralElementFromNameDenormalizerTest.php b/tests/Serializer/StructuralElementFromNameDenormalizerTest.php index 94b343a2..f4b4b7d5 100644 --- a/tests/Serializer/StructuralElementFromNameDenormalizerTest.php +++ b/tests/Serializer/StructuralElementFromNameDenormalizerTest.php @@ -20,10 +20,8 @@ namespace App\Tests\Serializer; -use App\Entity\Base\AbstractStructuralDBElement; use App\Entity\Parts\Category; use App\Serializer\StructuralElementFromNameDenormalizer; -use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; class StructuralElementFromNameDenormalizerTest extends WebTestCase @@ -35,7 +33,7 @@ class StructuralElementFromNameDenormalizerTest extends WebTestCase protected function setUp(): void { parent::setUp(); - //Get an service instance. + //Get a service instance. self::bootKernel(); $this->service = self::getContainer()->get(StructuralElementFromNameDenormalizer::class); } @@ -110,7 +108,7 @@ class StructuralElementFromNameDenormalizerTest extends WebTestCase $this->assertNotNull($category->getID()); $this->assertNotNull($category->getParent()->getID()); - //Test with non existing category + //Test with non-existing category $category = $this->service->denormalize('New category', Category::class, null, $context); $this->assertNull($category); diff --git a/tests/Serializer/StructuralElementNormalizerTest.php b/tests/Serializer/StructuralElementNormalizerTest.php index 09cf7299..cc5f996d 100644 --- a/tests/Serializer/StructuralElementNormalizerTest.php +++ b/tests/Serializer/StructuralElementNormalizerTest.php @@ -42,7 +42,7 @@ class StructuralElementNormalizerTest extends WebTestCase $this->service = self::getContainer()->get(StructuralElementNormalizer::class); } - public function testNormalize() + public function testNormalize(): void { $category1 = (new Category())->setName('Category 1'); $category11 = (new Category())->setName('Category 1.1'); @@ -65,7 +65,7 @@ class StructuralElementNormalizerTest extends WebTestCase $this->assertArrayNotHasKey('type', $data11); } - public function testSupportsNormalization() + public function testSupportsNormalization(): void { //Normalizer must only support StructuralElement objects (and child classes) $this->assertFalse($this->service->supportsNormalization(new \stdClass())); diff --git a/tests/Services/Attachments/AttachmentPathResolverTest.php b/tests/Services/Attachments/AttachmentPathResolverTest.php index 9edde560..6827e90a 100644 --- a/tests/Services/Attachments/AttachmentPathResolverTest.php +++ b/tests/Services/Attachments/AttachmentPathResolverTest.php @@ -29,8 +29,8 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; class AttachmentPathResolverTest extends WebTestCase { - protected $media_path; - protected $footprint_path; + protected string $media_path; + protected string $footprint_path; protected $projectDir_orig; protected $projectDir; /** @@ -42,7 +42,7 @@ class AttachmentPathResolverTest extends WebTestCase { parent::setUp(); - //Get an service instance. + //Get a service instance. self::bootKernel(); $this->projectDir_orig = realpath(self::$kernel->getProjectDir()); @@ -117,7 +117,7 @@ class AttachmentPathResolverTest extends WebTestCase //Every kind of absolute path, that is not based with our placeholder dirs must be invald ['/etc/passwd', null], ['C:\\not\\existing.txt', null], - //More then one placeholder is not allowed + //More than one placeholder is not allowed [$this->footprint_path.'/test/'.$this->footprint_path, null], //Path must begin with path ['/not/root'.$this->footprint_path, null], @@ -140,7 +140,7 @@ class AttachmentPathResolverTest extends WebTestCase $this->assertSame($expected, $this->service->realPathToPlaceholder($param, $old_method)); } - public function germanFootprintPathdDataProvider() + public function germanFootprintPathdDataProvider(): ?\Generator { self::bootKernel(); $this->projectDir_orig = realpath(self::$kernel->getProjectDir()); diff --git a/tests/Services/Attachments/AttachmentURLGeneratorTest.php b/tests/Services/Attachments/AttachmentURLGeneratorTest.php index 1588a951..9fac356f 100644 --- a/tests/Services/Attachments/AttachmentURLGeneratorTest.php +++ b/tests/Services/Attachments/AttachmentURLGeneratorTest.php @@ -33,7 +33,7 @@ class AttachmentURLGeneratorTest extends WebTestCase public static function setUpBeforeClass(): void { - //Get an service instance. + //Get a service instance. self::bootKernel(); self::$service = self::getContainer()->get(AttachmentURLGenerator::class); } diff --git a/tests/Services/Attachments/BuiltinAttachmentsFinderTest.php b/tests/Services/Attachments/BuiltinAttachmentsFinderTest.php index 499ab8f4..2ba317ed 100644 --- a/tests/Services/Attachments/BuiltinAttachmentsFinderTest.php +++ b/tests/Services/Attachments/BuiltinAttachmentsFinderTest.php @@ -27,7 +27,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; class BuiltinAttachmentsFinderTest extends WebTestCase { - protected static $mock_list = [ + protected static array $mock_list = [ '%FOOTPRINTS%/test/test.jpg', '%FOOTPRINTS%/test/test.png', '%FOOTPRINTS%/123.jpg', '%FOOTPRINTS%/123.jpeg', '%FOOTPRINTS_3D%/test.jpg', '%FOOTPRINTS_3D%/hallo.txt', ]; @@ -38,7 +38,7 @@ class BuiltinAttachmentsFinderTest extends WebTestCase public static function setUpBeforeClass(): void { - //Get an service instance. + //Get a service instance. self::bootKernel(); self::$service = self::getContainer()->get(BuiltinAttachmentsFinder::class); } diff --git a/tests/Services/Formatters/AmountFormatterTest.php b/tests/Services/Formatters/AmountFormatterTest.php index 40df0af7..62ded8fe 100644 --- a/tests/Services/Formatters/AmountFormatterTest.php +++ b/tests/Services/Formatters/AmountFormatterTest.php @@ -38,7 +38,7 @@ class AmountFormatterTest extends WebTestCase { parent::setUp(); // TODO: Change the autogenerated stub - //Get an service instance. + //Get a service instance. self::bootKernel(); $this->service = self::getContainer()->get(AmountFormatter::class); } diff --git a/tests/Services/ImportExportSystem/BOMImporterTest.php b/tests/Services/ImportExportSystem/BOMImporterTest.php index 674f1616..2a0013e5 100644 --- a/tests/Services/ImportExportSystem/BOMImporterTest.php +++ b/tests/Services/ImportExportSystem/BOMImporterTest.php @@ -23,7 +23,6 @@ namespace App\Tests\Services\ImportExportSystem; use App\Entity\ProjectSystem\Project; use App\Entity\ProjectSystem\ProjectBOMEntry; use App\Services\ImportExportSystem\BOMImporter; -use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\HttpFoundation\File\File; @@ -39,14 +38,14 @@ class BOMImporterTest extends WebTestCase { parent::setUp(); - //Get an service instance. + //Get a service instance. self::bootKernel(); $this->service = self::getContainer()->get(BOMImporter::class); } public function testImportFileIntoProject(): void { - $inpute = $input = <<service = self::getContainer()->get(EntityImporter::class); } @@ -113,7 +112,7 @@ EOT; $parent = new AttachmentType(); $results = $this->service->massCreation($input, AttachmentType::class, $parent, $errors); - //We have 7 elements, an now errros + //We have 7 elements, and 0 errors $this->assertCount(0, $errors); $this->assertCount(7, $results); diff --git a/tests/Services/LabelSystem/BarcodeGeneratorTest.php b/tests/Services/LabelSystem/BarcodeGeneratorTest.php index a82b630b..844cae90 100644 --- a/tests/Services/LabelSystem/BarcodeGeneratorTest.php +++ b/tests/Services/LabelSystem/BarcodeGeneratorTest.php @@ -56,7 +56,7 @@ final class BarcodeGeneratorTest extends WebTestCase protected function setUp(): void { self::bootKernel(); - $this->services = self::$container->get(BarcodeGenerator::class); + $this->services = self::getContainer()->get(BarcodeGenerator::class); } public function testGetContent(): void diff --git a/tests/Services/LabelSystem/LabelTextReplacerTest.php b/tests/Services/LabelSystem/LabelTextReplacerTest.php index 09635562..e965fcc1 100644 --- a/tests/Services/LabelSystem/LabelTextReplacerTest.php +++ b/tests/Services/LabelSystem/LabelTextReplacerTest.php @@ -51,18 +51,18 @@ class LabelTextReplacerTest extends WebTestCase /** * @var LabelTextReplacer */ - protected $service; + protected LabelTextReplacer $service; /** * @var Part */ - protected $target; + protected Part $target; protected function setUp(): void { parent::setUp(); - //Get an service instance. + //Get a service instance. self::bootKernel(); $this->service = self::getContainer()->get(LabelTextReplacer::class); diff --git a/tests/Services/LabelSystem/PlaceholderProviders/PartLotProviderTest.php b/tests/Services/LabelSystem/PlaceholderProviders/PartLotProviderTest.php index fda06053..83d7f3d9 100644 --- a/tests/Services/LabelSystem/PlaceholderProviders/PartLotProviderTest.php +++ b/tests/Services/LabelSystem/PlaceholderProviders/PartLotProviderTest.php @@ -53,15 +53,15 @@ class PartLotProviderTest extends WebTestCase /** * @var PartLotProvider */ - protected $service; + protected PartLotProvider $service; - protected $target; + protected PartLot $target; protected function setUp(): void { self::bootKernel(); \Locale::setDefault('en'); - $this->service = self::$container->get(PartLotProvider::class); + $this->service = self::getContainer()->get(PartLotProvider::class); $this->target = new PartLot(); $this->target->setDescription('Lot description'); $this->target->setComment('Lot comment'); diff --git a/tests/Services/LabelSystem/PlaceholderProviders/PartProviderTest.php b/tests/Services/LabelSystem/PlaceholderProviders/PartProviderTest.php index a97cb438..8e2b784e 100644 --- a/tests/Services/LabelSystem/PlaceholderProviders/PartProviderTest.php +++ b/tests/Services/LabelSystem/PlaceholderProviders/PartProviderTest.php @@ -56,9 +56,9 @@ class PartProviderTest extends WebTestCase /** * @var PartProvider */ - protected $service; + protected PartProvider $service; - protected $target; + protected Part $target; /** * @var \Doctrine\ORM\EntityManager diff --git a/tests/Services/LabelSystem/SandboxedTwigProviderTest.php b/tests/Services/LabelSystem/SandboxedTwigProviderTest.php index 92a6cd54..1d65d382 100644 --- a/tests/Services/LabelSystem/SandboxedTwigProviderTest.php +++ b/tests/Services/LabelSystem/SandboxedTwigProviderTest.php @@ -59,7 +59,7 @@ class SandboxedTwigProviderTest extends WebTestCase protected function setUp(): void { self::bootKernel(); - $this->service = self::$container->get(SandboxedTwigProvider::class); + $this->service = self::getContainer()->get(SandboxedTwigProvider::class); } public function twigDataProvider(): array @@ -139,5 +139,7 @@ class SandboxedTwigProviderTest extends WebTestCase 'lot' => new PartLot(), 'location' => new Storelocation(), ]); + + $this->assertIsString($str); } } diff --git a/tests/Services/LogSystem/EventCommentHelperTest.php b/tests/Services/LogSystem/EventCommentHelperTest.php index 4cab7bb4..62cca6a2 100644 --- a/tests/Services/LogSystem/EventCommentHelperTest.php +++ b/tests/Services/LogSystem/EventCommentHelperTest.php @@ -55,7 +55,7 @@ class EventCommentHelperTest extends WebTestCase { parent::setUp(); // TODO: Change the autogenerated stub - //Get an service instance. + //Get a service instance. self::bootKernel(); $this->service = self::getContainer()->get(EventCommentHelper::class); } diff --git a/tests/Services/LogSystem/EventCommentNeededHelperTest.php b/tests/Services/LogSystem/EventCommentNeededHelperTest.php index 9816d078..9cfabd6a 100644 --- a/tests/Services/LogSystem/EventCommentNeededHelperTest.php +++ b/tests/Services/LogSystem/EventCommentNeededHelperTest.php @@ -25,7 +25,7 @@ use PHPUnit\Framework\TestCase; class EventCommentNeededHelperTest extends TestCase { - public function testIsCommentNeeded() + public function testIsCommentNeeded(): void { $service = new EventCommentNeededHelper(['part_edit', 'part_create']); $this->assertTrue($service->isCommentNeeded('part_edit')); @@ -34,7 +34,7 @@ class EventCommentNeededHelperTest extends TestCase $this->assertFalse($service->isCommentNeeded('part_stock_operation')); } - public function testIsCommentNeededInvalidTypeException() + public function testIsCommentNeededInvalidTypeException(): void { $service = new EventCommentNeededHelper(['part_edit', 'part_create']); $this->expectException(\InvalidArgumentException::class); diff --git a/tests/Services/LogSystem/EventLoggerTest.php b/tests/Services/LogSystem/EventLoggerTest.php index 77be97db..0c94d8c7 100644 --- a/tests/Services/LogSystem/EventLoggerTest.php +++ b/tests/Services/LogSystem/EventLoggerTest.php @@ -58,7 +58,7 @@ class EventLoggerTest extends WebTestCase { parent::setUp(); // TODO: Change the autogenerated stub - //Get an service instance. + //Get a service instance. self::bootKernel(); $this->service = self::getContainer()->get(EventLogger::class); } diff --git a/tests/Services/Misc/FAIconGeneratorTest.php b/tests/Services/Misc/FAIconGeneratorTest.php index 63015d7b..34806bf9 100644 --- a/tests/Services/Misc/FAIconGeneratorTest.php +++ b/tests/Services/Misc/FAIconGeneratorTest.php @@ -23,7 +23,6 @@ declare(strict_types=1); namespace App\Tests\Services\Misc; use App\Services\Misc\FAIconGenerator; -use App\Tests\Services\AmountFormatter; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; class FAIconGeneratorTest extends WebTestCase @@ -37,7 +36,7 @@ class FAIconGeneratorTest extends WebTestCase { parent::setUp(); // TODO: Change the autogenerated stub - //Get an service instance. + //Get a service instance. self::bootKernel(); $this->service = self::getContainer()->get(FAIconGenerator::class); } diff --git a/tests/Services/Misc/MySQLDumpXMLConverterTest.php b/tests/Services/Misc/MySQLDumpXMLConverterTest.php index 9f2a9925..b666597a 100644 --- a/tests/Services/Misc/MySQLDumpXMLConverterTest.php +++ b/tests/Services/Misc/MySQLDumpXMLConverterTest.php @@ -26,7 +26,7 @@ use PHPUnit\Framework\TestCase; class MySQLDumpXMLConverterTest extends TestCase { - public function testConvertMySQLDumpXMLDataToArrayStructure() + public function testConvertMySQLDumpXMLDataToArrayStructure(): void { $service = new MySQLDumpXMLConverter(); diff --git a/tests/Services/Parameters/ParameterExtractorTest.php b/tests/Services/Parameters/ParameterExtractorTest.php index ceb28456..98393674 100644 --- a/tests/Services/Parameters/ParameterExtractorTest.php +++ b/tests/Services/Parameters/ParameterExtractorTest.php @@ -52,7 +52,7 @@ class ParameterExtractorTest extends WebTestCase protected function setUp(): void { parent::setUp(); - //Get an service instance. + //Get a service instance. self::bootKernel(); $this->service = self::getContainer()->get(ParameterExtractor::class); } diff --git a/tests/Services/Parts/PartLotWithdrawAddHelperTest.php b/tests/Services/Parts/PartLotWithdrawAddHelperTest.php index b2f8a2f3..269a06f9 100644 --- a/tests/Services/Parts/PartLotWithdrawAddHelperTest.php +++ b/tests/Services/Parts/PartLotWithdrawAddHelperTest.php @@ -5,9 +5,7 @@ namespace App\Tests\Services\Parts; use App\Entity\Parts\Part; use App\Entity\Parts\PartLot; use App\Entity\Parts\Storelocation; -use App\Services\ElementTypeNameGenerator; use App\Services\Parts\PartLotWithdrawAddHelper; -use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; class TestPartLot extends PartLot @@ -27,29 +25,29 @@ class PartLotWithdrawAddHelperTest extends WebTestCase protected $service; /** @var Part */ - private $part; + private Part $part; /** @var Storelocation */ - private $storageLocation; + private Storelocation $storageLocation; /** @var Storelocation */ - private $full_storageLocation; + private Storelocation $full_storageLocation; /** @var PartLot */ - private $partLot1; + private PartLot $partLot1; /** @var PartLot */ - private $partLot2; + private PartLot $partLot2; /** @var PartLot */ - private $partLot3; + private PartLot $partLot3; /** @var PartLot */ - private $fullLot; + private PartLot $fullLot; /** @var PartLot */ - private $lotWithUnknownInstock; + private PartLot $lotWithUnknownInstock; protected function setUp(): void { parent::setUp(); - //Get an service instance. + //Get a service instance. self::bootKernel(); $this->service = self::getContainer()->get(PartLotWithdrawAddHelper::class); @@ -89,7 +87,7 @@ class PartLotWithdrawAddHelperTest extends WebTestCase $this->lotWithUnknownInstock->setStorageLocation($this->storageLocation); } - public function testCanWithdraw() + public function testCanWithdraw(): void { //Normal lots should be withdrawable $this->assertTrue($this->service->canWithdraw($this->partLot1)); @@ -103,7 +101,7 @@ class PartLotWithdrawAddHelperTest extends WebTestCase $this->assertFalse($this->service->canWithdraw($this->lotWithUnknownInstock)); } - public function testCanAdd() + public function testCanAdd(): void { //Normal lots should be addable $this->assertTrue($this->service->canAdd($this->partLot1)); @@ -116,7 +114,7 @@ class PartLotWithdrawAddHelperTest extends WebTestCase $this->assertFalse($this->service->canAdd($this->lotWithUnknownInstock)); } - public function testAdd() + public function testAdd(): void { //Add 5 to lot 1 $this->service->add($this->partLot1, 5, "Test"); @@ -132,7 +130,7 @@ class PartLotWithdrawAddHelperTest extends WebTestCase } - public function testWithdraw() + public function testWithdraw(): void { //Withdraw 5 from lot 1 $this->service->withdraw($this->partLot1, 5, "Test"); @@ -143,7 +141,7 @@ class PartLotWithdrawAddHelperTest extends WebTestCase $this->assertEquals(0, $this->partLot2->getAmount()); } - public function testMove() + public function testMove(): void { //Move 5 from lot 1 to lot 2 $this->service->move($this->partLot1, $this->partLot2, 5, "Test"); diff --git a/tests/Services/Parts/PricedetailHelperTest.php b/tests/Services/Parts/PricedetailHelperTest.php index aff0fdba..89931acf 100644 --- a/tests/Services/Parts/PricedetailHelperTest.php +++ b/tests/Services/Parts/PricedetailHelperTest.php @@ -39,7 +39,7 @@ class PricedetailHelperTest extends WebTestCase protected function setUp(): void { parent::setUp(); - //Get an service instance. + //Get a service instance. self::bootKernel(); $this->service = self::getContainer()->get(PricedetailHelper::class); } diff --git a/tests/Services/ProjectSystem/ProjectBuildHelperTest.php b/tests/Services/ProjectSystem/ProjectBuildHelperTest.php index 0037ae0c..199a7dac 100644 --- a/tests/Services/ProjectSystem/ProjectBuildHelperTest.php +++ b/tests/Services/ProjectSystem/ProjectBuildHelperTest.php @@ -39,7 +39,7 @@ class ProjectBuildHelperTest extends WebTestCase $this->service = self::getContainer()->get(ProjectBuildHelper::class); } - public function testGetMaximumBuildableCountForBOMEntryNonPartBomEntry() + public function testGetMaximumBuildableCountForBOMEntryNonPartBomEntry(): void { $bom_entry = new ProjectBOMEntry(); $bom_entry->setPart(null); @@ -50,7 +50,7 @@ class ProjectBuildHelperTest extends WebTestCase $this->service->getMaximumBuildableCountForBOMEntry($bom_entry); } - public function testGetMaximumBuildableCountForBOMEntry() + public function testGetMaximumBuildableCountForBOMEntry(): void { $project_bom_entry = new ProjectBOMEntry(); $project_bom_entry->setQuantity(10); @@ -74,7 +74,7 @@ class ProjectBuildHelperTest extends WebTestCase $this->assertEquals(0, $this->service->getMaximumBuildableCountForBOMEntry($project_bom_entry)); } - public function testGetMaximumBuildableCount() + public function testGetMaximumBuildableCount(): void { $project = new Project(); diff --git a/tests/Services/ProjectSystem/ProjectBuildPartHelperTest.php b/tests/Services/ProjectSystem/ProjectBuildPartHelperTest.php index 41014c8a..d0ae8959 100644 --- a/tests/Services/ProjectSystem/ProjectBuildPartHelperTest.php +++ b/tests/Services/ProjectSystem/ProjectBuildPartHelperTest.php @@ -21,9 +21,7 @@ namespace App\Tests\Services\ProjectSystem; use App\Entity\ProjectSystem\Project; -use App\Services\Parts\PricedetailHelper; use App\Services\ProjectSystem\ProjectBuildPartHelper; -use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; class ProjectBuildPartHelperTest extends WebTestCase diff --git a/tests/Services/Trees/TreeViewGeneratorTest.php b/tests/Services/Trees/TreeViewGeneratorTest.php index c43fe680..92ba196d 100644 --- a/tests/Services/Trees/TreeViewGeneratorTest.php +++ b/tests/Services/Trees/TreeViewGeneratorTest.php @@ -44,7 +44,7 @@ class TreeViewGeneratorTest extends WebTestCase { parent::setUp(); // TODO: Change the autogenerated stub - //Get an service instance. + //Get a service instance. self::bootKernel(); $this->service = self::getContainer()->get(TreeViewGenerator::class); $this->em = self::getContainer()->get(EntityManagerInterface::class); @@ -99,7 +99,7 @@ class TreeViewGeneratorTest extends WebTestCase //First element should link to new category $this->assertStringContainsStringIgnoringCase('New', $tree[0]->getText()); $this->assertSame('/en/category/new', $tree[0]->getHref()); - //By default the new element node is selected + //By default, the new element node is selected $this->assertTrue($tree[0]->getState()->getSelected()); //Next element is spacing diff --git a/tests/Services/UserSystem/PermissionManagerTest.php b/tests/Services/UserSystem/PermissionManagerTest.php index 57905253..8e90715e 100644 --- a/tests/Services/UserSystem/PermissionManagerTest.php +++ b/tests/Services/UserSystem/PermissionManagerTest.php @@ -24,7 +24,6 @@ namespace App\Tests\Services\UserSystem; use App\Entity\UserSystem\Group; use App\Entity\UserSystem\PermissionData; -use App\Entity\UserSystem\PermissionsEmbed; use App\Entity\UserSystem\User; use App\Services\UserSystem\PermissionManager; use InvalidArgumentException; @@ -46,7 +45,7 @@ class PermissionManagerTest extends WebTestCase { parent::setUp(); // TODO: Change the autogenerated stub - //Get an service instance. + //Get a service instance. self::bootKernel(); $this->service = self::getContainer()->get(PermissionManager::class); @@ -156,7 +155,7 @@ class PermissionManagerTest extends WebTestCase public function testInherit(): void { - //Not inherited values should be same as dont inherit: + //Not inherited values should be same as don't inherit: $this->assertTrue($this->service->inherit($this->user, 'parts', 'read')); $this->assertFalse($this->service->inherit($this->user, 'parts', 'edit')); //When thing can not be resolved null should be returned diff --git a/tests/Services/UserSystem/PermissionSchemaUpdaterTest.php b/tests/Services/UserSystem/PermissionSchemaUpdaterTest.php index 79abb89c..8fe99b50 100644 --- a/tests/Services/UserSystem/PermissionSchemaUpdaterTest.php +++ b/tests/Services/UserSystem/PermissionSchemaUpdaterTest.php @@ -23,7 +23,6 @@ namespace App\Tests\Services\UserSystem; use App\Entity\UserSystem\PermissionData; use App\Security\Interfaces\HasPermissionsInterface; use App\Services\UserSystem\PermissionSchemaUpdater; -use PHPUnit\Framework\TestCase; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; class TestPermissionHolder implements HasPermissionsInterface @@ -53,10 +52,10 @@ class PermissionSchemaUpdaterTest extends WebTestCase parent::setUp(); self::bootKernel(); - $this->service = self::$container->get(PermissionSchemaUpdater::class); + $this->service = self::getContainer()->get(PermissionSchemaUpdater::class); } - public function testIsSchemaUpdateNeeded() + public function testIsSchemaUpdateNeeded(): void { $perm_data = new PermissionData(); $perm_data->setSchemaVersion(0); @@ -70,7 +69,7 @@ class PermissionSchemaUpdaterTest extends WebTestCase self::assertFalse($this->service->isSchemaUpdateNeeded($user)); } - public function testUpgradeSchema() + public function testUpgradeSchema(): void { $perm_data = new PermissionData(); $perm_data->setSchemaVersion(0); @@ -84,21 +83,21 @@ class PermissionSchemaUpdaterTest extends WebTestCase self::assertFalse($this->service->upgradeSchema($user)); } - public function testUpgradeSchemaToVersion1() + public function testUpgradeSchemaToVersion1(): void { $perm_data = new PermissionData(); $perm_data->setSchemaVersion(0); $perm_data->setPermissionValue('parts', 'edit', PermissionData::ALLOW); $user = new TestPermissionHolder($perm_data); - //Do an upgrade and afterwards the move, add, and withdraw permissions should be set to ALLOW + //Do an upgrade and afterward the move, add, and withdraw permissions should be set to ALLOW self::assertTrue($this->service->upgradeSchema($user, 1)); self::assertEquals(PermissionData::ALLOW, $user->getPermissions()->getPermissionValue('parts_stock', 'move')); self::assertEquals(PermissionData::ALLOW, $user->getPermissions()->getPermissionValue('parts_stock', 'add')); self::assertEquals(PermissionData::ALLOW, $user->getPermissions()->getPermissionValue('parts_stock', 'withdraw')); } - public function testUpgradeSchemaToVersion2() + public function testUpgradeSchemaToVersion2(): void { $perm_data = new PermissionData(); $perm_data->setSchemaVersion(1); diff --git a/tests/Services/UserSystem/TFA/BackupCodeManagerTest.php b/tests/Services/UserSystem/TFA/BackupCodeManagerTest.php index 6e2b744a..35b7f4f8 100644 --- a/tests/Services/UserSystem/TFA/BackupCodeManagerTest.php +++ b/tests/Services/UserSystem/TFA/BackupCodeManagerTest.php @@ -68,7 +68,7 @@ class BackupCodeManagerTest extends WebTestCase { $user = new User(); - //By default nothing other 2FA is activated, so the backup codes should be disabled + //By default, nothing other 2FA is activated, so the backup codes should be disabled $codes = ['aaaa', 'bbbb']; $user->setBackupCodes($codes); $this->service->disableBackupCodesIfUnused($user); diff --git a/tests/Twig/EntityExtensionTest.php b/tests/Twig/EntityExtensionTest.php index 9e951ea6..122165bc 100644 --- a/tests/Twig/EntityExtensionTest.php +++ b/tests/Twig/EntityExtensionTest.php @@ -20,7 +20,6 @@ namespace App\Tests\Twig; -use App\Entity\Attachments\Attachment; use App\Entity\Attachments\PartAttachment; use App\Entity\ProjectSystem\Project; use App\Entity\LabelSystem\LabelProfile; @@ -46,12 +45,12 @@ class EntityExtensionTest extends WebTestCase { parent::setUp(); // TODO: Change the autogenerated stub - //Get an service instance. + //Get a service instance. self::bootKernel(); $this->service = self::getContainer()->get(EntityExtension::class); } - public function testGetEntityType() + public function testGetEntityType(): void { $this->assertEquals('part', $this->service->getEntityType(new Part())); $this->assertEquals('footprint', $this->service->getEntityType(new Footprint())); diff --git a/tests/Twig/TwigCoreExtensionTest.php b/tests/Twig/TwigCoreExtensionTest.php index dccb43ca..ed55dcbc 100644 --- a/tests/Twig/TwigCoreExtensionTest.php +++ b/tests/Twig/TwigCoreExtensionTest.php @@ -55,7 +55,7 @@ class TwigCoreExtensionTest extends WebTestCase private $test3 = 5; private $test4 = 7; - public function getTest4() + public function getTest4(): int { return $this->test4; } diff --git a/tests/Twig/UserExtensionTest.php b/tests/Twig/UserExtensionTest.php index 6a469cda..04dd888f 100644 --- a/tests/Twig/UserExtensionTest.php +++ b/tests/Twig/UserExtensionTest.php @@ -34,7 +34,7 @@ class UserExtensionTest extends WebTestCase $this->service = self::getContainer()->get(UserExtension::class); } - public function removeeLocaleFromPathDataSet() + public function removeeLocaleFromPathDataSet(): ?\Generator { yield ['/', '/de/']; yield ['/test', '/de/test']; diff --git a/translations/messages.de.xlf b/translations/messages.de.xlf index f1b68642..9c469ea7 100644 --- a/translations/messages.de.xlf +++ b/translations/messages.de.xlf @@ -11183,16 +11183,76 @@ Element 3 BOM importieren - - - log.database_updated.old_version - Old database schema version + + + measurement_unit.new + Neue Maßeinheit - - - log.database_updated.new_version - New database schema version + + + measurement_unit.edit + Bearbeite Maßeinheit + + + + + user.aboutMe.label + Über mich + + + + + storelocation.owner.label + Besitzer + + + + + storelocation.part_owner_must_match.label + Bauteilebesitzer muss mit Lagerortbesitzer übereinstimmen + + + + + part_lot.owner + Besitzer + + + + + part_lot.owner.help + Nur der Besitzer kann Bauteile aus diesem Bestand entnehmen oder hinzufügen. + + + + + log.element_edited.changed_fields.owner + Besitzer + + + + + log.element_edited.changed_fields.instock_unknown + Menge unbekannt + + + + + log.element_edited.changed_fields.needs_refill + Muss aufgefüllt werden + + + + + part.withdraw.access_denied + Sie sind nicht berechtigt die gewünschte Aktion durchzuführen! Bitte überprüfen Sie Ihre Berechtigungen und den Besitzer des Bauteilebestandes. + + + + + part.info.amount.less_than_desired + Weniger als erwünscht diff --git a/translations/messages.en.xlf b/translations/messages.en.xlf index 3ecda60e..2c774d5f 100644 --- a/translations/messages.en.xlf +++ b/translations/messages.en.xlf @@ -10960,31 +10960,31 @@ Element 3 - + attachment.max_file_size Maximum file size - + user.saml_user SSO / SAML user - + user.saml_user.pw_change_hint Your user uses single sign-on (SSO). You can not change the password and 2FA settings here. Configure them on your central SSO provider instead! - + login.sso_saml_login Single Sign-On Login (SSO) - + login.local_login_hint The form below is only for log in with a local user. If you want to log in via single sign-on, press the button above. @@ -11188,103 +11188,103 @@ Element 3 - + measurement_unit.new New Measurement Unit - + measurement_unit.edit Edit Measurement Unit - + user.aboutMe.label About Me - + storelocation.owner.label Owner - + storelocation.part_owner_must_match.label Part Lot owner must match storage location owner - + part_lot.owner Owner - + part_lot.owner.help Only the owner can withdraw or add stock to this lot. - + log.element_edited.changed_fields.owner Owner - + log.element_edited.changed_fields.instock_unknown Amount unknown - + log.element_edited.changed_fields.needs_refill Refill needed - + part.withdraw.access_denied Not allowed to do the desired action. Please check your permissions and the owner of the part lots. - + part.info.amount.less_than_desired Less than desired - + log.cli_user CLI user - + log.element_edited.changed_fields.part_owner_must_match Part owner must match storage location owner - + part.filter.lessThanDesired - + In stock less than desired (total amount < min. amount) - + part.filter.lotOwner Lot owner - + user.show_email_on_profile.label Show email on public profile page diff --git a/translations/security.en.xlf b/translations/security.en.xlf index 2c9d8957..03d410c0 100644 --- a/translations/security.en.xlf +++ b/translations/security.en.xlf @@ -8,7 +8,7 @@ - + saml.error.cannot_login_local_user_per_saml You can not login as local user via SSO! Use your local user password instead. diff --git a/translations/validators.de.xlf b/translations/validators.de.xlf index 1012ae53..40068f2e 100644 --- a/translations/validators.de.xlf +++ b/translations/validators.de.xlf @@ -305,14 +305,16 @@ Wählen Sie einen Wert, oder laden Sie eine Datei hoch, um dessen Dateiname automatisch als Namen für diesen Anhang zu nutzen. - - - obsolete - obsolete - - - validator.isSelectable - The element must be selectable. + + + validator.part_lot.owner_must_match_storage_location_owner + Der Besitzer dieses Bauteilebestandes und des gewählten Lagerortes müssen übereinstimmen (%owner_name%)! + + + + + validator.part_lot.owner_must_not_be_anonymous + Der Eigentümer darf nicht der anonymous Benutzer sein! diff --git a/translations/validators.en.xlf b/translations/validators.en.xlf index 1f3438de..a24e6a0d 100644 --- a/translations/validators.en.xlf +++ b/translations/validators.en.xlf @@ -300,19 +300,19 @@ - + validator.attachment.name_not_blank Set a value here, or upload a file to automatically use its filename as name for the attachment. - + validator.part_lot.owner_must_match_storage_location_owner The owner of this lot must match the owner of the selected storage location (%owner_name%)! - + validator.part_lot.owner_must_not_be_anonymous A lot owner must not be the anonymous user! diff --git a/yarn.lock b/yarn.lock index df440a43..ecc6fd30 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17,38 +17,38 @@ dependencies: "@babel/highlight" "^7.18.6" -"@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.5", "@babel/compat-data@^7.21.4": - version "7.21.4" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.21.4.tgz#457ffe647c480dff59c2be092fc3acf71195c87f" - integrity sha512-/DYyDpeCfaVinT40FPGdkkb+lYSKvsVuMjDAG7jPOWWiM1ibOaB9CXJAlc4d1QpP/U2q2P9jbrSlClKSErd55g== +"@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.5", "@babel/compat-data@^7.21.5": + version "7.21.7" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.21.7.tgz#61caffb60776e49a57ba61a88f02bedd8714f6bc" + integrity sha512-KYMqFYTaenzMK4yUtf4EW9wc4N9ef80FsbMtkwool5zpwl4YrT1SdWYSTRcT94KO4hannogdS+LxY7L+arP3gA== "@babel/core@^7.19.6": - version "7.21.4" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.21.4.tgz#c6dc73242507b8e2a27fd13a9c1814f9fa34a659" - integrity sha512-qt/YV149Jman/6AfmlxJ04LMIu8bMoyl3RB91yTFrxQmgbrSvQMy7cI8Q62FHx1t8wJ8B5fu0UDoLwHAhUo1QA== + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.21.5.tgz#92f753e8b9f96e15d4b398dbe2f25d1408c9c426" + integrity sha512-9M398B/QH5DlfCOTKDZT1ozXr0x8uBEeFd+dJraGUZGiaNpGCDVGCc14hZexsMblw3XxltJ+6kSvogp9J+5a9g== dependencies: "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.21.4" - "@babel/generator" "^7.21.4" - "@babel/helper-compilation-targets" "^7.21.4" - "@babel/helper-module-transforms" "^7.21.2" - "@babel/helpers" "^7.21.0" - "@babel/parser" "^7.21.4" + "@babel/generator" "^7.21.5" + "@babel/helper-compilation-targets" "^7.21.5" + "@babel/helper-module-transforms" "^7.21.5" + "@babel/helpers" "^7.21.5" + "@babel/parser" "^7.21.5" "@babel/template" "^7.20.7" - "@babel/traverse" "^7.21.4" - "@babel/types" "^7.21.4" + "@babel/traverse" "^7.21.5" + "@babel/types" "^7.21.5" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.2" semver "^6.3.0" -"@babel/generator@^7.21.4": - version "7.21.4" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.21.4.tgz#64a94b7448989f421f919d5239ef553b37bb26bc" - integrity sha512-NieM3pVIYW2SwGzKoqfPrQsf4xGs9M9AIG3ThppsSRmO+m7eQhmI6amajKMUeIO37wFfsvnvcxQFx6x6iqxDnA== +"@babel/generator@^7.21.5": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.21.5.tgz#c0c0e5449504c7b7de8236d99338c3e2a340745f" + integrity sha512-SrKK/sRv8GesIW1bDagf9cCG38IOMYZusoe1dfg0D8aiUe3Amvoj1QtjTPAWcfrZFvIwlleLb0gxzQidL9w14w== dependencies: - "@babel/types" "^7.21.4" + "@babel/types" "^7.21.5" "@jridgewell/gen-mapping" "^0.3.2" "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" @@ -61,45 +61,46 @@ "@babel/types" "^7.18.6" "@babel/helper-builder-binary-assignment-operator-visitor@^7.18.6": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz#acd4edfd7a566d1d51ea975dff38fd52906981bb" - integrity sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw== + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.21.5.tgz#817f73b6c59726ab39f6ba18c234268a519e5abb" + integrity sha512-uNrjKztPLkUk7bpCNC0jEKDJzzkvel/W+HguzbN8krA+LPfC1CEobJEvAvGka2A/M+ViOqXdcRL0GqPUJSjx9g== dependencies: - "@babel/helper-explode-assignable-expression" "^7.18.6" - "@babel/types" "^7.18.9" + "@babel/types" "^7.21.5" -"@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.20.7", "@babel/helper-compilation-targets@^7.21.4": - version "7.21.4" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.21.4.tgz#770cd1ce0889097ceacb99418ee6934ef0572656" - integrity sha512-Fa0tTuOXZ1iL8IeDFUWCzjZcn+sJGd9RZdH9esYVjEejGmzf+FFYQpMi/kZUk2kPy/q1H3/GPw7np8qar/stfg== +"@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.20.7", "@babel/helper-compilation-targets@^7.21.5": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.21.5.tgz#631e6cc784c7b660417421349aac304c94115366" + integrity sha512-1RkbFGUKex4lvsB9yhIfWltJM5cZKUftB2eNajaDv3dCMEp49iBG0K14uH8NnX9IPux2+mK7JGEOB0jn48/J6w== dependencies: - "@babel/compat-data" "^7.21.4" + "@babel/compat-data" "^7.21.5" "@babel/helper-validator-option" "^7.21.0" browserslist "^4.21.3" lru-cache "^5.1.1" semver "^6.3.0" "@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.21.0": - version "7.21.4" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.21.4.tgz#3a017163dc3c2ba7deb9a7950849a9586ea24c18" - integrity sha512-46QrX2CQlaFRF4TkwfTt6nJD7IHq8539cCL7SDpqWSDeJKY1xylKKY5F/33mJhLZ3mFvKv2gGrVS6NkyF6qs+Q== + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.21.5.tgz#09a259305467d2020bd2492119ee1c1bc55029e9" + integrity sha512-yNSEck9SuDvPTEUYm4BSXl6ZVC7yO5ZLEMAhG3v3zi7RDxyL/nQDemWWZmw4L0stPWwhpnznRRyJHPRcbXR2jw== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-environment-visitor" "^7.21.5" "@babel/helper-function-name" "^7.21.0" - "@babel/helper-member-expression-to-functions" "^7.21.0" + "@babel/helper-member-expression-to-functions" "^7.21.5" "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-replace-supers" "^7.20.7" + "@babel/helper-replace-supers" "^7.21.5" "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" "@babel/helper-split-export-declaration" "^7.18.6" + semver "^6.3.0" "@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.20.5": - version "7.21.4" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.21.4.tgz#40411a8ab134258ad2cf3a3d987ec6aa0723cee5" - integrity sha512-M00OuhU+0GyZ5iBBN9czjugzWrEq2vDpf/zCYHxxf93ul/Q5rv+a5h+/+0WnI1AebHNVtl5bFV0qsJoH23DbfA== + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.21.5.tgz#4ce6ffaf497a241aa6c62192416b273987a8daa3" + integrity sha512-1+DPMcln46eNAta/rPIqQYXYRGvQ/LRy6bRKnSt9Dzt/yLjNUbbsh+6yzD6fUHmtzc9kWvVnAhtcMSMyziHmUA== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" regexpu-core "^5.3.1" + semver "^6.3.0" "@babel/helper-define-polyfill-provider@^0.3.3": version "0.3.3" @@ -113,17 +114,10 @@ resolve "^1.14.2" semver "^6.1.2" -"@babel/helper-environment-visitor@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" - integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== - -"@babel/helper-explode-assignable-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz#41f8228ef0a6f1a036b8dfdfec7ce94f9a6bc096" - integrity sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg== - dependencies: - "@babel/types" "^7.18.6" +"@babel/helper-environment-visitor@^7.18.9", "@babel/helper-environment-visitor@^7.21.5": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.21.5.tgz#c769afefd41d171836f7cb63e295bedf689d48ba" + integrity sha512-IYl4gZ3ETsWocUWgsFZLM5i1BYx9SoemminVEXadgLBa9TdeorzgLKm8wWLA6J1N/kT3Kch8XIk1laNzYoHKvQ== "@babel/helper-function-name@^7.18.9", "@babel/helper-function-name@^7.19.0", "@babel/helper-function-name@^7.21.0": version "7.21.0" @@ -140,33 +134,33 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-member-expression-to-functions@^7.20.7", "@babel/helper-member-expression-to-functions@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.21.0.tgz#319c6a940431a133897148515877d2f3269c3ba5" - integrity sha512-Muu8cdZwNN6mRRNG6lAYErJ5X3bRevgYR2O8wN0yn7jJSnGDu6eG59RfT29JHxGUovyfrh6Pj0XzmR7drNVL3Q== +"@babel/helper-member-expression-to-functions@^7.21.5": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.21.5.tgz#3b1a009af932e586af77c1030fba9ee0bde396c0" + integrity sha512-nIcGfgwpH2u4n9GG1HpStW5Ogx7x7ekiFHbjjFRKXbn5zUvqO9ZgotCO4x1aNbKn/x/xOUaXEhyNHCwtFCpxWg== dependencies: - "@babel/types" "^7.21.0" + "@babel/types" "^7.21.5" -"@babel/helper-module-imports@^7.18.6": +"@babel/helper-module-imports@^7.18.6", "@babel/helper-module-imports@^7.21.4": version "7.21.4" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.21.4.tgz#ac88b2f76093637489e718a90cec6cf8a9b029af" integrity sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg== dependencies: "@babel/types" "^7.21.4" -"@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.20.11", "@babel/helper-module-transforms@^7.21.2": - version "7.21.2" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz#160caafa4978ac8c00ac66636cb0fa37b024e2d2" - integrity sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ== +"@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.20.11", "@babel/helper-module-transforms@^7.21.5": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.21.5.tgz#d937c82e9af68d31ab49039136a222b17ac0b420" + integrity sha512-bI2Z9zBGY2q5yMHoBvJ2a9iX3ZOAzJPm7Q8Yz6YeoUjU/Cvhmi2G4QyTNyPBqqXSgTjUxRg3L0xV45HvkNWWBw== dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-simple-access" "^7.20.2" + "@babel/helper-environment-visitor" "^7.21.5" + "@babel/helper-module-imports" "^7.21.4" + "@babel/helper-simple-access" "^7.21.5" "@babel/helper-split-export-declaration" "^7.18.6" "@babel/helper-validator-identifier" "^7.19.1" "@babel/template" "^7.20.7" - "@babel/traverse" "^7.21.2" - "@babel/types" "^7.21.2" + "@babel/traverse" "^7.21.5" + "@babel/types" "^7.21.5" "@babel/helper-optimise-call-expression@^7.18.6": version "7.18.6" @@ -175,10 +169,10 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz#d1b9000752b18d0877cff85a5c376ce5c3121629" - integrity sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ== +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.21.5", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.21.5.tgz#345f2377d05a720a4e5ecfa39cbf4474a4daed56" + integrity sha512-0WDaIlXKOX/3KfBK/dwP1oQGiPh6rjMkT7HIRv7i5RR2VUMwrx5ZL0dwBkKx7+SW1zwNdgjHd34IMk5ZjTeHVg== "@babel/helper-remap-async-to-generator@^7.18.9": version "7.18.9" @@ -190,24 +184,24 @@ "@babel/helper-wrap-function" "^7.18.9" "@babel/types" "^7.18.9" -"@babel/helper-replace-supers@^7.18.6", "@babel/helper-replace-supers@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.20.7.tgz#243ecd2724d2071532b2c8ad2f0f9f083bcae331" - integrity sha512-vujDMtB6LVfNW13jhlCrp48QNslK6JXi7lQG736HVbHz/mbf4Dc7tIRh1Xf5C0rF7BP8iiSxGMCmY6Ci1ven3A== +"@babel/helper-replace-supers@^7.18.6", "@babel/helper-replace-supers@^7.20.7", "@babel/helper-replace-supers@^7.21.5": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.21.5.tgz#a6ad005ba1c7d9bc2973dfde05a1bba7065dde3c" + integrity sha512-/y7vBgsr9Idu4M6MprbOVUfH3vs7tsIfnVWv/Ml2xgwvyH6LTngdfbf5AdsKwkJy4zgy1X/kuNrEKvhhK28Yrg== dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-member-expression-to-functions" "^7.20.7" + "@babel/helper-environment-visitor" "^7.21.5" + "@babel/helper-member-expression-to-functions" "^7.21.5" "@babel/helper-optimise-call-expression" "^7.18.6" "@babel/template" "^7.20.7" - "@babel/traverse" "^7.20.7" - "@babel/types" "^7.20.7" + "@babel/traverse" "^7.21.5" + "@babel/types" "^7.21.5" -"@babel/helper-simple-access@^7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz#0ab452687fe0c2cfb1e2b9e0015de07fc2d62dd9" - integrity sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA== +"@babel/helper-simple-access@^7.21.5": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.21.5.tgz#d697a7971a5c39eac32c7e63c0921c06c8a249ee" + integrity sha512-ENPDAMC1wAjR0uaCUwliBdiSl1KBJAVnMTzXqi64c2MG8MPR6ii4qf7bSXDqSFbr4W6W028/rf5ivoHop5/mkg== dependencies: - "@babel/types" "^7.20.2" + "@babel/types" "^7.21.5" "@babel/helper-skip-transparent-expression-wrappers@^7.20.0": version "7.20.0" @@ -223,10 +217,10 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-string-parser@^7.19.4": - version "7.19.4" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63" - integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw== +"@babel/helper-string-parser@^7.21.5": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.21.5.tgz#2b3eea65443c6bdc31c22d037c65f6d323b6b2bd" + integrity sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w== "@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": version "7.19.1" @@ -248,14 +242,14 @@ "@babel/traverse" "^7.20.5" "@babel/types" "^7.20.5" -"@babel/helpers@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.21.0.tgz#9dd184fb5599862037917cdc9eecb84577dc4e7e" - integrity sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA== +"@babel/helpers@^7.21.5": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.21.5.tgz#5bac66e084d7a4d2d9696bdf0175a93f7fb63c08" + integrity sha512-BSY+JSlHxOmGsPTydUkPf1MdMQ3M81x5xGCOVgWM3G8XH77sJ292Y2oqcp0CbbgxhqBuI46iUz1tT7hqP7EfgA== dependencies: "@babel/template" "^7.20.7" - "@babel/traverse" "^7.21.0" - "@babel/types" "^7.21.0" + "@babel/traverse" "^7.21.5" + "@babel/types" "^7.21.5" "@babel/highlight@^7.18.6": version "7.18.6" @@ -266,10 +260,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.18.9", "@babel/parser@^7.20.7", "@babel/parser@^7.21.4": - version "7.21.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.4.tgz#94003fdfc520bbe2875d4ae557b43ddb6d880f17" - integrity sha512-alVJj7k7zIxqBZ7BTRhz0IqJFxW1VJbm6N8JbcYhQ186df9ZBPbZBmWSqAMXwHGsCJdYks7z/voa3ibiS5bCIw== +"@babel/parser@^7.18.9", "@babel/parser@^7.20.7", "@babel/parser@^7.21.5": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.5.tgz#821bb520118fd25b982eaf8d37421cf5c64a312b" + integrity sha512-J+IxH2IsxV4HbnTrSWgMAQj0UEo61hDA4Ny8h8PCX0MLXiibqHbqIOVneqdocemSBc22VpBKxt4J6FQzy9HarQ== "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": version "7.18.6" @@ -458,6 +452,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.19.0" +"@babel/plugin-syntax-import-meta@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" + integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-json-strings@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" @@ -521,12 +522,12 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-arrow-functions@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.20.7.tgz#bea332b0e8b2dab3dafe55a163d8227531ab0551" - integrity sha512-3poA5E7dzDomxj9WXWwuD6A5F3kc7VXwIJO+E+J8qtDtS+pXPAhrgEyh+9GBwBgPq1Z+bB+/JD60lp5jsN7JPQ== +"@babel/plugin-transform-arrow-functions@^7.21.5": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.21.5.tgz#9bb42a53de447936a57ba256fbf537fc312b6929" + integrity sha512-wb1mhwGOCaXHDTcsRYMKF9e5bbMgqwxtqa2Y1ifH96dXJPwbuLX9qHy3clhrxVqgMz7nyNXs8VkxdH8UBcjKqA== dependencies: - "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-plugin-utils" "^7.21.5" "@babel/plugin-transform-async-to-generator@^7.20.7": version "7.20.7" @@ -566,12 +567,12 @@ "@babel/helper-split-export-declaration" "^7.18.6" globals "^11.1.0" -"@babel/plugin-transform-computed-properties@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.20.7.tgz#704cc2fd155d1c996551db8276d55b9d46e4d0aa" - integrity sha512-Lz7MvBK6DTjElHAmfu6bfANzKcxpyNPeYBGEafyA6E5HtRpjpZwU+u7Qrgz/2OR0z+5TvKYbPdphfSaAcZBrYQ== +"@babel/plugin-transform-computed-properties@^7.21.5": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.21.5.tgz#3a2d8bb771cd2ef1cd736435f6552fe502e11b44" + integrity sha512-TR653Ki3pAwxBxUe8srfF3e4Pe3FTA46uaNHYyQwIoM4oWKSoOZiDNyHJ0oIoDIUPSRQbQG7jzgVBX3FPVne1Q== dependencies: - "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-plugin-utils" "^7.21.5" "@babel/template" "^7.20.7" "@babel/plugin-transform-destructuring@^7.21.3": @@ -604,12 +605,12 @@ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.18.6" "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-for-of@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.21.0.tgz#964108c9988de1a60b4be2354a7d7e245f36e86e" - integrity sha512-LlUYlydgDkKpIY7mcBWvyPPmMcOphEyYA27Ef4xpbh1IiDNLr0kZsos2nf92vz3IccvJI25QUwp86Eo5s6HmBQ== +"@babel/plugin-transform-for-of@^7.21.5": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.21.5.tgz#e890032b535f5a2e237a18535f56a9fdaa7b83fc" + integrity sha512-nYWpjKW/7j/I/mZkGVgHJXh4bA1sfdFnJoOXwJuj4m3Q2EraO/8ZyrkCau9P5tbHQk01RMSt6KYLCsW7730SXQ== dependencies: - "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-plugin-utils" "^7.21.5" "@babel/plugin-transform-function-name@^7.18.9": version "7.18.9" @@ -642,14 +643,14 @@ "@babel/helper-module-transforms" "^7.20.11" "@babel/helper-plugin-utils" "^7.20.2" -"@babel/plugin-transform-modules-commonjs@^7.21.2": - version "7.21.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.21.2.tgz#6ff5070e71e3192ef2b7e39820a06fb78e3058e7" - integrity sha512-Cln+Yy04Gxua7iPdj6nOV96smLGjpElir5YwzF0LBPKoPlLDNJePNlrGGaybAJkd0zKRnOVXOgizSqPYMNYkzA== +"@babel/plugin-transform-modules-commonjs@^7.21.5": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.21.5.tgz#d69fb947eed51af91de82e4708f676864e5e47bc" + integrity sha512-OVryBEgKUbtqMoB7eG2rs6UFexJi6Zj6FDXx+esBLPTCxCNxAY9o+8Di7IsUGJ+AVhp5ncK0fxWUBd0/1gPhrQ== dependencies: - "@babel/helper-module-transforms" "^7.21.2" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-simple-access" "^7.20.2" + "@babel/helper-module-transforms" "^7.21.5" + "@babel/helper-plugin-utils" "^7.21.5" + "@babel/helper-simple-access" "^7.21.5" "@babel/plugin-transform-modules-systemjs@^7.20.11": version "7.20.11" @@ -706,12 +707,12 @@ dependencies: "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-regenerator@^7.20.5": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz#57cda588c7ffb7f4f8483cc83bdcea02a907f04d" - integrity sha512-kW/oO7HPBtntbsahzQ0qSE3tFvkFwnbozz3NWFhLGqH75vLEg+sCGngLlhVkePlCs3Jv0dBBHDzCHxNiFAQKCQ== +"@babel/plugin-transform-regenerator@^7.21.5": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.21.5.tgz#576c62f9923f94bcb1c855adc53561fd7913724e" + integrity sha512-ZoYBKDb6LyMi5yCsByQ5jmXsHAQDDYeexT1Szvlmui+lADvfSecr5Dxd/PkrTC3pAD182Fcju1VQkB4oCp9M+w== dependencies: - "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-plugin-utils" "^7.21.5" regenerator-transform "^0.15.1" "@babel/plugin-transform-reserved-words@^7.18.6": @@ -757,12 +758,12 @@ dependencies: "@babel/helper-plugin-utils" "^7.18.9" -"@babel/plugin-transform-unicode-escapes@^7.18.10": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz#1ecfb0eda83d09bbcb77c09970c2dd55832aa246" - integrity sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ== +"@babel/plugin-transform-unicode-escapes@^7.21.5": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.21.5.tgz#1e55ed6195259b0e9061d81f5ef45a9b009fb7f2" + integrity sha512-LYm/gTOwZqsYohlvFUe/8Tujz75LqqVC2w+2qPHLR+WyWHGCZPN1KBpJCJn+4Bk4gOkQy/IXKIge6az5MqwlOg== dependencies: - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-plugin-utils" "^7.21.5" "@babel/plugin-transform-unicode-regex@^7.18.6": version "7.18.6" @@ -773,13 +774,13 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/preset-env@^7.19.4": - version "7.21.4" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.21.4.tgz#a952482e634a8dd8271a3fe5459a16eb10739c58" - integrity sha512-2W57zHs2yDLm6GD5ZpvNn71lZ0B/iypSdIeq25OurDKji6AdzV07qp4s3n1/x5BqtiGaTrPN3nerlSCaC5qNTw== + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.21.5.tgz#db2089d99efd2297716f018aeead815ac3decffb" + integrity sha512-wH00QnTTldTbf/IefEVyChtRdw5RJvODT/Vb4Vcxq1AZvtXj6T0YeX0cAcXhI6/BdGuiP3GcNIL4OQbI2DVNxg== dependencies: - "@babel/compat-data" "^7.21.4" - "@babel/helper-compilation-targets" "^7.21.4" - "@babel/helper-plugin-utils" "^7.20.2" + "@babel/compat-data" "^7.21.5" + "@babel/helper-compilation-targets" "^7.21.5" + "@babel/helper-plugin-utils" "^7.21.5" "@babel/helper-validator-option" "^7.21.0" "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.18.6" "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.20.7" @@ -804,6 +805,7 @@ "@babel/plugin-syntax-dynamic-import" "^7.8.3" "@babel/plugin-syntax-export-namespace-from" "^7.8.3" "@babel/plugin-syntax-import-assertions" "^7.20.0" + "@babel/plugin-syntax-import-meta" "^7.10.4" "@babel/plugin-syntax-json-strings" "^7.8.3" "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" @@ -813,22 +815,22 @@ "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-private-property-in-object" "^7.14.5" "@babel/plugin-syntax-top-level-await" "^7.14.5" - "@babel/plugin-transform-arrow-functions" "^7.20.7" + "@babel/plugin-transform-arrow-functions" "^7.21.5" "@babel/plugin-transform-async-to-generator" "^7.20.7" "@babel/plugin-transform-block-scoped-functions" "^7.18.6" "@babel/plugin-transform-block-scoping" "^7.21.0" "@babel/plugin-transform-classes" "^7.21.0" - "@babel/plugin-transform-computed-properties" "^7.20.7" + "@babel/plugin-transform-computed-properties" "^7.21.5" "@babel/plugin-transform-destructuring" "^7.21.3" "@babel/plugin-transform-dotall-regex" "^7.18.6" "@babel/plugin-transform-duplicate-keys" "^7.18.9" "@babel/plugin-transform-exponentiation-operator" "^7.18.6" - "@babel/plugin-transform-for-of" "^7.21.0" + "@babel/plugin-transform-for-of" "^7.21.5" "@babel/plugin-transform-function-name" "^7.18.9" "@babel/plugin-transform-literals" "^7.18.9" "@babel/plugin-transform-member-expression-literals" "^7.18.6" "@babel/plugin-transform-modules-amd" "^7.20.11" - "@babel/plugin-transform-modules-commonjs" "^7.21.2" + "@babel/plugin-transform-modules-commonjs" "^7.21.5" "@babel/plugin-transform-modules-systemjs" "^7.20.11" "@babel/plugin-transform-modules-umd" "^7.18.6" "@babel/plugin-transform-named-capturing-groups-regex" "^7.20.5" @@ -836,17 +838,17 @@ "@babel/plugin-transform-object-super" "^7.18.6" "@babel/plugin-transform-parameters" "^7.21.3" "@babel/plugin-transform-property-literals" "^7.18.6" - "@babel/plugin-transform-regenerator" "^7.20.5" + "@babel/plugin-transform-regenerator" "^7.21.5" "@babel/plugin-transform-reserved-words" "^7.18.6" "@babel/plugin-transform-shorthand-properties" "^7.18.6" "@babel/plugin-transform-spread" "^7.20.7" "@babel/plugin-transform-sticky-regex" "^7.18.6" "@babel/plugin-transform-template-literals" "^7.18.9" "@babel/plugin-transform-typeof-symbol" "^7.18.9" - "@babel/plugin-transform-unicode-escapes" "^7.18.10" + "@babel/plugin-transform-unicode-escapes" "^7.21.5" "@babel/plugin-transform-unicode-regex" "^7.18.6" "@babel/preset-modules" "^0.1.5" - "@babel/types" "^7.21.4" + "@babel/types" "^7.21.5" babel-plugin-polyfill-corejs2 "^0.3.3" babel-plugin-polyfill-corejs3 "^0.6.0" babel-plugin-polyfill-regenerator "^0.4.1" @@ -870,9 +872,9 @@ integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== "@babel/runtime@^7.8.4": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.21.0.tgz#5b55c9d394e5fcf304909a8b00c07dc217b56673" - integrity sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw== + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.21.5.tgz#8492dddda9644ae3bda3b45eabe87382caee7200" + integrity sha512-8jI69toZqqcsnqGGqwGS4Qb1VwLOEp4hz+CXPywcvjs60u3B4Pom/U/7rm4W8tMOYEB+E9wgD0mW1l3r8qlI9Q== dependencies: regenerator-runtime "^0.13.11" @@ -885,28 +887,28 @@ "@babel/parser" "^7.20.7" "@babel/types" "^7.20.7" -"@babel/traverse@^7.18.9", "@babel/traverse@^7.20.5", "@babel/traverse@^7.20.7", "@babel/traverse@^7.21.0", "@babel/traverse@^7.21.2", "@babel/traverse@^7.21.4": - version "7.21.4" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.21.4.tgz#a836aca7b116634e97a6ed99976236b3282c9d36" - integrity sha512-eyKrRHKdyZxqDm+fV1iqL9UAHMoIg0nDaGqfIOd8rKH17m5snv7Gn4qgjBoFfLz9APvjFU/ICT00NVCv1Epp8Q== +"@babel/traverse@^7.18.9", "@babel/traverse@^7.20.5", "@babel/traverse@^7.21.5": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.21.5.tgz#ad22361d352a5154b498299d523cf72998a4b133" + integrity sha512-AhQoI3YjWi6u/y/ntv7k48mcrCXmus0t79J9qPNlk/lAsFlCiJ047RmbfMOawySTHtywXhbXgpx/8nXMYd+oFw== dependencies: "@babel/code-frame" "^7.21.4" - "@babel/generator" "^7.21.4" - "@babel/helper-environment-visitor" "^7.18.9" + "@babel/generator" "^7.21.5" + "@babel/helper-environment-visitor" "^7.21.5" "@babel/helper-function-name" "^7.21.0" "@babel/helper-hoist-variables" "^7.18.6" "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.21.4" - "@babel/types" "^7.21.4" + "@babel/parser" "^7.21.5" + "@babel/types" "^7.21.5" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.20.5", "@babel/types@^7.20.7", "@babel/types@^7.21.0", "@babel/types@^7.21.2", "@babel/types@^7.21.4", "@babel/types@^7.4.4": - version "7.21.4" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.4.tgz#2d5d6bb7908699b3b416409ffd3b5daa25b030d4" - integrity sha512-rU2oY501qDxE8Pyo7i/Orqma4ziCOrby0/9mvbDUGEfvZjb279Nk9k19e2fiCxHbRRpY2ZyrgW1eq22mvmOIzA== +"@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.20.0", "@babel/types@^7.20.5", "@babel/types@^7.20.7", "@babel/types@^7.21.0", "@babel/types@^7.21.4", "@babel/types@^7.21.5", "@babel/types@^7.4.4": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.5.tgz#18dfbd47c39d3904d5db3d3dc2cc80bedb60e5b6" + integrity sha512-m4AfNvVF2mVC/F7fDEdH2El3HzUg9It/XsCxZiOTTA3m3qYfcSVSbTfM6Q9xG+hYDniZssYhlXKKUMD5m8tF4Q== dependencies: - "@babel/helper-string-parser" "^7.19.4" + "@babel/helper-string-parser" "^7.21.5" "@babel/helper-validator-identifier" "^7.19.1" to-fast-properties "^2.0.0" @@ -1550,9 +1552,9 @@ version "0.1.0" "@symfony/webpack-encore@^4.1.0": - version "4.2.0" - resolved "https://registry.yarnpkg.com/@symfony/webpack-encore/-/webpack-encore-4.2.0.tgz#1eec87e3fca9a410563511eb557f70461c10cce5" - integrity sha512-m0ZGm7vZpmc9pVKE7YBppS1tb9bK8r0qzOvRI2uCK7UfXtzfV3VgXr0VdTAlfmC72vvLKI+s9YJpiesOFbR6Aw== + version "4.3.0" + resolved "https://registry.yarnpkg.com/@symfony/webpack-encore/-/webpack-encore-4.3.0.tgz#2cf025bd9ee33b176cf6c040c5fb610415cc66f8" + integrity sha512-YhM6xh+aKmrWS7X7Y2CUDte4wiUm9WIo0w07KTwDLLQnOUdMHRf3wa680WXH/I3oHqD+grFa7BHPpR0sfmoGMQ== dependencies: "@nuxt/friendly-errors-webpack-plugin" "^2.5.1" assets-webpack-plugin "7.0.*" @@ -1601,9 +1603,9 @@ "@types/node" "*" "@types/connect-history-api-fallback@^1.3.5": - version "1.3.5" - resolved "https://registry.yarnpkg.com/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.3.5.tgz#d1f7a8a09d0ed5a57aee5ae9c18ab9b803205dae" - integrity sha512-h8QJa8xSb1WD4fpKBDcATDNGXghFj6/3GRWG6dhmRcu0RX1Ubasur2Uvx5aeEwlf0MwblEC2bMzzMQntxnw/Cw== + version "1.5.0" + resolved "https://registry.yarnpkg.com/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz#9fd20b3974bdc2bcd4ac6567e2e0f6885cb2cf41" + integrity sha512-4x5FkPpLipqwthjPsF7ZRbOv3uoLUFkTA9G9v583qi4pACvq0uTELrB8OLUzPWUI4IJIyvM85vzkV1nyiI2Lig== dependencies: "@types/express-serve-static-core" "*" "@types/node" "*" @@ -1631,24 +1633,20 @@ "@types/estree" "*" "@types/json-schema" "*" -"@types/estree@*": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" - integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== - -"@types/estree@^0.0.51": - version "0.0.51" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40" - integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ== +"@types/estree@*", "@types/estree@^1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.1.tgz#aa22750962f3bf0e79d753d3cc067f010c95f194" + integrity sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA== "@types/express-serve-static-core@*", "@types/express-serve-static-core@^4.17.33": - version "4.17.33" - resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.33.tgz#de35d30a9d637dc1450ad18dd583d75d5733d543" - integrity sha512-TPBqmR/HRYI3eC2E5hmiivIzv+bidAfXofM+sbonAGvyDhySGw9/PQZFt2BLOrjUUR++4eJVpx6KnLQK1Fk9tA== + version "4.17.34" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.34.tgz#c119e85b75215178bc127de588e93100698ab4cc" + integrity sha512-fvr49XlCGoUj2Pp730AItckfjat4WNb0lb3kfrLWffd+RLeoGAMsq7UOy04PAPtoL01uKwcp6u8nhzpgpDYr3w== dependencies: "@types/node" "*" "@types/qs" "*" "@types/range-parser" "*" + "@types/send" "*" "@types/express@*", "@types/express@^4.17.13": version "4.17.17" @@ -1669,9 +1667,9 @@ "@types/node" "*" "@types/http-proxy@^1.17.8": - version "1.17.10" - resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.10.tgz#e576c8e4a0cc5c6a138819025a88e167ebb38d6c" - integrity sha512-Qs5aULi+zV1bwKAg5z1PWnDXWmsn+LxIvUGv6E2+OOMYhclZMO+OXd9pYVf2gLykf2I7IV2u7oTHwChPNsvJ7g== + version "1.17.11" + resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.11.tgz#0ca21949a5588d55ac2b659b69035c84bd5da293" + integrity sha512-HC8G7c1WmaF2ekqpnFq626xd3Zz0uvaqFmBJNRZCGEZCXkvSdJoNFn/8Ygbd9fKNQj8UzLdCETaI0UWPAjK7IA== dependencies: "@types/node" "*" @@ -1704,15 +1702,20 @@ resolved "https://registry.yarnpkg.com/@types/mime/-/mime-3.0.1.tgz#5f8f2bca0a5863cb69bc0b0acd88c96cb1d4ae10" integrity sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA== +"@types/mime@^1": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" + integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== + "@types/minimatch@*": version "5.1.2" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== "@types/node@*": - version "18.15.11" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.11.tgz#b3b790f09cb1696cffcec605de025b088fa4225f" - integrity sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q== + version "18.16.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.16.3.tgz#6bda7819aae6ea0b386ebc5b24bdf602f1b42b01" + integrity sha512-OPs5WnnT1xkCBiuQrZA4+YAV4HEJejmHneyraIaxsbev5yCEr6KMwINNFP9wQeFIw8FWcoTqF3vQsa5CDaI+8Q== "@types/parse-json@^4.0.0": version "4.0.0" @@ -1734,6 +1737,14 @@ resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.0.tgz#2b35eccfcee7d38cd72ad99232fbd58bffb3c84d" integrity sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA== +"@types/send@*": + version "0.17.1" + resolved "https://registry.yarnpkg.com/@types/send/-/send-0.17.1.tgz#ed4932b8a2a805f1fe362a70f4e62d0ac994e301" + integrity sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q== + dependencies: + "@types/mime" "^1" + "@types/node" "*" + "@types/serve-index@^1.9.1": version "1.9.1" resolved "https://registry.yarnpkg.com/@types/serve-index/-/serve-index-1.9.1.tgz#1b5e85370a192c01ec6cec4735cf2917337a6278" @@ -1780,125 +1791,125 @@ dependencies: "@types/yargs-parser" "*" -"@webassemblyjs/ast@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7" - integrity sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw== +"@webassemblyjs/ast@1.11.5", "@webassemblyjs/ast@^1.11.5": + version "1.11.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.5.tgz#6e818036b94548c1fb53b754b5cae3c9b208281c" + integrity sha512-LHY/GSAZZRpsNQH+/oHqhRQ5FT7eoULcBqgfyTB5nQHogFnK3/7QoN7dLnwSE/JkUAF0SrRuclT7ODqMFtWxxQ== dependencies: - "@webassemblyjs/helper-numbers" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" + "@webassemblyjs/helper-numbers" "1.11.5" + "@webassemblyjs/helper-wasm-bytecode" "1.11.5" -"@webassemblyjs/floating-point-hex-parser@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz#f6c61a705f0fd7a6aecaa4e8198f23d9dc179e4f" - integrity sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ== +"@webassemblyjs/floating-point-hex-parser@1.11.5": + version "1.11.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.5.tgz#e85dfdb01cad16b812ff166b96806c050555f1b4" + integrity sha512-1j1zTIC5EZOtCplMBG/IEwLtUojtwFVwdyVMbL/hwWqbzlQoJsWCOavrdnLkemwNoC/EOwtUFch3fuo+cbcXYQ== -"@webassemblyjs/helper-api-error@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz#1a63192d8788e5c012800ba6a7a46c705288fd16" - integrity sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg== +"@webassemblyjs/helper-api-error@1.11.5": + version "1.11.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.5.tgz#1e82fa7958c681ddcf4eabef756ce09d49d442d1" + integrity sha512-L65bDPmfpY0+yFrsgz8b6LhXmbbs38OnwDCf6NpnMUYqa+ENfE5Dq9E42ny0qz/PdR0LJyq/T5YijPnU8AXEpA== -"@webassemblyjs/helper-buffer@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz#832a900eb444884cde9a7cad467f81500f5e5ab5" - integrity sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA== +"@webassemblyjs/helper-buffer@1.11.5": + version "1.11.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.5.tgz#91381652ea95bb38bbfd270702351c0c89d69fba" + integrity sha512-fDKo1gstwFFSfacIeH5KfwzjykIE6ldh1iH9Y/8YkAZrhmu4TctqYjSh7t0K2VyDSXOZJ1MLhht/k9IvYGcIxg== -"@webassemblyjs/helper-numbers@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz#64d81da219fbbba1e3bd1bfc74f6e8c4e10a62ae" - integrity sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ== +"@webassemblyjs/helper-numbers@1.11.5": + version "1.11.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.5.tgz#23380c910d56764957292839006fecbe05e135a9" + integrity sha512-DhykHXM0ZABqfIGYNv93A5KKDw/+ywBFnuWybZZWcuzWHfbp21wUfRkbtz7dMGwGgT4iXjWuhRMA2Mzod6W4WA== dependencies: - "@webassemblyjs/floating-point-hex-parser" "1.11.1" - "@webassemblyjs/helper-api-error" "1.11.1" + "@webassemblyjs/floating-point-hex-parser" "1.11.5" + "@webassemblyjs/helper-api-error" "1.11.5" "@xtuc/long" "4.2.2" -"@webassemblyjs/helper-wasm-bytecode@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz#f328241e41e7b199d0b20c18e88429c4433295e1" - integrity sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q== +"@webassemblyjs/helper-wasm-bytecode@1.11.5": + version "1.11.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.5.tgz#e258a25251bc69a52ef817da3001863cc1c24b9f" + integrity sha512-oC4Qa0bNcqnjAowFn7MPCETQgDYytpsfvz4ujZz63Zu/a/v71HeCAAmZsgZ3YVKec3zSPYytG3/PrRCqbtcAvA== -"@webassemblyjs/helper-wasm-section@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz#21ee065a7b635f319e738f0dd73bfbda281c097a" - integrity sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg== +"@webassemblyjs/helper-wasm-section@1.11.5": + version "1.11.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.5.tgz#966e855a6fae04d5570ad4ec87fbcf29b42ba78e" + integrity sha512-uEoThA1LN2NA+K3B9wDo3yKlBfVtC6rh0i4/6hvbz071E8gTNZD/pT0MsBf7MeD6KbApMSkaAK0XeKyOZC7CIA== dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-buffer" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/wasm-gen" "1.11.1" + "@webassemblyjs/ast" "1.11.5" + "@webassemblyjs/helper-buffer" "1.11.5" + "@webassemblyjs/helper-wasm-bytecode" "1.11.5" + "@webassemblyjs/wasm-gen" "1.11.5" -"@webassemblyjs/ieee754@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz#963929e9bbd05709e7e12243a099180812992614" - integrity sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ== +"@webassemblyjs/ieee754@1.11.5": + version "1.11.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.5.tgz#b2db1b33ce9c91e34236194c2b5cba9b25ca9d60" + integrity sha512-37aGq6qVL8A8oPbPrSGMBcp38YZFXcHfiROflJn9jxSdSMMM5dS5P/9e2/TpaJuhE+wFrbukN2WI6Hw9MH5acg== dependencies: "@xtuc/ieee754" "^1.2.0" -"@webassemblyjs/leb128@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.1.tgz#ce814b45574e93d76bae1fb2644ab9cdd9527aa5" - integrity sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw== +"@webassemblyjs/leb128@1.11.5": + version "1.11.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.5.tgz#482e44d26b6b949edf042a8525a66c649e38935a" + integrity sha512-ajqrRSXaTJoPW+xmkfYN6l8VIeNnR4vBOTQO9HzR7IygoCcKWkICbKFbVTNMjMgMREqXEr0+2M6zukzM47ZUfQ== dependencies: "@xtuc/long" "4.2.2" -"@webassemblyjs/utf8@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.1.tgz#d1f8b764369e7c6e6bae350e854dec9a59f0a3ff" - integrity sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ== +"@webassemblyjs/utf8@1.11.5": + version "1.11.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.5.tgz#83bef94856e399f3740e8df9f63bc47a987eae1a" + integrity sha512-WiOhulHKTZU5UPlRl53gHR8OxdGsSOxqfpqWeA2FmcwBMaoEdz6b2x2si3IwC9/fSPLfe8pBMRTHVMk5nlwnFQ== -"@webassemblyjs/wasm-edit@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz#ad206ebf4bf95a058ce9880a8c092c5dec8193d6" - integrity sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA== +"@webassemblyjs/wasm-edit@^1.11.5": + version "1.11.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.5.tgz#93ee10a08037657e21c70de31c47fdad6b522b2d" + integrity sha512-C0p9D2fAu3Twwqvygvf42iGCQ4av8MFBLiTb+08SZ4cEdwzWx9QeAHDo1E2k+9s/0w1DM40oflJOpkZ8jW4HCQ== dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-buffer" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/helper-wasm-section" "1.11.1" - "@webassemblyjs/wasm-gen" "1.11.1" - "@webassemblyjs/wasm-opt" "1.11.1" - "@webassemblyjs/wasm-parser" "1.11.1" - "@webassemblyjs/wast-printer" "1.11.1" + "@webassemblyjs/ast" "1.11.5" + "@webassemblyjs/helper-buffer" "1.11.5" + "@webassemblyjs/helper-wasm-bytecode" "1.11.5" + "@webassemblyjs/helper-wasm-section" "1.11.5" + "@webassemblyjs/wasm-gen" "1.11.5" + "@webassemblyjs/wasm-opt" "1.11.5" + "@webassemblyjs/wasm-parser" "1.11.5" + "@webassemblyjs/wast-printer" "1.11.5" -"@webassemblyjs/wasm-gen@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz#86c5ea304849759b7d88c47a32f4f039ae3c8f76" - integrity sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA== +"@webassemblyjs/wasm-gen@1.11.5": + version "1.11.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.5.tgz#ceb1c82b40bf0cf67a492c53381916756ef7f0b1" + integrity sha512-14vteRlRjxLK9eSyYFvw1K8Vv+iPdZU0Aebk3j6oB8TQiQYuO6hj9s4d7qf6f2HJr2khzvNldAFG13CgdkAIfA== dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/ieee754" "1.11.1" - "@webassemblyjs/leb128" "1.11.1" - "@webassemblyjs/utf8" "1.11.1" + "@webassemblyjs/ast" "1.11.5" + "@webassemblyjs/helper-wasm-bytecode" "1.11.5" + "@webassemblyjs/ieee754" "1.11.5" + "@webassemblyjs/leb128" "1.11.5" + "@webassemblyjs/utf8" "1.11.5" -"@webassemblyjs/wasm-opt@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz#657b4c2202f4cf3b345f8a4c6461c8c2418985f2" - integrity sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw== +"@webassemblyjs/wasm-opt@1.11.5": + version "1.11.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.5.tgz#b52bac29681fa62487e16d3bb7f0633d5e62ca0a" + integrity sha512-tcKwlIXstBQgbKy1MlbDMlXaxpucn42eb17H29rawYLxm5+MsEmgPzeCP8B1Cl69hCice8LeKgZpRUAPtqYPgw== dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-buffer" "1.11.1" - "@webassemblyjs/wasm-gen" "1.11.1" - "@webassemblyjs/wasm-parser" "1.11.1" + "@webassemblyjs/ast" "1.11.5" + "@webassemblyjs/helper-buffer" "1.11.5" + "@webassemblyjs/wasm-gen" "1.11.5" + "@webassemblyjs/wasm-parser" "1.11.5" -"@webassemblyjs/wasm-parser@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz#86ca734534f417e9bd3c67c7a1c75d8be41fb199" - integrity sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA== +"@webassemblyjs/wasm-parser@1.11.5", "@webassemblyjs/wasm-parser@^1.11.5": + version "1.11.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.5.tgz#7ba0697ca74c860ea13e3ba226b29617046982e2" + integrity sha512-SVXUIwsLQlc8srSD7jejsfTU83g7pIGr2YYNb9oHdtldSxaOhvA5xwvIiWIfcX8PlSakgqMXsLpLfbbJ4cBYew== dependencies: - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/helper-api-error" "1.11.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.1" - "@webassemblyjs/ieee754" "1.11.1" - "@webassemblyjs/leb128" "1.11.1" - "@webassemblyjs/utf8" "1.11.1" + "@webassemblyjs/ast" "1.11.5" + "@webassemblyjs/helper-api-error" "1.11.5" + "@webassemblyjs/helper-wasm-bytecode" "1.11.5" + "@webassemblyjs/ieee754" "1.11.5" + "@webassemblyjs/leb128" "1.11.5" + "@webassemblyjs/utf8" "1.11.5" -"@webassemblyjs/wast-printer@1.11.1": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz#d0c73beda8eec5426f10ae8ef55cee5e7084c2f0" - integrity sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg== +"@webassemblyjs/wast-printer@1.11.5": + version "1.11.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.5.tgz#7a5e9689043f3eca82d544d7be7a8e6373a6fa98" + integrity sha512-f7Pq3wvg3GSPUPzR0F6bmI89Hdb+u9WXrSKc4v+N0aV0q6r42WoF92Jp2jEorBEBRoRNXgjp53nBniDXcqZYPA== dependencies: - "@webassemblyjs/ast" "1.11.1" + "@webassemblyjs/ast" "1.11.5" "@xtuc/long" "4.2.2" "@webpack-cli/configtest@^1.2.0": @@ -2018,7 +2029,7 @@ ajv-keywords@^3.5.2: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== -ajv-keywords@^5.0.0: +ajv-keywords@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-5.1.0.tgz#69d4d385a4733cdbeab44964a1170a88f87f0e16" integrity sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw== @@ -2035,7 +2046,7 @@ ajv@^6.12.4, ajv@^6.12.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.0, ajv@^8.8.0: +ajv@^8.0.0, ajv@^8.9.0: version "8.12.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== @@ -2400,9 +2411,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001449: - version "1.0.30001474" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001474.tgz#13b6fe301a831fe666cce8ca4ef89352334133d5" - integrity sha512-iaIZ8gVrWfemh5DG3T9/YqarVZoYf0r188IjaGwx68j4Pf0SGY6CQkmJUIE+NZHkkecQGohzXmBGEwWDr9aM3Q== + version "1.0.30001481" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001481.tgz#f58a717afe92f9e69d0e35ff64df596bfad93912" + integrity sha512-KCqHwRnaa1InZBtqXzP98LPg0ajCVujMKjqKDhZEthIpAsJl/YEIa3YvXjGXPVqzZVguccuu7ga9KOE1J9rKPQ== chalk@^2.0.0, chalk@^2.3.2: version "2.4.2" @@ -2554,9 +2565,9 @@ colord@^2.9.1: integrity sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw== colorette@^2.0.10, colorette@^2.0.14: - version "2.0.19" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798" - integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== + version "2.0.20" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" + integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== combined-stream@^1.0.8: version "1.0.8" @@ -2575,7 +2586,7 @@ commander@^7.0.0, commander@^7.2.0: resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== -commander@^8.0.0: +commander@^8.3.0: version "8.3.0" resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== @@ -2666,16 +2677,16 @@ cookie@0.5.0: integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== core-js-compat@^3.25.1: - version "3.30.0" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.30.0.tgz#99aa2789f6ed2debfa1df3232784126ee97f4d80" - integrity sha512-P5A2h/9mRYZFIAP+5Ab8ns6083IyVpSclU74UNvbGVQ8VM7n3n3/g2yF3AkKQ9NXz2O+ioxLbEWKnDtgsFamhg== + version "3.30.1" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.30.1.tgz#961541e22db9c27fc48bfc13a3cafa8734171dfe" + integrity sha512-d690npR7MC6P0gq4npTl5n2VQeNAmUrJ90n+MHiKS7W2+xno4o3F5GDEuylSdi6EJ3VssibSGXOa1r3YXD3Mhw== dependencies: browserslist "^4.21.5" core-js@^3.23.0: - version "3.30.0" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.30.0.tgz#64ac6f83bc7a49fd42807327051701d4b1478dea" - integrity sha512-hQotSSARoNh1mYPi9O2YaWeiq/cEB95kOrFb4NCrO4RIFt1qqNpKsaE+vy/L3oiqvND5cThqXzUU3r9F7Efztg== + version "3.30.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.30.1.tgz#fc9c5adcc541d8e9fa3e381179433cbf795628ba" + integrity sha512-ZNS5nbiSwDTq4hFosEDqm65izl2CWmLz0hARJMyNQBgkUZMIF51cQiMvIQKA6hvuaeWxQDP3hEedM1JZIgTldQ== core-util-is@~1.0.0: version "1.0.3" @@ -3015,7 +3026,7 @@ define-lazy-prop@^2.0.0: resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== -define-properties@^1.1.3: +define-properties@^1.1.3, define-properties@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" integrity sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA== @@ -3098,9 +3109,9 @@ dns-equal@^1.0.0: integrity sha512-z+paD6YUQsk+AbGCEM4PrOXSss5gd66QfcVBFTKR/HpFL9jCqikS94HYwKww6fQyO7IxrIIyUu+g0Ka9tUS2Cg== dns-packet@^5.2.2: - version "5.5.0" - resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-5.5.0.tgz#f59cbf3396c130957c56a6ad5fd3959ccdc30065" - integrity sha512-USawdAUzRkV6xrqTjiAEp6M9YagZEzWcSUaZTcIFAiyQWW1SoI6KyId8y2+/71wbgHKQAKd+iupLv4YvEwYWvA== + version "5.6.0" + resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-5.6.0.tgz#2202c947845c7a63c23ece58f2f70ff6ab4c2f7d" + integrity sha512-rza3UH1LwdHh9qyPXp8lkwpjSNk/AMD3dPytUoRoqnypDUhY0xvbdmVhWOfxO68frEfV9BU8V12Ez7ZsHGZpCQ== dependencies: "@leichtgewicht/ip-codec" "^2.0.1" @@ -3171,9 +3182,9 @@ ee-first@1.1.1: integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== electron-to-chromium@^1.4.284: - version "1.4.356" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.356.tgz#b75a8a8c31d571f6024310cc980a08cd6c15a8c5" - integrity sha512-nEftV1dRX3omlxAj42FwqRZT0i4xd2dIg39sog/CnCJeCcL1TRd2Uh0i9Oebgv8Ou0vzTPw++xc+Z20jzS2B6A== + version "1.4.377" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.377.tgz#7f326a0b2c1b96eca6bb65907addc505d0d15989" + integrity sha512-H3BYG6DW5Z+l0xcfXaicJGxrpA4kMlCxnN71+iNX+dBLkRMOdVJqFJiAmbNZZKA1zISpRg17JR03qGifXNsJtw== emoji-regex@^8.0.0: version "8.0.0" @@ -3195,10 +3206,10 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== -enhanced-resolve@^5.0.0, enhanced-resolve@^5.10.0: - version "5.12.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz#300e1c90228f5b570c4d35babf263f6da7155634" - integrity sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ== +enhanced-resolve@^5.0.0, enhanced-resolve@^5.13.0: + version "5.13.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.13.0.tgz#26d1ecc448c02de997133217b5c1053f34a0a275" + integrity sha512-eyV8f0y1+bzyfh8xAwW/WTSZpLbjhqc4ne9eGSH4Zo2ejdyiNG9pU6mf9DG8a7+Auk6MFTlNOT4Y2y/9k8GKVg== dependencies: graceful-fs "^4.2.4" tapable "^2.2.0" @@ -3227,10 +3238,10 @@ error-stack-parser@^2.0.0: dependencies: stackframe "^1.3.4" -es-module-lexer@^0.9.0: - version "0.9.3" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz#6f13db00cc38417137daf74366f535c8eb438f19" - integrity sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ== +es-module-lexer@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.2.1.tgz#ba303831f63e6a394983fde2f97ad77b22324527" + integrity sha512-9978wrXM50Y4rTMmW5kXIC09ZdXQZqkE4mxhwkd8VbzsGkXGPgV4zWuqQJgCEzYngdo2dYDa0l8xhX4fkSwJSg== es5-ext@^0.10.35, es5-ext@^0.10.50, es5-ext@^0.10.62, es5-ext@~0.10.14: version "0.10.62" @@ -3637,7 +3648,7 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== -functions-have-names@^1.2.2: +functions-have-names@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== @@ -3818,9 +3829,9 @@ html-entities@^2.3.2: integrity sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA== html5-qrcode@^2.2.1: - version "2.3.7" - resolved "https://registry.yarnpkg.com/html5-qrcode/-/html5-qrcode-2.3.7.tgz#09ed2ca7473a47bd551088c15fcfcb7cb409a5be" - integrity sha512-Jmlok9Ynm49hgVXkdupWryf8o430proIFoQsRl1LmTg4Rq461W72omylR9yw9tsEMtswMEw3wacUM5y0agOBQA== + version "2.3.8" + resolved "https://registry.yarnpkg.com/html5-qrcode/-/html5-qrcode-2.3.8.tgz#0b0cdf7a9926cfd4be530e13a51db47592adfa0d" + integrity sha512-jsr4vafJhwoLVEDW3n1KvPnCCXWaQfRng0/EEYk1vNcQGcG/htAdhJX0be8YyqMoSz7+hZvOZSTAepsabiuhiQ== htmlparser2@^6.1.0: version "6.1.0" @@ -4024,9 +4035,9 @@ is-binary-path@~2.1.0: binary-extensions "^2.0.0" is-core-module@^2.11.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" - integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== + version "2.12.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.0.tgz#36ad62f6f73c8253fd6472517a12483cf03e7ec4" + integrity sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ== dependencies: has "^1.0.3" @@ -4281,11 +4292,11 @@ jszip@^3.2.0: setimmediate "^1.0.5" katex@^0.16.0: - version "0.16.4" - resolved "https://registry.yarnpkg.com/katex/-/katex-0.16.4.tgz#87021bc3bbd80586ef715aeb476794cba6a49ad4" - integrity sha512-WudRKUj8yyBeVDI4aYMNxhx5Vhh2PjpzQw1GRu/LVGqL4m1AxwD1GcUp0IMbdJaf5zsjtj8ghP0DOQRYhroNkw== + version "0.16.7" + resolved "https://registry.yarnpkg.com/katex/-/katex-0.16.7.tgz#36be1d4ed96e8afdc5863407e70f8fb250aeafd5" + integrity sha512-Xk9C6oGKRwJTfqfIbtr0Kes9OSv6IFsuhFGc7tW4urlpMJtuh+7YhzU6YEG9n8gmWKcMAFzkp7nr+r69kV0zrA== dependencies: - commander "^8.0.0" + commander "^8.3.0" kind-of@^6.0.2: version "6.0.3" @@ -4433,9 +4444,9 @@ media-typer@0.3.0: integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== memfs@^3.4.3: - version "3.5.0" - resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.5.0.tgz#9da86405fca0a539addafd37dbd452344fd1c0bd" - integrity sha512-yK6o8xVJlQerz57kvPROwTMgx5WtGwC2ZxDtOUsnGl49rHjYkfQoPNZPCKH73VdLE1BwBu/+Fx/NL8NYMUw2aA== + version "3.5.1" + resolved "https://registry.yarnpkg.com/memfs/-/memfs-3.5.1.tgz#f0cd1e2bfaef58f6fe09bfb9c2288f07fea099ec" + integrity sha512-UWbFJKvj5k+nETdteFndTpYxdeTMox/ULeqX5k/dpaQJCCFmj5EeKv3dBcyO2xmkRAx2vppRu5dVG7SOtsGOzA== dependencies: fs-monkey "^1.0.3" @@ -4549,9 +4560,9 @@ minipass@^3.0.0, minipass@^3.1.1: yallist "^4.0.0" minipass@^4.0.0: - version "4.2.5" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-4.2.5.tgz#9e0e5256f1e3513f8c34691dd68549e85b2c8ceb" - integrity sha512-+yQl7SX3bIT83Lhb4BVorMAHVuqsskxRdlmO9kTpyukp8vsm2Sn/fUOV9xlnG8/a5JsypJzap21lz/y3FBMJ8Q== + version "4.2.8" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-4.2.8.tgz#f0010f64393ecfc1d1ccb5f582bcaf45f48e1a3a" + integrity sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ== minizlib@^2.1.1: version "2.1.2" @@ -4594,7 +4605,7 @@ multicast-dns@^7.2.5: dns-packet "^5.2.2" thunky "^1.0.2" -nanoid@^3.3.4: +nanoid@^3.3.6: version "3.3.6" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== @@ -4661,9 +4672,9 @@ nth-check@^2.0.1: boolbase "^1.0.0" nwsapi@^2.2.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.3.tgz#00e04dfd5a4a751e5ec2fecdc75dfd2f0db820fa" - integrity sha512-jscxIO4/VKScHlbmFBdV1Z6LXnLO+ZR4VMtypudUdfwtKxUN3TQcNFIHLwKtrUbDyHN4/GycY9+oRGZ2XMXYPw== + version "2.2.4" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.4.tgz#fd59d5e904e8e1f03c25a7d5a15cfa16c714a1e5" + integrity sha512-NHj4rzRo0tQdijE9ZqAx6kYDcoRwYwSYzCA8MY3JzfxlrvEU0jhnhJT9BhqhJs7I/dKcrDm6TyulaRqZPIhN5g== object-assign@^4.0.1: version "4.1.1" @@ -5209,9 +5220,9 @@ postcss-reduce-transforms@^5.1.0: postcss-value-parser "^4.2.0" postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.5, postcss-selector-parser@^6.0.9: - version "6.0.11" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz#2e41dc39b7ad74046e1615185185cd0b17d0c8dc" - integrity sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g== + version "6.0.12" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.12.tgz#2efae5ffab3c8bfb2b7fbf0c426e3bca616c4abb" + integrity sha512-NdxGCAZdRrwVI1sy59+Wzrh+pMMHxapGnpfenDVlMEXoOcvt4pGE0JLK9YY2F5dLxcFYA/YbVQKhcGU+FtSYQg== dependencies: cssesc "^3.0.0" util-deprecate "^1.0.2" @@ -5242,11 +5253,11 @@ postcss-value-parser@^4.0.0, postcss-value-parser@^4.1.0, postcss-value-parser@^ integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== postcss@^8.2.14, postcss@^8.4.12, postcss@^8.4.17, postcss@^8.4.19: - version "8.4.21" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.21.tgz#c639b719a57efc3187b13a1d765675485f4134f4" - integrity sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg== + version "8.4.23" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.23.tgz#df0aee9ac7c5e53e1075c24a3613496f9e6552ab" + integrity sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA== dependencies: - nanoid "^3.3.4" + nanoid "^3.3.6" picocolors "^1.0.0" source-map-js "^1.0.2" @@ -5427,13 +5438,13 @@ regex-parser@^2.2.11: integrity sha512-jbD/FT0+9MBU2XAZluI7w2OBs1RBi6p9M83nkoZayQXXU9e8Robt69FcZc7wU4eJD/YFTjn1JdCk3rbMJajz8Q== regexp.prototype.flags@^1.2.0: - version "1.4.3" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" - integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== + version "1.5.0" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz#fe7ce25e7e4cca8db37b6634c8a2c7009199b9cb" + integrity sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA== dependencies: call-bind "^1.0.2" - define-properties "^1.1.3" - functions-have-names "^1.2.2" + define-properties "^1.2.0" + functions-have-names "^1.2.3" regexpu-core@^5.3.1: version "5.3.2" @@ -5592,24 +5603,24 @@ schema-utils@^2.6.5: ajv "^6.12.4" ajv-keywords "^3.5.2" -schema-utils@^3.0.0, schema-utils@^3.1.0, schema-utils@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.1.tgz#bc74c4b6b6995c1d88f76a8b77bea7219e0c8281" - integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw== +schema-utils@^3.0.0, schema-utils@^3.1.1, schema-utils@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.2.tgz#36c10abca6f7577aeae136c804b0c741edeadc99" + integrity sha512-pvjEHOgWc9OWA/f/DE3ohBWTD6EleVLf7iFUkoSwAxttdBhB9QUebQgxER2kWueOvRJXPHNnyrvvh9eZINB8Eg== dependencies: "@types/json-schema" "^7.0.8" ajv "^6.12.5" ajv-keywords "^3.5.2" schema-utils@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.0.0.tgz#60331e9e3ae78ec5d16353c467c34b3a0a1d3df7" - integrity sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg== + version "4.0.1" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.0.1.tgz#eb2d042df8b01f4b5c276a2dfd41ba0faab72e8d" + integrity sha512-lELhBAAly9NowEsX0yZBlw9ahZG+sK/1RJ21EpzdYHKEs13Vku3LJ+MIPhh4sMs0oCCeufZQEQbMekiA4vuVIQ== dependencies: "@types/json-schema" "^7.0.9" - ajv "^8.8.0" + ajv "^8.9.0" ajv-formats "^2.1.1" - ajv-keywords "^5.0.0" + ajv-keywords "^5.1.0" scope-analyzer@^2.0.1: version "2.1.2" @@ -5647,9 +5658,9 @@ semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.8: - version "7.3.8" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" - integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== + version "7.5.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.0.tgz#ed8c5dc8efb6c629c88b23d41dc9bf40c1d96cd0" + integrity sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA== dependencies: lru-cache "^6.0.0" @@ -6072,7 +6083,7 @@ terser-webpack-plugin@^4.2.3: terser "^5.3.4" webpack-sources "^1.4.3" -terser-webpack-plugin@^5.1.3, terser-webpack-plugin@^5.3.0: +terser-webpack-plugin@^5.3.0, terser-webpack-plugin@^5.3.7: version "5.3.7" resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.7.tgz#ef760632d24991760f339fe9290deb936ad1ffc7" integrity sha512-AfKwIktyP7Cu50xNjXF/6Qb5lBNzYaWpU6YfoX3uZicTx0zTy0stDDCsvjDapKsSDvOeWo5MEq4TmdBy2cNoHw== @@ -6084,9 +6095,9 @@ terser-webpack-plugin@^5.1.3, terser-webpack-plugin@^5.3.0: terser "^5.16.5" terser@^5.16.5, terser@^5.3.4: - version "5.16.8" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.16.8.tgz#ccde583dabe71df3f4ed02b65eb6532e0fae15d5" - integrity sha512-QI5g1E/ef7d+PsDifb+a6nnVgC4F22Bg6T0xrBrz6iloVB4PUkkunp6V8nzoOOZJIzjWVdAGqCdlKlhLq/TbIA== + version "5.17.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.17.1.tgz#948f10830454761e2eeedc6debe45c532c83fd69" + integrity sha512-hVl35zClmpisy6oaoKALOpS0rDYLxRFLHhRuDlEGTKey9qHjS1w9GMORjuwIMt70Wan4lwsLYyWDVnWgF+KUEw== dependencies: "@jridgewell/source-map" "^0.3.2" acorn "^8.5.0" @@ -6309,9 +6320,9 @@ unpipe@1.0.0, unpipe@~1.0.0: integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== update-browserslist-db@^1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz#0f54b876545726f17d00cd9a2561e6dade943ff3" - integrity sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ== + version "1.0.11" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz#9a2a641ad2907ae7b3616506f4b977851db5b940" + integrity sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA== dependencies: escalade "^3.1.1" picocolors "^1.0.0" @@ -6441,9 +6452,9 @@ webpack-dev-middleware@^5.3.1: schema-utils "^4.0.0" webpack-dev-server@^4.8.0: - version "4.13.2" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.13.2.tgz#d97445481d78691efe6d9a3b230833d802fc31f9" - integrity sha512-5i6TrGBRxG4vnfDpB6qSQGfnB6skGBXNL5/542w2uRGLimX6qeE5BQMLrzIC3JYV/xlGOv+s+hTleI9AZKUQNw== + version "4.13.3" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.13.3.tgz#9feb740b8b56b886260bae1360286818a221bae8" + integrity sha512-KqqzrzMRSRy5ePz10VhjyL27K2dxqwXQLP5rAKwRJBPUahe7Z2bBWzHw37jeb8GCPKxZRO79ZdQUAPesMh/Nug== dependencies: "@types/bonjour" "^3.5.9" "@types/connect-history-api-fallback" "^1.3.5" @@ -6514,21 +6525,21 @@ webpack-sources@^3.2.3: integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== webpack@^5.74.0: - version "5.78.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.78.0.tgz#836452a12416af2a7beae906b31644cb2562f9e6" - integrity sha512-gT5DP72KInmE/3azEaQrISjTvLYlSM0j1Ezhht/KLVkrqtv10JoP/RXhwmX/frrutOPuSq3o5Vq0ehR/4Vmd1g== + version "5.81.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.81.0.tgz#27a2e8466c8b4820d800a8d90f06ef98294f9956" + integrity sha512-AAjaJ9S4hYCVODKLQTgG5p5e11hiMawBwV2v8MYLE0C/6UAGLuAF4n1qa9GOwdxnicaP+5k6M5HrLmD4+gIB8Q== dependencies: "@types/eslint-scope" "^3.7.3" - "@types/estree" "^0.0.51" - "@webassemblyjs/ast" "1.11.1" - "@webassemblyjs/wasm-edit" "1.11.1" - "@webassemblyjs/wasm-parser" "1.11.1" + "@types/estree" "^1.0.0" + "@webassemblyjs/ast" "^1.11.5" + "@webassemblyjs/wasm-edit" "^1.11.5" + "@webassemblyjs/wasm-parser" "^1.11.5" acorn "^8.7.1" acorn-import-assertions "^1.7.6" browserslist "^4.14.5" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.10.0" - es-module-lexer "^0.9.0" + enhanced-resolve "^5.13.0" + es-module-lexer "^1.2.1" eslint-scope "5.1.1" events "^3.2.0" glob-to-regexp "^0.4.1" @@ -6537,9 +6548,9 @@ webpack@^5.74.0: loader-runner "^4.2.0" mime-types "^2.1.27" neo-async "^2.6.2" - schema-utils "^3.1.0" + schema-utils "^3.1.2" tapable "^2.1.1" - terser-webpack-plugin "^5.1.3" + terser-webpack-plugin "^5.3.7" watchpack "^2.4.0" webpack-sources "^3.2.3" @@ -6586,9 +6597,9 @@ which@^2.0.1, which@^2.0.2: isexe "^2.0.0" wildcard@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" - integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== + version "2.0.1" + resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67" + integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== word-wrap@~1.2.3: version "1.2.3"