Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[11.x] more pint rules #54332

Merged
merged 13 commits into from
Jan 24, 2025
Merged

[11.x] more pint rules #54332

merged 13 commits into from
Jan 24, 2025

Conversation

browner12
Copy link
Contributor

continuation of #54326

Copy link

Thanks for submitting a PR!

Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

@browner12
Copy link
Contributor Author

browner12 commented Jan 23, 2025

here is where I ended up compared to the StyleCI rules:

  • align_phpdoc --> align_multiline_comment
  • alpha_ordered_imports
  • array_indentation
  • binary_operator_exactly_one_space --> binary_operator_spaces
  • blank_line_after_namespace
  • blank_line_after_opening_tag
  • blank_line_before_return --> blank_line_before_statement
  • blank_line_between_import_groups
  • cast_spaces
  • class_definition
  • class_reference_name_casing
  • clean_namespace
  • compact_nullable_type_declaration
  • concat_without_spaces --> concat_space
  • declare_equal_normalize
  • die_to_exit
  • elseif
  • encoding
  • full_opening_tag
  • function_declaration
  • function_typehint_space --> type_declaration_spaces
  • hash_to_slash_comment --> single_line_comment_style
  • heredoc_to_nowdoc
  • include
  • indentation --> indentation_type
  • integer_literal_case
  • laravel_braces --> control_structure_braces, braces_position
  • laravel_phpdoc_alignment --> phpdoc_align
  • laravel_phpdoc_separation --> phpdoc_separation
  • lowercase_cast
  • lowercase_constants --> constant_case
  • lowercase_keywords
  • lowercase_static_reference
  • magic_constant_casing
  • magic_method_casing
  • method_argument_space
  • method_separation
  • method_visibility_required --> visibility_required
  • native_function_casing
  • native_type_declaration_casing
  • no_alternative_syntax
  • no_binary_string
  • no_blank_lines_after_attribute --> class_attributes_separation?
  • no_blank_lines_after_class_opening
  • no_blank_lines_after_phpdoc
  • no_blank_lines_after_throw --> no_extra_blank_lines
  • no_blank_lines_between_imports --> no_extra_blank_lines
  • no_closing_tag
  • no_empty_phpdoc
  • no_empty_statement
  • no_extra_consecutive_blank_lines --> no_extra_blank_lines
  • no_leading_import_slash
  • no_leading_namespace_whitespace
  • no_multiline_whitespace_around_double_arrow
  • no_multiline_whitespace_before_semicolons --> multiline_whitespace_before_semicolons
  • no_short_bool_cast
  • no_singleline_whitespace_before_semicolons
  • no_space_around_double_colon
  • no_spaces_after_function_name
  • no_spaces_inside_offset --> no_spaces_around_offset
  • no_spaces_inside_parenthesis --> spaces_inside_parentheses
  • no_trailing_comma_in_singleline_arguments --> no_trailing_comma_in_singleline
  • no_trailing_comma_in_singleline_array --> no_trailing_comma_in_singleline
  • no_trailing_comma_in_singleline_array_destructuring --> no_trailing_comma_in_singleline
  • no_trailing_comma_in_singleline_group_import --> no_trailing_comma_in_singleline
  • no_trailing_whitespace
  • no_trailing_whitespace_in_comment
  • no_unneeded_braces
  • no_unneeded_control_parentheses
  • no_unneeded_import_alias
  • no_unset_cast
  • no_unused_imports
  • no_unused_lambda_imports --> lambda_not_used_import
  • no_useless_return
  • no_whitespace_before_comma_in_array
  • no_whitespace_in_blank_line
  • normalize_index_brace
  • not_operator_with_successor_space
  • object_operator_without_whitespace
  • phpdoc_indent
  • phpdoc_inline_tag_normalizer
  • phpdoc_no_access
  • phpdoc_no_package
  • phpdoc_no_useless_inheritdoc
  • phpdoc_return_self_reference
  • phpdoc_scalar
  • phpdoc_single_line_var_spacing
  • phpdoc_singular_inheritdoc
  • phpdoc_summary
  • phpdoc_trim
  • phpdoc_type_to_var
  • phpdoc_types
  • phpdoc_var_without_name
  • post_increment --> increment_style
  • print_to_echo --> no_mixed_echo_print
  • property_visibility_required --> visibility_required
  • psr12_single_import_per_statement --> single_import_per_statement
  • return_type_declaration
  • short_array_syntax --> array_syntax
  • short_list_syntax --> list_syntax
  • short_scalar_cast
  • single_blank_line_at_eof
  • single_blank_line_before_namespace --> blank_lines_before_namespace
  • single_class_element_per_statement
  • single_line_after_imports
  • single_quote
  • space_after_semicolon
  • standardize_not_equals
  • switch_case_semicolon_to_colon
  • switch_case_space
  • switch_continue_to_break
  • symfony_phpdoc_order --> phpdoc_order
  • ternary_operator_spaces
  • trailing_comma_in_multiline_array --> trailing_comma_in_multiline
  • trim_array_spaces
  • unalign_equals
  • unary_operator_spaces
  • union_type_without_spaces --> types_spaces
  • unix_line_endings --> line_ending
  • whitespace_after_comma_in_array

risky

  • no_alias_functions
  • no_unreachable_default_argument_value
  • psr4 --> psr_autoloading?
  • self_accessor

custom

  • nullable_type_declarations --> nullable_type_declaration_for_default_null_value

@browner12
Copy link
Contributor Author

Are we currently running the "risky" checks with StyleCI?

And going forward to we want to add the Pint equivalents?

The unchecked boxes are the ones I'm struggling with converting to Pint. Any help would be appreciated.

@browner12 browner12 marked this pull request as ready for review January 24, 2025 16:56
@browner12
Copy link
Contributor Author

browner12 commented Jan 24, 2025

ok, let's go with this. I can't figure out these last 6

pint will currently fail with this configuration, but that's mostly due to /tests files that aren't formatted properly.

  • comments being converted to single line // vs multiline /* */
  • not allowing inline empty class definitions. I personally think we should allow this, but it is a change, so just wanted to run it by you.

@taylorotwell taylorotwell merged commit 9bb41a6 into laravel:11.x Jan 24, 2025
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants