[Issue] Declare optional argument after required. #31291
Labels
Component: MediaGalleryUi
Fixed in 2.4.x
The issue has been fixed in 2.4-develop branch
Issue: Confirmed
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed
Priority: P1
Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.
Progress: done
Reproduced on 2.4.x
The issue has been reproduced on latest 2.4-develop branch
Severity: S2
Major restrictions or short-term circumventions are required until a fix is available.
This issue is automatically created based on existing pull request: #31275: Declare optional argument after required.
Description
This prevents PHP fatal error when a plugin is added to the one of parent classes.
Manual testing scenarios
\Magento\Framework\View\Element\BlockInterface
.Plugin example
Open
Magento/Cms/etc/di.xml
and add the following code:Create
Magento\Cms\Plugin\Block
class:Actual Result: ✖️ A fatal error will be rendered: 'Error: Cannot instantiate interface Magento\Framework\Data\OptionSourceInterface'Magento\Framework\Data\OptionSourceInterface
Expected Result: ✔️ The page is successfully loaded
Contribution checklist (*)
The text was updated successfully, but these errors were encountered: