Hi,

When I add generics PHP documentation, I get error PHP0406:

    /**
     * @template TKey
     * @template TValue
     * @implements \IteratorAggregate<TKey, TValue>
     */

In my case:

WizardJobAttr <-- StdAttributes <-- ArrayClass

When I remove the generics PHP documentation, the error PHP0406 disappears.

Thank you.

    This is the test for this issue:

    <?php
        namespace Devsense\Helper;
    
        abstract class AbstractTest {}
    
        /**
         * @property-read bool $status
         */
        final class Test extends AbstractTest {}
    
        /**
         * @template P
         */
        abstract class AbstractHelper
        {
            /**
             * @var P
             */
            public AbstractPlugin $plugin;
        }
    
        /**
         * @extends AbstractHelper<Plugin>
         */
        final class Helper extends AbstractHelper {}
    
        /**
         * @template T
         */
        abstract class AbstractPlugin
        {
            /**
             * @var T
             */
            public AbstractTest $test;
        }
    
        /**
         * @extends AbstractPlugin<Test>
         */
        final class Plugin extends AbstractPlugin
        {
        }
    
        $helper = new Helper();
        $helper->plugin->test->status;
    
        function fctTest(AbstractHelper $helper) {
        }
    
        fctTest($helper);
      Write a Reply...