pbyrne84 / DynamicReturnTypePlugin

135 stars 7 forks source link

Not resolving const FOO = Bar::class #50

Closed norrs closed 9 years ago

norrs commented 9 years ago

git clone https://github.com/norrs/dynamic_issue

see Fail.php, why doesn't $thisShouldBeBar resolve?

pbyrne84 commented 9 years ago

Cool, thanks for the example I could checkout it is a big big help as the big test environment is great for checking stability as new versions of intellij etc come out but so big now not so fun trying to figure out these little edge cases as there is not real documentation on this stuff. I never envisioned class constants assigned to class constants which would then alias to ::class somewhere.

Anyway it took me a little while but I have found it is doable.

Cheers

norrs commented 9 years ago

Do you have an estimated time frame for when this could be fixed? Would greatly help phpstorm's introspection in our project. Can I personally sponsor you somehow via paypal etc?

Else thanks for your work and great plugin! :-)

pbyrne84 commented 9 years ago

Well I have fixed your edge case but now I need to re-add my edge cases and try to make it recursive so it can go down more than 1 level. So you are looking at tonight/monday night

On 4 September 2015 at 10:35, Roy Sindre Norangshol < notifications@github.com> wrote:

Do you have an estimated time frame for when this could be fixed? Would greatly help phpstorm's introspection in our project. Can I personally sponsor you somehow via paypal etc?

Else thanks for your work and great plugin! :-)

— Reply to this email directly or view it on GitHub https://github.com/pbyrne84/DynamicReturnTypePlugin/issues/50#issuecomment-137690563 .

pbyrne84 commented 9 years ago

Always those cases are resolved but I have to wait to monday. In theory it will keep on trucking until it finds something it can make sense of.

norrs commented 9 years ago

Thanks! Our use case is that we have a configuration file and some reflection "magic" to initialize defined service interfaces defined in a services interface with constants. ( in case you were curious what my use case was )

pbyrne84 commented 9 years ago

Should be done

norrs commented 9 years ago

@pbyrne84 : Thanks, I'll give it a spin at work tomorrow and let you know :+1:

norrs commented 9 years ago

Confirmed it to be working! Thanks! :-)

pbyrne84 commented 9 years ago

Nice...

On 8 September 2015 at 09:13, Roy Sindre Norangshol < notifications@github.com> wrote:

Closed #50 https://github.com/pbyrne84/DynamicReturnTypePlugin/issues/50 .

— Reply to this email directly or view it on GitHub https://github.com/pbyrne84/DynamicReturnTypePlugin/issues/50#event-403336230 .