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 .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
php: ['8.3']
php: ['8.4', '8.5']

steps:
- name: Checkout Code
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2.3.2
=====

* (improvement) Add support for Symfony 8
* (improvement) Require PHP 8.4


2.3.1
=====

Expand Down
23 changes: 12 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
],
"homepage": "https://github.com/21TORR/bundle-helpers",
"require": {
"php": ">= 8.3",
"symfony/config": "^7.1",
"symfony/dependency-injection": "^7.1",
"symfony/http-kernel": "^7.1"
"php": ">= 8.4",
"symfony/config": "^7.4 || ^8.0",
"symfony/dependency-injection": "^7.4 || ^8.0",
"symfony/http-kernel": "^7.4 || ^8.0"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8",
"roave/security-advisories": "dev-latest",
"symfony/phpunit-bridge": "^7.1"
"bamarni/composer-bin-plugin": "^1.8.2",
"phpunit/phpunit": "^13.0.5",
"roave/security-advisories": "dev-latest"
},
"autoload": {
"psr-4": {
Expand All @@ -33,6 +33,7 @@
},
"config": {
"allow-plugins": {
"21torr/janus": true,
"bamarni/composer-bin-plugin": true
},
"sort-packages": true
Expand All @@ -49,15 +50,15 @@
"scripts": {
"fix-lint": [
"@composer bin c-norm normalize \"$(pwd)/composer.json\" --indent-style tab --indent-size 1 --ansi",
"vendor-bin/cs-fixer/vendor/bin/php-cs-fixer fix --diff --config vendor-bin/cs-fixer/vendor/21torr/php-cs-fixer/.php-cs-fixer.dist.php --no-interaction --ansi"
"vendor-bin/cs-fixer/vendor/bin/php-cs-fixer fix --diff --config vendor-bin/cs-fixer/vendor/21torr/php-cs-fixer/.php-cs-fixer.dist.php --allow-unsupported-php-version=yes --no-interaction --ansi"
],
"lint": [
"@composer bin c-norm normalize \"$(pwd)/composer.json\" --indent-style tab --indent-size 1 --dry-run --ansi",
"vendor-bin/cs-fixer/vendor/bin/php-cs-fixer check --diff --config vendor-bin/cs-fixer/vendor/21torr/php-cs-fixer/.php-cs-fixer.dist.php --no-interaction --ansi"
"vendor-bin/cs-fixer/vendor/bin/php-cs-fixer check --diff --config vendor-bin/cs-fixer/vendor/21torr/php-cs-fixer/.php-cs-fixer.dist.php --allow-unsupported-php-version=yes --no-interaction --ansi"
],
"test": [
"simple-phpunit",
"phpunit",
"vendor-bin/phpstan/vendor/bin/phpstan analyze -c phpstan.neon . --ansi -v"
]
}
}
}
50 changes: 46 additions & 4 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,6 +1,48 @@
includes:
- vendor-bin/janus/vendor/21torr/janus/phpstan/lib.neon
# This file was copied manually von Janus, as we need to exclude the custom rule

parameters:
bootstrapFiles:
- vendor/bin/.phpunit/phpunit/vendor/autoload.php
level: 9

editorUrl: 'phpstorm://open?file=%%file%%&line=%%line%%'

checkDynamicProperties: true
checkExplicitMixedMissingReturn: true
checkUninitializedProperties: true
inferPrivatePropertyTypeFromConstructor: true
polluteScopeWithLoopInitialAssignments: false
reportPossiblyNonexistentConstantArrayOffset: true
reportUnmatchedIgnoredErrors: false
treatPhpDocTypesAsCertain: false

# Disable these settings here, as they currently crash in PHPStan v2
#excludePaths:
# analyse:
# - %currentWorkingDirectory%/vendor
# analyseAndScan:
# - %currentWorkingDirectory%/node_modules (?)
# - %currentWorkingDirectory%/var (?)
# - %currentWorkingDirectory%/vendor-bin

