We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
PHP 8.0.2 (cli) (built: Feb 4 2021 18:10:29) ( NTS )
PHP CS Fixer 2.18.3 Remote Void by Fabien Potencier and Dariusz Ruminski
php vendor/bin/php-cs-fixer fix --show-progress=estimating-max -vvv
With 'nullable_type_declaration_for_default_null_value' => true the code below produces
'nullable_type_declaration_for_default_null_value' => true
[PhpCsFixer\Linter\LintingException] Parse error: syntax error, unexpected token "#[" on line 14.
<?php declare(strict_types=1); namespace HappyInc\Import\CompanyStructureImport; use Symfony\Component\Validator\Constraints as Assert; final class CompanyStructureImportRow { public function __construct( #[Assert\Count(min: 1, minMessage: 'Пустая цепочка департаментов.')] public array $departmentTitleChain, #[Assert\NotBlank(message: 'Пустой email.', allowNull: true)] #[Assert\Email(message: 'Некорректный email {{ value }}.')] public ?string $email = null, ) { } }
Disabling nullable_type_declaration_for_default_null_value fixes the issue.
nullable_type_declaration_for_default_null_value
The text was updated successfully, but these errors were encountered:
I think we may not support attributes on parameter level at all. can you raise a PR to improve the situation, @vudaltsov ?
Sorry, something went wrong.
@keradus , I'm pretty busy this month. I will try to find some time, though.
This is fixed by #5665.
No branches or pull requests
Bug report
PHP 8.0.2 (cli) (built: Feb 4 2021 18:10:29) ( NTS )
PHP CS Fixer 2.18.3 Remote Void by Fabien Potencier and Dariusz Ruminski
php vendor/bin/php-cs-fixer fix --show-progress=estimating-max -vvv
With
'nullable_type_declaration_for_default_null_value' => true
the code below producesDisabling
nullable_type_declaration_for_default_null_value
fixes the issue.The text was updated successfully, but these errors were encountered: