-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Method with same name already defined in this class #703
Comments
+1 on this. I can't here with this same issue. Laravel 5.7 |
Me, three. Laravel 5.5 |
Same as #697 ? |
@yutarux No. Our files create successfully. We don't get an error during compose update. Our error is within PhpStorm, complaining about pre-existing methods. |
+1 Laravel 5.7 |
1 similar comment
+1 Laravel 5.7 |
The same issue happened after updating ide-helper from 2.4.3 to 2.5.1. In 2.4.3 all was OK. Any suggestions? |
Another one here; confirmed that reverting to Edit: Edit 2: Edit 3: Edit 4: Edit 5: |
+1 Laravel 5.7.6 |
+1 Laravel 5.7.9 |
+1 Laravel 5.7.6 |
I've proposed a fix for this issue in #720. |
Please explain step by step how to solve this problem... |
The issue is that methods are both defined in the classes defined in idehelper, as well as in the class docblock. For example, take this snippet from the idehelper file for the DB class:
You see there's both a method Some versions of PhpStorm (e.g. 2018.3) give an error on this kind of thing: "Method with the same name already defined in this class", causing PhpStorm to ignore the method completely. In my pull request I detect the When/if the fix gets released, you will just need to update idehelper to the newest version and run |
Thank you) |
Is the issue fixed? I never worked in Laravel (I work in Symfony where there is a plugin installed in the IDE, much simpler than this...) and I have to do something on a project started by someone else... I generate this What should I do to fix the issue? Ignore a vendor folder? This is very weird... |
+1 |
+1 |
@pks1989 Bad solution. If you mark _ide_helper.php as Plain Text you got the same result as removing this (barryvdh/laravel-ide-helper) package at all. |
ok, my fault. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
This should not be closed since it's still an issue. |
I have the same with laravel v9.35.1 and phpstorm 2022.2.1 |
Laravel 9.43 and PHPStorm 2202.2.3 Is there a harmless way to get the IDE to ignore this (assuming it's not actually a problem?). |
+1 |
+1 Symfony |
+1 |
This issue is already closed. Is something changed? Which PR should I look at? |
When i use "barryvdh/laravel-dompdf": "^2.0", in my project in laravell 10.10 I face with this again. |
It's 2024 and Still getting this issue. I manually removed the duplicate DomPdf "PDF" vs "pdf", but when doing composer install or update the _ide_helper.php is regenerated and the issue comes back. |
L5.7.2, LIDEH:2.5.1
_ide_helper.php produces error in PHPStorm : 'Method with same name already defined in this class'
on many methods. Never had an issue with 5.6, but this is the first time I'm installing both 5.7 Laravel and 2.5.1 LIDEH.
Screenshot shows the first part of the file with underlined methods that reflect this error.
The text was updated successfully, but these errors were encountered: