extension_builder icon indicating copy to clipboard operation
extension_builder copied to clipboard

Missing default in PhpParser

Open DavidBruchmann opened this issue 2 years ago • 3 comments

Describe the bug The PhpParser never has a default property and therefore in ExtensionBuilder an error might be thrown.
As I never know if the parser is even supposed to have a default property, I never post it there, but think it should be posted by someone who knows more about it -- if applying. This patch code shows the detail:

--- lib/PhpParser/Node/Stmt/Property.php	2023-12-31 22:54:18.591544225 +0700
+++ lib/PhpParser/Node/Stmt/Property.php.patched	2023-12-31 22:53:21.041280247 +0700
@@ -17,6 +17,10 @@
     public $type;
     /** @var Node\AttributeGroup[] PHP attribute groups */
     public $attrGroups;
+    /**
+     * @var mixed
+     */
+    public $default;
 
     /**
      * Constructs a class property list node.

TYPO3 Version v11

Extension Builder Version: v11

DavidBruchmann avatar Dec 31 '23 16:12 DavidBruchmann

Thanks, this could be related to #662

PKuhlmay avatar Jan 09 '24 17:01 PKuhlmay

I can confirm this is related to #662. After applying the patch the export is working.

TYPO3 Version: 11.5.34 Extension Builder Version: 11.0.11

dkoether avatar Jan 19 '24 11:01 dkoether

I changed the assignment of the default value in https://github.com/FriendsOfTYPO3/extension_builder/commit/38546dd1f14ebd8ad170310139dd8b8a091c473c. I cannot see, where this default value is used but it works for now. It still works, when I remove the whole line.

PKuhlmay avatar Feb 15 '24 11:02 PKuhlmay