Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project file #20

Open
mkusher opened this issue Nov 14, 2015 · 9 comments
Open

Project file #20

mkusher opened this issue Nov 14, 2015 · 9 comments
Milestone

Comments

@mkusher
Copy link
Member

mkusher commented Nov 14, 2015

Proposal

Project file is a yaml(e.g. .padawan.yml) configuration for a project.

Structure

php: 7
plugins:
    Mkusher\SymfonyPlugin:
    Someone\SomepackagePlugin:
        extra_option_for_somepackagePlugin: 1
exclude: ['app/bootstrap.php.cache', 'app/cache/*']
cache_dir: '.padawan'

here we have 3 sections:

  1. plugins - plugins you want to be enabled for this project
  2. exclude - files or folders you want to exclude from being indexed
  3. cache_dir - folder for padawan.php cache for this project
  4. php - version of php being used for running padawan. Could be 5 or 7. php5.* will use nikic/PHP-Parser and 7 will use built-in AST builder.

Editors' plugins

Before editors were looking for composer.json file, now they will have to look for .padawan.yml first and only then look for composer.json.

@voronkovich
Copy link

👍

@msjyoo
Copy link

msjyoo commented Nov 17, 2015

Maybe this should be stored inside the .padawan folder?

@mkusher
Copy link
Member Author

mkusher commented Nov 17, 2015

@sekjun9878 this file is not autogenerated by padawan.php, you should create it manually. So for a new project your variant will need extra step - make dir .padawan :)

@mkusher
Copy link
Member Author

mkusher commented Nov 24, 2015

updated proposal: added php prop
php - version of php being used for running padawan. Could be 5 or 7. php 5.* will use nikic/PHP-Parser and php 7 will use built-in AST builder.

@msjyoo
Copy link

msjyoo commented Nov 24, 2015

@mkusher php7 has a built-in ast node builder?

@mkusher
Copy link
Member Author

mkusher commented Nov 24, 2015

@msjyoo
Copy link

msjyoo commented Nov 24, 2015

@mkusher That however introduces an additional dependency on the php-ast extension (and therefore a need for a custom PHP build)? I guess it depends on the result of https://wiki.php.net/rfc/parser-extension-api but for the forseeable future it looks like just using PHP-Parser seems a better choice.

@dantleech
Copy link

+1 would also be good to cascade back to a global configuration so I can f.e. ignore nested vendor files **/vendor

@mkusher mkusher modified the milestones: 0.4, 0.3 Sep 9, 2016
@michaeltintiuc
Copy link

michaeltintiuc commented Nov 27, 2017

Given that this had not progress for so long, perhaps it makes more sense to add features incrementally? Something among the lines of searching for padawan.yaml file and parsing the exclude dirs array?
I like the fact that there currently are no extra steps, the above will be an optional step for edge cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants