-
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.
* v1.6.0 [WIP][feature]: Implements validation * 1.6.0 [feature] Add TimeZone, Time, Date, DatTime validation * 1.6.0 [feature] Add Negative, Negative_or_Zero, Positive, Positive_or_Zero validators * v1.6.0 [downgrade] switch to php8.1 version * v1.6.0 [feature] Implements validators: EqualTo, NotEqualTo, GreaterThan, GreaterThanOrEqual,LessThan, LessThanOrEqual, Identical, NotIdentical, Range * v1.6.0 [feature] Implements validators: CardScheme * v1.6.0 [fix] delete debug information * v1.6.0 [compatibility] allow ^5|^6 validators * v1.6.0 [feature] Implements BIC validation * v1.6.0 [feature] Implements Currency validation * v1.6.0 [feature] Implements Luhn algorithm validation * v1.6.0 [feature] Implements Iban validation * v1.6.0 [feature] Implements Isbn validation * v1.6.0 [feature] Implements Issn validation * v1.6.0 [feature] Implements Isin validation * v1.6.0 [improvements] Implements psalm, phpstan, phpunit
- Loading branch information
Showing
133 changed files
with
5,779 additions
and
843 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,9 @@ | ||
/.github export-ignore | ||
/tests export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/.php-cs-fixer.dist.php export-ignore | ||
/psalm.xml export-ignore | ||
|
||
*.php diff=php |
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 |
---|---|---|
@@ -1,4 +1,10 @@ | ||
out/ | ||
vendor/ | ||
.idea | ||
vendor | ||
composer.lock | ||
.phpunit.result.cache | ||
.phpunit.result.cache | ||
.php-cs-fixer.cache | ||
test-coverage-report | ||
phpunit.xml | ||
coverage/ | ||
.php-cs-fixer.php | ||
phpstan.neon |
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,67 @@ | ||
<?php | ||
|
||
if (!file_exists(__DIR__.'/src')) { | ||
exit(0); | ||
} | ||
|
||
$finder = (new PhpCsFixer\Finder()) | ||
->in(__DIR__.'/src') | ||
->in(__DIR__.'/tests') | ||
; | ||
|
||
return (new PhpCsFixer\Config()) | ||
->setRules(array( | ||
'@Symfony' => true, | ||
'@Symfony:risky' => true, | ||
'protected_to_private' => false, | ||
'array_indentation' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'combine_consecutive_unsets' => true, | ||
'declare_strict_types' => true, | ||
'dir_constant' => true, | ||
'fully_qualified_strict_types' => true, | ||
'linebreak_after_opening_tag' => true, | ||
'mb_str_functions' => true, | ||
'modernize_types_casting' => true, | ||
'no_alternative_syntax' => true, | ||
'no_null_property_initialization' => true, | ||
'no_php4_constructor' => true, | ||
'no_superfluous_elseif' => true, | ||
'no_unreachable_default_argument_value' => true, | ||
'no_useless_else' => true, | ||
'no_useless_return' => true, | ||
'ordered_class_elements' => true, | ||
'ordered_imports' => true, | ||
'phpdoc_order' => true, | ||
'phpdoc_to_comment' => false, | ||
'phpdoc_types_order' => [ | ||
'null_adjustment' => 'always_last', | ||
'sort_algorithm' => 'none' | ||
], | ||
'php_unit_set_up_tear_down_visibility' => true, | ||
'pow_to_exponentiation' => true, | ||
'semicolon_after_instruction' => true, | ||
'ternary_to_null_coalescing' => true, | ||
'method_argument_space' => [ | ||
'keep_multiple_spaces_after_comma' => true, | ||
'on_multiline' => 'ensure_fully_multiline', | ||
'after_heredoc' => true, | ||
], | ||
'phpdoc_annotation_without_dot' => false, | ||
'phpdoc_var_without_name' => false, | ||
'phpdoc_trim' => true, | ||
'no_superfluous_phpdoc_tags' => false, | ||
'single_line_throw' => true, | ||
'header_comment' => [ | ||
'header' => <<<EOF | ||
This file is part of the Micro framework package. | ||
(c) Stanislau Komar <[email protected]> | ||
For the full copyright and license information, please view the LICENSE | ||
file that was distributed with this source code. | ||
EOF | ||
] | ||
)) | ||
->setRiskyAllowed(true) | ||
->setFinder($finder); |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Komar Stanislau | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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 |
---|---|---|
@@ -1,34 +1,79 @@ | ||
{ | ||
"name": "micro/dto", | ||
"description": "Micro: Library for generating DTO classes.", | ||
"keywords": ["dto", "data transfer", "transfer", "data", "object", "generator", "data transfer object", "micro"], | ||
"type": "library", | ||
"description": "Library for generating and validation DTO classes.", | ||
"license": "MIT", | ||
"version": "1.0.6", | ||
"type": "library", | ||
"keywords": [ | ||
"dto", | ||
"data transfer", | ||
"transfer", | ||
"data", | ||
"object", | ||
"generator", | ||
"data transfer object", | ||
"micro" | ||
], | ||
"authors": [ | ||
{ | ||
"name": "Stanislau Komar", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require": { | ||
"php": ">= 8.1", | ||
"ext-dom": "*", | ||
"ext-intl": "*", | ||
"ext-libxml": "*", | ||
"nette/php-generator": "^4", | ||
"psr/log": "^1 || ^2 || ^3", | ||
"symfony/intl": "^5 || ^6", | ||
"symfony/property-access": "^5 || ^6", | ||
"symfony/validator": "^5 || ^6" | ||
}, | ||
"require-dev": { | ||
"ergebnis/composer-normalize": "^2.29", | ||
"friendsofphp/php-cs-fixer": "^3.13", | ||
"phpstan/phpstan": "^1.9", | ||
"phpunit/php-code-coverage": "^9.2", | ||
"phpunit/phpunit": "^9.5", | ||
"symfony/var-dumper": "^5 || ^6", | ||
"vimeo/psalm": "^5.2" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Micro\\Library\\DTO\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Micro\\Library\\DTO\\Tests\\": "tests/", | ||
"TransferTest\\": "tests/DTO/" | ||
"TransferTest\\": "tests/DTO/", | ||
"Micro\\Library\\DTO\\Tests\\": "tests/" | ||
} | ||
}, | ||
"authors": [ | ||
{ | ||
"name": "Stanislau Komar", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require": { | ||
"php": ">= 8.0", | ||
"nette/php-generator": "^3|^4", | ||
"psr/log": "^1|^2|^3" | ||
"config": { | ||
"allow-plugins": { | ||
"ergebnis/composer-normalize": true | ||
}, | ||
"sort-packages": true | ||
}, | ||
"require-dev": { | ||
"symfony/var-dumper": "^5|^6", | ||
"phpunit/phpunit": "^9" | ||
"scripts": { | ||
"coverage": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-text", | ||
"coverage-html": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-html ./test-coverage-report", | ||
"php-cs-fix": "PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --verbose --using-cache=no", | ||
"php-cs-try": "PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --verbose --dry-run --using-cache=no", | ||
"phpstan": "./vendor/bin/phpstan analyze --no-progress", | ||
"phpunit": "./vendor/bin/phpunit", | ||
"psalm": "./vendor/bin/psalm --no-progress --show-info=true --no-cache", | ||
"statics": [ | ||
"@phpstan", | ||
"@psalm", | ||
"@php-cs-try" | ||
], | ||
"test": [ | ||
"@statics", | ||
"composer validate --strict", | ||
"composer normalize", | ||
"@coverage" | ||
] | ||
} | ||
} |
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.