-
Notifications
You must be signed in to change notification settings - Fork 308
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
Trait method "methodName" was already imported. [even if it is an abstract method] #272
Comments
Hi Thomas, looks fine to me. If you still got this issue, could you send PR? |
Hi, obviously this was the wrong project. Sorry for that. I created a PR for the PHP-Token-Reflection project: Andrewsville/PHP-Token-Reflection#60 Let's see if it is going to be merged. Cheers, |
I see :) . Great that you send a PR! |
@t11n I've just added the fix from your PR to ApiGen's fork of TokenReflection, see https://github.com/apigen/TokenReflection/commit/441d42121a06e045b47c72d562d0920d41766ad0#diff-918c79373ab56a6567b280c96c5503e9R713 This should fasten up the process. |
Hi there,
When generating the API documentation for my latest project, I came over the following exception:
Trait method "methodName" was already imported.
I looked into the sources and saw this exception gets thrown, if one tries to import the same method from two different traits. Usually, this is not correct, so the exception gets thrown correctly. Except for (at least) one exception: Traits can import abstract methods. This was my case. Two traits were imported, both having an abstract method with the same name, the using class implements that method. Fine with PHP, but apigen complains.
Without having covered the full issue, I locally applied the following patch to make apigen run through.
Basically, the patched version checks if the imported method is an abstract method. If it is, it will not complain.
Maybe somebody can take care of that?
Cheers,
Thomas
The text was updated successfully, but these errors were encountered: