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

Livewire related

Open HUN-Julian opened this issue 4 years ago • 2 comments

Versions:

  • ide-helper Version: 2.8.2
  • Laravel Version: 8.19.0
  • PHP Version: 7.4.8

Description:

Ide helper can generate the _ide_helper.php file, but one line is not in a good way. I need to modify the namespace Illuminate\View to Illuminate\Contracts\View. After that, everythings works fine. It contains some a Laravel Livewire related stuffs…

Steps To Reproduce:

  • php artisan ide-helper:generate

That is wrong: ... namespace Illuminate\View { ...

That is correct: ... namespace Illuminate\Contracts\View { ...

Whole together:

namespace Illuminate\Contracts\View {
    /**
     *
     *
     */
    class ComponentAttributeBag
    {
        /**
         *
         *
         * @see \Livewire\LivewireServiceProvider::registerViewMacros()
         * @param mixed $name
         * @static
         */
        public static function wire($name)
        {
            return \Illuminate\View\ComponentAttributeBag::wire($name);
        }
    }
    /**
     *
     *
     */
    class View
    {
        /**
         *
         *
         * @see \Livewire\Macros\ViewMacros::extends()
         * @param mixed $view
         * @param mixed $params
         * @static
         */
        function extends ($view, $params = []) {
            return \Illuminate\View\View:: extends ($view, $params);
        }
        /**
         *
         *
         * @see \Livewire\Macros\ViewMacros::layout()
         * @param mixed $view
         * @param mixed $params
         * @static
         */
        public static function layout($view, $params = [])
        {
            return \Illuminate\View\View::layout($view, $params);
        }
        /**
         *
         *
         * @see \Livewire\Macros\ViewMacros::section()
         * @param mixed $section
         * @static
         */
        public static function section($section)
        {
            return \Illuminate\View\View::section($section);
        }
        /**
         *
         *
         * @see \Livewire\Macros\ViewMacros::slot()
         * @param mixed $slot
         * @static
         */
        public static function slot($slot)
        {
            return \Illuminate\View\View::slot($slot);
        }
    }
}

HUN-Julian avatar Dec 19 '20 10:12 HUN-Julian

This bug isn't fixed yet

sakurikii avatar May 07 '21 07:05 sakurikii

Still not fixed

rafayrty avatar Aug 20 '22 18:08 rafayrty