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

Update finder options to force Swagger-PHP parse only *.php file #350

Merged
merged 1 commit into from
Dec 5, 2016

Conversation

marcoleong
Copy link
Contributor

We faced a issue where swagger-php trying to parse non-php files, that causes Unexpected token error. I added this patch to our version of swagger-php, to parse only files with .php extensions.

Is there any use case that swagger php needed to parse non-php files?

We faced a issue where swagger-php trying to parse non-php files, that causes `Unexpected token error`. I added this patch to our version of swagger-php, to parse only files with .php extensions.

Is there any use case that swagger php needed to parse non-php files?
@bfanger bfanger merged commit 2661386 into zircote:master Dec 5, 2016
@bfanger
Copy link
Collaborator

bfanger commented Dec 5, 2016

Sadly, some programmers used .inc and maybe others, but i haven't seen that in any modern php codebase. I'm in favour of parsing only *.php files by default.

If needed those users can configure a custom Finder object and pass that to Swagger\scan()

bfanger added a commit that referenced this pull request Dec 16, 2016
 - Dynamic Definitions / partial support #301
 - By default only scan *.php files #350
 - Removed silence operator @, improves compatiblity custom errorhandlers #331
 - Additional datetime classes & interfaces #338
 - Fixed case of UNDEFINED constants namespaces, improves hhvm compatibility #319
 - Misc improvements to the docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants