Skip to content

Conversation

@alexmerlin
Copy link
Member

No description provided.

@alexmerlin alexmerlin self-assigned this May 8, 2025
@alexmerlin alexmerlin linked an issue May 8, 2025 that may be closed by this pull request
@github-actions
Copy link

github-actions bot commented May 8, 2025

Qodana for PHP

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Detected 107 dependencies

Third-party software list

This page lists the third-party software dependencies used in project

Dependency Version Licenses
brick/math 0.12.3 MIT
brick/varexporter 0.6.0 MIT
defuse/php-encryption v2.4.0 MIT
doctrine/collections 2.3.0 MIT
doctrine/common 3.5.0 MIT
doctrine/data-fixtures 2.0.2 MIT
doctrine/dbal 4.2.3 MIT
doctrine/deprecations 1.1.5 MIT
doctrine/event-manager 2.0.1 MIT
doctrine/inflector 2.0.10 MIT
doctrine/instantiator 2.0.0 MIT
doctrine/lexer 3.0.1 MIT
doctrine/migrations 3.9.0 MIT
doctrine/orm 3.3.3 MIT
doctrine/persistence 4.0.0 MIT
dotkernel/dot-cache 4.3.0 MIT
dotkernel/dot-cli 3.9.0 MIT
dotkernel/dot-data-fixtures 1.4.0 MIT
dotkernel/dot-dependency-injection 1.2.0 MIT
dotkernel/dot-errorhandler 4.0.0 MIT
dotkernel/dot-event 4.3.0 MIT
dotkernel/dot-log 4.0.4 MIT
dotkernel/dot-mail 5.3.0 MIT
dotkernel/dot-response-header 3.5.0 MIT
dotkernel/dot-router 1.0.5 MIT
egulias/email-validator 4.0.4 MIT
fig/http-message-util 1.1.5 MIT
laminas/laminas-authentication 2.18.0 BSD-3-Clause
laminas/laminas-cli 1.11.0 BSD-3-Clause
laminas/laminas-component-installer 3.5.0 BSD-3-Clause
laminas/laminas-config-aggregator 1.18.0 BSD-3-Clause
laminas/laminas-diactoros 3.6.0 BSD-3-Clause
laminas/laminas-escaper 2.17.0 BSD-3-Clause
laminas/laminas-eventmanager 3.14.0 BSD-3-Clause
laminas/laminas-filter 2.41.0 BSD-3-Clause
laminas/laminas-httphandlerrunner 2.11.0 BSD-3-Clause
laminas/laminas-hydrator 4.16.0 BSD-3-Clause
laminas/laminas-inputfilter 2.32.0 BSD-3-Clause
laminas/laminas-permissions-acl 2.17.0 BSD-3-Clause
laminas/laminas-permissions-rbac 3.7.0 BSD-3-Clause
laminas/laminas-servicemanager 3.23.0 BSD-3-Clause
laminas/laminas-stdlib 3.20.0 BSD-3-Clause
laminas/laminas-stratigility 3.13.0 BSD-3-Clause
laminas/laminas-validator 2.64.2 BSD-3-Clause
lcobucci/clock 3.3.1 MIT
lcobucci/jwt 5.5.0 BSD-3-Clause
league/event 2.3.0 MIT
league/oauth2-server 8.5.5 MIT
league/uri-interfaces 7.5.0 MIT
league/uri 7.5.1 MIT
mezzio/mezzio-authentication-oauth2 2.11.0 BSD-3-Clause
mezzio/mezzio-authentication 1.11.0 BSD-3-Clause
mezzio/mezzio-authorization-acl 1.12.0 BSD-3-Clause
mezzio/mezzio-authorization-rbac 1.9.0 BSD-3-Clause
mezzio/mezzio-authorization 1.10.0 BSD-3-Clause
mezzio/mezzio-cors 1.14.0 BSD-3-Clause
mezzio/mezzio-fastroute 3.13.0 BSD-3-Clause
mezzio/mezzio-hal 2.10.1 BSD-3-Clause
mezzio/mezzio-helpers 5.18.0 BSD-3-Clause
mezzio/mezzio-problem-details 1.15.0 BSD-3-Clause
mezzio/mezzio-router 3.18.0 BSD-3-Clause
mezzio/mezzio-template 2.11.0 BSD-3-Clause
mezzio/mezzio 3.21.0 BSD-3-Clause
nikic/fast-route v1.3.0 BSD-3-Clause
nikic/php-parser v5.4.0 BSD-3-Clause
paragonie/random_compat v9.99.100 MIT
psr/cache 3.0.0 MIT
psr/clock 1.0.0 MIT
psr/container 1.1.2 MIT
psr/event-dispatcher 1.0.0 MIT
psr/http-client 1.0.3 MIT
psr/http-factory 1.1.0 MIT
psr/http-message 2.0 MIT
psr/http-server-handler 1.0.2 MIT
psr/http-server-middleware 1.0.2 MIT
psr/link 1.1.1 MIT
psr/log 3.0.2 MIT
ramsey/collection 2.1.1 MIT
ramsey/uuid-doctrine 2.1.0 MIT
ramsey/uuid 4.7.6 MIT
roave/psr-container-doctrine 5.7.0 BSD-2-Clause
spatie/array-to-xml 3.4.0 MIT
symfony/cache-contracts v3.5.1 MIT
symfony/cache v7.2.6 MIT
symfony/console v7.2.6 MIT
symfony/deprecation-contracts v3.5.1 MIT
symfony/event-dispatcher-contracts v3.5.1 MIT
symfony/event-dispatcher v7.2.0 MIT
symfony/filesystem v7.2.0 MIT
symfony/finder v7.2.2 MIT
symfony/mailer v7.2.6 MIT
symfony/mime v7.2.6 MIT
symfony/polyfill-ctype v1.32.0 MIT
symfony/polyfill-intl-grapheme v1.32.0 MIT
symfony/polyfill-intl-idn v1.32.0 MIT
symfony/polyfill-intl-normalizer v1.32.0 MIT
symfony/polyfill-mbstring v1.32.0 MIT
symfony/polyfill-php84 v1.32.0 MIT
symfony/service-contracts v3.5.1 MIT
symfony/stopwatch v7.2.4 MIT
symfony/string v7.2.6 MIT
symfony/var-exporter v7.2.6 MIT
symfony/yaml v7.2.6 MIT
webimpress/safe-writer 2.2.0 BSD-2-Clause
webmozart/assert 1.11.0 MIT
willdurand/negotiation 3.1.0 MIT
zircote/swagger-php 5.1.1 Apache-2.0
Contact Qodana team