ignoreErrors:
- message: "#^Attribute class JetBrains\\\\PhpStorm\\\\.*? does not exist\\.$#"
- identifier: missingType.iterableValue
-
identifier: argument.type
path: %currentWorkingDirectory%/tests/*
-
identifier: staticMethod.alreadyNarrowedType
path: %currentWorkingDirectory%/tests/*
-
identifier: method.deprecated
path: %currentWorkingDirectory%/tests/*
# Using this will have a lot of false-positives, as entities are often used as form
# entries and there the fields need to be nullable.
- identifier: doctrine.columnType

excludePaths:
analyse:
- vendor
analyseAndScan:
- node_modules (?)
- var (?)
- vendor-bin
41 changes: 19 additions & 22 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
colors="true"
bootstrap="vendor/autoload.php"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
colors="true"
bootstrap="vendor/autoload.php"
displayDetailsOnAllIssues="true"
>
<php>
<ini name="error_reporting" value="-1" />
<server name="APP_ENV" value="test" force="true" />
<server name="SHELL_VERBOSITY" value="-1" />
<server name="SYMFONY_PHPUNIT_REMOVE" value="" />
<server name="SYMFONY_PHPUNIT_VERSION" value="9.5" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[direct]=0"/>
<env name="SYMFONY_PHPUNIT_VERSION" value="9.6" />
</php>
<php>
<ini name="error_reporting" value="-1" />
<server name="APP_ENV" value="test" force="true" />
<server name="SHELL_VERBOSITY" value="-1" />
<server name="SYMFONY_PHPUNIT_REMOVE" value="" />
<server name="SYMFONY_PHPUNIT_VERSION" value="9.5" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[direct]=0" />
<env name="SYMFONY_PHPUNIT_VERSION" value="9.6" />
</php>

<testsuites>
<testsuite name="Bundle Tests">
<directory>tests</directory>
<exclude>tests/fixtures</exclude>
</testsuite>
</testsuites>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
</listeners>
<testsuites>
<testsuite name="Bundle Tests">
<directory>tests</directory>
<exclude>tests/fixtures</exclude>
</testsuite>
</testsuites>
</phpunit>
2 changes: 1 addition & 1 deletion vendor-bin/c-norm/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require-dev": {
"ergebnis/composer-normalize": "^2.42",
"ergebnis/composer-normalize": "^2.47",
"roave/security-advisories": "dev-latest"
},
"config": {
Expand Down
2 changes: 1 addition & 1 deletion vendor-bin/cs-fixer/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require-dev": {
"21torr/php-cs-fixer": "^1.1.1",
"21torr/php-cs-fixer": "^1.1.5",
"roave/security-advisories": "dev-latest"
}
}
7 changes: 6 additions & 1 deletion vendor-bin/janus/composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"require": {
"21torr/janus": "^1.4"
"21torr/janus": "^2.0"
},
"config": {
"allow-plugins": {
"21torr/janus": true
}
}
}
14 changes: 7 additions & 7 deletions vendor-bin/phpstan/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"php": "^8.3"
},
"require-dev": {
"phpstan/extension-installer": "^1.3.1",
"phpstan/phpstan": "^1.11",
"phpstan/phpstan-deprecation-rules": "^1.2",
"phpstan/phpstan-doctrine": "^1.4",
"phpstan/phpstan-phpunit": "^1.4",
"phpstan/phpstan-symfony": "^1.4",
"phpstan/extension-installer": "^1.4.2",
"phpstan/phpstan": "^2.1.11",
"phpstan/phpstan-deprecation-rules": "^2.0.1",
"phpstan/phpstan-doctrine": "^2.0.2",
"phpstan/phpstan-phpunit": "^2.0.6",
"phpstan/phpstan-symfony": "^2.0.4",
"roave/security-advisories": "dev-latest",
"staabm/phpstan-todo-by": "^0.1.25"
"staabm/phpstan-todo-by": "^0.2"
},
"config": {
"sort-packages": true,
Expand Down