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']

steps:
- name: Checkout Code
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
3.3.1 (unreleased)
3.4.0
=====

* (improvement) Log raw JSON when fetching the JSON content from a request fails.
* (feature) Add `ImportData` helper VO.
* (improvement) Add `EntityModel::persist()` as unified `add/edit`.
* (improvement) Require PHP 8.4+


3.3.0
Expand Down
22 changes: 12 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,21 @@
],
"homepage": "https://github.com/21TORR/RadBundle",
"require": {
"php": ">= 8.3",
"php": ">= 8.4",
"ext-json": "*",
"21torr/bundle-helpers": "^2.2",
"21torr/html-builder": "^2.1",
"psr/log": "^3.0",
"symfony/dependency-injection": "^6.4 || ^7.0",
"symfony/deprecation-contracts": "^3.4",
"symfony/framework-bundle": "^6.4 || ^7.0",
"symfony/http-foundation": "^6.4 || ^7.0",
"symfony/http-kernel": "^6.4 || ^7.0"
"symfony/dependency-injection": "^6.4 || ^7.0 || ^8.0",
"symfony/deprecation-contracts": "^3.5",
"symfony/framework-bundle": "^6.4 || ^7.0 || ^8.0",
"symfony/http-foundation": "^6.4 || ^7.0 || ^8.0",
"symfony/http-kernel": "^6.4 || ^7.0 || ^8.0",
"symfony/property-access": "^7.0 || ^8.0"
},
"require-dev": {
"21torr/janus": "^1.3.3",
"bamarni/composer-bin-plugin": "^1.8",
"21torr/janus": "^2.0.0",
"bamarni/composer-bin-plugin": "^1.8.2",
"doctrine/dbal": "^3.0 || ^4.0",
"doctrine/orm": "^3.0",
"roave/security-advisories": "dev-latest",
Expand Down Expand Up @@ -58,6 +59,7 @@
},
"config": {
"allow-plugins": {
"21torr/janus": true,
"bamarni/composer-bin-plugin": true
},
"sort-packages": true
Expand All @@ -75,11 +77,11 @@
"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"
"PHP_CS_FIXER_IGNORE_ENV=1 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"
],
"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"
"PHP_CS_FIXER_IGNORE_ENV=1 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"
],
"test": [
"simple-phpunit",
Expand Down
49 changes: 49 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
parameters:
ignoreErrors:
-
message: '#^Method Torr\\Rad\\Controller\\BaseController\:\:normalizeFormErrors\(\) has parameter \$form with generic interface Symfony\\Component\\Form\\FormInterface but does not specify its types\: TData$#'
identifier: missingType.generics
count: 1
path: src/Controller/BaseController.php

-
message: '#^Method Torr\\Rad\\Form\\FormErrorNormalizer\:\:normalize\(\) has parameter \$form with generic interface Symfony\\Component\\Form\\FormInterface but does not specify its types\: TData$#'
identifier: missingType.generics
count: 1
path: src/Form/FormErrorNormalizer.php

-
message: '#^Method Torr\\Rad\\Form\\FormErrorNormalizer\:\:normalizeNested\(\) has parameter \$parent with generic interface Symfony\\Component\\Form\\FormInterface but does not specify its types\: TData$#'
identifier: missingType.generics
count: 1
path: src/Form/FormErrorNormalizer.php

-
message: '#^Method Torr\\Rad\\Import\\ImportData\:\:getEnum\(\) never returns null so it can be removed from the return type\.$#'
identifier: return.unusedType
count: 1
path: src/Import/ImportData.php

-
message: '#^Method Torr\\Rad\\Pagination\\Doctrine\\Paginator\:\:fetchPaginated\(\) should return Torr\\Rad\\Pagination\\PaginatedList\<object\> but returns Torr\\Rad\\Pagination\\PaginatedList\<mixed\>\.$#'
identifier: return.type
count: 1
path: src/Pagination/Doctrine/Paginator.php

-
message: '#^Method Torr\\Rad\\Pagination\\PaginatedList\:\:fromArray\(\) should return Torr\\Rad\\Pagination\\PaginatedList\<EntryType\> but returns Torr\\Rad\\Pagination\\PaginatedList\<mixed\>\.$#'
identifier: return.type
count: 1
path: src/Pagination/PaginatedList.php

-
message: '#^Parameter \#2 \$label of method Torr\\Rad\\Stats\\StatsLog\:\:setLabel\(\) expects string, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Stats/StatsLog.php

-
message: '#^Parameter \#3 \$description of method Torr\\Rad\\Stats\\StatsLog\:\:setLabel\(\) expects string\|null, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Stats/StatsLog.php
14 changes: 13 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
includes:
- vendor/21torr/janus/phpstan/lib.neon
- phpstan-baseline.neon

parameters:

# If you use simple-phpunit, you need to uncomment the following line.
# Always make sure to first run simple-phpunit and then PHPStan.
parameters:
bootstrapFiles:
- vendor/bin/.phpunit/phpunit/vendor/autoload.php

# These are temporarily copied here, as normally they should be in the lib.neon of janus.
# However, due to a bug in PHPStan, this currently doesn't work (https://github.com/phpstan/phpstan/issues/12844)
excludePaths:
analyse:
- vendor
analyseAndScan:
- node_modules (?)
- var (?)
- vendor-bin
12 changes: 12 additions & 0 deletions src/Exception/Import/InvalidImportDataException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php declare(strict_types=1);

namespace Torr\Rad\Exception\Import;

use Torr\Rad\Exception\RadException;

/**
* @final
*/
class InvalidImportDataException extends \InvalidArgumentException implements RadException
{
}
Loading