Skip to content

Commit

Permalink
Remove phpversion function
Browse files Browse the repository at this point in the history
  • Loading branch information
Kathryn Anne S Tan committed Jul 21, 2024
1 parent e2bf2ef commit 57b654b
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions app/Services/Scanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,34 +71,6 @@ public function filamentVersion( array $options )
}
}

public function phpVersion()
{
try{
// Composer json contains filament requirement
$composerContent = (new \App\Services\File())->composerJsonContent( $options['path'] );

// Extract version
if( isset( $composerContent['require'] ) && isset($composerContent['require']['php']) ){
$phpVersion = $composerContent['require']['php'];
if( strpos( $phpVersion, '|' )!==false ){
$list = explode( '|', $phpVersion );
$phpVersion = $list[ count($list )-1 ];

}

$phpVersion = trim($phpVersion, '^');
if( is_numeric($phpVersion) )
return $phpVersion;

}
}catch(\Exception $e){
dd( $e );
}

// Return default
return '8.2';
}

/**
* Scan directory and check if applicable for Fly.io deployment
*/
Expand Down

0 comments on commit 57b654b

Please sign in to comment.