Bug 245840 - Sometimes PHP files won't recognize classes from other files
Summary: Sometimes PHP files won't recognize classes from other files
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: PHP (show other bugs)
Version: git master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-26 23:08 UTC by Alexander
Modified: 2023-01-18 09:58 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test project (422 bytes, application/x-gzip)
2010-07-27 11:12 UTC, Alexander
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander 2010-07-26 23:08:10 UTC
Version:           SVN (using KDE 4.4.3) 
OS:                Linux

I'm using KDevelop/KDevplatform/php/php-docs from git master.

This problem is somewhat hard to describe, but it's been there in php support since its first days. Note that C++ doesn't have this problem.

It happens when I open a large PHP project (with many subdirectories, if that matters) with some of the files being automatically opened. For example, the project has a file "a.php" open, which uses class C from "c.php". When opening the project and a.php automatically opens in the editor (with previously clean ~/.kdevduchain), any use of class C inside a.php has brown squiggles under it. It's as if the parsing was performed in one direction and a.php can't see what's been parsed after it.

Reopening a.php doesn't help, opening / closing KDevelop doesn't help. The only thing that helps is pressing F5 while a.php is open.

Note that this happens only when a.php is automatically opened while the project is loading. If it's not, class C is visible in it and everything's OK.

Thanks

Reproducible: Sometimes




openSUSE 11.1 x86_64
Comment 1 Milian Wolff 2010-07-27 00:20:11 UTC
Hm it should get reparsed once the rest of the project got parsed. Does that happen or not?

I'll try to reproduce but if you can create a test project that exhibits that behavior, it would be awesome.

Thanks, bye
Comment 2 Alexander 2010-07-27 11:12:47 UTC
Created attachment 49520 [details]
Test project

Doesn't seem like it gets reparsed.

I was able to reproduce it with a simple project.
To reproduce:
1. Open the project.
2. Open a.php.
3. Close KDevelop.
4. rm ~/.kdevduchain
5. Open KDevelop.

You should see a.php with "SomeClass" having squiggles (even after the parsing is done), even though SomeClass is defined in c.php.
You may need several tries to reproduce it (it happens almost always on my machine).
Comment 3 Andrew Crouthamel 2018-11-11 04:24:32 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Andrew Crouthamel 2018-11-21 04:43:24 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Alexander 2018-11-21 08:50:47 UTC
I no longer use KDevelop so I cannot re-test this, sorry.
Comment 6 Justin Zobel 2023-01-18 02:41:16 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 7 Alexander 2023-01-18 09:58:03 UTC
I no longer use the software, and this is for a very old version of the software, so I'm closing this bug.