We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 306793c commit 7dd8290Copy full SHA for 7dd8290
bin/list-legacy-filenames
@@ -0,0 +1,3 @@
1
+#!/usr/bin/env bash
2
+
3
+echo ".php-version"
bin/parse-legacy-file
@@ -0,0 +1,18 @@
+get_legacy_version() {
4
+ current_file="$1"
5
+ basename="$(basename -- "$current_file")"
6
7
+ if [ "$basename" == ".php-version" ]; then
8
+ # Get version from .php-version file (filters out 'php-' prefix if it exists).
9
+ # The .php-version is used by rbenv and now rvm.
10
+ php_version="$(cat "$current_file")"
11
+ php_prefix="php-"
12
+ PHP_VERSION="${php_version/#$php_prefix/}"
13
+ fi
14
15
+ echo "$PHP_VERSION"
16
+}
17
18
+get_legacy_version "$1"
0 commit comments