Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Require a strict_types declaration #488

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
fredden wants to merge 6 commits into magento:develop
base: develop
Choose a base branch
Loading
from fredden:feature/strict-types

Conversation

Copy link
Member

@fredden fredden commented Sep 27, 2024

Fixes #33

The current composer.json file requires version 3.6.1 or better of PHP_CodeSniffer. That version and versions up to 3.7.2 only check that there is a declaration, but not if the declaration is setting the feature on/off. From version 3.8.0 onwards, the sniff also asserts that the feature is enabled. While this is a useful feature, I'm undecided if the minimum version for PHP_CodeSniffer should be increased as part of this pull request.

DmitryFurs reacted with thumbs up emoji
Copy link

@Copilot 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.

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

Files not reviewed (20)
  • Magento2/Helpers/Commenting/PHPDocFormattingValidator.php: Language not supported
  • Magento2/Helpers/Tokenizer/AbstractTokenizer.php: Language not supported
  • Magento2/Helpers/Tokenizer/Parameter.php: Language not supported
  • Magento2/Helpers/Tokenizer/Variable.php: Language not supported
  • Magento2/Sniffs/Classes/AbstractApiSniff.php: Language not supported
  • Magento2/Sniffs/Classes/DiscouragedDependenciesSniff.php: Language not supported
  • Magento2/Sniffs/CodeAnalysis/EmptyBlockSniff.php: Language not supported
  • Magento2/Sniffs/Commenting/ClassAndInterfacePHPDocFormattingSniff.php: Language not supported
  • Magento2/Sniffs/Commenting/ConstantsPHPDocFormattingSniff.php: Language not supported
  • Magento2/Sniffs/Exceptions/DirectThrowSniff.php: Language not supported
  • Magento2/Sniffs/Exceptions/ThrowCatchSniff.php: Language not supported
  • Magento2/Sniffs/Exceptions/TryProcessSystemResourcesSniff.php: Language not supported
  • Magento2/Sniffs/Functions/DiscouragedFunctionSniff.php: Language not supported
  • Magento2/Sniffs/Functions/StaticFunctionSniff.php: Language not supported
  • Magento2/Sniffs/GraphQL/AbstractGraphQLSniff.php: Language not supported
  • Magento2/Sniffs/GraphQL/ValidArgumentNameSniff.php: Language not supported
  • Magento2/Sniffs/GraphQL/ValidEnumValueSniff.php: Language not supported
  • Magento2/Sniffs/GraphQL/ValidFieldNameSniff.php: Language not supported
  • Magento2/Sniffs/GraphQL/ValidTopLevelFieldNameSniff.php: Language not supported
  • Magento2/Sniffs/GraphQL/ValidTypeNameSniff.php: Language not supported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

Copilot code review Copilot Copilot left review comments

@ihor-sviziev ihor-sviziev ihor-sviziev approved these changes

Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

[New Rule] Add declare(strict_types=1) to your PHP files

AltStyle によって変換されたページ (->オリジナル) /