Skip to content

Commit

Permalink
PHP 5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
magicsunday committed Apr 9, 2024
1 parent 51f9780 commit ffecc6d
Show file tree
Hide file tree
Showing 36 changed files with 193 additions and 378 deletions.
14 changes: 1 addition & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ '8.1', '8.2', '8.3' ]
php: [ '5.6' ]

steps:
- id: checkout
Expand Down Expand Up @@ -62,18 +62,6 @@ jobs:
run: |
php-cs-fixer fix --dry-run --verbose
- id: phpstan
name: PHPStan
if: ${{ always() && steps.install.conclusion == 'success' }}
run: |
composer ci:test:php:phpstan -- --error-format=github
- id: rector
name: Rector
if: ${{ always() && steps.install.conclusion == 'success' }}
run: |
composer ci:test:php:rector
- id: tests_unit
name: Unit Tests
if: ${{ always() && steps.install.conclusion == 'success' }}
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ composer.lock

# Cache
.php-cs-fixer.cache
.php_cs.cache
.phplint.cache
.phpunit.result.cache
.phpunit.cache

# Custom
/test/
18 changes: 3 additions & 15 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@
->setRiskyAllowed(true)
->setRules([
'@PSR12' => true,
'@PER-CS2.0' => true,
'@Symfony' => true,

// Additional custom rules
'declare_strict_types' => true,
'declare_strict_types' => false,
'concat_space' => [
'spacing' => 'one',
],
Expand All @@ -57,19 +56,9 @@
'phpdoc_to_comment' => false,
'phpdoc_no_alias_tag' => false,
'no_superfluous_phpdoc_tags' => false,
'phpdoc_separation' => [
'groups' => [
[
'author',
'license',
'link',
],
],
],
'phpdoc_separation' => true,
'no_alias_functions' => true,
'whitespace_after_comma_in_array' => [
'ensure_single_space' => true,
],
'whitespace_after_comma_in_array' => true,
'single_line_throw' => false,
'self_accessor' => false,
'global_namespace_import' => [
Expand All @@ -79,7 +68,6 @@
],
'function_declaration' => [
'closure_function_spacing' => 'one',
'closure_fn_spacing' => 'one',
],
'binary_operator_spaces' => [
'operators' => [
Expand Down
1 change: 1 addition & 0 deletions .php_cs.cache
Original file line number Diff line number Diff line change
@@ -0,0 +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}}
35 changes: 10 additions & 25 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,19 @@
"issues": "https://github.com/magicsunday/jsonmapper/issues"
},
"require": {
"php": ">=8.1.0 <8.4.0",
"php": ">=5.6.0 <7.0.0",
"ext-json": "*",
"symfony/property-info": "^6.0 || ^7.0",
"symfony/property-access": "^6.0 || ^7.0",
"doctrine/inflector": "^2.0",
"doctrine/annotations": "^2.0"
"symfony/property-info": "^3.4",
"symfony/property-access": "^3.4",
"doctrine/inflector": "^1.1",
"doctrine/annotations": "^1.4"
},
"require-dev": {
"phpdocumentor/reflection-docblock": "^5.0",
"friendsofphp/php-cs-fixer": "^3.50",
"overtrue/phplint": "^3.4 || ^9.0",
"phpunit/phpunit": "^10.0 || ^11.0",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-phpunit": "^1.3",
"phpstan/phpstan-strict-rules": "^1.5",
"phpstan/phpstan-deprecation-rules": "^1.1",
"rector/rector": "^1.0"
"symfony/phpunit-bridge": "^5.0",
"phpdocumentor/reflection-docblock": "^3.3",
"friendsofphp/php-cs-fixer": "^2.19",
"overtrue/phplint": "^2.4",
"phpunit/phpunit": "^5.7"
},
"suggest": {
"phpdocumentor/reflection-docblock": "In order to use the PhpDocExtractor this library is required too."
Expand Down Expand Up @@ -60,19 +56,8 @@
"ci:test:php:unit": [
"phpunit"
],
"ci:test:php:phpstan": [
"phpstan analyze"
],
"ci:test:php:phpstan:baseline": [
"phpstan analyze --generate-baseline phpstan-baseline.neon --allow-empty-baseline"
],
"ci:test:php:rector": [
"rector process --config rector.php --dry-run"
],
"ci:test": [
"@ci:test:php:lint",
"@ci:test:php:phpstan",
"@ci:test:php:rector",
"@ci:test:php:unit"
],
"ci:cgl": [
Expand Down
6 changes: 0 additions & 6 deletions phpstan-baseline.neon

This file was deleted.

18 changes: 0 additions & 18 deletions phpstan.neon

This file was deleted.

13 changes: 6 additions & 7 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/5.7/phpunit.xsd"
colors="true"
columns="max"
stderr="true"
bootstrap="./.build/vendor/autoload.php"
cacheDirectory=".phpunit.cache"
>
<testsuites>
<testsuite name="Integration Tests">
<directory>./test</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory>./src</directory>
</include>
</source>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
</phpunit>
62 changes: 0 additions & 62 deletions rector.php

This file was deleted.

Loading

0 comments on commit ffecc6d

Please sign in to comment.