laravel-ide-helper icon indicating copy to clipboard operation
laravel-ide-helper copied to clipboard

Psaml phpdoc bug

Open Stevemoretz opened this issue 2 years ago • 5 comments

Versions:

  • ide-helper Version: 2.10.0
  • Lumen Version: 8
  • PHP Version: 7.4

Description:

this

    /**
     * @param class-string<T> $className
     * @param null|string $driver
     * @return T
     * @noinspection all
     */
    public function instance( $className, $driver = null ){

turns into:

         * @param \SteveMoretz\Tools\Utils\MultiDrivers\Managers\class-string<T> $className
         * @param null|string $driver
         * @return \SteveMoretz\Tools\Utils\MultiDrivers\Managers\T
         * @noinspection all
         * @static
         */

(In case you are not familiar T is for generic, so it must not be namespaced)

how can I stop this from happening?

Stevemoretz avatar Oct 26 '21 16:10 Stevemoretz

Possible fix (if feasible on your side): wish we had a way to ignore the @params that start with a keyword.

Stevemoretz avatar Oct 26 '21 16:10 Stevemoretz

Took me a long frustrating debug until I found and fixed the problem, please merge it: https://github.com/barryvdh/ReflectionDocBlock/pull/6

Screen Shot 1400-08-05 at 00 14 14

Now I'll have generic autocompletion on facade, thanks to your package and that little PR.

Stevemoretz avatar Oct 26 '21 20:10 Stevemoretz

Closing, as the PR has been merged

mfn avatar Feb 20 '23 15:02 mfn

@mfn The change was actually reverted and is pending some test fixes here. I believe it is also the cause of #1401

Jefemy avatar Feb 22 '23 11:02 Jefemy

I've a feeling I mixed up issues and closed this one wrongly anyway -> sorry, re-opening!

mfn avatar Feb 22 '23 15:02 mfn