Skip to content

Commit 90b449c

Browse files
authored
Merge pull request #20 from symfony-cli/deps-bump
Deps bump
2 parents 81cf7b8 + 13fc48c commit 90b449c

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/symfony-cli/phpstore
33
go 1.17
44

55
require (
6-
github.com/hashicorp/go-version v1.3.0
6+
github.com/hashicorp/go-version v1.6.0
77
github.com/mitchellh/go-homedir v1.1.0
88
github.com/pkg/errors v0.9.1
99
gopkg.in/yaml.v2 v2.4.0

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
github.com/hashicorp/go-version v1.3.0 h1:McDWVJIU/y+u1BRV06dPaLfLCaT7fUTJLp5r04x7iNw=
2-
github.com/hashicorp/go-version v1.3.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
1+
github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek=
2+
github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
33
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
44
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
55
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=

store.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import (
2323
"bytes"
2424
"encoding/json"
2525
"fmt"
26-
"io/ioutil"
2726
"os"
2827
"path/filepath"
2928
"sort"
@@ -200,7 +199,7 @@ func (s *PHPStore) loadVersions() {
200199
// disk cache?
201200
cache := filepath.Join(s.configDir, "php_versions.json")
202201
if _, err := os.Stat(cache); err == nil {
203-
if contents, err := ioutil.ReadFile(cache); err == nil {
202+
if contents, err := os.ReadFile(cache); err == nil {
204203
var vs versions
205204
if err := json.Unmarshal(contents, &vs); err == nil {
206205
for _, v := range vs {
@@ -222,7 +221,7 @@ func (s *PHPStore) loadVersions() {
222221
s.discover()
223222
sort.Sort(s.versions)
224223
if contents, err := json.MarshalIndent(s.versions, "", " "); err == nil {
225-
_ = ioutil.WriteFile(cache, contents, 0644)
224+
_ = os.WriteFile(cache, contents, 0644)
226225
}
227226
}
228227

@@ -282,7 +281,7 @@ func (s *PHPStore) readVersion(file string) []byte {
282281
if _, err := os.Stat(file); err != nil {
283282
return nil
284283
}
285-
contents, err := ioutil.ReadFile(file)
284+
contents, err := os.ReadFile(file)
286285
if err != nil {
287286
return nil
288287
}

0 commit comments

Comments
 (0)