laravel-idea / plugin

Laravel Idea plugin for PhpStorm
https://laravel-idea.com/
177 stars 7 forks source link

[Bug]: Facade hints are no longer generating in PHPStorm 2024.2.1 #1073

Closed moazam1 closed 1 month ago

moazam1 commented 1 month ago

Bug description

Hi - just upgraded to PHPStorm 2024.2.1 and now facade hints are no longer available in the IDE. I regenerated code multiple times and tried in a fresh project but no luck. Is this a known bug? I am using Laravel idea 8.3.1.242

Plugin version

8.3.1.242

Operating system

Windows

Steps to reproduce

No response

Relevant log output

No response

moazam1 commented 1 month ago

@adelf hope you can help?

adelf commented 1 month ago

Could you tell which class doesn't complete their methods? Typical aliases, like \Cache, or facade classes, like Illuminate\Support\Facades\Cache?

moazam1 commented 1 month ago

@adelf thanks for the reply. TheseFacades are created by me. They were working fine in PHPStorm 2023.6 version but now it's stopped working in the latest version. This is my code:

namespace App\Facades;

use Illuminate\Support\Facades\Facade;

class PaymentGateway extends Facade
{
    protected static function getFacadeAccessor()
    {
        return 'paymentgateway';
    }
}
namespace App\Providers;

use App\Core\Payments\PaymentGateway;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;

class PaymentGatewaySerivceProvider extends ServiceProvider
{
    public function boot()
    {
        $this->app->singleton('paymentgateway', function () {
            return new PaymentGateway();
        });
    }
}

In config/app.php

I have this line in the providers:

App\Providers\PaymentGatewaySerivceProvider::class,

I also added this in aliases in config.php but no luck:

'PaymentGateway' => 'App\\Facades\\PaymentGateway',

moazam1 commented 1 month ago

I just used ide helper and it generated the code for me. I wonder how it was working before?