Enhance serve recipe to automatically open the browser

- use xdg-open firefox
- keep serve recipe in foreground
This commit is contained in:
Pontoporeia
2026-05-04 14:46:05 +02:00
parent 8a38708fc8
commit d6e30ec9cd
3 changed files with 5 additions and 2 deletions

1
.php-cs-fixer.cache Normal file
View File

@@ -0,0 +1 @@
{"php":"8.5.5","version":"3.95.1","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_anonymous_functions":false,"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,"modifier_keywords":true,"new_with_parentheses":{"anonymous_class":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":{"sort_algorithm":"alpha"},"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},"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":{"closure_fn_spacing":"one"},"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"after_heredoc":true},"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,"clean_namespace":true,"no_unset_cast":true,"assign_null_coalescing_to_coalesce_equal":true,"normalize_index_brace":true,"heredoc_indentation":true,"no_whitespace_before_comma_in_array":{"after_heredoc":true},"trailing_comma_in_multiline":true,"list_syntax":true,"ternary_to_null_coalescing":true,"array_syntax":{"syntax":"short"},"no_unused_imports":true,"single_quote":true},"ruleCustomisationPolicyVersion":"null-policy","hashes":{"app\/src\/AdminAuth.php":"9281ad7ee564c8f0e321ba5f709c9a5a","app\/src\/ShareLink.php":"29e258f6344bff7d8d4db5e626d4ac51","app\/src\/StudentEmail.php":"4b522bf8921999866b2b56326e49d255","app\/tests\/Security\/SecurityTest.php":"ff9996affd0ca42095d34e0ac0650050","app\/tests\/run-tests.php":"89ccc4a9cff85fb8f2c92903eb866b79","app\/tests\/Integration\/SearchTest.php":"29aba0f9da3c115fb5d2722576815361","app\/tests\/Unit\/DatabaseTest.php":"2dd249e28ac632ba222a8cead3ae16a1","app\/tests\/Unit\/RateLimitTest.php":"4fc2ffe64d2c889835ef4fcd2e89d835","app\/src\/Database.php":"cc2b6873cfafab02dcb13931ff301753","app\/src\/Controllers\/ExportController.php":"12e717b606f36c3a3d49ad58f7120898","app\/src\/Controllers\/TfeController.php":"46f092d0ef7ee3d0bc609cb70d15ef97","app\/src\/Controllers\/SystemController.php":"aaf106e4c73fa846344513346a1236a6","app\/src\/Controllers\/SearchController.php":"cc2ecf70d496f4e05448f4ec9670a3bc","app\/src\/Controllers\/LicenceController.php":"be382174f80b1dbcda03450cabc531a7","app\/src\/Controllers\/FileAccessController.php":"9665edaa0ab1fd7c94b9a3d9fad95c5f","app\/src\/Controllers\/MediaController.php":"2cadef1d1d249ceaaf33abca2f79a8ad","app\/src\/Controllers\/HomeController.php":"d3a36adcdb969448c23cea34fb6d7896","app\/src\/Controllers\/AboutController.php":"79eac4bf3404a7c8d3ba736e3d2f32d6","app\/src\/Controllers\/LiveReloadController.php":"e2ff21e7155e769b2684a51accf1699d","app\/src\/Controllers\/ThesisEditController.php":"e02f5350f34949840d398d53423e7f18","app\/src\/Controllers\/ThesisCreateController.php":"37f2c13b34d49093289bae80d44104c9","app\/src\/Dispatcher.php":"d1d693bdacbe0006cb806b15d067cbbb","app\/src\/Parsedown.php":"d98c00dfbbb11933a86407ee9cf9215d","app\/src\/App.php":"abed36a5403738f071a5cdc3451b1e24","app\/src\/AppLogger.php":"8522037460732198e9e68d13ade7b13b","app\/src\/SystemCache.php":"4ead28637fa3a9281bdad42cdb9e00c2","app\/src\/RateLimit.php":"2e1df734570cb3eb584682bed33a2636","app\/src\/SmtpRelay.php":"22c9b92eab1575c14c393917138a6e3b"}}

View File

@@ -5,4 +5,5 @@
- [x] Remove rarely used recipes (`show id`, `setup-dirs`) - [x] Remove rarely used recipes (`show id`, `setup-dirs`)
- [x] Simplify `test-*` recipes - [x] Simplify `test-*` recipes
- [x] Remove redundant `default` recipe - [x] Remove redundant `default` recipe
- [x] Preserve all critical functionality - [x] Preserve all critical functionality
- [x] Enhance `serve` recipe to automatically open the browser

View File

@@ -10,6 +10,7 @@ setup:
[group('dev')] [group('dev')]
serve: migrate serve: migrate
@xdg-open http://127.0.0.1:8000 &
@php \ @php \
-d upload_max_filesize=512M \ -d upload_max_filesize=512M \
-d post_max_size=520M \ -d post_max_size=520M \
@@ -17,7 +18,7 @@ serve: migrate
-d max_execution_time=300 \ -d max_execution_time=300 \
-d max_input_time=300 \ -d max_input_time=300 \
-S 127.0.0.1:8000 -t app/public/ app/router.php 2>&1 \ -S 127.0.0.1:8000 -t app/public/ app/router.php 2>&1 \
| stdbuf -oL grep -Ev '(Accepted|Closing|live-reload\.php|assets/|favicon)' || true | stdbuf -oL grep -Ev '(Accepted|Closing|live-reload\.php|assets/|favicon)'
[group('dev')] [group('dev')]
stop: stop: