From f727f5161ebfd70502258cf24ad7e5843eb9b315 Mon Sep 17 00:00:00 2001 From: Shonster88 Date: Wed, 24 Jan 2024 09:39:23 +0100 Subject: [PATCH] Initial commit --- .docker/30-xdebug.ini | 1 + .editorconfig | 834 ++++++++++++++++++ .gitattributes | 16 + .github/PULL_REQUEST_TEMPLATE.md | 4 + .github/ci/files/.env | 2 + .github/ci/files/.my.cnf | 5 + .github/ci/files/bin/console | 46 + .github/ci/files/config/bundles.php | 5 + .github/ci/files/config/config.yaml | 3 + .../ci/files/config/packages/security.yaml | 32 + .../ci/files/config/packages/test/config.yaml | 32 + .github/ci/files/config/services.yaml | 23 + .github/ci/files/config/system.yaml | 58 ++ .github/ci/files/kernel/Kernel.php | 22 + .github/ci/files/public/.htaccess | 155 ++++ .github/ci/files/public/index_test.php | 41 + .github/ci/files/templates/.gitkeep | 0 .../ci/scripts/setup-pimcore-environment.sh | 14 + .github/workflows/cla.yaml | 34 + .github/workflows/codeception.yaml | 62 ++ .github/workflows/docs.yaml | 69 ++ .github/workflows/php-cs-fixer.yaml | 34 + .github/workflows/poeditor-export.yaml | 22 + .github/workflows/qodana.yml | 61 ++ .github/workflows/stale.yml | 10 + .github/workflows/static-analysis.yaml | 80 ++ .gitignore | 49 + .php-cs-fixer.dist.php | 75 ++ .qodana-profile.xml | 625 +++++++++++++ LICENSE.md | 11 + README.md | 8 + SECURITY.md | 21 + codeception.dist.yml | 24 + composer.json | 55 ++ config/services.yaml | 20 + doc/01_Installation.md | 34 + docker-compose.yml | 8 + phpstan-baseline.neon | 2 + phpstan-bootstrap.php | 23 + phpstan.neon | 12 + placeholderReplace.sh | 76 ++ qodana.yaml | 43 + src/Controller/DefaultController.php | 24 + src/Installer.php | 23 + src/PimcorexTemplateBundlex.php | 58 ++ tests/README.md | 24 + tests/Unit.suite.dist.yml | 1 + tests/Unit/DefaultTest.php | 24 + tests/_bootstrap.php | 15 + 49 files changed, 2920 insertions(+) create mode 100644 .docker/30-xdebug.ini create mode 100644 .editorconfig create mode 100644 .gitattributes create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/ci/files/.env create mode 100644 .github/ci/files/.my.cnf create mode 100644 .github/ci/files/bin/console create mode 100644 .github/ci/files/config/bundles.php create mode 100644 .github/ci/files/config/config.yaml create mode 100644 .github/ci/files/config/packages/security.yaml create mode 100644 .github/ci/files/config/packages/test/config.yaml create mode 100644 .github/ci/files/config/services.yaml create mode 100644 .github/ci/files/config/system.yaml create mode 100644 .github/ci/files/kernel/Kernel.php create mode 100644 .github/ci/files/public/.htaccess create mode 100644 .github/ci/files/public/index_test.php create mode 100644 .github/ci/files/templates/.gitkeep create mode 100755 .github/ci/scripts/setup-pimcore-environment.sh create mode 100644 .github/workflows/cla.yaml create mode 100644 .github/workflows/codeception.yaml create mode 100644 .github/workflows/docs.yaml create mode 100644 .github/workflows/php-cs-fixer.yaml create mode 100644 .github/workflows/poeditor-export.yaml create mode 100644 .github/workflows/qodana.yml create mode 100644 .github/workflows/stale.yml create mode 100644 .github/workflows/static-analysis.yaml create mode 100644 .gitignore create mode 100644 .php-cs-fixer.dist.php create mode 100644 .qodana-profile.xml create mode 100644 LICENSE.md create mode 100644 README.md create mode 100644 SECURITY.md create mode 100644 codeception.dist.yml create mode 100644 composer.json create mode 100644 config/services.yaml create mode 100644 doc/01_Installation.md create mode 100644 docker-compose.yml create mode 100644 phpstan-baseline.neon create mode 100644 phpstan-bootstrap.php create mode 100644 phpstan.neon create mode 100644 placeholderReplace.sh create mode 100644 qodana.yaml create mode 100644 src/Controller/DefaultController.php create mode 100644 src/Installer.php create mode 100644 src/PimcorexTemplateBundlex.php create mode 100644 tests/README.md create mode 100644 tests/Unit.suite.dist.yml create mode 100644 tests/Unit/DefaultTest.php create mode 100644 tests/_bootstrap.php diff --git a/.docker/30-xdebug.ini b/.docker/30-xdebug.ini new file mode 100644 index 000000000..5cc963ce8 --- /dev/null +++ b/.docker/30-xdebug.ini @@ -0,0 +1 @@ +xdebug.mode=debug,coverage \ No newline at end of file diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..67b82d76c --- /dev/null +++ b/.editorconfig @@ -0,0 +1,834 @@ +[*] +charset = utf-8 +end_of_line = lf +indent_size = 4 +indent_style = space +insert_final_newline = false +max_line_length = 120 +tab_width = 4 +ij_continuation_indent_size = 8 +ij_formatter_off_tag = @formatter:off +ij_formatter_on_tag = @formatter:on +ij_formatter_tags_enabled = true +ij_smart_tabs = false +ij_visual_guides = 120 +ij_wrap_on_typing = false + +[*.blade.php] +ij_visual_guides = none +ij_blade_keep_indents_on_empty_lines = false + +[*.css] +ij_visual_guides = none +ij_css_align_closing_brace_with_properties = false +ij_css_blank_lines_around_nested_selector = 1 +ij_css_blank_lines_between_blocks = 1 +ij_css_block_comment_add_space = false +ij_css_brace_placement = end_of_line +ij_css_enforce_quotes_on_format = false +ij_css_hex_color_long_format = false +ij_css_hex_color_lower_case = false +ij_css_hex_color_short_format = false +ij_css_hex_color_upper_case = false +ij_css_keep_blank_lines_in_code = 2 +ij_css_keep_indents_on_empty_lines = false +ij_css_keep_single_line_blocks = false +ij_css_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow +ij_css_space_after_colon = true +ij_css_space_before_opening_brace = true +ij_css_use_double_quotes = true +ij_css_value_alignment = do_not_align + +[*.feature] +indent_size = 2 +ij_visual_guides = none +ij_gherkin_keep_indents_on_empty_lines = false + +[*.less] +indent_size = 2 +ij_visual_guides = none +ij_less_align_closing_brace_with_properties = false +ij_less_blank_lines_around_nested_selector = 1 +ij_less_blank_lines_between_blocks = 1 +ij_less_block_comment_add_space = false +ij_less_brace_placement = 0 +ij_less_enforce_quotes_on_format = false +ij_less_hex_color_long_format = false +ij_less_hex_color_lower_case = false +ij_less_hex_color_short_format = false +ij_less_hex_color_upper_case = false +ij_less_keep_blank_lines_in_code = 2 +ij_less_keep_indents_on_empty_lines = false +ij_less_keep_single_line_blocks = false +ij_less_line_comment_add_space = false +ij_less_line_comment_at_first_column = false +ij_less_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow +ij_less_space_after_colon = true +ij_less_space_before_opening_brace = true +ij_less_use_double_quotes = true +ij_less_value_alignment = 0 + +[*.sass] +indent_size = 2 +ij_visual_guides = none +ij_sass_align_closing_brace_with_properties = false +ij_sass_blank_lines_around_nested_selector = 1 +ij_sass_blank_lines_between_blocks = 1 +ij_sass_brace_placement = 0 +ij_sass_enforce_quotes_on_format = false +ij_sass_hex_color_long_format = false +ij_sass_hex_color_lower_case = false +ij_sass_hex_color_short_format = false +ij_sass_hex_color_upper_case = false +ij_sass_keep_blank_lines_in_code = 2 +ij_sass_keep_indents_on_empty_lines = false +ij_sass_keep_single_line_blocks = false +ij_sass_line_comment_add_space = false +ij_sass_line_comment_at_first_column = false +ij_sass_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow +ij_sass_space_after_colon = true +ij_sass_space_before_opening_brace = true +ij_sass_use_double_quotes = true +ij_sass_value_alignment = 0 + +[*.scss] +indent_size = 2 +ij_visual_guides = none +ij_scss_align_closing_brace_with_properties = false +ij_scss_blank_lines_around_nested_selector = 1 +ij_scss_blank_lines_between_blocks = 1 +ij_scss_block_comment_add_space = false +ij_scss_brace_placement = 0 +ij_scss_enforce_quotes_on_format = false +ij_scss_hex_color_long_format = false +ij_scss_hex_color_lower_case = false +ij_scss_hex_color_short_format = false +ij_scss_hex_color_upper_case = false +ij_scss_keep_blank_lines_in_code = 2 +ij_scss_keep_indents_on_empty_lines = false +ij_scss_keep_single_line_blocks = false +ij_scss_line_comment_add_space = false +ij_scss_line_comment_at_first_column = false +ij_scss_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow +ij_scss_space_after_colon = true +ij_scss_space_before_opening_brace = true +ij_scss_use_double_quotes = true +ij_scss_value_alignment = 0 + +[*.twig] +ij_visual_guides = none +ij_twig_keep_indents_on_empty_lines = false +ij_twig_spaces_inside_comments_delimiters = true +ij_twig_spaces_inside_delimiters = true +ij_twig_spaces_inside_variable_delimiters = true + +[*.vue] +indent_size = 2 +tab_width = 2 +ij_continuation_indent_size = 4 +ij_visual_guides = none +ij_vue_indent_children_of_top_level = template +ij_vue_interpolation_new_line_after_start_delimiter = true +ij_vue_interpolation_new_line_before_end_delimiter = true +ij_vue_interpolation_wrap = off +ij_vue_keep_indents_on_empty_lines = false +ij_vue_spaces_within_interpolation_expressions = true + +[.editorconfig] +ij_visual_guides = none +ij_editorconfig_align_group_field_declarations = false +ij_editorconfig_space_after_colon = false +ij_editorconfig_space_after_comma = true +ij_editorconfig_space_before_colon = false +ij_editorconfig_space_before_comma = false +ij_editorconfig_spaces_around_assignment_operators = true + +[{*.ant,*.fxml,*.jhm,*.jnlp,*.jrxml,*.rng,*.tld,*.wsdl,*.xml,*.xsd,*.xsl,*.xslt,*.xul,phpunit.xml.dist}] +ij_visual_guides = none +ij_xml_align_attributes = true +ij_xml_align_text = false +ij_xml_attribute_wrap = normal +ij_xml_block_comment_add_space = false +ij_xml_block_comment_at_first_column = true +ij_xml_keep_blank_lines = 2 +ij_xml_keep_indents_on_empty_lines = false +ij_xml_keep_line_breaks = true +ij_xml_keep_line_breaks_in_text = true +ij_xml_keep_whitespaces = false +ij_xml_keep_whitespaces_around_cdata = preserve +ij_xml_keep_whitespaces_inside_cdata = false +ij_xml_line_comment_at_first_column = true +ij_xml_space_after_tag_name = false +ij_xml_space_around_equals_in_attribute = false +ij_xml_space_inside_empty_tag = false +ij_xml_text_wrap = normal + +[{*.ats,*.cts,*.mts,*.ts}] +ij_continuation_indent_size = 4 +ij_visual_guides = none +ij_typescript_align_imports = false +ij_typescript_align_multiline_array_initializer_expression = false +ij_typescript_align_multiline_binary_operation = false +ij_typescript_align_multiline_chained_methods = false +ij_typescript_align_multiline_extends_list = false +ij_typescript_align_multiline_for = true +ij_typescript_align_multiline_parameters = true +ij_typescript_align_multiline_parameters_in_calls = false +ij_typescript_align_multiline_ternary_operation = false +ij_typescript_align_object_properties = 0 +ij_typescript_align_union_types = false +ij_typescript_align_var_statements = 0 +ij_typescript_array_initializer_new_line_after_left_brace = false +ij_typescript_array_initializer_right_brace_on_new_line = false +ij_typescript_array_initializer_wrap = off +ij_typescript_assignment_wrap = off +ij_typescript_binary_operation_sign_on_next_line = false +ij_typescript_binary_operation_wrap = off +ij_typescript_blacklist_imports = rxjs/Rx,node_modules/**,**/node_modules/**,@angular/material,@angular/material/typings/** +ij_typescript_blank_lines_after_imports = 1 +ij_typescript_blank_lines_around_class = 1 +ij_typescript_blank_lines_around_field = 0 +ij_typescript_blank_lines_around_field_in_interface = 0 +ij_typescript_blank_lines_around_function = 1 +ij_typescript_blank_lines_around_method = 1 +ij_typescript_blank_lines_around_method_in_interface = 1 +ij_typescript_block_brace_style = end_of_line +ij_typescript_block_comment_add_space = false +ij_typescript_block_comment_at_first_column = true +ij_typescript_call_parameters_new_line_after_left_paren = false +ij_typescript_call_parameters_right_paren_on_new_line = false +ij_typescript_call_parameters_wrap = off +ij_typescript_catch_on_new_line = false +ij_typescript_chained_call_dot_on_new_line = true +ij_typescript_class_brace_style = end_of_line +ij_typescript_comma_on_new_line = false +ij_typescript_do_while_brace_force = never +ij_typescript_else_on_new_line = false +ij_typescript_enforce_trailing_comma = keep +ij_typescript_enum_constants_wrap = on_every_item +ij_typescript_extends_keyword_wrap = off +ij_typescript_extends_list_wrap = off +ij_typescript_field_prefix = _ +ij_typescript_file_name_style = relaxed +ij_typescript_finally_on_new_line = false +ij_typescript_for_brace_force = never +ij_typescript_for_statement_new_line_after_left_paren = false +ij_typescript_for_statement_right_paren_on_new_line = false +ij_typescript_for_statement_wrap = off +ij_typescript_force_quote_style = false +ij_typescript_force_semicolon_style = false +ij_typescript_function_expression_brace_style = end_of_line +ij_typescript_if_brace_force = never +ij_typescript_import_merge_members = global +ij_typescript_import_prefer_absolute_path = global +ij_typescript_import_sort_members = true +ij_typescript_import_sort_module_name = false +ij_typescript_import_use_node_resolution = true +ij_typescript_imports_wrap = on_every_item +ij_typescript_indent_case_from_switch = true +ij_typescript_indent_chained_calls = true +ij_typescript_indent_package_children = 0 +ij_typescript_jsdoc_include_types = false +ij_typescript_jsx_attribute_value = braces +ij_typescript_keep_blank_lines_in_code = 2 +ij_typescript_keep_first_column_comment = true +ij_typescript_keep_indents_on_empty_lines = false +ij_typescript_keep_line_breaks = true +ij_typescript_keep_simple_blocks_in_one_line = false +ij_typescript_keep_simple_methods_in_one_line = false +ij_typescript_line_comment_add_space = true +ij_typescript_line_comment_at_first_column = false +ij_typescript_method_brace_style = end_of_line +ij_typescript_method_call_chain_wrap = off +ij_typescript_method_parameters_new_line_after_left_paren = false +ij_typescript_method_parameters_right_paren_on_new_line = false +ij_typescript_method_parameters_wrap = off +ij_typescript_object_literal_wrap = on_every_item +ij_typescript_object_types_wrap = on_every_item +ij_typescript_parentheses_expression_new_line_after_left_paren = false +ij_typescript_parentheses_expression_right_paren_on_new_line = false +ij_typescript_place_assignment_sign_on_next_line = false +ij_typescript_prefer_as_type_cast = false +ij_typescript_prefer_explicit_types_function_expression_returns = false +ij_typescript_prefer_explicit_types_function_returns = false +ij_typescript_prefer_explicit_types_vars_fields = false +ij_typescript_prefer_parameters_wrap = false +ij_typescript_reformat_c_style_comments = false +ij_typescript_space_after_colon = true +ij_typescript_space_after_comma = true +ij_typescript_space_after_dots_in_rest_parameter = false +ij_typescript_space_after_generator_mult = true +ij_typescript_space_after_property_colon = true +ij_typescript_space_after_quest = true +ij_typescript_space_after_type_colon = true +ij_typescript_space_after_unary_not = false +ij_typescript_space_before_async_arrow_lparen = true +ij_typescript_space_before_catch_keyword = true +ij_typescript_space_before_catch_left_brace = true +ij_typescript_space_before_catch_parentheses = true +ij_typescript_space_before_class_lbrace = true +ij_typescript_space_before_class_left_brace = true +ij_typescript_space_before_colon = true +ij_typescript_space_before_comma = false +ij_typescript_space_before_do_left_brace = true +ij_typescript_space_before_else_keyword = true +ij_typescript_space_before_else_left_brace = true +ij_typescript_space_before_finally_keyword = true +ij_typescript_space_before_finally_left_brace = true +ij_typescript_space_before_for_left_brace = true +ij_typescript_space_before_for_parentheses = true +ij_typescript_space_before_for_semicolon = false +ij_typescript_space_before_function_left_parenth = true +ij_typescript_space_before_generator_mult = false +ij_typescript_space_before_if_left_brace = true +ij_typescript_space_before_if_parentheses = true +ij_typescript_space_before_method_call_parentheses = false +ij_typescript_space_before_method_left_brace = true +ij_typescript_space_before_method_parentheses = false +ij_typescript_space_before_property_colon = false +ij_typescript_space_before_quest = true +ij_typescript_space_before_switch_left_brace = true +ij_typescript_space_before_switch_parentheses = true +ij_typescript_space_before_try_left_brace = true +ij_typescript_space_before_type_colon = false +ij_typescript_space_before_unary_not = false +ij_typescript_space_before_while_keyword = true +ij_typescript_space_before_while_left_brace = true +ij_typescript_space_before_while_parentheses = true +ij_typescript_spaces_around_additive_operators = true +ij_typescript_spaces_around_arrow_function_operator = true +ij_typescript_spaces_around_assignment_operators = true +ij_typescript_spaces_around_bitwise_operators = true +ij_typescript_spaces_around_equality_operators = true +ij_typescript_spaces_around_logical_operators = true +ij_typescript_spaces_around_multiplicative_operators = true +ij_typescript_spaces_around_relational_operators = true +ij_typescript_spaces_around_shift_operators = true +ij_typescript_spaces_around_unary_operator = false +ij_typescript_spaces_within_array_initializer_brackets = false +ij_typescript_spaces_within_brackets = false +ij_typescript_spaces_within_catch_parentheses = false +ij_typescript_spaces_within_for_parentheses = false +ij_typescript_spaces_within_if_parentheses = false +ij_typescript_spaces_within_imports = false +ij_typescript_spaces_within_interpolation_expressions = false +ij_typescript_spaces_within_method_call_parentheses = false +ij_typescript_spaces_within_method_parentheses = false +ij_typescript_spaces_within_object_literal_braces = false +ij_typescript_spaces_within_object_type_braces = true +ij_typescript_spaces_within_parentheses = false +ij_typescript_spaces_within_switch_parentheses = false +ij_typescript_spaces_within_type_assertion = false +ij_typescript_spaces_within_union_types = true +ij_typescript_spaces_within_while_parentheses = false +ij_typescript_special_else_if_treatment = true +ij_typescript_ternary_operation_signs_on_next_line = false +ij_typescript_ternary_operation_wrap = off +ij_typescript_union_types_wrap = on_every_item +ij_typescript_use_chained_calls_group_indents = false +ij_typescript_use_double_quotes = true +ij_typescript_use_explicit_js_extension = auto +ij_typescript_use_path_mapping = always +ij_typescript_use_public_modifier = false +ij_typescript_use_semicolon_after_statement = true +ij_typescript_var_declaration_wrap = normal +ij_typescript_while_brace_force = never +ij_typescript_while_on_new_line = false +ij_typescript_wrap_comments = false + +[{*.bash,*.sh,*.zsh}] +indent_size = 2 +tab_width = 2 +ij_visual_guides = none +ij_shell_binary_ops_start_line = false +ij_shell_keep_column_alignment_padding = false +ij_shell_minify_program = false +ij_shell_redirect_followed_by_space = false +ij_shell_switch_cases_indented = false +ij_shell_use_unix_line_separator = true + +[{*.cjs,*.js}] +ij_continuation_indent_size = 4 +ij_visual_guides = none +ij_javascript_align_imports = false +ij_javascript_align_multiline_array_initializer_expression = false +ij_javascript_align_multiline_binary_operation = false +ij_javascript_align_multiline_chained_methods = false +ij_javascript_align_multiline_extends_list = false +ij_javascript_align_multiline_for = true +ij_javascript_align_multiline_parameters = true +ij_javascript_align_multiline_parameters_in_calls = false +ij_javascript_align_multiline_ternary_operation = false +ij_javascript_align_object_properties = 0 +ij_javascript_align_union_types = false +ij_javascript_align_var_statements = 0 +ij_javascript_array_initializer_new_line_after_left_brace = false +ij_javascript_array_initializer_right_brace_on_new_line = false +ij_javascript_array_initializer_wrap = off +ij_javascript_assignment_wrap = off +ij_javascript_binary_operation_sign_on_next_line = false +ij_javascript_binary_operation_wrap = off +ij_javascript_blacklist_imports = rxjs/Rx,node_modules/**,**/node_modules/**,@angular/material,@angular/material/typings/** +ij_javascript_blank_lines_after_imports = 1 +ij_javascript_blank_lines_around_class = 1 +ij_javascript_blank_lines_around_field = 0 +ij_javascript_blank_lines_around_function = 1 +ij_javascript_blank_lines_around_method = 1 +ij_javascript_block_brace_style = end_of_line +ij_javascript_block_comment_add_space = false +ij_javascript_block_comment_at_first_column = true +ij_javascript_call_parameters_new_line_after_left_paren = false +ij_javascript_call_parameters_right_paren_on_new_line = false +ij_javascript_call_parameters_wrap = off +ij_javascript_catch_on_new_line = false +ij_javascript_chained_call_dot_on_new_line = true +ij_javascript_class_brace_style = end_of_line +ij_javascript_comma_on_new_line = false +ij_javascript_do_while_brace_force = never +ij_javascript_else_on_new_line = false +ij_javascript_enforce_trailing_comma = keep +ij_javascript_extends_keyword_wrap = off +ij_javascript_extends_list_wrap = off +ij_javascript_field_prefix = _ +ij_javascript_file_name_style = relaxed +ij_javascript_finally_on_new_line = false +ij_javascript_for_brace_force = never +ij_javascript_for_statement_new_line_after_left_paren = false +ij_javascript_for_statement_right_paren_on_new_line = false +ij_javascript_for_statement_wrap = off +ij_javascript_force_quote_style = false +ij_javascript_force_semicolon_style = false +ij_javascript_function_expression_brace_style = end_of_line +ij_javascript_if_brace_force = never +ij_javascript_import_merge_members = global +ij_javascript_import_prefer_absolute_path = global +ij_javascript_import_sort_members = true +ij_javascript_import_sort_module_name = false +ij_javascript_import_use_node_resolution = true +ij_javascript_imports_wrap = on_every_item +ij_javascript_indent_case_from_switch = true +ij_javascript_indent_chained_calls = true +ij_javascript_indent_package_children = 0 +ij_javascript_jsx_attribute_value = braces +ij_javascript_keep_blank_lines_in_code = 2 +ij_javascript_keep_first_column_comment = true +ij_javascript_keep_indents_on_empty_lines = false +ij_javascript_keep_line_breaks = true +ij_javascript_keep_simple_blocks_in_one_line = false +ij_javascript_keep_simple_methods_in_one_line = false +ij_javascript_line_comment_add_space = true +ij_javascript_line_comment_at_first_column = false +ij_javascript_method_brace_style = end_of_line +ij_javascript_method_call_chain_wrap = off +ij_javascript_method_parameters_new_line_after_left_paren = false +ij_javascript_method_parameters_right_paren_on_new_line = false +ij_javascript_method_parameters_wrap = off +ij_javascript_object_literal_wrap = on_every_item +ij_javascript_object_types_wrap = on_every_item +ij_javascript_parentheses_expression_new_line_after_left_paren = false +ij_javascript_parentheses_expression_right_paren_on_new_line = false +ij_javascript_place_assignment_sign_on_next_line = false +ij_javascript_prefer_as_type_cast = false +ij_javascript_prefer_explicit_types_function_expression_returns = false +ij_javascript_prefer_explicit_types_function_returns = false +ij_javascript_prefer_explicit_types_vars_fields = false +ij_javascript_prefer_parameters_wrap = false +ij_javascript_reformat_c_style_comments = false +ij_javascript_space_after_colon = true +ij_javascript_space_after_comma = true +ij_javascript_space_after_dots_in_rest_parameter = false +ij_javascript_space_after_generator_mult = true +ij_javascript_space_after_property_colon = true +ij_javascript_space_after_quest = true +ij_javascript_space_after_type_colon = true +ij_javascript_space_after_unary_not = false +ij_javascript_space_before_async_arrow_lparen = true +ij_javascript_space_before_catch_keyword = true +ij_javascript_space_before_catch_left_brace = true +ij_javascript_space_before_catch_parentheses = true +ij_javascript_space_before_class_lbrace = true +ij_javascript_space_before_class_left_brace = true +ij_javascript_space_before_colon = true +ij_javascript_space_before_comma = false +ij_javascript_space_before_do_left_brace = true +ij_javascript_space_before_else_keyword = true +ij_javascript_space_before_else_left_brace = true +ij_javascript_space_before_finally_keyword = true +ij_javascript_space_before_finally_left_brace = true +ij_javascript_space_before_for_left_brace = true +ij_javascript_space_before_for_parentheses = true +ij_javascript_space_before_for_semicolon = false +ij_javascript_space_before_function_left_parenth = true +ij_javascript_space_before_generator_mult = false +ij_javascript_space_before_if_left_brace = true +ij_javascript_space_before_if_parentheses = true +ij_javascript_space_before_method_call_parentheses = false +ij_javascript_space_before_method_left_brace = true +ij_javascript_space_before_method_parentheses = false +ij_javascript_space_before_property_colon = false +ij_javascript_space_before_quest = true +ij_javascript_space_before_switch_left_brace = true +ij_javascript_space_before_switch_parentheses = true +ij_javascript_space_before_try_left_brace = true +ij_javascript_space_before_type_colon = false +ij_javascript_space_before_unary_not = false +ij_javascript_space_before_while_keyword = true +ij_javascript_space_before_while_left_brace = true +ij_javascript_space_before_while_parentheses = true +ij_javascript_spaces_around_additive_operators = true +ij_javascript_spaces_around_arrow_function_operator = true +ij_javascript_spaces_around_assignment_operators = true +ij_javascript_spaces_around_bitwise_operators = true +ij_javascript_spaces_around_equality_operators = true +ij_javascript_spaces_around_logical_operators = true +ij_javascript_spaces_around_multiplicative_operators = true +ij_javascript_spaces_around_relational_operators = true +ij_javascript_spaces_around_shift_operators = true +ij_javascript_spaces_around_unary_operator = false +ij_javascript_spaces_within_array_initializer_brackets = false +ij_javascript_spaces_within_brackets = false +ij_javascript_spaces_within_catch_parentheses = false +ij_javascript_spaces_within_for_parentheses = false +ij_javascript_spaces_within_if_parentheses = false +ij_javascript_spaces_within_imports = false +ij_javascript_spaces_within_interpolation_expressions = false +ij_javascript_spaces_within_method_call_parentheses = false +ij_javascript_spaces_within_method_parentheses = false +ij_javascript_spaces_within_object_literal_braces = false +ij_javascript_spaces_within_object_type_braces = true +ij_javascript_spaces_within_parentheses = false +ij_javascript_spaces_within_switch_parentheses = false +ij_javascript_spaces_within_type_assertion = false +ij_javascript_spaces_within_union_types = true +ij_javascript_spaces_within_while_parentheses = false +ij_javascript_special_else_if_treatment = true +ij_javascript_ternary_operation_signs_on_next_line = false +ij_javascript_ternary_operation_wrap = off +ij_javascript_union_types_wrap = on_every_item +ij_javascript_use_chained_calls_group_indents = false +ij_javascript_use_double_quotes = true +ij_javascript_use_explicit_js_extension = auto +ij_javascript_use_path_mapping = always +ij_javascript_use_public_modifier = false +ij_javascript_use_semicolon_after_statement = true +ij_javascript_var_declaration_wrap = normal +ij_javascript_while_brace_force = never +ij_javascript_while_on_new_line = false +ij_javascript_wrap_comments = false + +[{*.ctp,*.hphp,*.inc,*.module,*.php,*.php4,*.php5,*.phtml}] +ij_continuation_indent_size = 4 +ij_visual_guides = none +ij_php_align_assignments = false +ij_php_align_class_constants = false +ij_php_align_enum_cases = false +ij_php_align_group_field_declarations = false +ij_php_align_inline_comments = false +ij_php_align_key_value_pairs = false +ij_php_align_match_arm_bodies = false +ij_php_align_multiline_array_initializer_expression = false +ij_php_align_multiline_binary_operation = false +ij_php_align_multiline_chained_methods = false +ij_php_align_multiline_extends_list = true +ij_php_align_multiline_for = true +ij_php_align_multiline_parameters = false +ij_php_align_multiline_parameters_in_calls = false +ij_php_align_multiline_ternary_operation = false +ij_php_align_named_arguments = false +ij_php_align_phpdoc_comments = false +ij_php_align_phpdoc_param_names = false +ij_php_anonymous_brace_style = end_of_line +ij_php_api_weight = 28 +ij_php_array_initializer_new_line_after_left_brace = true +ij_php_array_initializer_right_brace_on_new_line = true +ij_php_array_initializer_wrap = on_every_item +ij_php_assignment_wrap = on_every_item +ij_php_attributes_wrap = off +ij_php_author_weight = 28 +ij_php_binary_operation_sign_on_next_line = false +ij_php_binary_operation_wrap = normal +ij_php_blank_lines_after_class_header = 0 +ij_php_blank_lines_after_function = 1 +ij_php_blank_lines_after_imports = 1 +ij_php_blank_lines_after_opening_tag = 1 +ij_php_blank_lines_after_package = 1 +ij_php_blank_lines_around_class = 1 +ij_php_blank_lines_around_constants = 0 +ij_php_blank_lines_around_enum_cases = 0 +ij_php_blank_lines_around_field = 0 +ij_php_blank_lines_around_method = 1 +ij_php_blank_lines_before_class_end = 0 +ij_php_blank_lines_before_imports = 1 +ij_php_blank_lines_before_method_body = 0 +ij_php_blank_lines_before_package = 1 +ij_php_blank_lines_before_return_statement = 0 +ij_php_blank_lines_between_imports = 1 +ij_php_block_brace_style = end_of_line +ij_php_call_parameters_new_line_after_left_paren = true +ij_php_call_parameters_right_paren_on_new_line = true +ij_php_call_parameters_wrap = on_every_item +ij_php_catch_on_new_line = false +ij_php_category_weight = 28 +ij_php_class_brace_style = next_line +ij_php_comma_after_last_argument = false +ij_php_comma_after_last_array_element = true +ij_php_comma_after_last_closure_use_var = false +ij_php_comma_after_last_match_arm = false +ij_php_comma_after_last_parameter = false +ij_php_concat_spaces = true +ij_php_copyright_weight = 28 +ij_php_deprecated_weight = 28 +ij_php_do_while_brace_force = always +ij_php_else_if_style = combine +ij_php_else_on_new_line = true +ij_php_example_weight = 28 +ij_php_extends_keyword_wrap = normal +ij_php_extends_list_wrap = on_every_item +ij_php_fields_default_visibility = private +ij_php_filesource_weight = 28 +ij_php_finally_on_new_line = false +ij_php_for_brace_force = always +ij_php_for_statement_new_line_after_left_paren = true +ij_php_for_statement_right_paren_on_new_line = true +ij_php_for_statement_wrap = off +ij_php_force_empty_methods_in_one_line = false +ij_php_force_short_declaration_array_style = true +ij_php_getters_setters_naming_style = camel_case +ij_php_getters_setters_order_style = getters_first +ij_php_global_weight = 28 +ij_php_group_use_wrap = normal +ij_php_if_brace_force = always +ij_php_if_lparen_on_next_line = false +ij_php_if_rparen_on_next_line = false +ij_php_ignore_weight = 28 +ij_php_import_sorting = alphabetic +ij_php_indent_break_from_case = true +ij_php_indent_case_from_switch = true +ij_php_indent_code_in_php_tags = false +ij_php_internal_weight = 28 +ij_php_keep_blank_lines_after_lbrace = 0 +ij_php_keep_blank_lines_before_right_brace = 0 +ij_php_keep_blank_lines_in_code = 2 +ij_php_keep_blank_lines_in_declarations = 2 +ij_php_keep_control_statement_in_one_line = false +ij_php_keep_first_column_comment = false +ij_php_keep_indents_on_empty_lines = false +ij_php_keep_line_breaks = false +ij_php_keep_rparen_and_lbrace_on_one_line = true +ij_php_keep_simple_classes_in_one_line = false +ij_php_keep_simple_methods_in_one_line = false +ij_php_lambda_brace_style = end_of_line +ij_php_license_weight = 28 +ij_php_line_comment_add_space = false +ij_php_line_comment_at_first_column = true +ij_php_link_weight = 28 +ij_php_lower_case_boolean_const = true +ij_php_lower_case_keywords = true +ij_php_lower_case_null_const = true +ij_php_method_brace_style = next_line +ij_php_method_call_chain_wrap = off +ij_php_method_parameters_new_line_after_left_paren = true +ij_php_method_parameters_right_paren_on_new_line = true +ij_php_method_parameters_wrap = on_every_item +ij_php_method_weight = 28 +ij_php_modifier_list_wrap = false +ij_php_multiline_chained_calls_semicolon_on_new_line = false +ij_php_namespace_brace_style = 1 +ij_php_new_line_after_php_opening_tag = true +ij_php_null_type_position = in_the_end +ij_php_package_weight = 28 +ij_php_param_weight = 0 +ij_php_parameters_attributes_wrap = normal +ij_php_parentheses_expression_new_line_after_left_paren = false +ij_php_parentheses_expression_right_paren_on_new_line = false +ij_php_phpdoc_blank_line_before_tags = false +ij_php_phpdoc_blank_lines_around_parameters = false +ij_php_phpdoc_keep_blank_lines = true +ij_php_phpdoc_param_spaces_between_name_and_description = 1 +ij_php_phpdoc_param_spaces_between_tag_and_type = 1 +ij_php_phpdoc_param_spaces_between_type_and_name = 1 +ij_php_phpdoc_use_fqcn = false +ij_php_phpdoc_wrap_long_lines = true +ij_php_place_assignment_sign_on_next_line = false +ij_php_place_parens_for_constructor = 0 +ij_php_property_read_weight = 28 +ij_php_property_weight = 28 +ij_php_property_write_weight = 28 +ij_php_return_type_on_new_line = false +ij_php_return_weight = 1 +ij_php_see_weight = 28 +ij_php_since_weight = 28 +ij_php_sort_phpdoc_elements = true +ij_php_space_after_colon = true +ij_php_space_after_colon_in_enum_backed_type = true +ij_php_space_after_colon_in_named_argument = true +ij_php_space_after_colon_in_return_type = true +ij_php_space_after_comma = true +ij_php_space_after_for_semicolon = true +ij_php_space_after_quest = true +ij_php_space_after_type_cast = false +ij_php_space_after_unary_not = false +ij_php_space_before_array_initializer_left_brace = false +ij_php_space_before_catch_keyword = true +ij_php_space_before_catch_left_brace = true +ij_php_space_before_catch_parentheses = true +ij_php_space_before_class_left_brace = true +ij_php_space_before_closure_left_parenthesis = true +ij_php_space_before_colon = true +ij_php_space_before_colon_in_enum_backed_type = false +ij_php_space_before_colon_in_named_argument = false +ij_php_space_before_colon_in_return_type = false +ij_php_space_before_comma = false +ij_php_space_before_do_left_brace = true +ij_php_space_before_else_keyword = true +ij_php_space_before_else_left_brace = true +ij_php_space_before_finally_keyword = true +ij_php_space_before_finally_left_brace = true +ij_php_space_before_for_left_brace = true +ij_php_space_before_for_parentheses = true +ij_php_space_before_for_semicolon = false +ij_php_space_before_if_left_brace = true +ij_php_space_before_if_parentheses = true +ij_php_space_before_method_call_parentheses = false +ij_php_space_before_method_left_brace = true +ij_php_space_before_method_parentheses = false +ij_php_space_before_quest = true +ij_php_space_before_short_closure_left_parenthesis = false +ij_php_space_before_switch_left_brace = true +ij_php_space_before_switch_parentheses = true +ij_php_space_before_try_left_brace = true +ij_php_space_before_unary_not = false +ij_php_space_before_while_keyword = true +ij_php_space_before_while_left_brace = true +ij_php_space_before_while_parentheses = true +ij_php_space_between_ternary_quest_and_colon = false +ij_php_spaces_around_additive_operators = true +ij_php_spaces_around_arrow = false +ij_php_spaces_around_assignment_in_declare = false +ij_php_spaces_around_assignment_operators = true +ij_php_spaces_around_bitwise_operators = true +ij_php_spaces_around_equality_operators = true +ij_php_spaces_around_logical_operators = true +ij_php_spaces_around_multiplicative_operators = true +ij_php_spaces_around_null_coalesce_operator = true +ij_php_spaces_around_pipe_in_union_type = false +ij_php_spaces_around_relational_operators = true +ij_php_spaces_around_shift_operators = true +ij_php_spaces_around_unary_operator = false +ij_php_spaces_around_var_within_brackets = false +ij_php_spaces_within_array_initializer_braces = false +ij_php_spaces_within_brackets = false +ij_php_spaces_within_catch_parentheses = false +ij_php_spaces_within_for_parentheses = false +ij_php_spaces_within_if_parentheses = false +ij_php_spaces_within_method_call_parentheses = false +ij_php_spaces_within_method_parentheses = false +ij_php_spaces_within_parentheses = false +ij_php_spaces_within_short_echo_tags = true +ij_php_spaces_within_switch_parentheses = false +ij_php_spaces_within_while_parentheses = false +ij_php_special_else_if_treatment = false +ij_php_subpackage_weight = 28 +ij_php_ternary_operation_signs_on_next_line = false +ij_php_ternary_operation_wrap = on_every_item +ij_php_throws_weight = 2 +ij_php_todo_weight = 28 +ij_php_treat_multiline_arrays_and_lambdas_multiline = false +ij_php_unknown_tag_weight = 28 +ij_php_upper_case_boolean_const = false +ij_php_upper_case_null_const = false +ij_php_uses_weight = 28 +ij_php_var_weight = 28 +ij_php_variable_naming_style = camel_case +ij_php_version_weight = 28 +ij_php_while_brace_force = always +ij_php_while_on_new_line = false + +[{*.har,*.jsb2,*.jsb3,*.json,.babelrc,.eslintrc,.prettierrc,.stylelintrc,bowerrc,composer.lock,jest.config}] +indent_size = 2 +ij_visual_guides = none +ij_json_array_wrapping = split_into_lines +ij_json_keep_blank_lines_in_code = 0 +ij_json_keep_indents_on_empty_lines = false +ij_json_keep_line_breaks = true +ij_json_keep_trailing_comma = false +ij_json_object_wrapping = split_into_lines +ij_json_property_alignment = do_not_align +ij_json_space_after_colon = true +ij_json_space_after_comma = true +ij_json_space_before_colon = false +ij_json_space_before_comma = false +ij_json_spaces_within_braces = false +ij_json_spaces_within_brackets = false +ij_json_wrap_long_lines = false + +[{*.htm,*.html,*.ng,*.sht,*.shtm,*.shtml}] +ij_visual_guides = none +ij_html_add_new_line_before_tags = body,div,p,form,h1,h2,h3 +ij_html_align_attributes = true +ij_html_align_text = false +ij_html_attribute_wrap = normal +ij_html_block_comment_add_space = false +ij_html_block_comment_at_first_column = true +ij_html_do_not_align_children_of_min_lines = 0 +ij_html_do_not_break_if_inline_tags = title,h1,h2,h3,h4,h5,h6,p +ij_html_do_not_indent_children_of_tags = html,body,thead,tbody,tfoot +ij_html_enforce_quotes = false +ij_html_inline_tags = a,abbr,acronym,b,basefont,bdo,big,br,cite,cite,code,dfn,em,font,i,img,input,kbd,label,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var +ij_html_keep_blank_lines = 2 +ij_html_keep_indents_on_empty_lines = false +ij_html_keep_line_breaks = true +ij_html_keep_line_breaks_in_text = true +ij_html_keep_whitespaces = false +ij_html_keep_whitespaces_inside = span,pre,textarea +ij_html_line_comment_at_first_column = true +ij_html_new_line_after_last_attribute = never +ij_html_new_line_before_first_attribute = never +ij_html_quote_style = double +ij_html_remove_new_line_before_tags = br +ij_html_space_after_tag_name = false +ij_html_space_around_equality_in_attribute = false +ij_html_space_inside_empty_tag = false +ij_html_text_wrap = normal + +[{*.http,*.rest}] +indent_size = 0 +ij_continuation_indent_size = 4 +ij_visual_guides = none +ij_http request_call_parameters_wrap = normal + +[{*.markdown,*.md}] +ij_visual_guides = none +ij_markdown_force_one_space_after_blockquote_symbol = true +ij_markdown_force_one_space_after_header_symbol = true +ij_markdown_force_one_space_after_list_bullet = true +ij_markdown_force_one_space_between_words = true +ij_markdown_format_tables = true +ij_markdown_insert_quote_arrows_on_wrap = true +ij_markdown_keep_indents_on_empty_lines = false +ij_markdown_keep_line_breaks_inside_text_blocks = true +ij_markdown_max_lines_around_block_elements = 1 +ij_markdown_max_lines_around_header = 1 +ij_markdown_max_lines_between_paragraphs = 1 +ij_markdown_min_lines_around_block_elements = 1 +ij_markdown_min_lines_around_header = 1 +ij_markdown_min_lines_between_paragraphs = 1 +ij_markdown_wrap_text_if_long = true +ij_markdown_wrap_text_inside_blockquotes = true + +[{*.mk,GNUmakefile,makefile}] +ij_visual_guides = none + +[{*.yaml,*.yml}] +indent_size = 4 +ij_visual_guides = none +ij_yaml_align_values_properties = do_not_align +ij_yaml_autoinsert_sequence_marker = true +ij_yaml_block_mapping_on_new_line = false +ij_yaml_indent_sequence_value = true +ij_yaml_keep_indents_on_empty_lines = false +ij_yaml_keep_line_breaks = true +ij_yaml_sequence_on_new_line = false +ij_yaml_space_before_colon = false +ij_yaml_spaces_within_braces = true +ij_yaml_spaces_within_brackets = true diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..d8efbbfe8 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,16 @@ + +* -text + + +# Exclude build/test files from archive to reduce ZIP size for composer dist download +/.github export-ignore +/tests export-ignore +/.editorconfig export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore +/.markdownlint.json export-ignore +/.php-cs-fixer.dist.php export-ignore +/CLA.md export-ignore +/CONTRIBUTING.md export-ignore +/codeception.dist.yml export-ignore +/phpstan* export-ignore diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..445b37aef --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,4 @@ +## Changes in this pull request +Resolves # + +## Additional info diff --git a/.github/ci/files/.env b/.github/ci/files/.env new file mode 100644 index 000000000..1b5934023 --- /dev/null +++ b/.github/ci/files/.env @@ -0,0 +1,2 @@ +APP_ENV=test +APP_DEBUG=true diff --git a/.github/ci/files/.my.cnf b/.github/ci/files/.my.cnf new file mode 100644 index 000000000..b8cc4500d --- /dev/null +++ b/.github/ci/files/.my.cnf @@ -0,0 +1,5 @@ +[client] +host=127.0.0.1 +port=33006 +user=root +password= diff --git a/.github/ci/files/bin/console b/.github/ci/files/bin/console new file mode 100644 index 000000000..b37ac8fbd --- /dev/null +++ b/.github/ci/files/bin/console @@ -0,0 +1,46 @@ +#!/usr/bin/env php +getParameterOption(['--env', '-e'], null, true)) { + putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env); +} + +if ($input->hasParameterOption('--no-debug', true)) { + putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0'); +} + +/** @var \Pimcore\Kernel $kernel */ +$kernel = \Pimcore\Bootstrap::startupCli(); +$application = new \Pimcore\Console\Application($kernel); +$application->run(); diff --git a/.github/ci/files/config/bundles.php b/.github/ci/files/config/bundles.php new file mode 100644 index 000000000..3a4f51529 --- /dev/null +++ b/.github/ci/files/config/bundles.php @@ -0,0 +1,5 @@ + ['all' => true], +]; diff --git a/.github/ci/files/config/config.yaml b/.github/ci/files/config/config.yaml new file mode 100644 index 000000000..459522eee --- /dev/null +++ b/.github/ci/files/config/config.yaml @@ -0,0 +1,3 @@ +imports: + - { resource: services.yaml } + - { resource: system.yaml } \ No newline at end of file diff --git a/.github/ci/files/config/packages/security.yaml b/.github/ci/files/config/packages/security.yaml new file mode 100644 index 000000000..c9f1e0412 --- /dev/null +++ b/.github/ci/files/config/packages/security.yaml @@ -0,0 +1,32 @@ +security: + enable_authenticator_manager: true + + providers: + pimcore_admin: + id: Pimcore\Security\User\UserProvider + + firewalls: + dev: + pattern: ^/(_(profiler|wdt)|css|images|js)/ + security: false + + # Pimcore WebDAV HTTP basic // DO NOT CHANGE! + pimcore_webdav: + pattern: ^/asset/webdav + provider: pimcore_admin + http_basic: ~ + + access_control: + # Pimcore admin ACl // DO NOT CHANGE! + - { path: ^/admin/settings/display-custom-logo, roles: PUBLIC_ACCESS } + - { path: ^/admin/login/2fa-verify, roles: IS_AUTHENTICATED_2FA_IN_PROGRESS } + - { path: ^/admin/login/2fa-setup, roles: ROLE_PIMCORE_USER } + - { path: ^/admin/login/2fa, roles: IS_AUTHENTICATED_2FA_IN_PROGRESS } + - { path: ^/admin/login$, roles: PUBLIC_ACCESS } + - { path: ^/admin/login/(login|lostpassword|deeplink|csrf-token)$, roles: PUBLIC_ACCESS } + - { path: ^/admin, roles: ROLE_PIMCORE_USER } + - { path: ^/asset/webdav, roles: ROLE_PIMCORE_USER } + + role_hierarchy: + # Pimcore admin // DO NOT CHANGE! + ROLE_PIMCORE_ADMIN: [ROLE_PIMCORE_USER] \ No newline at end of file diff --git a/.github/ci/files/config/packages/test/config.yaml b/.github/ci/files/config/packages/test/config.yaml new file mode 100644 index 000000000..269963481 --- /dev/null +++ b/.github/ci/files/config/packages/test/config.yaml @@ -0,0 +1,32 @@ +imports: + - { resource: ../../config.yaml } + +# this cache is used during tests when setting up pimcore +framework: + cache: + pools: + pimcore.cache.pool: + public: true + tags: true + default_lifetime: 31536000 # 1 year + adapter: cache.adapter.array + + +doctrine: + dbal: + connections: + default: + url: '%pimcore_test.db.dsn%' + host: ~ + port: ~ + dbname: ~ + user: ~ + password: ~ + mapping_types: + enum: string + bit: boolean + +parameters: + pimcore_test.db.dsn: '%env(PIMCORE_TEST_DB_DSN)%' + env(PIMCORE_TEST_DB_DSN): ~ + pimcore.encryption.secret: 'def00000fc1e34a17a03e2ef85329325b0736a5941633f8062f6b0a1a20f416751af119256bea0abf83ac33ef656b3fff087e1ce71fa6b8810d7f854fe2781f3fe4507f6' diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml new file mode 100644 index 000000000..23f348848 --- /dev/null +++ b/.github/ci/files/config/services.yaml @@ -0,0 +1,23 @@ +parameters: + secret: ThisTokenIsNotSoSecretChangeIt + +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + # + # INSTALLER + # + Pimcore\Bundle\xTemplateBundlex\Installer: + public: true + arguments: + $bundle: "@=service('kernel').getBundle('PimcorexTemplateBundlex')" + + # controllers are imported separately to make sure they're public + # and have a tag that allows actions to type-hint services + Pimcore\Bundle\xTemplateBundlex\Controller\: + resource: '../src/Controller' + public: true + tags: [ 'controller.service_arguments' ] \ No newline at end of file diff --git a/.github/ci/files/config/system.yaml b/.github/ci/files/config/system.yaml new file mode 100644 index 000000000..cc15792e7 --- /dev/null +++ b/.github/ci/files/config/system.yaml @@ -0,0 +1,58 @@ +pimcore: + general: + timezone: Europe/Berlin + path_variable: '' + domain: pimcore-test.dev + redirect_to_maindomain: false + language: en + valid_languages: 'en,de' + fallback_languages: + en: '' + de: '' + default_language: '' + disable_usage_statistics: false + documents: + versions: + days: null + steps: 10 + error_pages: + default: /error + allow_trailing_slash: 'no' + generate_preview: true + objects: + versions: + days: null + steps: 10 + assets: + versions: + days: null + steps: 10 + icc_rgb_profile: '' + icc_cmyk_profile: '' + full_page_cache: + enabled: false + lifetime: null + exclude_patterns: '' + exclude_cookie: '' + httpclient: + adapter: Socket + proxy_host: '' + proxy_port: '' + proxy_user: '' + proxy_pass: '' + email: + sender: + name: pimcore + email: pimcore@example.com + return: + name: pimcore + email: pimcore@example.com + debug: + email_addresses: '' + applicationlog: + mail_notification: + send_log_summary: false + filter_priority: null + mail_receiver: '' + archive_treshold: '30' + archive_alternative_database: '' \ No newline at end of file diff --git a/.github/ci/files/kernel/Kernel.php b/.github/ci/files/kernel/Kernel.php new file mode 100644 index 000000000..c801b2773 --- /dev/null +++ b/.github/ci/files/kernel/Kernel.php @@ -0,0 +1,22 @@ + + Options -MultiViews + + +# mime types +AddType video/mp4 .mp4 +AddType video/webm .webm +AddType image/jpeg .pjpeg + +Options +SymLinksIfOwnerMatch + +# Use UTF-8 encoding for anything served text/plain or text/html +AddDefaultCharset utf-8 + +RewriteEngine On + + + + Header always unset X-Content-Type-Options + + + +# Determine the RewriteBase automatically and set it as environment variable. +# If you are using Apache aliases to do mass virtual hosting or installed the +# project in a subdirectory, the base path will be prepended to allow proper +# resolution of the app.php file and to redirect to the correct URI. It will +# work in environments without path prefix as well, providing a safe, one-size +# fits all solution. But as you do not need it in this case, you can comment +# the following 2 lines to eliminate the overhead. +RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$ +RewriteRule ^(.*) - [E=BASE:%1] + +# Sets the HTTP_AUTHORIZATION header removed by Apache +RewriteCond %{HTTP:Authorization} . +RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] + +# Redirect to URI without front controller to prevent duplicate content +# (with and without `/app.php`). Only do this redirect on the initial +# rewrite by Apache and not on subsequent cycles. Otherwise we would get an +# endless redirect loop (request -> rewrite to front controller -> +# redirect -> request -> ...). +# So in case you get a "too many redirects" error or you always get redirected +# to the start page because your Apache does not expose the REDIRECT_STATUS +# environment variable, you have 2 choices: +# - disable this feature by commenting the following 2 lines or +# - use Apache >= 2.3.9 and replace all L flags by END flags and remove the +# following RewriteCond (best solution) +RewriteCond %{ENV:REDIRECT_STATUS} ^$ +RewriteRule ^app\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L] + + + RewriteCond %{REQUEST_URI} ^/(fpm|server)-(info|status|ping) + RewriteRule . - [L] + + +# restrict access to dotfiles +RewriteCond %{REQUEST_FILENAME} -d [OR] +RewriteCond %{REQUEST_FILENAME} -l [OR] +RewriteCond %{REQUEST_FILENAME} -f +RewriteRule /\.|^\.(?!well-known/) - [F,L] + +# ASSETS: check if request method is GET (because of WebDAV) and if the requested file (asset) exists on the filesystem, if both match, deliver the asset directly +RewriteCond %{REQUEST_METHOD} ^(GET|HEAD) +RewriteCond %{DOCUMENT_ROOT}/var/assets%{REQUEST_URI} -f +RewriteRule ^(.*)$ /var/assets%{REQUEST_URI} [PT,L] + +# Thumbnails +RewriteCond %{REQUEST_URI} .*/(image|video)-thumb__[\d]+__.* +RewriteCond %{DOCUMENT_ROOT}/var/tmp/%1-thumbnails%{REQUEST_URI} -f +RewriteRule ^(.*)$ /var/tmp/%1-thumbnails%{REQUEST_URI} [PT,L] + +# cache-buster rule for scripts & stylesheets embedded using view helpers +RewriteRule ^cache-buster\-[\d]+/(.*) $1 [PT,L] + +# If the requested filename exists, simply serve it. +# We only want to let Apache serve files and not directories. +RewriteCond %{REQUEST_FILENAME} -f +RewriteRule ^ - [L] + +# Rewrite all other queries to the front controller. +RewriteRule ^ %{ENV:BASE}/index_test.php [L] + + + + +########################################## +### OPTIONAL PERFORMANCE OPTIMIZATIONS ### +########################################## + + + # Force compression for mangled headers. + # http://developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping + + + SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding + RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding + + + + # Compress all output labeled with one of the following MIME-types + # (for Apache versions below 2.3.7, you don't need to enable `mod_filter` + # and can remove the `` and `` lines + # as `AddOutputFilterByType` is still in the core directives). + + AddOutputFilterByType DEFLATE application/atom+xml application/javascript application/json \ + application/vnd.ms-fontobject application/x-font-ttf application/rss+xml \ + application/x-web-app-manifest+json application/xhtml+xml \ + application/xml font/opentype image/svg+xml image/x-icon \ + text/css text/html text/plain text/x-component text/xml text/javascript + + + + + ExpiresActive on + ExpiresDefault "access plus 31536000 seconds" + + # specific overrides + #ExpiresByType text/css "access plus 1 year" + + + + # pimcore mod_pagespeed integration + # pimcore automatically disables mod_pagespeed in the following situations: debug-mode on, /admin, preview, editmode, ... + # if you want to disable pagespeed for specific actions in pimcore you can use $this->disableBrowserCache() in your action + RewriteCond %{REQUEST_URI} ^/(mod_)?pagespeed_(statistics|message|console|beacon|admin|global_admin) + RewriteRule . - [L] + + ModPagespeed Off + AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html + ModPagespeedModifyCachingHeaders off + ModPagespeedRewriteLevel PassThrough + # low risk filters + ModPagespeedEnableFilters remove_comments,recompress_images + # low and moderate filters, recommended filters, but can cause problems + ModPagespeedEnableFilters lazyload_images,extend_cache_images,inline_preview_images,sprite_images + ModPagespeedEnableFilters combine_css,rewrite_css,move_css_to_head,flatten_css_imports,extend_cache_css,prioritize_critical_css + ModPagespeedEnableFilters extend_cache_scripts,combine_javascript,canonicalize_javascript_libraries,rewrite_javascript + # high risk + #ModPagespeedEnableFilters defer_javascript,local_storage_cache + diff --git a/.github/ci/files/public/index_test.php b/.github/ci/files/public/index_test.php new file mode 100644 index 000000000..c4daad55d --- /dev/null +++ b/.github/ci/files/public/index_test.php @@ -0,0 +1,41 @@ +handle($request); +$response->send(); + +$kernel->terminate($request, $response); diff --git a/.github/ci/files/templates/.gitkeep b/.github/ci/files/templates/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/.github/ci/scripts/setup-pimcore-environment.sh b/.github/ci/scripts/setup-pimcore-environment.sh new file mode 100755 index 000000000..ac32e84e0 --- /dev/null +++ b/.github/ci/scripts/setup-pimcore-environment.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -eu + +mkdir -p var/config +mkdir -p bin + +cp .github/ci/files/.env . +cp -r .github/ci/files/config/. config +cp -r .github/ci/files/templates/. templates +cp -r .github/ci/files/bin/console bin/console +chmod 755 bin/console +cp -r .github/ci/files/kernel/. kernel +cp -r .github/ci/files/public/. public \ No newline at end of file diff --git a/.github/workflows/cla.yaml b/.github/workflows/cla.yaml new file mode 100644 index 000000000..5d17fe607 --- /dev/null +++ b/.github/workflows/cla.yaml @@ -0,0 +1,34 @@ +name: "CLA Assistant" +on: + issue_comment: + types: [created] + pull_request_target: + types: [opened,closed,synchronize] + +jobs: + CLAssistant: + runs-on: ubuntu-latest + steps: + - name: "CLA Assistant" + if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target' + # Beta Release + uses: cla-assistant/github-action@v2.1.1-beta + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # the below token should have repo scope and must be manually added by you in the repository's secret + PERSONAL_ACCESS_TOKEN : ${{ secrets.PERSONAL_ACCESS_TOKEN }} + with: + path-to-signatures: 'signatures/version1/cla.json' + path-to-document: 'https://github.com/pimcore/pimcore/blob/master/CLA.md' # e.g. a CLA or a DCO document + # branch should not be protected + branch: 'main' + allowlist: user1,bot* + + #below are the optional inputs - If the optional inputs are not given, then default values will be taken + remote-organization-name: 'pimcore' #enter the remote organization name where the signatures should be stored (Default is storing the signatures in the same repository) + remote-repository-name: 'cla' + #create-file-commit-message: 'For example: Creating file for storing CLA Signatures' + #signed-commit-message: 'For example: $contributorName has signed the CLA in #$pullRequestNo' + #custom-notsigned-prcomment: 'pull request comment with Introductory message to ask new contributors to sign' + #custom-pr-sign-comment: 'The signature to be committed in order to sign the CLA' + #custom-allsigned-prcomment: 'pull request comment when all contributors has signed, defaults to **CLA Assistant Lite bot** All Contributors have signed the CLA.' diff --git a/.github/workflows/codeception.yaml b/.github/workflows/codeception.yaml new file mode 100644 index 000000000..c78fd4ddb --- /dev/null +++ b/.github/workflows/codeception.yaml @@ -0,0 +1,62 @@ +name: "Codeception Tests" + +on: + # Enable Later. + #schedule: + # - cron: '0 3 * * 1,3,5' + pull_request: + branches: + - "[0-9]+.[0-9]+" + - "[0-9]+.x" + - "feature-*" + push: + branches: + - "[0-9]+.[0-9]+" + - "[0-9]+.x" + +env: + PIMCORE_PROJECT_ROOT: ${{ github.workspace }} + APP_ENV: test + PIMCORE_TEST: 1 + +jobs: + codeception-tests: + name: "Codeception tests" + runs-on: "ubuntu-20.04" + continue-on-error: ${{ matrix.experimental }} + strategy: + matrix: + include: + - { php-version: 8.1, dependencies: lowest, pimcore_version: "", experimental: false } + - { php-version: 8.2, dependencies: highest, pimcore_version: "", experimental: false } + + steps: + - name: "Checkout code" + uses: "actions/checkout@v2" + + - name: "Install PHP" + uses: "shivammathur/setup-php@v2" + with: + coverage: xdebug + ini-values: display_errors=On, display_startup_errors=On, error_reporting=32767 + php-version: "${{ matrix.php-version }}" + + - name: Install SSH Key # this is necessary for Composer to be able to clone source from pimcore/ee-pimcore + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SSH_PRIVATE_KEY_PIMCORE_DEPLOYMENTS_USER }} + known_hosts: 'TBD' + + - name: "Add authentication for private pimcore packages" + run: | + composer config repositories.private-packagist composer https://repo.pimcore.com/github-actions/ + composer config --global --auth http-basic.repo.pimcore.com github-actions ${{ secrets.COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN }} + + + - name: "Install dependencies with Composer" + uses: "ramsey/composer-install@v2" + with: + dependency-versions: "${{ matrix.dependencies }}" + + - name: "Run Codeception" + run: "vendor/bin/codecept run -c . -vvv --xml --coverage-xml" \ No newline at end of file diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 000000000..28e8e74d8 --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,69 @@ + +name: "Documentation" + +on: + pull_request: + branches: + - "[0-9]+.[0-9]+" + - "[0-9]+.x" + paths: + - 'doc/**' + - '.github/workflows/docs.yaml' + - 'README.md' + push: + branches: + - "[0-9]+.[0-9]+" + - "[0-9]+.x" + - "*_actions" + paths: + - 'doc/**' + - '.github/workflows/docs.yaml' + - 'README.md' + +permissions: + contents: read + +jobs: + docs: + name: "Generate docs Pimcore Docs Generator" + runs-on: "ubuntu-latest" + steps: + - name: "Checkout code" + uses: "actions/checkout@v3" + + - name: "Checkout Docs Generator" + uses: "actions/checkout@v3" + with: + repository: "pimcore/docs-generator" + ref: "main" + path: "./docs-generator" + token: ${{ secrets.DOCS_GENERATOR_ACCESS_TOKEN }} + + - name: "Install Node" + uses: actions/setup-node@v3 + with: + node-version: 19.x + registry-url: 'https://registry.npmjs.org' + + - name: Prepare Docs + working-directory: "./docs-generator" + run: | + mkdir docs + # copy docs to working directory + cp -r ../doc ./docs/ + + # copy readme to working directory + cp -r ../README.md ./docs/ + + # copy index page + cp bin/resources/00_index_empty.md ./docs/00_index.md + + # use special docusaurus config (to exclude search plugin) and check for broken links + mv docusaurus.config.js.repos-tests docusaurus.config.js + + - name: Build Docs + working-directory: "./docs-generator" + run: | + npm install + npm run build + diff --git a/.github/workflows/php-cs-fixer.yaml b/.github/workflows/php-cs-fixer.yaml new file mode 100644 index 000000000..e1f17de32 --- /dev/null +++ b/.github/workflows/php-cs-fixer.yaml @@ -0,0 +1,34 @@ +name: "PHP-CS-Fixer" + +on: + pull_request: + branches: + - "[0-9]+.[0-9]+" + - "[0-9]+.x" + - "feature-*" + push: + branches: + - "[0-9]+.[0-9]+" + - "[0-9]+.x" + - "*_actions" + - "feature-*" + +permissions: + contents: read + +jobs: + php-cs-fixer: + permissions: + contents: write # for stefanzweifel/git-auto-commit-action to push code in repo + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} + + - name: PHP-CS-Fixer + uses: docker://oskarstark/php-cs-fixer-ga:latest + + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Apply php-cs-fixer changes \ No newline at end of file diff --git a/.github/workflows/poeditor-export.yaml b/.github/workflows/poeditor-export.yaml new file mode 100644 index 000000000..ecf9cb0a6 --- /dev/null +++ b/.github/workflows/poeditor-export.yaml @@ -0,0 +1,22 @@ +name: "Trigger POEditor Translations Export" + +on: + workflow_dispatch: + push: + branches: + - "[0-9]+.x" + paths: + - 'translations/admin.en.yaml' + +permissions: + contents: read + +jobs: + poeditor: + runs-on: ubuntu-latest + steps: + - name: Trigger workflow in pimcore/poeditor-export-action + env: + GH_TOKEN: ${{ secrets.POEDITOR_ACTION_TRIGGER_TOKEN }} + run: | + gh workflow run -R pimcore/poeditor-export-action poeditor-export.yaml \ No newline at end of file diff --git a/.github/workflows/qodana.yml b/.github/workflows/qodana.yml new file mode 100644 index 000000000..6a478ba9f --- /dev/null +++ b/.github/workflows/qodana.yml @@ -0,0 +1,61 @@ +name: Qodana +on: + schedule: + - cron: '0 01 * * *' # Run once per day + workflow_dispatch: + push: + paths: + - '**.php' + - '**.yml' + - '**.yaml' + branches: + - '*' + - '**' + pull_request_target: + types: [opened, synchronize, reopened] + paths: + - '**.php' + - '**.yml' + - '**.yaml' + branches: + - '*' + - '**' + +jobs: + qodana: + timeout-minutes: 15 + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + checks: write + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + - name: Install PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8.1 + extensions: curl, mbstring, openssl, pdo, pdo_sqlite + ini-values: memory_limit=-1, date.timezone='UTC' + coverage: xdebug + tools: composer:v2 + + - name: Validate composer.json and composer.lock + run: composer validate + + - name: Add authentication for private pimcore packages + run: | + composer config repositories.private-packagist composer https://repo.pimcore.com/github-actions/ + composer config --global --auth http-basic.repo.pimcore.com github-actions ${{ secrets.COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN }} + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-interaction + - name: 'Qodana Scan' + uses: JetBrains/qodana-action@latest + with: + args: --baseline,qodana.sarif.json + env: + QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 000000000..553c3b572 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,10 @@ +name: Handle stale issues + +on: + workflow_dispatch: + schedule: + - cron: '37 7 * * *' + +jobs: + call-stale-workflow: + uses: pimcore/workflows-collection-public/.github/workflows/stale.yml@v1.1.0 diff --git a/.github/workflows/static-analysis.yaml b/.github/workflows/static-analysis.yaml new file mode 100644 index 000000000..3ca2368c1 --- /dev/null +++ b/.github/workflows/static-analysis.yaml @@ -0,0 +1,80 @@ +name: "Static Analysis" + +on: + schedule: + - cron: '0 3 * * 1,3,5' + pull_request: + branches: + - "[0-9]+.[0-9]+" + - "[0-9]+.x" + - "feature-*" + paths-ignore: + #- 'doc/**' + - 'public/**' + push: + branches: + - "[0-9]+.[0-9]+" + - "[0-9]+.x" + - "*_actions" + +jobs: + static-analysis-phpstan: + name: "Static Analysis with PHPStan" + runs-on: "ubuntu-20.04" + strategy: + matrix: + include: + - { php-version: "8.1", dependencies: "lowest", experimental: false } + - { php-version: "8.2", dependencies: "highest", experimental: false } + - { php-version: "8.2", dependencies: "highest", pimcore_version: "11.x-dev as 11.99.9", experimental: true } + steps: + - name: "Checkout code" + uses: "actions/checkout@v2" + + - name: "Install PHP" + uses: "shivammathur/setup-php@v2" + with: + coverage: "none" + php-version: "${{ matrix.php-version }}" + + - name: Install SSH Key # this is necessary for Composer to be able to clone source from pimcore/ee-pimcore + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SSH_PRIVATE_KEY_PIMCORE_DEPLOYMENTS_USER }} + known_hosts: 'TBD' + + - name: "Add authentication for private pimcore packages" + run: | + composer config repositories.private-packagist composer https://repo.pimcore.com/github-actions/ + composer config --global --auth http-basic.repo.pimcore.com github-actions ${{ secrets.COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN }} + + - name: "Setup Pimcore environment" + run: | + .github/ci/scripts/setup-pimcore-environment.sh + + - name: "Update Pimcore version" + env: + PIMCORE_VERSION: "${{ matrix.pimcore_version }}" + run: | + if [ ! -z "$PIMCORE_VERSION" ]; then + composer require --no-update pimcore/pimcore:"${PIMCORE_VERSION}" + fi + + - name: "Install dependencies with Composer" + uses: "ramsey/composer-install@v2" + with: + dependency-versions: "${{ matrix.dependencies }}" + + - name: "Run a static analysis with phpstan/phpstan" + run: "vendor/bin/phpstan analyse --memory-limit=-1" + + - name: "Generate baseline file" + if: ${{ failure() }} + run: "vendor/bin/phpstan analyse --memory-limit=-1 --generate-baseline" + + - name: "Upload baseline file" + if: ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: phpstan-baseline.neon + path: phpstan-baseline.neon \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..c78ed7abe --- /dev/null +++ b/.gitignore @@ -0,0 +1,49 @@ +# temp files +.DS_Store +Thumbs.db +*.log + +# symfony default +/.web-server-pid +/app/config/parameters.yml +/build/ +/phpunit.xml +/web/bundles/ +/web/var/ + +# PHP-CS-Fixer +/.php_cs +/.php_cs.cache + +# composer +/composer.lock + +# PhpStorm / IDEA +.idea + + +# Test env +/bin +/cache +/kernel +/var +/vendor + +/node_modules +package-lock.json + +# code style fixer +.php_cs +.php_cs.cache +.php-cs-fixer.cache + +# codeception +/codeception.yaml +/tests/_output/ +/tests/Support/_generated/ + + +/.env +/.htaccess +/auth.json +/config.json \ No newline at end of file diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 000000000..37a001f61 --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,75 @@ +in([ + __DIR__ . '/src', + __DIR__ . '/tests', + ]) + + ->exclude([ + __DIR__ . '/tests/_output', + __DIR__ . '/tests/Support/_generated', + ]) +; + +// do not enable self_accessor as it breaks pimcore models relying on get_called_class() +$config = new PhpCsFixer\Config(); +$config->setRules([ + '@PSR1' => true, + '@PSR2' => true, + 'array_syntax' => ['syntax' => 'short'], + 'list_syntax' => ['syntax' => 'short'], + + 'header_comment' => [ + 'comment_type' => 'PHPDoc', + 'header' => 'Pimcore' . PHP_EOL . PHP_EOL . + 'This source file is available under following license:' . PHP_EOL . + '- Pimcore Commercial License (PCL)' . PHP_EOL . + PHP_EOL . + ' @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)' . PHP_EOL . + ' @license http://www.pimcore.org/license PCL' + ], + + 'blank_line_before_statement' => true, + 'encoding' => true, + 'function_typehint_space' => true, + 'single_line_comment_style' => true, + 'lowercase_cast' => true, + 'magic_constant_casing' => true, + 'method_argument_space' => ['on_multiline' => 'ignore'], + 'class_attributes_separation' => true, + 'native_function_casing' => true, + 'no_blank_lines_after_class_opening' => true, + 'no_blank_lines_after_phpdoc' => true, + 'no_empty_comment' => true, + 'no_empty_phpdoc' => true, + 'no_empty_statement' => true, + 'no_extra_blank_lines' => true, + 'no_leading_import_slash' => true, + 'no_leading_namespace_whitespace' => true, + 'no_short_bool_cast' => true, + 'no_spaces_around_offset' => true, + 'no_unneeded_control_parentheses' => true, + 'no_unused_imports' => true, + 'no_whitespace_before_comma_in_array' => true, + 'no_whitespace_in_blank_line' => true, + 'object_operator_without_whitespace' => true, + 'ordered_imports' => true, + 'phpdoc_indent' => true, + 'phpdoc_no_useless_inheritdoc' => true, + 'phpdoc_scalar' => true, + 'phpdoc_separation' => true, + 'phpdoc_single_line_var_spacing' => true, + 'return_type_declaration' => true, + 'short_scalar_cast' => true, + 'single_blank_line_before_namespace' => true, + 'single_quote' => true, + 'space_after_semicolon' => true, + 'standardize_not_equals' => true, + 'ternary_operator_spaces' => true, + 'trailing_comma_in_multiline' => true, + 'whitespace_after_comma_in_array' => true, +]); + +$config->setFinder($finder); +return $config; diff --git a/.qodana-profile.xml b/.qodana-profile.xml new file mode 100644 index 000000000..c1a0bf251 --- /dev/null +++ b/.qodana-profile.xml @@ -0,0 +1,625 @@ + + \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 000000000..bd095c511 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,11 @@ +# License +Copyright (C) Pimcore GmbH + +This software is available under following license: +* Pimcore Commercial License (PCL) + +## Pimcore Commercial License (PCL) +Commercial and supported versions of the program - also known as +Commercial Distributions - must be used in accordance with the terms and conditions +contained in a separate written agreement between you and Pimcore GmbH. +For more information about the Pimcore Commercial License (PCL) please contact info@pimcore.com. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 000000000..b7824b59e --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# x Template x +todo + +## Features in a Nutshell + + +## Documentation Overview +- [Installation](./doc/01_Installation.md) diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..5d11c0293 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,21 @@ +# Security Policy + +## Reporting a Vulnerability + +If you think that you have found a security issue, +don’t use the bug tracker and don’t publish it publicly. +Instead, all security issues must be reported via 📫 to [security-issue@pimcore.com](mailto:security-issue@pimcore.com). + + +## Resolving Process +Every submitted security issue is handled with top priority by following these steps: + +1. Confirm the vulnerability +2. Determine the severity +3. Contact reporter +4. Work on a patch +5. Get a CVE identification number (might be done by the reporter or a security service provider) +6. Patch reviewing +7. Tagging a new release for supported versions +8. Publish security announcement + diff --git a/codeception.dist.yml b/codeception.dist.yml new file mode 100644 index 000000000..475b188be --- /dev/null +++ b/codeception.dist.yml @@ -0,0 +1,24 @@ +namespace: Pimcore\Bundle\xTemplateBundlex\Tests +bootstrap: _bootstrap.php + +settings: + shuffle: true + lint: true + +paths: + tests: tests + output: tests/_output + data: tests/Support/Data + support: tests/Support + +coverage: + enabled: true + show_uncovered: true + include: + - src/* + exclude: + - src/Controller/* + - src/DependencyInjection/* + - src/Repository/* + - src/Installer.php + - src/PimcorexTemplateBundlex.php \ No newline at end of file diff --git a/composer.json b/composer.json new file mode 100644 index 000000000..efa2a141e --- /dev/null +++ b/composer.json @@ -0,0 +1,55 @@ +{ + "name": "pimcore/x-template-name-bundle-x", + "license": "Pimcore Enterprise License (PEL)", + "type": "pimcore-bundle", + "description": "Pimcore xTemplate Bundlex", + "config": { + "discard-changes": true, + "sort-packages": true, + "preferred-install": { + "pimcore/pimcore": "source", + "*": "dist" + }, + "allow-plugins": { + "php-http/discovery": false + } + }, + "prefer-stable": true, + "minimum-stability": "dev", + "require": { + "php": "~8.1.0 || ~8.2.0", + "pimcore/enterprise-subscription-tools": "^1.3", + "pimcore/pimcore": "^11.0" + }, + "require-dev": { + "roave/security-advisories": "dev-latest", + "codeception/codeception": "^5.0.10", + "codeception/phpunit-wrapper": "^9", + "codeception/module-asserts": "^2", + "codeception/module-symfony": "^3.1.1", + "phpstan/phpstan": "^1.10.5", + "phpstan/phpstan-symfony": "^1.2.20", + "phpunit/phpunit": "10.2.7", + "nyholm/psr7": "^1", + "symfony/phpunit-bridge": "^6", + "fakerphp/faker": "^1.23" + }, + "autoload": { + "psr-4": { + "Pimcore\\Bundle\\xTemplateBundlex\\": "src/", + "Pimcore\\": "core-extension/Pimcore/" + } + }, + "autoload-dev": { + "psr-4": { + "Pimcore\\Bundle\\xTemplateBundlex\\Tests\\": "tests" + } + }, + "extra": { + "pimcore": { + "bundles": [ + "Pimcore\\Bundle\\xTemplateBundlex\\PimcorexTemplateBundlex" + ] + } + } +} diff --git a/config/services.yaml b/config/services.yaml new file mode 100644 index 000000000..3667ee694 --- /dev/null +++ b/config/services.yaml @@ -0,0 +1,20 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + # + # INSTALLER + # + Pimcore\Bundle\xTemplateBundlex\Installer: + public: true + arguments: + $bundle: "@=service('kernel').getBundle('PimcorexTemplateBundlex')" + + # controllers are imported separately to make sure they're public + # and have a tag that allows actions to type-hint services + Pimcore\Bundle\xTemplateBundlex\Controller\: + resource: '../src/Controller' + public: true + tags: [ 'controller.service_arguments' ] \ No newline at end of file diff --git a/doc/01_Installation.md b/doc/01_Installation.md new file mode 100644 index 000000000..7d1b7fb92 --- /dev/null +++ b/doc/01_Installation.md @@ -0,0 +1,34 @@ +# Installation of the xTemplate Bundlex + +:::info + + This bundle is only supported on Pimcore Core Framework 11. + +::: + + ## Bundle Installation + +To install the xTemplate Bundlex, follow the three steps below: + +1) Install the required dependencies: + +```bash +composer require pimcore/x-template-name-bundle-x +``` + +2) Make sure the bundle is enabled in the `config/bundles.php` file. The following lines should be added: +```php +use Pimcore\Bundle\xTemplateBundlex\PimcorexTemplateBundlex; +// ... +return [ + // ... + xTemplateBundlex::class => ['all' => true], + // ... +]; +``` + +3) Install the bundle: + +```bash +bin/console pimcore:bundle:install PimcorexTemplateBundlex +``` \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..2b94ee618 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +version: '3.0' +services: + php-x-template-bundle-x: + image: pimcore/pimcore:php8.2-debug-latest + environment: + PHP_IDE_CONFIG: serverName=localhost + volumes: + - .:/var/cli/ \ No newline at end of file diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon new file mode 100644 index 000000000..1339890a6 --- /dev/null +++ b/phpstan-baseline.neon @@ -0,0 +1,2 @@ +parameters: + ignoreErrors: \ No newline at end of file diff --git a/phpstan-bootstrap.php b/phpstan-bootstrap.php new file mode 100644 index 000000000..07d236803 --- /dev/null +++ b/phpstan-bootstrap.php @@ -0,0 +1,23 @@ +" + exit 1 +fi + +REAL_NAME_BUNDLE="$1" + +# Extract different components +NAME=$(echo "$REAL_NAME_BUNDLE" | awk -F"_bundle" '{print $1}') +BUNDLE="bundle$(echo "$REAL_NAME_BUNDLE" | awk -F"_bundle" '{if (NF>1) print "_" $2}')" + +# Derived formats +UPPER_CAMEL_NAME=$(echo "$NAME" | sed -r 's/(^|_)([a-z])/\U\2/g') +UPPER_CAMEL_BUNDLE=$(echo "$BUNDLE" | sed -r 's/(^|_)([a-z])/\U\2/g') + +SPACE_NAME=$(echo "$NAME" | sed 's/_/ /g') +SPACE_BUNDLE=$(echo "$BUNDLE" | sed 's/_/ /g') +CAPITALIZED_SPACE_NAME=$(echo "$SPACE_NAME" | awk '{ for(i=1;i<=NF;i++) $i=toupper(substr($i,1,1)) tolower(substr($i,2)); }1') + +DASH_NAME=$(echo "$NAME" | sed 's/_/-/g') +DASH_BUNDLE=$(echo "$BUNDLE" | sed 's/_/-/g') + +# Function to perform the replacements +perform_replacements() { + local FILE=$1 + sed -i -e "s/x-template-name-bundle-x/$(echo $NAME | sed 's/_/-/g')-bundle/g" "$FILE" + sed -i -e "s/xTemplateBundlex/${UPPER_CAMEL_NAME}Bundle/g" "$FILE" + sed -i -e "s/xTemplate Bundlex/${CAPITALIZED_SPACE_NAME} Bundle/g" "$FILE" + sed -i -e "s/xtemplate-bundlex/${NAME}-bundle/g" "$FILE" + sed -i -e "s/x_template_bundle_x/${REAL_NAME_BUNDLE}/g" "$FILE" + sed -i -e "s/x_template_x/${NAME}/g" "$FILE" + sed -i -e "s/xtemplatex/$(echo $NAME | sed 's/_//g')/g" "$FILE" + sed -i -e "s/x Template x/${CAPITALIZED_SPACE_NAME}/g" "$FILE" +} + + +# Check if a file contains any of the target strings +file_contains_target() { + local FILE=$1 + for target in "${TARGET_STRINGS[@]}"; do + grep -q "$target" "$FILE" && return 0 + done + return 1 +} + +# Find all files in the directory and perform replacements +# Only on files that contain the target strings +find . -type f | while read -r FILE; do + if file_contains_target "$FILE"; then + perform_replacements "$FILE" + fi + + # Rename files + if [[ "$FILE" == "./src/PimcorexTemplateBundlex.php" ]]; then + mv "$FILE" "./src/Pimcore${UPPER_CAMEL_NAME}Bundle.php"; + fi + +done + +echo "Replacements done!" diff --git a/qodana.yaml b/qodana.yaml new file mode 100644 index 000000000..95fff5680 --- /dev/null +++ b/qodana.yaml @@ -0,0 +1,43 @@ +version: "1.0" +linter: jetbrains/qodana-php:latest +profile: + path: .qodana-profile.xml +php: + version: "8.1" +failThreshold: 0 +exclude: + - name: All + paths: + - vendor + - public + - tests + - var + - translations + - .php_cs.dist + - doc + - .github + - .php-cs-fixer.dist.php + - .qodana-profile.xml + - config + - .editorconfig + - composer.json + - composer.lock + - docker-compose.yml + - README.md + - SECURITY.md + - codeception.dist.yml + - phpstan-bootstrap.php + - phpstan-baseline.neon + - phpstan.neon + - LICENSE.md + - .env + - .gitatributes + - src/DependencyInjection/Configuration.php +include: + - name: PhpTaintFunctionInspection + - name: PhpVulnerablePathsInspection +plugins: + - id: de.espend.idea.php.annotation + - id: com.kalessil.phpStorm.phpInspectionsEA + - id: de.espend.idea.php.toolbox + - id: fr.adrienbrault.idea.symfony2plugin \ No newline at end of file diff --git a/src/Controller/DefaultController.php b/src/Controller/DefaultController.php new file mode 100644 index 000000000..450cdf060 --- /dev/null +++ b/src/Controller/DefaultController.php @@ -0,0 +1,24 @@ +container->get(Installer::class); + } + + public static function registerDependentBundles(BundleCollection $collection): void + { + $collection->addBundle(new PimcoreEnterpriseSubscriptionToolsBundle()); + } + + public function getBundleLicenseId(): string + { + return self::ENTERPRISE_BUNDLE_LICENSE_ID; + } +} diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 000000000..929da7fe2 --- /dev/null +++ b/tests/README.md @@ -0,0 +1,24 @@ +# Test Environment +## Setup Test Environment +1. Spin up your docker container: + ```bash + docker-compose up -d + ``` +2. Open the bash of the php container: + ```bash + docker-compose exec php bash + ``` +3. Move to the working directory: + ```bash + cd /var/cli + ``` +4. Install the dependencies: + ```bash + composer install + ``` + +## Run the tests +When all dependencies are installed you can run the tests with the following command: +```bash +./vendor/bin/codecept run -vvv +``` \ No newline at end of file diff --git a/tests/Unit.suite.dist.yml b/tests/Unit.suite.dist.yml new file mode 100644 index 000000000..f23e4f557 --- /dev/null +++ b/tests/Unit.suite.dist.yml @@ -0,0 +1 @@ +suite_namespace: Pimcore\Bundle\xTemplateBundlex\Tests \ No newline at end of file diff --git a/tests/Unit/DefaultTest.php b/tests/Unit/DefaultTest.php new file mode 100644 index 000000000..79e0be7c4 --- /dev/null +++ b/tests/Unit/DefaultTest.php @@ -0,0 +1,24 @@ +assertTrue(true); + } +} diff --git a/tests/_bootstrap.php b/tests/_bootstrap.php new file mode 100644 index 000000000..e014ed13e --- /dev/null +++ b/tests/_bootstrap.php @@ -0,0 +1,15 @@ + 'test', 'PIMCORE_SKIP_DOTENV_FILE' => true] as $name => $value) { + putenv("{$name}={$value}"); + $_ENV[$name] = $_SERVER[$name] = $value; +} +require_once PIMCORE_PROJECT_ROOT . '/vendor/autoload.php'; + +\Pimcore\Bootstrap::setProjectRoot(); +\Pimcore\Bootstrap::bootstrap();