Skip to content

Commit a0c22ed

Browse files
authored
php attributes (#15)
1 parent 4733876 commit a0c22ed

25 files changed

+494
-357
lines changed

.editorconfig

Lines changed: 300 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,311 @@
55
root = true
66

77
[*]
8-
# Change these settings to your own preference
9-
indent_style = space
10-
indent_size = 4
11-
12-
# We recommend you to keep these unchanged
13-
end_of_line = lf
148
charset = utf-8
15-
trim_trailing_whitespace = true
9+
end_of_line = lf
10+
indent_size = 4
11+
indent_style = space
1612
insert_final_newline = true
13+
max_line_length = 120
14+
tab_width = 4
15+
trim_trailing_whitespace = true
16+
ij_continuation_indent_size = 8
17+
ij_formatter_off_tag = @formatter:off
18+
ij_formatter_on_tag = @formatter:on
19+
ij_formatter_tags_enabled = false
20+
ij_smart_tabs = false
21+
ij_visual_guides = none
22+
ij_wrap_on_typing = false
1723

18-
[*.md]
19-
trim_trailing_whitespace = false
24+
[{*.ctp,*.engine,*.hphp,*.inc,*.install,*.module,*.php,*.php4,*.php5,*.phtml,*.profile,*.test,*.theme}]
25+
ij_continuation_indent_size = 4
26+
ij_php_align_assignments = true
27+
ij_php_align_class_constants = true
28+
ij_php_align_enum_cases = true
29+
ij_php_align_group_field_declarations = false
30+
ij_php_align_inline_comments = false
31+
ij_php_align_key_value_pairs = true
32+
ij_php_align_match_arm_bodies = true
33+
ij_php_align_multiline_array_initializer_expression = true
34+
ij_php_align_multiline_binary_operation = false
35+
ij_php_align_multiline_chained_methods = false
36+
ij_php_align_multiline_extends_list = true
37+
ij_php_align_multiline_for = false
38+
ij_php_align_multiline_parameters = true
39+
ij_php_align_multiline_parameters_in_calls = false
40+
ij_php_align_multiline_ternary_operation = false
41+
ij_php_align_named_arguments = false
42+
ij_php_align_phpdoc_comments = false
43+
ij_php_align_phpdoc_param_names = true
44+
ij_php_anonymous_brace_style = end_of_line
45+
ij_php_api_weight = 28
46+
ij_php_array_initializer_new_line_after_left_brace = true
47+
ij_php_array_initializer_right_brace_on_new_line = true
48+
ij_php_array_initializer_wrap = on_every_item
49+
ij_php_assignment_wrap = off
50+
ij_php_attributes_wrap = split_into_lines
51+
ij_php_author_weight = 28
52+
ij_php_binary_operation_sign_on_next_line = false
53+
ij_php_binary_operation_wrap = off
54+
ij_php_blank_lines_after_class_header = 0
55+
ij_php_blank_lines_after_function = 1
56+
ij_php_blank_lines_after_imports = 1
57+
ij_php_blank_lines_after_opening_tag = 1
58+
ij_php_blank_lines_after_package = 1
59+
ij_php_blank_lines_around_class = 1
60+
ij_php_blank_lines_around_constants = 0
61+
ij_php_blank_lines_around_enum_cases = 0
62+
ij_php_blank_lines_around_field = 1
63+
ij_php_blank_lines_around_method = 1
64+
ij_php_blank_lines_before_class_end = 0
65+
ij_php_blank_lines_before_imports = 1
66+
ij_php_blank_lines_before_method_body = 0
67+
ij_php_blank_lines_before_package = 1
68+
ij_php_blank_lines_before_return_statement = 1
69+
ij_php_blank_lines_between_imports = 0
70+
ij_php_block_brace_style = end_of_line
71+
ij_php_call_parameters_new_line_after_left_paren = true
72+
ij_php_call_parameters_right_paren_on_new_line = true
73+
ij_php_call_parameters_wrap = on_every_item
74+
ij_php_catch_on_new_line = false
75+
ij_php_category_weight = 28
76+
ij_php_class_brace_style = next_line
77+
ij_php_comma_after_last_argument = false
78+
ij_php_comma_after_last_array_element = true
79+
ij_php_comma_after_last_closure_use_var = false
80+
ij_php_comma_after_last_match_arm = true
81+
ij_php_comma_after_last_parameter = true
82+
ij_php_concat_spaces = true
83+
ij_php_copyright_weight = 28
84+
ij_php_deprecated_weight = 0
85+
ij_php_do_while_brace_force = always
86+
ij_php_else_if_style = separate
87+
ij_php_else_on_new_line = false
88+
ij_php_example_weight = 28
89+
ij_php_extends_keyword_wrap = off
90+
ij_php_extends_list_wrap = off
91+
ij_php_fields_default_visibility = private
92+
ij_php_filesource_weight = 28
93+
ij_php_finally_on_new_line = false
94+
ij_php_for_brace_force = always
95+
ij_php_for_statement_new_line_after_left_paren = false
96+
ij_php_for_statement_right_paren_on_new_line = false
97+
ij_php_for_statement_wrap = off
98+
ij_php_force_empty_methods_in_one_line = false
99+
ij_php_force_short_declaration_array_style = true
100+
ij_php_getters_setters_naming_style = camel_case
101+
ij_php_getters_setters_order_style = getters_first
102+
ij_php_global_weight = 28
103+
ij_php_group_use_wrap = on_every_item
104+
ij_php_if_brace_force = always
105+
ij_php_if_lparen_on_next_line = false
106+
ij_php_if_rparen_on_next_line = false
107+
ij_php_ignore_weight = 28
108+
ij_php_import_sorting = alphabetic
109+
ij_php_indent_break_from_case = true
110+
ij_php_indent_case_from_switch = true
111+
ij_php_indent_code_in_php_tags = false
112+
ij_php_internal_weight = 28
113+
ij_php_keep_blank_lines_after_lbrace = 0
114+
ij_php_keep_blank_lines_before_right_brace = 0
115+
ij_php_keep_blank_lines_in_code = 1
116+
ij_php_keep_blank_lines_in_declarations = 0
117+
ij_php_keep_control_statement_in_one_line = false
118+
ij_php_keep_first_column_comment = true
119+
ij_php_keep_indents_on_empty_lines = false
120+
ij_php_keep_line_breaks = true
121+
ij_php_keep_rparen_and_lbrace_on_one_line = true
122+
ij_php_keep_simple_classes_in_one_line = false
123+
ij_php_keep_simple_methods_in_one_line = false
124+
ij_php_lambda_brace_style = end_of_line
125+
ij_php_license_weight = 28
126+
ij_php_line_comment_add_space = false
127+
ij_php_line_comment_at_first_column = true
128+
ij_php_link_weight = 28
129+
ij_php_lower_case_boolean_const = true
130+
ij_php_lower_case_keywords = true
131+
ij_php_lower_case_null_const = true
132+
ij_php_method_brace_style = next_line
133+
ij_php_method_call_chain_wrap = on_every_item
134+
ij_php_method_parameters_new_line_after_left_paren = true
135+
ij_php_method_parameters_right_paren_on_new_line = true
136+
ij_php_method_parameters_wrap = on_every_item
137+
ij_php_method_weight = 28
138+
ij_php_modifier_list_wrap = false
139+
ij_php_multiline_chained_calls_semicolon_on_new_line = true
140+
ij_php_namespace_brace_style = 1
141+
ij_php_new_line_after_php_opening_tag = false
142+
ij_php_null_type_position = in_the_end
143+
ij_php_package_weight = 28
144+
ij_php_param_weight = 2
145+
ij_php_parameters_attributes_wrap = split_into_lines
146+
ij_php_parentheses_expression_new_line_after_left_paren = false
147+
ij_php_parentheses_expression_right_paren_on_new_line = false
148+
ij_php_phpdoc_blank_line_before_tags = true
149+
ij_php_phpdoc_blank_lines_around_parameters = true
150+
ij_php_phpdoc_keep_blank_lines = true
151+
ij_php_phpdoc_param_spaces_between_name_and_description = 4
152+
ij_php_phpdoc_param_spaces_between_tag_and_type = 1
153+
ij_php_phpdoc_param_spaces_between_type_and_name = 1
154+
ij_php_phpdoc_use_fqcn = false
155+
ij_php_phpdoc_wrap_long_lines = false
156+
ij_php_place_assignment_sign_on_next_line = false
157+
ij_php_place_parens_for_constructor = 1
158+
ij_php_property_read_weight = 28
159+
ij_php_property_weight = 28
160+
ij_php_property_write_weight = 28
161+
ij_php_return_type_on_new_line = false
162+
ij_php_return_weight = 3
163+
ij_php_see_weight = 1
164+
ij_php_since_weight = 28
165+
ij_php_sort_phpdoc_elements = true
166+
ij_php_space_after_colon = true
167+
ij_php_space_after_colon_in_enum_backed_type = true
168+
ij_php_space_after_colon_in_named_argument = true
169+
ij_php_space_after_colon_in_return_type = true
170+
ij_php_space_after_comma = true
171+
ij_php_space_after_for_semicolon = true
172+
ij_php_space_after_quest = true
173+
ij_php_space_after_type_cast = true
174+
ij_php_space_after_unary_not = false
175+
ij_php_space_before_array_initializer_left_brace = false
176+
ij_php_space_before_catch_keyword = true
177+
ij_php_space_before_catch_left_brace = true
178+
ij_php_space_before_catch_parentheses = true
179+
ij_php_space_before_class_left_brace = true
180+
ij_php_space_before_closure_left_parenthesis = false
181+
ij_php_space_before_colon = true
182+
ij_php_space_before_colon_in_enum_backed_type = false
183+
ij_php_space_before_colon_in_named_argument = false
184+
ij_php_space_before_colon_in_return_type = false
185+
ij_php_space_before_comma = false
186+
ij_php_space_before_do_left_brace = true
187+
ij_php_space_before_else_keyword = true
188+
ij_php_space_before_else_left_brace = true
189+
ij_php_space_before_finally_keyword = true
190+
ij_php_space_before_finally_left_brace = true
191+
ij_php_space_before_for_left_brace = true
192+
ij_php_space_before_for_parentheses = true
193+
ij_php_space_before_for_semicolon = false
194+
ij_php_space_before_if_left_brace = true
195+
ij_php_space_before_if_parentheses = true
196+
ij_php_space_before_method_call_parentheses = false
197+
ij_php_space_before_method_left_brace = true
198+
ij_php_space_before_method_parentheses = false
199+
ij_php_space_before_quest = true
200+
ij_php_space_before_short_closure_left_parenthesis = false
201+
ij_php_space_before_switch_left_brace = true
202+
ij_php_space_before_switch_parentheses = true
203+
ij_php_space_before_try_left_brace = true
204+
ij_php_space_before_unary_not = false
205+
ij_php_space_before_while_keyword = true
206+
ij_php_space_before_while_left_brace = true
207+
ij_php_space_before_while_parentheses = true
208+
ij_php_space_between_ternary_quest_and_colon = false
209+
ij_php_spaces_around_additive_operators = true
210+
ij_php_spaces_around_arrow = false
211+
ij_php_spaces_around_assignment_in_declare = false
212+
ij_php_spaces_around_assignment_operators = true
213+
ij_php_spaces_around_bitwise_operators = true
214+
ij_php_spaces_around_equality_operators = true
215+
ij_php_spaces_around_logical_operators = true
216+
ij_php_spaces_around_multiplicative_operators = true
217+
ij_php_spaces_around_null_coalesce_operator = true
218+
ij_php_spaces_around_pipe_in_union_type = false
219+
ij_php_spaces_around_relational_operators = true
220+
ij_php_spaces_around_shift_operators = true
221+
ij_php_spaces_around_unary_operator = false
222+
ij_php_spaces_around_var_within_brackets = false
223+
ij_php_spaces_within_array_initializer_braces = false
224+
ij_php_spaces_within_brackets = false
225+
ij_php_spaces_within_catch_parentheses = false
226+
ij_php_spaces_within_for_parentheses = false
227+
ij_php_spaces_within_if_parentheses = false
228+
ij_php_spaces_within_method_call_parentheses = false
229+
ij_php_spaces_within_method_parentheses = false
230+
ij_php_spaces_within_parentheses = false
231+
ij_php_spaces_within_short_echo_tags = true
232+
ij_php_spaces_within_switch_parentheses = false
233+
ij_php_spaces_within_while_parentheses = false
234+
ij_php_special_else_if_treatment = true
235+
ij_php_subpackage_weight = 28
236+
ij_php_ternary_operation_signs_on_next_line = false
237+
ij_php_ternary_operation_wrap = off
238+
ij_php_throws_weight = 4
239+
ij_php_todo_weight = 28
240+
ij_php_treat_multiline_arrays_and_lambdas_multiline = false
241+
ij_php_unknown_tag_weight = 28
242+
ij_php_upper_case_boolean_const = false
243+
ij_php_upper_case_null_const = false
244+
ij_php_uses_weight = 28
245+
ij_php_var_weight = 28
246+
ij_php_variable_naming_style = camel_case
247+
ij_php_version_weight = 28
248+
ij_php_while_brace_force = always
249+
ij_php_while_on_new_line = false
20250

21-
[*.js]
22-
indent_size = 2
251+
[{*.markdown,*.md}]
252+
ij_markdown_force_one_space_after_blockquote_symbol = true
253+
ij_markdown_force_one_space_after_header_symbol = true
254+
ij_markdown_force_one_space_after_list_bullet = true
255+
ij_markdown_force_one_space_between_words = true
256+
ij_markdown_format_tables = true
257+
ij_markdown_insert_quote_arrows_on_wrap = true
258+
ij_markdown_keep_indents_on_empty_lines = false
259+
ij_markdown_keep_line_breaks_inside_text_blocks = true
260+
ij_markdown_max_lines_around_block_elements = 1
261+
ij_markdown_max_lines_around_header = 1
262+
ij_markdown_max_lines_between_paragraphs = 1
263+
ij_markdown_min_lines_around_block_elements = 1
264+
ij_markdown_min_lines_around_header = 1
265+
ij_markdown_min_lines_between_paragraphs = 1
266+
ij_markdown_wrap_text_if_long = true
267+
ij_markdown_wrap_text_inside_blockquotes = true
23268

24-
[*.json]
269+
[{*.har,*.jsb2,*.jsb3,*.json,.babelrc,.eslintrc,.prettierrc,.stylelintrc,bowerrc,composer.lock,jest.config}]
25270
indent_size = 2
271+
ij_json_array_wrapping = split_into_lines
272+
ij_json_keep_blank_lines_in_code = 0
273+
ij_json_keep_indents_on_empty_lines = false
274+
ij_json_keep_line_breaks = true
275+
ij_json_keep_trailing_comma = false
276+
ij_json_object_wrapping = split_into_lines
277+
ij_json_property_alignment = do_not_align
278+
ij_json_space_after_colon = true
279+
ij_json_space_after_comma = true
280+
ij_json_space_before_colon = false
281+
ij_json_space_before_comma = false
282+
ij_json_spaces_within_braces = false
283+
ij_json_spaces_within_brackets = false
284+
ij_json_wrap_long_lines = false
26285

27-
[*.{yml,yaml}]
28-
indent_size = 4
286+
[{*.yaml,*.yml}]
287+
ij_yaml_align_values_properties = do_not_align
288+
ij_yaml_autoinsert_sequence_marker = true
289+
ij_yaml_block_mapping_on_new_line = false
290+
ij_yaml_indent_sequence_value = true
291+
ij_yaml_keep_indents_on_empty_lines = false
292+
ij_yaml_keep_line_breaks = true
293+
ij_yaml_sequence_on_new_line = true
294+
ij_yaml_space_before_colon = false
295+
ij_yaml_spaces_within_braces = true
296+
ij_yaml_spaces_within_brackets = true
29297

30-
[*.sh]
31-
indent_size = 2
298+
[{*.ant,*.fxml,*.jhm,*.jnlp,*.jrxml,*.rng,*.tld,*.wsdl,*.xml,*.xsd,*.xsl,*.xslt,*.xul,phpunit.xml.dist}]
299+
ij_xml_align_attributes = true
300+
ij_xml_align_text = false
301+
ij_xml_attribute_wrap = normal
302+
ij_xml_block_comment_add_space = false
303+
ij_xml_block_comment_at_first_column = true
304+
ij_xml_keep_blank_lines = 2
305+
ij_xml_keep_indents_on_empty_lines = false
306+
ij_xml_keep_line_breaks = true
307+
ij_xml_keep_line_breaks_in_text = true
308+
ij_xml_keep_whitespaces = false
309+
ij_xml_keep_whitespaces_around_cdata = preserve
310+
ij_xml_keep_whitespaces_inside_cdata = false
311+
ij_xml_line_comment_at_first_column = true
312+
ij_xml_space_after_tag_name = false
313+
ij_xml_space_around_equals_in_attribute = false
314+
ij_xml_space_inside_empty_tag = false
315+
ij_xml_text_wrap = normal

.github/workflows/ci.yaml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ jobs:
1515
runs-on: "ubuntu-20.04"
1616

1717
strategy:
18+
fail-fast: false
1819
matrix:
20+
experimental: [ false ]
21+
composer-options: [ "--prefer-stable" ]
1922
php-version:
20-
- "7.1"
21-
- "7.2"
22-
- "7.3"
23-
- "7.4"
24-
- "8.0"
23+
- "8.1"
24+
- "8.2"
2525
dependencies:
2626
- "highest"
27-
include:
28-
- php-version: "7.1"
29-
dependencies: "lowest"
27+
symfony-require:
28+
- "5.4.*"
29+
- "^6.0"
3030

3131
steps:
3232
- name: "Checkout"
@@ -40,11 +40,15 @@ jobs:
4040
php-version: "${{ matrix.php-version }}"
4141
coverage: "xdebug"
4242
ini-values: "zend.assertions=1"
43+
tools: "flex"
4344

4445
- name: "Install dependencies with Composer"
4546
uses: "ramsey/composer-install@v1"
47+
env:
48+
SYMFONY_REQUIRE: "${{ matrix.symfony-require }}"
4649
with:
4750
dependency-versions: "${{ matrix.dependencies }}"
51+
composer-options: "${{ matrix.composer-options }}"
4852

4953
- name: "Run PHPUnit"
5054
run: "vendor/bin/phpunit"

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [2.1.0] - 2022-12-14
8+
### Added
9+
- Symfony 6.x support
10+
11+
### Changed
12+
- **Breaking:** `MutexRequest` is now a PHP Attribute and does no longer support Doctrine annotations.
13+
14+
### Removed
15+
- **Breaking:** Drop PHP 7.4 and 8.0 support.
16+
- **Breaking:** Drop Symfony 4.4 support.
17+
- Drop `doctrine/annotations` dependency.
18+
719
## [2.0.0] - 2021-10-12
820
### Added
921
- `IXarlie\MutexBundle\Exception\MutexException` as a new `HttpException` with `423` http status code

0 commit comments

Comments
 (0)