diff --git a/.cs.php b/.cs.php index 2bba5e9..52c4c3e 100644 --- a/.cs.php +++ b/.cs.php @@ -19,7 +19,7 @@ 'array_syntax' => ['syntax' => 'short'], 'cast_spaces' => ['space' => 'none'], 'concat_space' => ['spacing' => 'one'], - 'compact_nullable_typehint' => true, + 'compact_nullable_type_declaration' => true, 'declare_equal_normalize' => ['space' => 'single'], 'general_phpdoc_annotation_remove' => [ 'annotations' => [ @@ -36,7 +36,11 @@ 'phpdoc_order' => true, // psr-5 'phpdoc_no_useless_inheritdoc' => false, 'protected_to_private' => false, - 'yoda_style' => false, + 'yoda_style' => [ + 'equal' => false, + 'identical' => false, + 'less_and_greater' => false + ], 'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'], 'ordered_imports' => [ 'sort_algorithm' => 'alpha', diff --git a/LICENSE b/LICENSE index bf7a9a3..bfcf021 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2023 odan +Copyright (c) 2025 odan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 72b0e95..052e960 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ A strictly typed configuration component for PHP. Inspired by [Apache Commons Co ## Requirements -* PHP 8.1+ +* PHP 8.1 - 8.4 ## Installation diff --git a/composer.json b/composer.json index 67f4e69..85d933b 100644 --- a/composer.json +++ b/composer.json @@ -13,12 +13,12 @@ ], "homepage": "https://github.com/selective-php/config", "require": { - "php": "^8.1", + "php": "8.1.* || 8.2.* || 8.3.* || 8.4.*", "cakephp/chronos": "^2 || ^3" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3", - "phpstan/phpstan": "^1", + "phpstan/phpstan": "^1 || ^2", "phpunit/phpunit": "^10", "squizlabs/php_codesniffer": "^3" }, @@ -47,13 +47,16 @@ "sniffer:check": "phpcs --standard=phpcs.xml", "sniffer:fix": "phpcbf --standard=phpcs.xml", "stan": "phpstan analyse -c phpstan.neon --no-progress --ansi", - "test": "phpunit --configuration phpunit.xml --do-not-cache-result --colors=always", + "test": "phpunit --configuration phpunit.xml --do-not-cache-result --colors=always --display-warnings --display-deprecations --no-coverage", "test:all": [ "@cs:check", "@sniffer:check", "@stan", "@test" ], - "test:coverage": "php -d xdebug.mode=coverage -r \"require 'vendor/bin/phpunit';\" -- --configuration phpunit.xml --do-not-cache-result --colors=always --coverage-clover build/logs/clover.xml --coverage-html build/coverage" + "test:coverage": [ + "@putenv XDEBUG_MODE=coverage", + "phpunit --configuration phpunit.xml --do-not-cache-result --colors=always --display-warnings --display-deprecations --coverage-clover build/coverage/clover.xml --coverage-html build/coverage --coverage-text" + ] } }