-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/contao5Compatibility' into 'main'
Php8 contao413 (#14) See merge request trilobit/trilobit-gmbh/bundles/contao-constants-bundle!9
- Loading branch information
Showing
28 changed files
with
236 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# EditorConfig is awesome: http://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.{php,twig,yml}] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.{html5,svg,min.css,min.js}] | ||
insert_final_newline = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* linguist-vendored | ||
*.php linguist-vendored=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
.idea | ||
|
||
/vendor | ||
/composer.lock | ||
/composer.lock | ||
/.php-cs-fixer.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
<?php | ||
$date = date('Y'); | ||
$header = <<<EOF | ||
@copyright trilobit GmbH | ||
@author trilobit GmbH <https://github.com/trilobit-gmbh> | ||
@license LGPL-3.0-or-later | ||
EOF; | ||
|
||
$config = new \PhpCsFixer\Config(); | ||
|
||
return $config | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
// https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/master/doc/rules/index.rst | ||
|
||
'@Symfony' => true, | ||
'@Symfony:risky' => true, | ||
'@DoctrineAnnotation' => true, | ||
|
||
// Alias | ||
// Array Notation | ||
// Basic | ||
// Casing | ||
// Cast Notation | ||
// Class Notation | ||
'self_static_accessor' => true, | ||
// Class Usage | ||
// Comment | ||
'header_comment' => [ | ||
'header' => $header, | ||
'comment_type' => 'comment', | ||
'location' => 'after_declare_strict', | ||
], | ||
'comment_to_phpdoc' => [ | ||
'ignored_tags' => [ | ||
'todo' | ||
], | ||
], | ||
'multiline_comment_opening_closing' => true, | ||
'no_empty_comment' => true, | ||
// Constant Notation | ||
// Control Structure | ||
'no_useless_else' => true, | ||
'simplified_if_return' => true, | ||
// Doctrine Annotation | ||
// Function Notation | ||
'no_unreachable_default_argument_value' => true, | ||
'function_declaration' => [ | ||
'closure_function_spacing' => 'none', | ||
], | ||
'native_function_invocation' => [ | ||
'include' => ['@compiler_optimized'], | ||
'scope' => 'namespaced', | ||
'strict' => true, | ||
], | ||
'no_useless_sprintf' => true, | ||
'nullable_type_declaration_for_default_null_value' => true, | ||
'phpdoc_to_param_type' => true, | ||
'return_type_declaration' => true, | ||
'single_line_throw' => true, | ||
'static_lambda' => true, | ||
// Import | ||
// Language Construct | ||
'combine_consecutive_unsets' => true, | ||
'declare_parentheses' => true, | ||
'explicit_indirect_variable' => true, | ||
// List Notation | ||
// Namespace Notation | ||
// Naming | ||
// Operator | ||
// PHP Tag | ||
'echo_tag_syntax' => [ | ||
'format' => 'short' | ||
], | ||
// PHPUnit | ||
// PHPDoc | ||
'align_multiline_comment' => true, | ||
'phpdoc_add_missing_param_annotation' => true, | ||
'phpdoc_no_empty_return' => true, | ||
'phpdoc_order_by_value' => true, | ||
'phpdoc_order' => true, | ||
'phpdoc_tag_casing' => true, | ||
'phpdoc_var_annotation_correct_order' => true, | ||
// Return Notation | ||
'no_useless_return' => true, | ||
'return_assignment' => true, | ||
'simplified_null_return' => true, | ||
// Semicolon | ||
'multiline_whitespace_before_semicolons' => [ | ||
'strategy' => 'new_line_for_chained_calls', | ||
], | ||
// Strict | ||
'declare_strict_types' => true, | ||
'strict_comparison' => true, | ||
'strict_param' => true, | ||
// String Notation | ||
'heredoc_to_nowdoc' => true, | ||
'single_quote' => true, | ||
'string_length_to_empty' => true, | ||
]) | ||
->setFinder( | ||
PhpCsFixer\Finder::create() | ||
->exclude('trilobit') | ||
->in([ | ||
__DIR__.'/src' | ||
]) | ||
) | ||
; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
src/EventListener/DataContainer/ConstantsListener.php
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.