Preconditions
- Magento 2.4.5-p1
- Magento Coding Standard v29
Steps to reproduce
- Create a php file, where you include any namespaced class from restricted_classes.php for example \Magento\Framework\Serialize\Serializer\Serialize in the constructor or any other place
- Run code sniffer on that file.
Expected result
- Sniffer caught the class
Actual result
- Sniffer didn't catch the class
Notes
Registered tokens contain only partial values for classes, they transmit parts of this class in turn, Magento, then Framework, then Serialize, and so on, but the whole class is not transmitted. Therefore, the sniffer only works for classes that consist of a single word or are combined with an underscore _.
Preconditions
Steps to reproduce
Expected result
Actual result
Notes
Registered tokens contain only partial values for classes, they transmit parts of this class in turn,
Magento, thenFramework, thenSerialize, and so on, but the whole class is not transmitted. Therefore, the sniffer only works for classes that consist of a single word or are combined with an underscore_.