Skip to content

Commit

Permalink
Fix Symfony deprecation (and forbid SF6.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrixx committed Dec 1, 2021
1 parent 6be78dc commit 8dae385
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .php-cs-fixer.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"php":"8.0.11","version":"3.3.2:v3.3.2#06bdbdfcd619183dd7a1a6948360f8af73b9ecec","indent":" ","lineEnding":"\n","rules":{"array_syntax":true,"backtick_to_shell_exec":true,"binary_operator_spaces":true,"blank_line_before_statement":{"statements":["break","case","continue","declare","default","exit","goto","include","include_once","require","require_once","return","switch","throw","try"]},"braces":{"allow_single_line_anonymous_class_with_empty_body":true,"allow_single_line_closure":true},"cast_spaces":true,"class_attributes_separation":{"elements":{"method":"one"}},"class_definition":{"single_line":true},"clean_namespace":true,"concat_space":{"spacing":"one"},"echo_tag_syntax":true,"empty_loop_body":true,"empty_loop_condition":true,"fully_qualified_strict_types":true,"function_typehint_space":true,"general_phpdoc_tag_rename":{"replacements":{"inheritDocs":"inheritDoc"}},"include":true,"increment_style":true,"integer_literal_case":true,"lambda_not_used_import":true,"linebreak_after_opening_tag":true,"magic_constant_casing":true,"magic_method_casing":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline"},"native_function_casing":true,"native_function_type_declaration_casing":true,"no_alias_language_construct_call":true,"no_alternative_syntax":true,"no_binary_string":true,"no_blank_lines_after_phpdoc":true,"no_empty_comment":true,"no_empty_phpdoc":true,"no_empty_statement":true,"no_extra_blank_lines":{"tokens":["break","case","continue","curly_brace_block","default","extra","parenthesis_brace_block","return","square_brace_block","switch","throw","use"]},"no_leading_namespace_whitespace":true,"no_mixed_echo_print":true,"no_multiline_whitespace_around_double_arrow":true,"no_short_bool_cast":true,"no_singleline_whitespace_before_semicolons":true,"no_spaces_around_offset":true,"no_superfluous_phpdoc_tags":{"allow_mixed":true,"allow_unused_params":true},"no_trailing_comma_in_list_call":true,"no_trailing_comma_in_singleline_array":true,"no_unneeded_control_parentheses":{"statements":["break","clone","continue","echo_print","return","switch_case","yield","yield_from"]},"no_unneeded_curly_braces":{"namespaces":true},"no_unset_cast":true,"no_unused_imports":true,"no_whitespace_before_comma_in_array":true,"normalize_index_brace":true,"object_operator_without_whitespace":true,"ordered_imports":true,"php_unit_fqcn_annotation":true,"php_unit_method_casing":true,"phpdoc_align":true,"phpdoc_annotation_without_dot":true,"phpdoc_indent":true,"phpdoc_inline_tag_normalizer":true,"phpdoc_no_access":true,"phpdoc_no_alias_tag":true,"phpdoc_no_package":true,"phpdoc_no_useless_inheritdoc":true,"phpdoc_return_self_reference":true,"phpdoc_scalar":true,"phpdoc_separation":true,"phpdoc_single_line_var_spacing":true,"phpdoc_summary":true,"phpdoc_tag_type":{"tags":{"inheritDoc":"inline"}},"phpdoc_to_comment":true,"phpdoc_trim":true,"phpdoc_trim_consecutive_blank_line_separation":true,"phpdoc_types":true,"phpdoc_types_order":true,"phpdoc_var_without_name":true,"protected_to_private":true,"semicolon_after_instruction":true,"single_class_element_per_statement":true,"single_line_comment_style":true,"single_quote":true,"single_space_after_construct":true,"space_after_semicolon":{"remove_in_empty_for_expressions":true},"standardize_increment":true,"standardize_not_equals":true,"switch_continue_to_break":true,"trailing_comma_in_multiline":true,"trim_array_spaces":true,"types_spaces":true,"unary_operator_spaces":true,"whitespace_after_comma_in_array":true,"yoda_style":true,"blank_line_after_opening_tag":true,"compact_nullable_typehint":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_braces":true,"no_blank_lines_after_class_opening":true,"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":true,"return_type_declaration":true,"short_scalar_cast":true,"single_blank_line_before_namespace":true,"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"no_break_comment":true,"no_closing_tag":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"array_push":true,"combine_nested_dirname":true,"dir_constant":true,"ereg_to_preg":true,"error_suppression":true,"fopen_flag_order":true,"fopen_flags":{"b_mode":false},"function_to_constant":true,"implode_call":true,"is_null":true,"logical_operators":true,"modernize_types_casting":true,"native_constant_invocation":true,"native_function_invocation":{"include":["@compiler_optimized"],"scope":"namespaced","strict":true},"no_alias_functions":true,"no_homoglyph_names":true,"no_php4_constructor":true,"no_unneeded_final_method":true,"no_useless_sprintf":true,"non_printable_character":true,"ordered_traits":true,"php_unit_construct":true,"php_unit_mock_short_will_return":true,"php_unit_set_up_tear_down_visibility":true,"php_unit_test_annotation":true,"psr_autoloading":true,"self_accessor":true,"set_type_to_cast":true,"string_length_to_empty":true,"string_line_ending":true,"ternary_to_elvis_operator":true,"pow_to_exponentiation":true,"no_trailing_whitespace_in_string":true,"assign_null_coalescing_to_coalesce_equal":true,"heredoc_indentation":true,"list_syntax":true,"ternary_to_null_coalescing":true,"align_multiline_comment":true,"array_indentation":true,"combine_consecutive_issets":true,"combine_consecutive_unsets":true,"escape_implicit_backslashes":true,"explicit_indirect_variable":true,"explicit_string_variable":true,"heredoc_to_nowdoc":true,"method_chaining_indentation":true,"multiline_comment_opening_closing":true,"multiline_whitespace_before_semicolons":{"strategy":"new_line_for_chained_calls"},"no_null_property_initialization":true,"no_superfluous_elseif":true,"no_useless_else":true,"no_useless_return":true,"operator_linebreak":{"only_booleans":true},"phpdoc_no_empty_return":true,"phpdoc_order":true,"phpdoc_order_by_value":true,"phpdoc_var_annotation_correct_order":true,"return_assignment":true,"simple_to_complex_string_variable":true,"header_comment":{"header":"This file is part of JoliTypo - a project by JoliCode.\n\nThis software consists of voluntary contributions made by many individuals\nand is licensed under the MIT license."}},"hashes":{"tests\/JoliTypo\/Tests\/FrenchTest.php":571590367,"tests\/JoliTypo\/Tests\/Fixer\/DashTest.php":2806742422,"tests\/JoliTypo\/Tests\/Fixer\/UnitTest.php":3107754528,"tests\/JoliTypo\/Tests\/Fixer\/GermanQuotesTest.php":1724570669,"tests\/JoliTypo\/Tests\/Fixer\/CurlyQuoteTest.php":4224151457,"tests\/JoliTypo\/Tests\/Fixer\/FrenchNoBreakSpaceTest.php":3838085430,"tests\/JoliTypo\/Tests\/Fixer\/SmartQuotesTest.php":3249552190,"tests\/JoliTypo\/Tests\/Fixer\/NoSpaceBeforeCommaTest.php":170649926,"tests\/JoliTypo\/Tests\/Fixer\/EnglishQuotesTest.php":363133942,"tests\/JoliTypo\/Tests\/Fixer\/FrenchQuotesTest.php":1879741396,"tests\/JoliTypo\/Tests\/Fixer\/TrademarkTest.php":1315489761,"tests\/JoliTypo\/Tests\/Fixer\/HyphenTest.php":3617938544,"tests\/JoliTypo\/Tests\/Fixer\/EllipsisTest.php":1007869428,"tests\/JoliTypo\/Tests\/Fixer\/DimensionTest.php":2182516128,"tests\/JoliTypo\/Tests\/Bridge\/FunctionalTest.php":569905406,"tests\/JoliTypo\/Tests\/Bridge\/app\/AppController.php":1585760343,"tests\/JoliTypo\/Tests\/Bridge\/app\/AppKernel.php":711822088,"tests\/JoliTypo\/Tests\/JoliTypoTest.php":162517983,"tests\/JoliTypo\/Tests\/EnglishTest.php":4253749720,"tests\/JoliTypo\/Tests\/Html5Test.php":1318619115,"src\/JoliTypo\/Fixer\/Ellipsis.php":1322572827,"src\/JoliTypo\/Fixer\/FrenchQuotes.php":1096885352,"src\/JoliTypo\/Fixer\/Numeric.php":4240485160,"src\/JoliTypo\/Fixer\/Trademark.php":872992273,"src\/JoliTypo\/Fixer\/Unit.php":1334008357,"src\/JoliTypo\/Fixer\/BaseOpenClosePair.php":683229440,"src\/JoliTypo\/Fixer\/Dash.php":1871239030,"src\/JoliTypo\/Fixer\/Dimension.php":1622747082,"src\/JoliTypo\/Fixer\/SmartQuotes.php":2913590745,"src\/JoliTypo\/Fixer\/NoSpaceBeforeComma.php":1393861542,"src\/JoliTypo\/Fixer\/EnglishQuotes.php":597170398,"src\/JoliTypo\/Fixer\/GermanQuotes.php":3782629239,"src\/JoliTypo\/Fixer\/CurlyQuote.php":1965526237,"src\/JoliTypo\/Fixer\/FrenchNoBreakSpace.php":3447984317,"src\/JoliTypo\/Fixer\/Hyphen.php":1619697567,"src\/JoliTypo\/LocaleAwareFixerInterface.php":3170491986,"src\/JoliTypo\/Bridge\/Symfony\/DependencyInjection\/Configuration.php":690395456,"src\/JoliTypo\/Bridge\/Symfony\/DependencyInjection\/JoliTypoExtension.php":1062154280,"src\/JoliTypo\/Bridge\/Symfony\/JoliTypoBundle.php":1924966606,"src\/JoliTypo\/Bridge\/Twig\/JoliTypoExtension.php":1344626979,"src\/JoliTypo\/StateBag.php":295254385,"src\/JoliTypo\/Exception\/InvalidMarkupException.php":3499056778,"src\/JoliTypo\/Exception\/BadRuleSetException.php":2499856306,"src\/JoliTypo\/Exception\/BadFixerConfigurationException.php":884610078,"src\/JoliTypo\/FixerInterface.php":3099097164,"src\/JoliTypo\/StateNode.php":3579890256,"src\/JoliTypo\/Fixer.php":4097066463,".php-cs-fixer.php":3514061682}}
4 changes: 2 additions & 2 deletions src/JoliTypo/Bridge/Twig/JoliTypoExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ public function __construct($presets)
$this->presets = $presets;
}

public function getFunctions()
public function getFunctions(): array
{
return [
new \Twig\TwigFunction('jolitypo', [$this, 'translate']),
];
}

public function getFilters()
public function getFilters(): array
{
return [
new \Twig\TwigFilter('jolitypo', [$this, 'translate'], ['pre_escape' => 'html', 'is_safe' => ['html']]),
Expand Down
6 changes: 3 additions & 3 deletions tests/JoliTypo/Tests/Bridge/app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

class AppKernel extends Kernel
{
public function registerBundles()
public function registerBundles(): iterable
{
$bundles = [
new FrameworkBundle(),
Expand Down Expand Up @@ -54,12 +54,12 @@ public function registerContainerConfiguration(LoaderInterface $loader)
}
}

public function getCacheDir()
public function getCacheDir(): string
{
return '/tmp/jolitypo/cache/'.$this->environment;
}

public function getLogDir()
public function getLogDir(): string
{
return '/tmp/jolitypo/logs/'.$this->environment;
}
Expand Down

0 comments on commit 8dae385

Please sign in to comment.