Skip to content
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

Require a strict_types declaration #488

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

fredden
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.

@ihor-sviziev ihor-sviziev requested a review from Copilot February 13, 2025 16:05

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
Projects
Status: Reviewer Approved
Development

Successfully merging this pull request may close these issues.

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