fly-apps / fly-laravel

Run your Laravel apps on Fly
40 stars 3 forks source link

Web App: Detect Node/PHP version #3

Closed KTanAug21 closed 1 year ago

KTanAug21 commented 1 year ago

Origin( Launch-c ): https://flyio.slab.com/posts/discussion-on-artisan-command-1p074z7a

PHP Version:

I think the scanner doesn't attempt to find the Node version, just PHP. The code is seen here:

https://github.com/superfly/flyctl/blob/master/scanner/laravel.go#L70

Basically it runs php -v and runs some regex against the response to find the version. The regex: PHP ([0-9]+\.[0-9]+)\.[0-9].

Example of doing that in PHP is here: https://www.phpliveregex.com/p/ICS

KTanAug21 commented 1 year ago