Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ phpmd-ci: prepare-ci ## Run PHP Mess Detector (CI)
PHPMD_FORMAT="github" $(MAKE) phpmd
.PHONY: phpmd phpmd-ci

PHPSTAN_LEVEL ?= max
PHPSTAN_LEVEL ?= 9
phpstan: ## Run PHPStan
vendor/bin/phpstan analyse --configuration=phpstan.neon --memory-limit=-1 --level=$(PHPSTAN_LEVEL) $(EXTRA_ARGS) src tests
phpstan-ci: prepare-ci ## Run PHPStan (CI)
Expand Down
17 changes: 9 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@
"type": "phpcodesniffer-standard",
"license": "MIT",
"require": {
"php": "^8.3",
"squizlabs/php_codesniffer": "^3.8",
"slevomat/coding-standard": "^8.14",
"php": "^8.4",
"squizlabs/php_codesniffer": "^4.0",
"slevomat/coding-standard": "^8.24",
"phpmd/phpmd": "^2.15",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-phpunit": "^1.3",
"jangregor/phpstan-prophecy": "^1.0",
"phpspec/prophecy-phpunit": "^2.1",
"phpunit/phpunit": "^10.5 || ^11.0"
"phpstan/phpstan": "^2.1",
"phpstan/phpstan-phpunit": "^2.0",
"phpstan/phpstan-symfony": "^2.0",
"jangregor/phpstan-prophecy": "^2.2",
"phpspec/prophecy-phpunit": "^2.4",
"phpunit/phpunit": "^11.0 || ^12.4"
},
"require-dev": {
"roave/security-advisories": "dev-latest"
Expand Down
41 changes: 20 additions & 21 deletions lib/phpcs/rules/base.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,26 @@
<!-- Forbid alias functions, i.e. `sizeof()`, `delete()` -->
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array"
value="
chop => rtrim,
close => closedir,
delete => unset,
doubleval => floatval,
fputs => fwrite,
ini_alter => ini_set,
is_double => is_float,
is_integer => is_int,
is_long => is_int,
is_null => null,
is_real => is_float,
is_writeable => is_writable,
join => implode,
key_exists => array_key_exists,
pos => current,
show_source => highlight_file,
sizeof => count,
strchr => strstr
"/>
<property name="forbiddenFunctions" type="array">
<element key="chop" value="rtrim" />
<element key="close" value="closedir" />
<element key="delete" value="unset" />
<element key="doubleval" value="floatval" />
<element key="fputs" value="fwrite" />
<element key="ini_alter" value="ini_set" />
<element key="is_double" value="is_float" />
<element key="is_integer" value="is_int" />
<element key="is_long" value="is_int" />
<element key="is_null" value="null" />
<element key="is_real" value="is_float" />
<element key="is_writeable" value="is_writable" />
<element key="join" value="implode" />
<element key="key_exists" value="array_key_exists" />
<element key="pos" value="current" />
<element key="show_source" value="highlight_file" />
<element key="sizeof" value="count" />
<element key="strchr" value="strstr" />
</property>
</properties>
</rule>
<!-- Forbid useless inline string concatenation -->
Expand Down
4 changes: 2 additions & 2 deletions lib/phpcs/rules/slevomat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,10 @@
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification" />
</rule>
<!-- Checks format of union type hints. -->
<rule ref="SlevomatCodingStandard.TypeHints.UnionTypeHintFormat">
<rule ref="SlevomatCodingStandard.TypeHints.DNFTypeHintFormat">
<properties>
<!-- Union type must be separated by | without spaces -->
<property name="withSpaces" value="no"/>
<property name="withSpacesAroundOperators" value="no"/>
</properties>
</rule>
<!-- Reports useless @var annotation (or whole documentation comment) for constants because the type of constant is always clear. -->
Expand Down
Loading