vscode-intelephense
vscode-intelephense copied to clipboard
Undefined types when using slim/slim
Describe the bug When using slim/slim (as installed via composer) vscode lists functions provided by the package as undefined. See https://github.com/bmewburn/vscode-intelephense/issues/962 for more details.
To Reproduce The code below is sample to start showing the errors. Can also reproduce via this code
<?php
use \Psr\Http\Message\ServerRequestInterface as Request;
use \Psr\Http\Message\ResponseInterface as Response;
require './vendor/autoload.php';
$app = new \Slim\App;
Expected behavior No errors? Would expect either a way to declare the usage (via the compose system) or something else. Dont have an answer.
Screenshots
Platform and version
- Windows 10 21H2 (19044.1889)
- VSCode
- Version: 1.70.1 (user setup)
- Commit: 6d9b74a70ca9c7733b29f0456fd8195364076dda
- Date: 2022-08-10T06:08:33.642Z (6 days ago)
- Electron: 18.3.5
- Chromium: 100.0.4896.160
- Node.js: 16.13.2
- V8: 10.0.139.17-electron.0
- PHP Intelephense 1.8.2 (install latest version today 16/Aug/2022)