Closed barbazul closed 2 years ago
Hi @barbazul. Thank you for your report. To help us process this issue please make sure that you provided sufficient information.
Please, add a comment to assign the issue: @magento I am working on this
Hi @barbazul, Thank you for your bug report, it has been confirmed and resolved, fix will be published in next release.
Hi @barbazul , this issue has been fixed in release v12, can you confirm?
Upgraded to 12.0 and the issue was fixed.
There is a new ERROR in the report though which I will have to look into. might be a violation that was previously not checked
module-shipping-cost-calculator master ✚1 …3 ✔
09:09:40 barbazul@lyracons ▶ ./vendor/bin/phpcs
.....W 6 / 6 (100%)
FILE: src/Model/ShippingCostCalculator.php
---------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------
24 | WARNING | Missing PHP DocBlock for class property.
| | (Magento2.Commenting.ClassPropertyPHPDocFormatting.Missing)
---------------------------------------------------------------------------------------------------------------------
Time: 128ms; Memory: 12MB
module-shipping-cost-calculator master ✚1 …3 ✘-1
09:09:43 barbazul@lyracons ▶ composer require --dev magento/magento-coding-standard ^12.0
./composer.json has been updated
Running composer update magento/magento-coding-standard
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals
- Upgrading magento/magento-coding-standard (10 => 12)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
- Upgrading magento/magento-coding-standard (10 => 12): Extracting archive
Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/container instead.
Generating autoload files
65 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
module-shipping-cost-calculator master ✚2 …3 ✔
09:10:05 barbazul@lyracons ▶ ./vendor/bin/phpcs
....E. 6 / 6 (100%)
FILE: src/Model/ShippingMethodManagement.php
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
90 | ERROR | Class Magento\Framework\Reflection\DataObjectProcessor needs to be requested in constructor, otherwise compiler will not be able to find and generate these classes
| | (Magento2.PHP.AutogeneratedClassNotInConstructor.AUTOGENERATED_CLASS_NOT_IN_CONSTRUCTOR)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Time: 139ms; Memory: 12MB
Describe the bug
When using typed class properties the "Missing PHP DocBlock for class property." warning is triggered
Code sample
To reproduce Steps to reproduce the behavior:
test.php
with the code sample above...phpcs test.php ...
Expected behavior No warning should be raised as the property has a corresponding docblock.
Versions (please complete the following information):
Additional context If we remove the type definition, the warning dissapears.