Skip to content

Commit 9b14fd8

Browse files
committed
PHP56 adjustments
1 parent db4168c commit 9b14fd8

36 files changed

+141
-322
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
php: [ '7.3', '7.4', '8.0' ]
14+
php: [ '5.6' ]
1515

1616
steps:
1717
- id: checkout
@@ -62,18 +62,6 @@ jobs:
6262
run: |
6363
composer ci:cgl -- --dry-run
6464
65-
- id: phpstan
66-
name: PHPStan
67-
if: ${{ always() && steps.install.conclusion == 'success' }}
68-
run: |
69-
composer ci:test:php:phpstan -- --error-format=github
70-
71-
- id: rector
72-
name: Rector
73-
if: ${{ always() && steps.install.conclusion == 'success' }}
74-
run: |
75-
composer ci:test:php:rector
76-
7765
- id: tests_unit
7866
name: Unit Tests
7967
if: ${{ always() && steps.install.conclusion == 'success' }}

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,3 @@ composer.lock
2121
.phpunit.cache
2222

2323
# Custom
24-
/test/

.php-cs-fixer.dist.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
'@Symfony' => true,
4444

4545
// Additional custom rules
46-
'declare_strict_types' => true,
46+
'declare_strict_types' => false,
4747
'concat_space' => [
4848
'spacing' => 'one',
4949
],

.php_cs.cache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"php":"8.2.17","version":"2.19.3:v2.19.3#75ac86f33fab4714ea5a39a396784d83ae3b5ed8","indent":" ","lineEnding":"\n","rules":{"blank_line_after_opening_tag":true,"braces":{"allow_single_line_anonymous_class_with_empty_body":true,"allow_single_line_closure":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":{"order":["use_trait"]},"ordered_imports":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,"class_definition":{"single_line":true},"constant_case":true,"elseif":true,"function_declaration":{"closure_function_spacing":"one"},"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":true,"no_break_comment":true,"no_closing_tag":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_class_element_per_statement":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_syntax":{"syntax":"short"},"backtick_to_shell_exec":true,"binary_operator_spaces":{"operators":{"=":"align_single_space_minimal","=>":"align_single_space_minimal"}},"blank_line_before_statement":{"statements":["return","if","throw"]},"cast_spaces":true,"class_attributes_separation":{"elements":{"method":"one"}},"clean_namespace":true,"concat_space":{"spacing":"one"},"echo_tag_syntax":true,"fully_qualified_strict_types":true,"function_typehint_space":true,"general_phpdoc_tag_rename":{"replacements":{"inheritDocs":"inheritDoc"}},"include":true,"increment_style":true,"lambda_not_used_import":true,"linebreak_after_opening_tag":true,"magic_constant_casing":true,"magic_method_casing":true,"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":["case","continue","curly_brace_block","default","extra","parenthesis_brace_block","square_brace_block","switch","throw","use","use_trait"]},"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_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,"php_unit_fqcn_annotation":true,"php_unit_method_casing":true,"phpdoc_align":{"tags":["method","param","property","return","throws","type","var"]},"phpdoc_annotation_without_dot":true,"phpdoc_indent":true,"phpdoc_inline_tag_normalizer":true,"phpdoc_no_access":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_trim":true,"phpdoc_trim_consecutive_blank_line_separation":true,"phpdoc_types":true,"phpdoc_types_order":{"null_adjustment":"always_last","sort_algorithm":"none"},"phpdoc_var_without_name":true,"protected_to_private":true,"semicolon_after_instruction":true,"single_line_comment_style":{"comment_types":["hash"]},"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,"unary_operator_spaces":true,"whitespace_after_comma_in_array":true,"yoda_style":{"equal":false,"identical":false,"less_and_greater":false,"always_move_variable":false},"header_comment":{"header":"This file is part of the package magicsunday\/jsonmapper.\n\nFor the full copyright and license information, please read the\nLICENSE file that was distributed with this source code.","comment_type":"PHPDoc","location":"after_open","separate":"both"},"no_alias_functions":true,"global_namespace_import":{"import_classes":true,"import_constants":true,"import_functions":true}},"hashes":{"src\/JsonMapper.php":267040816,"src\/JsonMapper\/Annotation\/ReplaceProperty.php":959442023,"src\/JsonMapper\/Annotation\/ReplaceNullWithDefaultValue.php":1601690386,"src\/JsonMapper\/Converter\/CamelCasePropertyNameConverter.php":2881120086,"src\/JsonMapper\/Converter\/PropertyNameConverterInterface.php":3642027963,"rector.php":497958059,"test\/Classes\/Simple.php":4224730192,"test\/Classes\/CustomConstructor.php":3617109242,"test\/Classes\/MultidimensionalArray.php":1188723047,"test\/Classes\/VariadicSetterClass.php":2400783425,"test\/Classes\/Person.php":2133098368,"test\/Classes\/PlainArrayClass.php":376542333,"test\/Classes\/VipPerson.php":2793682997,"test\/Classes\/MapPlainArrayKeyValueClass.php":167325638,"test\/Classes\/Collection.php":2436348255,"test\/Classes\/Initialized.php":3767725526,"test\/Classes\/CustomClass.php":2445941503,"test\/Classes\/ClassMap\/SourceItem.php":2276858995,"test\/Classes\/ClassMap\/CollectionTarget.php":1584121411,"test\/Classes\/ClassMap\/TargetItem.php":2295790439,"test\/Classes\/ClassMap\/CollectionSource.php":2644840146,"test\/Classes\/ReplacePropertyTestClass.php":1360745770,"test\/Classes\/Base.php":1962955433,"test\/Annotation\/ReplacePropertyTest.php":828584376,"test\/TestCase.php":1771366670,"test\/Converter\/CamelCasePropertyNameConverterTest.php":2408713842,"test\/JsonMapperTest.php":3896490306,"test\/Provider\/DataProvider.php":343500605}}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
SOFTWARE.

