Ordered Imports by Length and More
December 05, 2016
We’re excited to announce some major improvements to our fixers and presets, and finally, the length_ordered_imports fixer! We’re also pleased to announce that our docs have had a styling overhall.
Our 16 new fixers are:
const_visibility_requiredlength_ordered_importsno_blank_lines_after_returnno_blank_lines_after_throwno_blank_lines_between_importsno_blank_lines_between_traitsno_extra_block_blank_linesno_spaces_outside_offsetphp_unit_fqcn_annotationphpdoc_add_missing_param_annotationphpdoc_link_to_seepow_to_exponentiationproperty_visibility_requiredprotected_to_privatereturn_type_declarationsingle_line_class_definition
Full descriptions of each fixer are available in our docs.
The following new fixers have been added to the symfony preset:
- no_blank_lines_after_throw
- no_blank_lines_between_imports
- no_extra_block_blank_lines
- no_spaces_outside_offset
- php_unit_fqcn_annotation
- phpdoc_link_to_see
- property_visibility_required
- return_type_declaration
- single_line_class_definition
The following new fixers have been added to the laravel preset:
length_ordered_importsno_blank_lines_after_throwno_blank_lines_between_importsno_blank_lines_between_traitsproperty_visibility_required
The following new fixers have been added to the recommended preset:
no_blank_lines_after_throwno_blank_lines_between_importsno_blank_lines_between_traitsno_spaces_outside_offsetproperty_visibility_required
Our other changes include:
- The part of the
no_extra_consecutive_blank_linesfixer that removed newlines between imports has been moved to the newno_blank_lines_between_imports fixer. - We’ve renamed the
ordered_importsfixer toalpha_ordered_imports. The original name will continue to work. - We’ve rename and the
visibility_requiredfixer tomethod_visibility_required. The original name will continue to work. - We’ve merged into the
psr0fixer into thepsr4fixer. - The new
pow_to_exponentiationfixer is “risky”. - The
simplified_null_returnfixer has been marked as “risky” in light of the changes made in PHP 7.1. - Support for PHP 7.0 grouped imports.
- Various bug fixes, of course.