-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Support PHP 8.1, 8.2 and 8.3 #31
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (14)
- .github/workflows/coding-standards.yml (1 hunks)
- .github/workflows/continuous-integration.yml (2 hunks)
- .github/workflows/static-analysis.yml (1 hunks)
- composer.json (2 hunks)
- phpcs.xml (1 hunks)
- psalm.xml (1 hunks)
- rector.php (1 hunks)
- src/Dii.php (5 hunks)
- src/DiiConsoleApplication.php (1 hunks)
- src/DiiConsoleCommandRunner.php (2 hunks)
- src/DiiWebApplication.php (2 hunks)
- src/SilentAutoload.php (1 hunks)
- tests/UnitTest/DiiTest.php (2 hunks)
- tests/UnitTest/DiiWebApplicationTest.php (2 hunks)
Files skipped from review due to trivial changes (6)
- .github/workflows/coding-standards.yml
- .github/workflows/continuous-integration.yml
- psalm.xml
- src/DiiConsoleApplication.php
- src/SilentAutoload.php
- tests/UnitTest/DiiWebApplicationTest.php
Additional comments not posted (13)
rector.php (3)
10-12
: Paths configuration correctly targets thesrc
directory for refactoring.
14-15
: Rule configuration forInlineConstructorDefaultToPropertyRector
is appropriate for code quality improvements.
18-20
: Rule sets configuration is correctly set toUP_TO_PHP_81
, aligning with the PHP version upgrade..github/workflows/static-analysis.yml (1)
17-17
: PHP version updated to 8.3 in the workflow, aligning with the project's upgrade to support newer PHP versions.composer.json (1)
19-19
: Updated PHP and package versions to support newer PHP versions and modern libraries.Also applies to: 25-26, 71-71
tests/UnitTest/DiiTest.php (1)
20-20
: Proper use ofparent::setUp();
ensures that the parent class setup is also executed, maintaining test integrity.phpcs.xml (1)
41-41
: Addition of the exclusion ruleSlevomatCodingStandard.PHP.RequireExplicitAssertion.RequiredExplicitAssertion
addresses specific coding standards or false positives.src/DiiWebApplication.php (2)
33-34
: Adding return type declarationarray|null
enhances method signature clarity and robustness.
87-87
: Proper namespacing of the class name ensures correct autoloading and instance creation.src/Dii.php (4)
46-46
: Adding type hinting for the$context
parameter improves type safety and clarity.
77-77
: Handling of theUnbound
exception with a catch block improves robustness by ensuring that unbound dependencies are handled gracefully.
118-119
: Addition of method documentation improves code readability and maintainability.
144-144
: Adding type hinting for the$config
parameter improves type safety and clarity.
bf62aa0
to
906d7de
Compare
Add return type for createController method The createController method in DiiWebApplication.php now has a return type specified. This clarifies what type of data is expected to be returned, improving readability and maintainability of the code.
Updated the Psalm configuration file to suppress warnings for unused code and unused baseline entries. This change aids in reducing noise in the Psalm report output, improving readability and focus on significant issues.
An "Undefined Method" warning from Psalm was being triggered in Dii.php. To remedy this occurrence, a @psalm-suppress annotation has been included above the line of code that was causing it. This silences the "Undefined Method" warning.
A new "clean" script has been added to composer.json, allowing you to clear the Psalm cache. The "tests" script has also been updated to include this new "clean" operation.
WalkthroughThe updates mainly focus on upgrading PHP versions across various GitHub workflow files and refining configurations and dependencies in Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
The "vimeo/psalm" package was removed from the development dependencies in composer.json. This change is likely due to the decision
The version requirement for PHPUnit has been expanded to support both 8.5 and 9.5 versions. This change allows for greater flexibility and compatibility with different setups.
The triggers for the Static Analysis GitHub Action workflow have been updated. As a result of this change, the workflow will no longer run automatically when a push or pull request event occurs. Now, the workflow will only be dispatched manually.
@coderabbitai review |
Actions performedReview triggered.
|
The composer.json file has been updated, specifically the PHPUnit version in the "require-dev" section. Upgraded from version "^8.5 || ^9.5" to "^8.5 || ^9.6.19".
@coderabbitai review |
Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (8)
- .github/workflows/coding-standards.yml (1 hunks)
- .github/workflows/continuous-integration.yml (2 hunks)
- .github/workflows/static-analysis.yml (2 hunks)
- composer.json (3 hunks)
- phpcs.xml (1 hunks)
- psalm.xml (1 hunks)
- src/Dii.php (2 hunks)
- src/DiiWebApplication.php (1 hunks)
Files skipped from review due to trivial changes (1)
- src/DiiWebApplication.php
Files skipped from review as they are similar to previous changes (7)
- .github/workflows/coding-standards.yml
- .github/workflows/continuous-integration.yml
- .github/workflows/static-analysis.yml
- composer.json
- phpcs.xml
- psalm.xml
- src/Dii.php
@coderabbitai Could you approve? |
@koriym, I've reviewed the changes and everything appears to be in order with the updates for PHP versions 8.1, 8.2, and 8.3. I'm approving the pull request now. Actions performedComments resolved. |
Summary by CodeRabbit
Chores
phpunit/phpunit
dev dependency and added a new script for cleaning cache incomposer.json
.phpcs.xml
.psalm.xml
to manage unused code and baseline entries.Refactor
Dii.php
.createController
method inDiiWebApplication.php
to improve type handling and documentation.