PHPSTORM_META DB Prefix
Hi, I would like to use PHPSTORM_META for the DB prefix.
According to the documentation here: https://www.jetbrains.com/help/phpstorm/ide-advanced-metadata.html
I can't get it to work for writing the prefix: …" . DB_PREFIX . "
…
File .phpstorm.meta.php:
namespace PHPSTORM_META {
override(sql_injection_subst(),
map([
'" . DB_PREFIX . "' => 'oc_',
'DB_PREFIX' => 'oc_',
]));
}
Example of DB prefix:
SELECT column_name FROM `" . DB_PREFIX . "table_name
- Not work
- This is the official notation of the prefix, in CMS. Is it possible to write in PHPSTORM_META so that PhpStorm can also read such writing? Or will it not be possible with such an entry?
If I modify the entry of the prefix to :
SELECT column_name FROM `DB_PREFIXtable_name`
- It works
I will be glad for any advice.
Please sign in to leave a comment.
Hi,
Unfortunately, dynamic constants are not yet supported, please check this ticket for details:
https://youtrack.jetbrains.com/issue/WI-59732/Support-dynamic-constant-replacement-ins-sqlinjectionsubst