DEVSENSE / phptools-docs

PHP Tools public content
Apache License 2.0
82 stars 10 forks source link

posix_getsid() is not recognized by PHP parser #711

Closed neuralldev closed 3 weeks ago

neuralldev commented 3 weeks ago

the posix_getsid() function exist for a long time and is not recognised by intelliphp with either php 7.X or 8.X code. it should be added as it is a basic php function call to interact with tasks.

the exact error message is:

(Warning sign) Call to unknown function: 'posix_getsid' (PHP0417)

used in my section of code:

if (file_exists($pid_file)) { if (@posix_getsid(trim(file_get_contents($pid_file)))) $return['state'] = 'ok'; else shell_exec(system::getCmdSudo() . 'rm -rf ' . $pid_file . ' 2>&1 > /dev/null'); }

jakubmisek commented 3 weeks ago

Please add a "posix" stub, using "Workjspace Stubs" command from Command Palette:

image image

It is dsabled by default on non-Windows machines.