composer.json

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,19 @@
1414
"issues": "https://github.com/magicsunday/jsonmapper/issues"
1515
},
1616
"require": {
17-
"php": ">=7.3.0 <8.1.0",
17+
"php": ">=5.6.0 <7.0.0",
1818
"ext-json": "*",
19-
"symfony/property-info": "^5.0 || ^6.0 || ^7.0",
20-
"symfony/property-access": "^5.0 || ^6.0 || ^7.0",
21-
"doctrine/inflector": "^1.0 || ^2.0",
22-
"doctrine/annotations": "^1.0 || ^2.0"
19+
"symfony/property-info": "^3.4",
20+
"symfony/property-access": "^3.4",
21+
"doctrine/inflector": "^1.1",
22+
"doctrine/annotations": "^1.4"
2323
},
2424
"require-dev": {
25-
"phpdocumentor/reflection-docblock": "^4.0 || ^5.0",
25+
"symfony/phpunit-bridge": "^5.0",
26+
"phpdocumentor/reflection-docblock": "^3.3",
2627
"friendsofphp/php-cs-fixer": "^2.0",
27-
"overtrue/phplint": "^2.0 || ^3.0 || ^9.0",
28-
"phpunit/phpunit": "^9.0 || ^10.0 || ^11.0",
29-
"phpstan/phpstan": "^1.10",
30-
"phpstan/phpstan-phpunit": "^1.3",
31-
"phpstan/phpstan-strict-rules": "^1.5",
32-
"phpstan/phpstan-deprecation-rules": "^1.1",
33-
"rector/rector": "^1.0"
28+
"overtrue/phplint": "^2.4",
29+
"phpunit/phpunit": "^5.7"
3430
},
3531
"suggest": {
3632
"phpdocumentor/reflection-docblock": "In order to use the PhpDocExtractor this library is required too."
@@ -46,6 +42,9 @@
4642
}
4743
},
4844
"config": {
45+
"platform": {
46+
"php": "5.6"
47+
},
4948
"bin-dir": ".build/bin",
5049
"vendor-dir": ".build/vendor",
5150
"discard-changes": true,
@@ -60,19 +59,8 @@
6059
"ci:test:php:unit": [
6160
"phpunit"
6261
],
63-
"ci:test:php:phpstan": [
64-
"phpstan analyze"
65-
],
66-
"ci:test:php:phpstan:baseline": [
67-
"phpstan analyze --generate-baseline phpstan-baseline.neon --allow-empty-baseline"
68-
],
69-
"ci:test:php:rector": [
70-
"rector process --config rector.php --dry-run"
71-
],
7262
"ci:test": [
7363
"@ci:test:php:lint",
74-
"@ci:test:php:phpstan",
75-
"@ci:test:php:rector",
7664
"@ci:test:php:unit"
7765
],
7866
"ci:cgl": [

phpstan.neon

Lines changed: 0 additions & 19 deletions
This file was deleted.

phpunit.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/5.7/phpunit.xsd"
44
colors="true"
55
columns="max"
66
stderr="true"
@@ -11,9 +11,9 @@
1111
<directory>./test</directory>
1212
</testsuite>
1313
</testsuites>
14-
<coverage>
15-
<include>
14+
<filter>
15+
<whitelist processUncoveredFilesFromWhitelist="true">
1616
<directory suffix=".php">./src</directory>
17-
</include>
18-
</coverage>
17+
</whitelist>
18+
</filter>
1919
</phpunit>

rector.php

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)