Peekmo / atom-autocomplete-php

Autocomplete for PHP in atom editor
MIT License
136 stars 34 forks source link

Local variable & require() #291

Open Arkshine opened 8 years ago

Arkshine commented 8 years ago

Hi,

I'm playing with Slim PHP micro-framework and using an existing skeleton with the following structures:

project
-- public
-- src
-- templates
-- tests
-- vendor

public/index.php contains this kind of code:

$app = new \Slim\App($settings);

require __DIR__ . '/../src/dependencies.php';
require __DIR__ . '/../src/middleware.php';
require __DIR__ . '/../src/routes.php';

$app->run();

The issue is that nothing is triggered with$apps variable in the required files. Did I miss something? Is there something you can do to make it work?

I'm using the latest of everything (fresh installation).

Thanks!

Peekmo commented 8 years ago

Hello,

This plugin could, but is not planned to work with non OOP files. So, if you're not in a class, it will probably not work, that's why you don't have completion in your index.php

It could be a feature to support non OOP files, but for now, it's not supported sorry.