PHP : detection of SQL strings fails when using heredoc
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
### Apache NetBeans version
Apache NetBeans 15
### What happened
Netbeans fails to detect SQL strings that are written using PHP's heredoc syntax.
Netbeans tries to guess if a PHP string is a SQL query, so that completion within the string can use the database connection. This works for plain string, with single or double quotes. It also works for nowdoc strings, i.e. using delimiters like `<<<'EOSQL'\n ...\nEOSQL`. But I've never seen it work with heredoc strings, i.e. using delimiters like `<<<"EOSQL" ... EOSQL` or just `<<
Contributor guide
Research direction
Start with SQLStatement.java and the PHP editor's SQL completion path, then reproduce the difference between quoted nowdoc and unquoted or double-quoted heredoc examples from the issue. Compare how each string form is classified, and consider the issue done when SQL completion works at the caret for both heredoc forms as it does for nowdoc.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, php, sql
- Domain
- databases, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100