Contact us at [email protected]

@arhimede arhimede requested a review from Copilot May 9, 2025 09:20
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR increases the PHPStan analysis level to 8 and enhances type annotations and PHPDoc comments across exception classes, config providers, and service interfaces while also adding minor input sanitation improvements.

  • Increase PHPStan level in phpstan.neon
  • Update PHPDoc types (using non-empty-string, non-empty-array, etc.) in exception classes, service interfaces, and config providers
  • Introduce input trimming in AdminCreateCommand for more robust input handling

Reviewed Changes

Copilot reviewed 103 out of 103 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/App/src/Exception/SunsetException.php Updated to extend Exception and implement ProblemDetailsExceptionInterface, including a new create() method with a status set to STATUS_UNAUTHORIZED
src/App/src/Exception/RuntimeException.php Added PHPDoc documentation for the create() method
src/App/src/Exception/*.php Similar PHPDoc type enhancements applied to various exception classes
src/App/src/ConfigProvider.php Added detailed PHPStan type annotations for collections and dependencies
src/App/src/Attribute/BaseDeprecation.php Updated to use the new factory method for throwing SunsetException
src/Admin/src/Service/* Adjusted PHPDoc types for input arrays on service interfaces and implementations
src/Admin/src/Handler/* Updated input filtering to assign a trimmed data array before passing to service methods
src/Admin/src/ConfigProvider.php Enhanced PHPStan type documentation for Hal metadata and dependencies
src/Admin/src/Command/AdminCreateCommand.php Added the trim() function for input options and improved PHPDoc for expected data structure
phpstan.neon Increased analysis level from 5 to 8
Comments suppressed due to low confidence (1)

src/App/src/Exception/SunsetException.php:26

  • Consider verifying that using STATUS_UNAUTHORIZED is appropriate for a sunset exception. Typically, sunset or deprecation semantics might be better reflected by a status such as 410 (Gone) to more accurately indicate that the resource is no longer available.
$exception->status     = StatusCodeInterface::STATUS_UNAUTHORIZED;

@arhimede arhimede merged commit a24d18a into 6.0 May 9, 2025
28 checks passed
@alexmerlin alexmerlin deleted the issue-415 branch May 9, 2025 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC]: phpstan level increase to 8

3 participants