From 10814290bde17a52186ceca060d0be747eee83a7 Mon Sep 17 00:00:00 2001 From: Norbert Micheel Date: Thu, 22 May 2025 12:18:55 +0200 Subject: [PATCH 1/2] Update MediaSorter.php missing bracket --- lib/QuickNavigation/Media/MediaSorter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/QuickNavigation/Media/MediaSorter.php b/lib/QuickNavigation/Media/MediaSorter.php index b590e74..4b2e1f4 100644 --- a/lib/QuickNavigation/Media/MediaSorter.php +++ b/lib/QuickNavigation/Media/MediaSorter.php @@ -21,7 +21,7 @@ public static function modifyMediaListQuery(rex_extension_point $ep): string $user = rex::getUser()->getId(); $package = rex_addon::get('quick_navigation'); - if (!rex::getUser() { + if (!rex::getUser()) { return $ep->getSubject(); } From 70bec5d32e7c28c56e6a7256011ccfc618bee3b6 Mon Sep 17 00:00:00 2001 From: tyrant88 Date: Thu, 22 May 2025 10:19:41 +0000 Subject: [PATCH 2/2] Apply php-cs-fixer changes --- .php-cs-fixer.cache | 2 +- vendor/autoload.php | 5 +---- vendor/composer/InstalledVersions.php | 20 +++++++++++++++++++- vendor/composer/installed.php | 12 ++++++------ 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/.php-cs-fixer.cache b/.php-cs-fixer.cache index 4d5062a..9f8b60e 100644 --- a/.php-cs-fixer.cache +++ b/.php-cs-fixer.cache @@ -1 +1 @@ -{"php":"8.3.20","version":"3.64.0:v3.64.0#58dd9c931c785a79739310aef5178928305ffa67","indent":" ","lineEnding":"\n","rules":{"binary_operator_spaces":{"default":"at_least_single_space"},"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"braces_position":{"allow_single_line_empty_anonymous_classes":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_type_declaration":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_parentheses":true,"no_blank_lines_after_class_opening":true,"no_extra_blank_lines":{"tokens":["use"]},"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"none"},"return_type_declaration":true,"short_scalar_cast":true,"single_import_per_statement":{"group_to_single_imports":false},"single_space_around_construct":{"constructs_followed_by_a_single_space":["abstract","as","case","catch","class","const_import","do","else","elseif","final","finally","for","foreach","function","function_import","if","insteadof","interface","namespace","new","private","protected","public","static","switch","trait","try","use","use_lambda","while"],"constructs_preceded_by_a_single_space":["as","else","elseif","use_lambda"]},"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"unary_operator_spaces":{"only_dec_inc":true},"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"attribute_placement":"ignore","on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_line_after_imports":true,"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true},"hashes":{"lib\/QuickNavigation\/Utility\/BuildNavigationArray.php":"d2a23cc394de4fd4e83bb34da8b3c0bc","lib\/QuickNavigation\/Media\/QuickNavigationMedia.php":"624d087e36608a981f2276f37737c71a","lib\/QuickNavigation\/LinkMap\/QuickNavigationLinkMap.php":"3060d0975067e724f1dd427eadb02d47","lib\/QuickNavigation\/rex_api_quicknavigation_render.php":"bf8a3f8aa45712984014768a68ba441f","lib\/QuickNavigation\/Minibar\/ArticleHistoryElement.php":"fa606bdfb8e44afdcd46695f36b5d327","lib\/QuickNavigation\/QuickNavigationApi.php":"4eabc25eae94790b9095085102dc278a","lib\/QuickNavigation\/Button\/ButtonInterface.php":"943bf3db82d39b6854401e16fe7e36b6","lib\/QuickNavigation\/Button\/ArticleNavigationButton.php":"0036d750da4417a5cf81bda896b01de7","lib\/QuickNavigation\/Button\/ButtonRegistry.php":"0ecf7951feeb0b3524fa1b8c92ac6288","lib\/QuickNavigation\/Button\/ArticleHistoryButton.php":"b60589453343c834038edfd26f3c7220","lib\/QuickNavigation\/Button\/CategoryButton.php":"fa0637c3410b461739392b4f4aa50c9d","lib\/QuickNavigation\/Button\/FavoriteButton.php":"382a3446b216ca0aaef31fa2f21e82d4","lib\/QuickNavigation\/Button\/WatsonButton.php":"ef0d3641591e83b6e7dfec54008e36a8","lib\/QuickNavigation\/Button\/YformButton.php":"0f33ef81e17add648d4bf64770faf19e","lib\/QuickNavigation\/QuickNavigation.php":"e7879d206a5a091437921d1570285cd9","lib\/QuickNavigation\/ApiFunction\/MenuRender.php":"fa555351a229780f110eba970ed42a59","fragments\/QuickNavigation\/MinibarList.php":"6c40eb3f991f48d730f45b8d222914b1","fragments\/QuickNavigation\/Dropdown.php":"7cc52d767a1b8fa704e4d89c9a3e48a7","fragments\/QuickNavigation\/NoResult.php":"9b879a1abf902a8aa81cb9e6ce5d921a","fragments\/QuickNavigation\/List.php":"e90ddecd29ce153eec1083841a3088e2","pages\/config.php":"9f7cf272364c09f38e33d861d33e9727","pages\/index.php":"daf2b1a819e7a27391553c599d053802","update.php":"77c556570fd24e393bfa5653a276578f","boot.php":"f8d0f81d63e7cbb73a7f52a8a3f01106","lib\/QuickNavigation\/Button\/MediaSortButton.php":"f9b018570641c995f6711d7cf6f5859a","lib\/QuickNavigation\/Media\/MediaSorter.php":"427ad7f2ac3595cae5dca56ef85da78e"}} \ No newline at end of file +{"php":"8.3.21","version":"3.64.0:v3.64.0#58dd9c931c785a79739310aef5178928305ffa67","indent":" ","lineEnding":"\n","rules":{"binary_operator_spaces":{"default":"at_least_single_space"},"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"braces_position":{"allow_single_line_empty_anonymous_classes":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_type_declaration":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_parentheses":true,"no_blank_lines_after_class_opening":true,"no_extra_blank_lines":{"tokens":["use"]},"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"none"},"return_type_declaration":true,"short_scalar_cast":true,"single_import_per_statement":{"group_to_single_imports":false},"single_space_around_construct":{"constructs_followed_by_a_single_space":["abstract","as","case","catch","class","const_import","do","else","elseif","final","finally","for","foreach","function","function_import","if","insteadof","interface","namespace","new","private","protected","public","static","switch","trait","try","use","use_lambda","while"],"constructs_preceded_by_a_single_space":["as","else","elseif","use_lambda"]},"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"unary_operator_spaces":{"only_dec_inc":true},"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"attribute_placement":"ignore","on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_line_after_imports":true,"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true},"hashes":{"lib\/QuickNavigation\/LinkMap\/QuickNavigationLinkMap.php":"3060d0975067e724f1dd427eadb02d47","lib\/QuickNavigation\/ApiFunction\/MenuRender.php":"fa555351a229780f110eba970ed42a59","lib\/QuickNavigation\/Button\/ArticleHistoryButton.php":"b60589453343c834038edfd26f3c7220","lib\/QuickNavigation\/Button\/FavoriteButton.php":"382a3446b216ca0aaef31fa2f21e82d4","lib\/QuickNavigation\/Button\/CategoryButton.php":"fa0637c3410b461739392b4f4aa50c9d","lib\/QuickNavigation\/Button\/WatsonButton.php":"ef0d3641591e83b6e7dfec54008e36a8","lib\/QuickNavigation\/Button\/YformButton.php":"0f33ef81e17add648d4bf64770faf19e","lib\/QuickNavigation\/Button\/ButtonInterface.php":"943bf3db82d39b6854401e16fe7e36b6","lib\/QuickNavigation\/Button\/ArticleNavigationButton.php":"0036d750da4417a5cf81bda896b01de7","lib\/QuickNavigation\/Button\/ButtonRegistry.php":"0ecf7951feeb0b3524fa1b8c92ac6288","lib\/QuickNavigation\/Utility\/BuildNavigationArray.php":"d2a23cc394de4fd4e83bb34da8b3c0bc","lib\/QuickNavigation\/QuickNavigation.php":"e7879d206a5a091437921d1570285cd9","lib\/QuickNavigation\/QuickNavigationApi.php":"4eabc25eae94790b9095085102dc278a","lib\/QuickNavigation\/Minibar\/ArticleHistoryElement.php":"fa606bdfb8e44afdcd46695f36b5d327","lib\/QuickNavigation\/Media\/MediaSorter.php":"161a68caa4895fe8887470db5265ea82","lib\/QuickNavigation\/Media\/QuickNavigationMedia.php":"624d087e36608a981f2276f37737c71a","lib\/QuickNavigation\/rex_api_quicknavigation_render.php":"bf8a3f8aa45712984014768a68ba441f","fragments\/QuickNavigation\/MinibarList.php":"6c40eb3f991f48d730f45b8d222914b1","fragments\/QuickNavigation\/List.php":"e90ddecd29ce153eec1083841a3088e2","fragments\/QuickNavigation\/Dropdown.php":"7cc52d767a1b8fa704e4d89c9a3e48a7","fragments\/QuickNavigation\/NoResult.php":"9b879a1abf902a8aa81cb9e6ce5d921a","boot.php":"f8d0f81d63e7cbb73a7f52a8a3f01106","update.php":"77c556570fd24e393bfa5653a276578f","pages\/index.php":"daf2b1a819e7a27391553c599d053802","pages\/config.php":"9f7cf272364c09f38e33d861d33e9727"}} \ No newline at end of file diff --git a/vendor/autoload.php b/vendor/autoload.php index 75c96bb..1e64dba 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -14,10 +14,7 @@ echo $err; } } - trigger_error( - $err, - E_USER_ERROR - ); + throw new RuntimeException($err); } require_once __DIR__ . '/composer/autoload_real.php'; diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php index 6d29bff..2052022 100644 --- a/vendor/composer/InstalledVersions.php +++ b/vendor/composer/InstalledVersions.php @@ -26,6 +26,12 @@ */ class InstalledVersions { + /** + * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to + * @internal + */ + private static $selfDir = null; + /** * @var mixed[]|null * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null @@ -322,6 +328,18 @@ public static function reload($data) self::$installedIsLocalDir = false; } + /** + * @return string + */ + private static function getSelfDir() + { + if (self::$selfDir === null) { + self::$selfDir = strtr(__DIR__, '\\', '/'); + } + + return self::$selfDir; + } + /** * @return array[] * @psalm-return list}> @@ -336,7 +354,7 @@ private static function getInstalled() $copiedLocalDir = false; if (self::$canGetVendors) { - $selfDir = strtr(__DIR__, '\\', '/'); + $selfDir = self::getSelfDir(); foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { $vendorDir = strtr($vendorDir, '\\', '/'); if (isset(self::$installedByVendor[$vendorDir])) { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index e04a799..5794edd 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -1,9 +1,9 @@ array( 'name' => '__root__', - 'pretty_version' => 'dev-main', - 'version' => 'dev-main', - 'reference' => '871e9b45bf5de96f143b7b72a0d9d71f0402418d', + 'pretty_version' => 'dev-17acd1446d240b531915cfe079cc382881c9ec47', + 'version' => 'dev-17acd1446d240b531915cfe079cc382881c9ec47', + 'reference' => '17acd1446d240b531915cfe079cc382881c9ec47', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -11,9 +11,9 @@ ), 'versions' => array( '__root__' => array( - 'pretty_version' => 'dev-main', - 'version' => 'dev-main', - 'reference' => '871e9b45bf5de96f143b7b72a0d9d71f0402418d', + 'pretty_version' => 'dev-17acd1446d240b531915cfe079cc382881c9ec47', + 'version' => 'dev-17acd1446d240b531915cfe079cc382881c9ec47', + 'reference' => '17acd1446d240b531915cfe079cc382881c9ec47', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(),