From 284fc5b5030b94bb26a827766882ebb672dfe84e Mon Sep 17 00:00:00 2001 From: TangRufus Date: Mon, 13 Oct 2025 20:52:05 +0100 Subject: [PATCH] GitHub Actions: Fix `Update Version Data` workflow; Make `txtar` stable --- .gitattributes | 2 +- .github/workflows/update-data.yml | 35 -- .github/workflows/update-version-data.yml | 42 ++ Makefile | 27 +- README.md | 2 +- bin/update-all-versions | 7 +- {resources => data}/all-versions.json | 0 internal/common.go | 19 +- internal/composer/fail/main.go | 4 +- internal/composer/success/main.go | 55 +- .../testdata/_--mode_full____7_stable_.txtar | 32 ++ ...> _--mode_full_____7.1.2_____8.0.3_.txtar} | 67 ++- .../_--mode_full_____7.4_____8.4_.txtar | 22 + .../testdata/_--mode_full_____7__7.2.3_.txtar | 102 ++++ .../testdata/_--mode_full_____7__7.2_.txtar | 132 ----- .../testdata/_--mode_full_____7_stable_.txtar | 200 ------- .../testdata/_--mode_full_____8.2_.txtar | 22 + .../_--mode_full_____8.2____8.4.1_.txtar | 22 + .../_--mode_full_____8.2_____8.4.0_.txtar | 22 + .../testdata/_--mode_full_____8.3.4_.txtar | 22 + .../testdata/_--mode_full_____8_.txtar | 22 + .../testdata/_--mode_full_____8_rc_.txtar | 22 + .../success/testdata/_--mode_full______.txtar | 503 +---------------- .../testdata/_--mode_full______7.4_.txtar | 22 + .../testdata/_--mode_full_____stable_.txtar | 503 +---------------- ... => _--mode_minor-only____7_stable_.txtar} | 14 +- ...ode_minor-only_____7.1.2_____8.0.3_.txtar} | 10 +- .../_--mode_minor-only_____7.4_____8.4_.txtar | 22 + ...=> _--mode_minor-only_____7__7.2.3_.txtar} | 12 +- .../_--mode_minor-only_____8.2_.txtar | 22 + ..._--mode_minor-only_____8.2____8.4.1_.txtar | 22 + ...--mode_minor-only_____8.2_____8.4.0_.txtar | 22 + .../_--mode_minor-only_____8.3.4_.txtar | 22 + .../testdata/_--mode_minor-only_____8_.txtar | 22 + .../_--mode_minor-only_____8_rc_.txtar | 22 + .../testdata/_--mode_minor-only______.txtar | 34 +- .../_--mode_minor-only______7.4_.txtar | 22 + .../_--mode_minor-only_____stable_.txtar | 34 +- ...____7__7.2_.txtar => _____7_stable_.txtar} | 14 +- ....2_.txtar => ______7.1.2_____8.0.3_.txtar} | 10 +- .../success/testdata/______7.4_____8.4_.txtar | 22 + ..._7_stable_.txtar => ______7__7.2.3_.txtar} | 12 +- .../success/testdata/______8.2_.txtar | 22 + .../testdata/______8.2____8.4.1_.txtar | 22 + .../testdata/______8.2_____8.4.0_.txtar | 22 + .../success/testdata/______8.3.4_.txtar | 22 + .../composer/success/testdata/______8_.txtar | 22 + .../success/testdata/______8_rc_.txtar | 22 + .../composer/success/testdata/_______.txtar | 34 +- .../success/testdata/_______7.4_.txtar | 22 + .../success/testdata/______stable_.txtar | 34 +- internal/constraint/fail/main.go | 4 +- internal/constraint/success/main.go | 52 +- .../testdata/_--mode_full____7_stable_.txtar | 30 ++ ...> _--mode_full_____7.1.2_____8.0.3_.txtar} | 73 ++- .../_--mode_full_____7.4_____8.4_.txtar | 19 + .../testdata/_--mode_full_____7__7.2.3_.txtar | 100 ++++ .../testdata/_--mode_full_____7__7.2_.txtar | 130 ----- .../testdata/_--mode_full_____7_stable_.txtar | 198 ------- .../testdata/_--mode_full_____8.2_.txtar | 19 + .../_--mode_full_____8.2____8.4.1_.txtar | 19 + .../_--mode_full_____8.2_____8.4.0_.txtar | 19 + .../testdata/_--mode_full_____8.3.4_.txtar | 19 + .../testdata/_--mode_full_____8_.txtar | 19 + .../testdata/_--mode_full_____8_rc_.txtar | 19 + .../success/testdata/_--mode_full______.txtar | 504 +----------------- .../testdata/_--mode_full______7.4_.txtar | 19 + .../testdata/_--mode_full_____stable_.txtar | 504 +----------------- .../_--mode_minor-only____7_stable_.txtar | 30 ++ ...ode_minor-only_____7.1.2_____8.0.3_.txtar} | 16 +- .../_--mode_minor-only_____7.4_____8.4_.txtar | 19 + .../_--mode_minor-only_____7__7.2.3_.txtar | 32 ++ .../_--mode_minor-only_____7__7.2_.txtar | 32 -- .../_--mode_minor-only_____7_stable_.txtar | 34 -- .../_--mode_minor-only_____8.2_.txtar | 19 + ..._--mode_minor-only_____8.2____8.4.1_.txtar | 19 + ...--mode_minor-only_____8.2_____8.4.0_.txtar | 19 + .../_--mode_minor-only_____8.3.4_.txtar | 19 + .../testdata/_--mode_minor-only_____8_.txtar | 19 + .../_--mode_minor-only_____8_rc_.txtar | 19 + .../testdata/_--mode_minor-only______.txtar | 35 +- .../_--mode_minor-only______7.4_.txtar | 19 + .../_--mode_minor-only_____stable_.txtar | 35 +- .../success/testdata/_____7_stable_.txtar | 30 ++ ....2_.txtar => ______7.1.2_____8.0.3_.txtar} | 16 +- .../success/testdata/______7.4_____8.4_.txtar | 19 + ..._7_stable_.txtar => ______7__7.2.3_.txtar} | 18 +- .../success/testdata/______7__7.2_.txtar | 32 -- .../success/testdata/______8.2_.txtar | 19 + .../testdata/______8.2____8.4.1_.txtar | 19 + .../testdata/______8.2_____8.4.0_.txtar | 19 + .../success/testdata/______8.3.4_.txtar | 19 + .../success/testdata/______8_.txtar | 19 + .../success/testdata/______8_rc_.txtar | 19 + .../constraint/success/testdata/_______.txtar | 35 +- .../success/testdata/_______7.4_.txtar | 19 + .../success/testdata/______stable_.txtar | 35 +- src/Console/Source.php | 2 +- src/Releases/OfflineReleases.php | 2 +- tests/TestCase.php | 8 +- .../{releases-5.json => versions/v5.json} | 0 .../{releases-7.json => versions/v7.json} | 0 .../{releases-8.json => versions/v8.json} | 0 103 files changed, 1694 insertions(+), 3217 deletions(-) delete mode 100644 .github/workflows/update-data.yml create mode 100644 .github/workflows/update-version-data.yml rename {resources => data}/all-versions.json (100%) create mode 100644 internal/composer/success/testdata/_--mode_full____7_stable_.txtar rename internal/composer/success/testdata/{_--mode_full_____7.1.2_____8.1.2_.txtar => _--mode_full_____7.1.2_____8.0.3_.txtar} (80%) create mode 100644 internal/composer/success/testdata/_--mode_full_____7.4_____8.4_.txtar create mode 100644 internal/composer/success/testdata/_--mode_full_____7__7.2.3_.txtar delete mode 100644 internal/composer/success/testdata/_--mode_full_____7__7.2_.txtar delete mode 100644 internal/composer/success/testdata/_--mode_full_____7_stable_.txtar create mode 100644 internal/composer/success/testdata/_--mode_full_____8.2_.txtar create mode 100644 internal/composer/success/testdata/_--mode_full_____8.2____8.4.1_.txtar create mode 100644 internal/composer/success/testdata/_--mode_full_____8.2_____8.4.0_.txtar create mode 100644 internal/composer/success/testdata/_--mode_full_____8.3.4_.txtar create mode 100644 internal/composer/success/testdata/_--mode_full_____8_.txtar create mode 100644 internal/composer/success/testdata/_--mode_full_____8_rc_.txtar create mode 100644 internal/composer/success/testdata/_--mode_full______7.4_.txtar rename internal/composer/success/testdata/{_--mode_minor-only_____7__7.2_.txtar => _--mode_minor-only____7_stable_.txtar} (73%) rename internal/composer/success/testdata/{_--mode_minor-only_____7.1.2_____8.1.2_.txtar => _--mode_minor-only_____7.1.2_____8.0.3_.txtar} (78%) create mode 100644 internal/composer/success/testdata/_--mode_minor-only_____7.4_____8.4_.txtar rename internal/composer/success/testdata/{_--mode_minor-only_____7_stable_.txtar => _--mode_minor-only_____7__7.2.3_.txtar} (76%) create mode 100644 internal/composer/success/testdata/_--mode_minor-only_____8.2_.txtar create mode 100644 internal/composer/success/testdata/_--mode_minor-only_____8.2____8.4.1_.txtar create mode 100644 internal/composer/success/testdata/_--mode_minor-only_____8.2_____8.4.0_.txtar create mode 100644 internal/composer/success/testdata/_--mode_minor-only_____8.3.4_.txtar create mode 100644 internal/composer/success/testdata/_--mode_minor-only_____8_.txtar create mode 100644 internal/composer/success/testdata/_--mode_minor-only_____8_rc_.txtar create mode 100644 internal/composer/success/testdata/_--mode_minor-only______7.4_.txtar rename internal/composer/success/testdata/{______7__7.2_.txtar => _____7_stable_.txtar} (72%) rename internal/composer/success/testdata/{______7.1.2_____8.1.2_.txtar => ______7.1.2_____8.0.3_.txtar} (77%) create mode 100644 internal/composer/success/testdata/______7.4_____8.4_.txtar rename internal/composer/success/testdata/{______7_stable_.txtar => ______7__7.2.3_.txtar} (75%) create mode 100644 internal/composer/success/testdata/______8.2_.txtar create mode 100644 internal/composer/success/testdata/______8.2____8.4.1_.txtar create mode 100644 internal/composer/success/testdata/______8.2_____8.4.0_.txtar create mode 100644 internal/composer/success/testdata/______8.3.4_.txtar create mode 100644 internal/composer/success/testdata/______8_.txtar create mode 100644 internal/composer/success/testdata/______8_rc_.txtar create mode 100644 internal/composer/success/testdata/_______7.4_.txtar create mode 100644 internal/constraint/success/testdata/_--mode_full____7_stable_.txtar rename internal/constraint/success/testdata/{_--mode_full_____7.1.2_____8.1.2_.txtar => _--mode_full_____7.1.2_____8.0.3_.txtar} (74%) create mode 100644 internal/constraint/success/testdata/_--mode_full_____7.4_____8.4_.txtar create mode 100644 internal/constraint/success/testdata/_--mode_full_____7__7.2.3_.txtar delete mode 100644 internal/constraint/success/testdata/_--mode_full_____7__7.2_.txtar delete mode 100644 internal/constraint/success/testdata/_--mode_full_____7_stable_.txtar create mode 100644 internal/constraint/success/testdata/_--mode_full_____8.2_.txtar create mode 100644 internal/constraint/success/testdata/_--mode_full_____8.2____8.4.1_.txtar create mode 100644 internal/constraint/success/testdata/_--mode_full_____8.2_____8.4.0_.txtar create mode 100644 internal/constraint/success/testdata/_--mode_full_____8.3.4_.txtar create mode 100644 internal/constraint/success/testdata/_--mode_full_____8_.txtar create mode 100644 internal/constraint/success/testdata/_--mode_full_____8_rc_.txtar create mode 100644 internal/constraint/success/testdata/_--mode_full______7.4_.txtar create mode 100644 internal/constraint/success/testdata/_--mode_minor-only____7_stable_.txtar rename internal/constraint/success/testdata/{_--mode_minor-only_____7.1.2_____8.1.2_.txtar => _--mode_minor-only_____7.1.2_____8.0.3_.txtar} (51%) create mode 100644 internal/constraint/success/testdata/_--mode_minor-only_____7.4_____8.4_.txtar create mode 100644 internal/constraint/success/testdata/_--mode_minor-only_____7__7.2.3_.txtar delete mode 100644 internal/constraint/success/testdata/_--mode_minor-only_____7__7.2_.txtar delete mode 100644 internal/constraint/success/testdata/_--mode_minor-only_____7_stable_.txtar create mode 100644 internal/constraint/success/testdata/_--mode_minor-only_____8.2_.txtar create mode 100644 internal/constraint/success/testdata/_--mode_minor-only_____8.2____8.4.1_.txtar create mode 100644 internal/constraint/success/testdata/_--mode_minor-only_____8.2_____8.4.0_.txtar create mode 100644 internal/constraint/success/testdata/_--mode_minor-only_____8.3.4_.txtar create mode 100644 internal/constraint/success/testdata/_--mode_minor-only_____8_.txtar create mode 100644 internal/constraint/success/testdata/_--mode_minor-only_____8_rc_.txtar create mode 100644 internal/constraint/success/testdata/_--mode_minor-only______7.4_.txtar create mode 100644 internal/constraint/success/testdata/_____7_stable_.txtar rename internal/constraint/success/testdata/{______7.1.2_____8.1.2_.txtar => ______7.1.2_____8.0.3_.txtar} (51%) create mode 100644 internal/constraint/success/testdata/______7.4_____8.4_.txtar rename internal/constraint/success/testdata/{______7_stable_.txtar => ______7__7.2.3_.txtar} (50%) delete mode 100644 internal/constraint/success/testdata/______7__7.2_.txtar create mode 100644 internal/constraint/success/testdata/______8.2_.txtar create mode 100644 internal/constraint/success/testdata/______8.2____8.4.1_.txtar create mode 100644 internal/constraint/success/testdata/______8.2_____8.4.0_.txtar create mode 100644 internal/constraint/success/testdata/______8.3.4_.txtar create mode 100644 internal/constraint/success/testdata/______8_.txtar create mode 100644 internal/constraint/success/testdata/______8_rc_.txtar create mode 100644 internal/constraint/success/testdata/_______7.4_.txtar rename tests/data/{releases-5.json => versions/v5.json} (100%) rename tests/data/{releases-7.json => versions/v7.json} (100%) rename tests/data/{releases-8.json => versions/v8.json} (100%) diff --git a/.gitattributes b/.gitattributes index 02caddb..bbcc2e0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,7 +5,7 @@ # Export white-listed production code only. /bin -export-ignore -/resources -export-ignore +/data -export-ignore /src -export-ignore /composer.json -export-ignore /composer.lock -export-ignore diff --git a/.github/workflows/update-data.yml b/.github/workflows/update-data.yml deleted file mode 100644 index 1a81d5d..0000000 --- a/.github/workflows/update-data.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Update Data - -on: - workflow_dispatch: - schedule: - - cron: 13 3 * * 1 # Weekly on Monday - push: - branches: - - main - paths-ignore: - - .github/** - - .gitattributes - - .gitignore - - LICENSE - - pint.json - - README.md - - '!.github/workflows/update-data.yml' - -concurrency: - group: ${{ github.workflow }}-${{ github.ref_name }} - cancel-in-progress: true - -permissions: {} - -jobs: - update-data: - uses: typisttech/.github/.github/workflows/create-auto-merged-pull-request-php.yml@v2 - permissions: - contents: read - with: - command: composer data:update - php-version: '8.4' - branch: "tastendruck/github_actions/update-data/${{ github.ref_name }}" - labels: update_data - secrets: inherit diff --git a/.github/workflows/update-version-data.yml b/.github/workflows/update-version-data.yml new file mode 100644 index 0000000..34edb08 --- /dev/null +++ b/.github/workflows/update-version-data.yml @@ -0,0 +1,42 @@ +name: Update Version Data + +on: + workflow_dispatch: + schedule: + - cron: 13 3 * * 1 # Weekly on Monday + push: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref_name }} + cancel-in-progress: true + +permissions: {} + +jobs: + update-data: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + + - uses: shivammathur/setup-php@v2 + with: + php-version: '8.4' + coverage: none + + - uses: actions/setup-go@v6 + with: + go-version-file: 'go.mod' + + - run: make version-data + env: + MAKEFLAGS: "--jobs=4 --output-sync=target" + + - uses: typisttech/.github/.github/actions/create-auto-merged-pull-request@v2 + with: + app-id: ${{ vars.TASTENDRUCK_APP_ID }} + private-key: ${{ secrets.TASTENDRUCK_PRIVATE_KEY }} + branch: "tastendruck/github_actions/update-data/${{ github.ref_name }}" + title: ":robot: `make version-data`" + labels: update_data diff --git a/Makefile b/Makefile index 6aae2be..78353c9 100644 --- a/Makefile +++ b/Makefile @@ -12,16 +12,27 @@ bin: vendor test-%: % PATH="$(shell pwd)/$*:$(shell echo $$PATH)" \ - go test -count=1 ./... + go test -count=1 ./... -tests/data/releases-%.json: FORCE - curl 'https://www.php.net/releases/index.php?json&max=1000&version=$*' | jq . > ./tests/data/releases-$*.json +.PHONY: tests/data/versions +tests/data/versions: MAJORS := 5 7 8 +tests/data/versions: + rm -rf tests/data/versions + mkdir -p tests/data/versions + $(MAKE) $(foreach MAJOR,$(MAJORS),tests/data/versions/v$(MAJOR).json) -resources/all-versions.json: bin tests/data/releases-5.json tests/data/releases-7.json tests/data/releases-8.json +tests/data/versions/v%.json: FORCE + curl 'https://www.php.net/releases/index.php?json&max=1000&version=$*' | \ + jq . > tests/data/versions/v$*.json + +.PHONY: data/all-versions.json +data/all-versions.json: bin ./bin/update-all-versions ---go-generate: - go generate ./... +.PHONY: version-data +version-data: data/all-versions.json tests/data/versions -txtar: resources/all-versions.json --go-generate - $(MAKE) UPDATE_SCRIPTS=1 test-bin +.PHONY: txtar +txtar: data/all-versions.json + go generate ./... + UPDATE_SCRIPTS=1 $(MAKE) test-bin diff --git a/README.md b/README.md index fb717b7..d40ded1 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ Available modes: Available sources: - `auto` *(default)*: Use `offline` in `minor-only` mode. Otherwise, fetch from [php.net](https://www.php.net/releases/index.php) - `php.net`: Fetch releases information from [php.net](https://www.php.net/releases/index.php) -- `offline`: Use [hardcoded releases](resources/all-versions.json) information +- `offline`: Use [hardcoded releases](data/all-versions.json) information ## Installation diff --git a/bin/update-all-versions b/bin/update-all-versions index 87b8e19..c8a3812 100755 --- a/bin/update-all-versions +++ b/bin/update-all-versions @@ -12,5 +12,10 @@ $releases = new PhpNetReleases; $data = $releases->all(); $data = Semver::rsort($data); +$dir = __DIR__.'/../data'; +@mkdir($dir, 0755); + $content = json_encode($data, JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); -file_put_contents(__DIR__.'/../resources/all-versions.json', $content); +file_put_contents($dir .'/all-versions.json', $content); + +echo "Done: '{$dir}/all-versions.json' updated".PHP_EOL; diff --git a/resources/all-versions.json b/data/all-versions.json similarity index 100% rename from resources/all-versions.json rename to data/all-versions.json diff --git a/internal/common.go b/internal/common.go index f527a5a..414f5cf 100644 --- a/internal/common.go +++ b/internal/common.go @@ -1,14 +1,25 @@ package internal -var Constraints = []string{ +var EOLConstraints = []string{ "^7", "^7.1", "^7.1.2", - "^7.1.2 || ~8.1.2", - "^7 ^7.2", + "^7.1.2 || ~8.0.3", + "^7 <7.2.3", + "7@stable", +} + +var SupportedConstraints = []string{ + "^8", + "^8.2", + "^8.3.4", + "^8.2 || ~8.4.0", + "^8.2 <= 8.4.1", + "^7.4 || ^8.4", + ">=7.4", "*", "@stable", - "^7@stable", + "^8@rc", } var Modes = []string{ diff --git a/internal/composer/fail/main.go b/internal/composer/fail/main.go index 48dea05..f81d432 100644 --- a/internal/composer/fail/main.go +++ b/internal/composer/fail/main.go @@ -81,7 +81,9 @@ func (d data) Write(f *os.File) error { } func main() { - var cases []data + num := len(internal.Modes) * len(rawCases) + cases := make([]data, 0, num) + for _, mode := range internal.Modes { for _, r := range rawCases { cases = append(cases, data{ diff --git a/internal/composer/success/main.go b/internal/composer/success/main.go index 6ff6f96..2da3eb4 100644 --- a/internal/composer/success/main.go +++ b/internal/composer/success/main.go @@ -8,7 +8,7 @@ import ( "github.com/typisttech/php-matrix/internal" ) -const fileTemplateRaw = `# DO NOT EDIT THIS FILE +const eolTemplateRaw = `# DO NOT EDIT THIS FILE # This file is generated by "internal/composer/success/main.go" # Test the '{{ .Name }}' case @@ -34,11 +34,37 @@ cmp stdout stdout.golden -- stdout.golden -- ` -var fileTemplate = template.Must(template.New("").Parse(fileTemplateRaw)) +const supportedTemplateRaw = `# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '{{ .Name }}' case + +exec php-matrix composer {{ .Mode }} +stdout . +! stderr . + +exec php-matrix composer {{ .Mode }} --source=auto +stdout . +! stderr . + +exec php-matrix composer {{ .Mode }} --source=php.net +stdout . +! stderr . + +exec php-matrix composer {{ .Mode }} --source=offline +stdout . +! stderr . + +-- composer.json -- +{"require":{"php":"{{ .Constraint }}"}} +` + +var eolFileTemplate = template.Must(template.New("").Parse(eolTemplateRaw)) +var supportedFileTemplate = template.Must(template.New("").Parse(supportedTemplateRaw)) type data struct { - Mode string - Constraint string + Mode string + Constraint string + fileTemplate *template.Template } func (d data) Name() string { @@ -46,16 +72,27 @@ func (d data) Name() string { } func (d data) Write(f *os.File) error { - return fileTemplate.Execute(f, d) + return d.fileTemplate.Execute(f, d) } func main() { - var cases []data + num := len(internal.Modes) * (len(internal.EOLConstraints) + len(internal.SupportedConstraints)) + cases := make([]data, 0, num) + for _, mode := range internal.Modes { - for _, constraint := range internal.Constraints { + for _, constraint := range internal.EOLConstraints { + cases = append(cases, data{ + Mode: mode, + Constraint: constraint, + fileTemplate: eolFileTemplate, + }) + } + + for _, constraint := range internal.SupportedConstraints { cases = append(cases, data{ - Mode: mode, - Constraint: constraint, + Mode: mode, + Constraint: constraint, + fileTemplate: supportedFileTemplate, }) } } diff --git a/internal/composer/success/testdata/_--mode_full____7_stable_.txtar b/internal/composer/success/testdata/_--mode_full____7_stable_.txtar new file mode 100644 index 0000000..021cb38 --- /dev/null +++ b/internal/composer/success/testdata/_--mode_full____7_stable_.txtar @@ -0,0 +1,32 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '"--mode=full"__"7@stable"' case + +exec php-matrix composer --mode=full +cmp stdout stdout.golden +! stderr . + +exec php-matrix composer --mode=full --source=auto +cmp stdout stdout.golden +! stderr . + +exec php-matrix composer --mode=full --source=php.net +cmp stdout stdout.golden +! stderr . + +exec php-matrix composer --mode=full --source=offline +cmp stdout stdout.golden +! stderr . + +-- composer.json -- +{"require":{"php":"7@stable"}} + +-- stdout.golden -- +{ + "constraint": "7@stable", + "versions": [ + "7.0.0" + ], + "lowest": "7.0.0", + "highest": "7.0.0" +} diff --git a/internal/composer/success/testdata/_--mode_full_____7.1.2_____8.1.2_.txtar b/internal/composer/success/testdata/_--mode_full_____7.1.2_____8.0.3_.txtar similarity index 80% rename from internal/composer/success/testdata/_--mode_full_____7.1.2_____8.1.2_.txtar rename to internal/composer/success/testdata/_--mode_full_____7.1.2_____8.0.3_.txtar index d548fa8..8d8120d 100644 --- a/internal/composer/success/testdata/_--mode_full_____7.1.2_____8.1.2_.txtar +++ b/internal/composer/success/testdata/_--mode_full_____7.1.2_____8.0.3_.txtar @@ -1,6 +1,6 @@ # DO NOT EDIT THIS FILE # This file is generated by "internal/composer/success/main.go" -# Test the '"--mode=full"__"^7.1.2 || ~8.1.2"' case +# Test the '"--mode=full"__"^7.1.2 || ~8.0.3"' case exec php-matrix composer --mode=full cmp stdout stdout.golden @@ -19,11 +19,11 @@ cmp stdout stdout.golden ! stderr . -- composer.json -- -{"require":{"php":"^7.1.2 || ~8.1.2"}} +{"require":{"php":"^7.1.2 || ~8.0.3"}} -- stdout.golden -- { - "constraint": "^7.1.2 || ~8.1.2", + "constraint": "^7.1.2 || ~8.0.3", "versions": [ "7.1.2", "7.1.3", @@ -158,39 +158,34 @@ cmp stdout stdout.golden "7.4.30", "7.4.32", "7.4.33", - "8.1.2", - "8.1.3", - "8.1.4", - "8.1.5", - "8.1.6", - "8.1.7", - "8.1.8", - "8.1.9", - "8.1.10", - "8.1.11", - "8.1.12", - "8.1.13", - "8.1.14", - "8.1.15", - "8.1.16", - "8.1.17", - "8.1.18", - "8.1.19", - "8.1.20", - "8.1.21", - "8.1.22", - "8.1.23", - "8.1.24", - "8.1.25", - "8.1.26", - "8.1.27", - "8.1.28", - "8.1.29", - "8.1.30", - "8.1.31", - "8.1.32", - "8.1.33" + "8.0.3", + "8.0.5", + "8.0.6", + "8.0.7", + "8.0.8", + "8.0.9", + "8.0.10", + "8.0.11", + "8.0.12", + "8.0.13", + "8.0.14", + "8.0.15", + "8.0.16", + "8.0.17", + "8.0.18", + "8.0.19", + "8.0.20", + "8.0.21", + "8.0.22", + "8.0.23", + "8.0.24", + "8.0.25", + "8.0.26", + "8.0.27", + "8.0.28", + "8.0.29", + "8.0.30" ], "lowest": "7.1.2", - "highest": "8.1.33" + "highest": "8.0.30" } diff --git a/internal/composer/success/testdata/_--mode_full_____7.4_____8.4_.txtar b/internal/composer/success/testdata/_--mode_full_____7.4_____8.4_.txtar new file mode 100644 index 0000000..3073ff1 --- /dev/null +++ b/internal/composer/success/testdata/_--mode_full_____7.4_____8.4_.txtar @@ -0,0 +1,22 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '"--mode=full"__"^7.4 || ^8.4"' case + +exec php-matrix composer --mode=full +stdout . +! stderr . + +exec php-matrix composer --mode=full --source=auto +stdout . +! stderr . + +exec php-matrix composer --mode=full --source=php.net +stdout . +! stderr . + +exec php-matrix composer --mode=full --source=offline +stdout . +! stderr . + +-- composer.json -- +{"require":{"php":"^7.4 || ^8.4"}} diff --git a/internal/composer/success/testdata/_--mode_full_____7__7.2.3_.txtar b/internal/composer/success/testdata/_--mode_full_____7__7.2.3_.txtar new file mode 100644 index 0000000..ab47289 --- /dev/null +++ b/internal/composer/success/testdata/_--mode_full_____7__7.2.3_.txtar @@ -0,0 +1,102 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '"--mode=full"__"^7 <7.2.3"' case + +exec php-matrix composer --mode=full +cmp stdout stdout.golden +! stderr . + +exec php-matrix composer --mode=full --source=auto +cmp stdout stdout.golden +! stderr . + +exec php-matrix composer --mode=full --source=php.net +cmp stdout stdout.golden +! stderr . + +exec php-matrix composer --mode=full --source=offline +cmp stdout stdout.golden +! stderr . + +-- composer.json -- +{"require":{"php":"^7 <7.2.3"}} + +-- stdout.golden -- +{ + "constraint": "^7 <7.2.3", + "versions": [ + "7.0.0", + "7.0.1", + "7.0.2", + "7.0.3", + "7.0.4", + "7.0.5", + "7.0.6", + "7.0.7", + "7.0.8", + "7.0.9", + "7.0.10", + "7.0.11", + "7.0.12", + "7.0.13", + "7.0.14", + "7.0.15", + "7.0.16", + "7.0.17", + "7.0.18", + "7.0.19", + "7.0.20", + "7.0.21", + "7.0.22", + "7.0.23", + "7.0.24", + "7.0.25", + "7.0.26", + "7.0.27", + "7.0.28", + "7.0.29", + "7.0.30", + "7.0.31", + "7.0.32", + "7.0.33", + "7.1.0", + "7.1.1", + "7.1.2", + "7.1.3", + "7.1.4", + "7.1.5", + "7.1.6", + "7.1.7", + "7.1.8", + "7.1.9", + "7.1.10", + "7.1.11", + "7.1.12", + "7.1.13", + "7.1.14", + "7.1.15", + "7.1.16", + "7.1.17", + "7.1.18", + "7.1.19", + "7.1.20", + "7.1.21", + "7.1.22", + "7.1.23", + "7.1.24", + "7.1.25", + "7.1.26", + "7.1.27", + "7.1.28", + "7.1.29", + "7.1.30", + "7.1.31", + "7.1.32", + "7.1.33", + "7.2.0", + "7.2.1", + "7.2.2" + ], + "lowest": "7.0.0", + "highest": "7.2.2" +} diff --git a/internal/composer/success/testdata/_--mode_full_____7__7.2_.txtar b/internal/composer/success/testdata/_--mode_full_____7__7.2_.txtar deleted file mode 100644 index 11853c4..0000000 --- a/internal/composer/success/testdata/_--mode_full_____7__7.2_.txtar +++ /dev/null @@ -1,132 +0,0 @@ -# DO NOT EDIT THIS FILE -# This file is generated by "internal/composer/success/main.go" -# Test the '"--mode=full"__"^7 ^7.2"' case - -exec php-matrix composer --mode=full -cmp stdout stdout.golden -! stderr . - -exec php-matrix composer --mode=full --source=auto -cmp stdout stdout.golden -! stderr . - -exec php-matrix composer --mode=full --source=php.net -cmp stdout stdout.golden -! stderr . - -exec php-matrix composer --mode=full --source=offline -cmp stdout stdout.golden -! stderr . - --- composer.json -- -{"require":{"php":"^7 ^7.2"}} - --- stdout.golden -- -{ - "constraint": "^7 ^7.2", - "versions": [ - "7.2.0", - "7.2.1", - "7.2.2", - "7.2.3", - "7.2.4", - "7.2.5", - "7.2.6", - "7.2.7", - "7.2.8", - "7.2.9", - "7.2.10", - "7.2.11", - "7.2.12", - "7.2.13", - "7.2.14", - "7.2.15", - "7.2.16", - "7.2.17", - "7.2.18", - "7.2.19", - "7.2.20", - "7.2.21", - "7.2.22", - "7.2.23", - "7.2.24", - "7.2.25", - "7.2.26", - "7.2.27", - "7.2.28", - "7.2.29", - "7.2.30", - "7.2.31", - "7.2.32", - "7.2.33", - "7.2.34", - "7.3.0", - "7.3.1", - "7.3.2", - "7.3.3", - "7.3.4", - "7.3.5", - "7.3.6", - "7.3.7", - "7.3.8", - "7.3.9", - "7.3.10", - "7.3.11", - "7.3.12", - "7.3.13", - "7.3.14", - "7.3.15", - "7.3.16", - "7.3.17", - "7.3.18", - "7.3.19", - "7.3.20", - "7.3.21", - "7.3.22", - "7.3.23", - "7.3.24", - "7.3.25", - "7.3.26", - "7.3.27", - "7.3.28", - "7.3.29", - "7.3.30", - "7.3.31", - "7.3.32", - "7.3.33", - "7.4.0", - "7.4.1", - "7.4.2", - "7.4.3", - "7.4.4", - "7.4.5", - "7.4.6", - "7.4.7", - "7.4.8", - "7.4.9", - "7.4.10", - "7.4.11", - "7.4.12", - "7.4.13", - "7.4.14", - "7.4.15", - "7.4.16", - "7.4.18", - "7.4.19", - "7.4.20", - "7.4.21", - "7.4.22", - "7.4.23", - "7.4.24", - "7.4.25", - "7.4.26", - "7.4.27", - "7.4.28", - "7.4.29", - "7.4.30", - "7.4.32", - "7.4.33" - ], - "lowest": "7.2.0", - "highest": "7.4.33" -} diff --git a/internal/composer/success/testdata/_--mode_full_____7_stable_.txtar b/internal/composer/success/testdata/_--mode_full_____7_stable_.txtar deleted file mode 100644 index 21e9e7a..0000000 --- a/internal/composer/success/testdata/_--mode_full_____7_stable_.txtar +++ /dev/null @@ -1,200 +0,0 @@ -# DO NOT EDIT THIS FILE -# This file is generated by "internal/composer/success/main.go" -# Test the '"--mode=full"__"^7@stable"' case - -exec php-matrix composer --mode=full -cmp stdout stdout.golden -! stderr . - -exec php-matrix composer --mode=full --source=auto -cmp stdout stdout.golden -! stderr . - -exec php-matrix composer --mode=full --source=php.net -cmp stdout stdout.golden -! stderr . - -exec php-matrix composer --mode=full --source=offline -cmp stdout stdout.golden -! stderr . - --- composer.json -- -{"require":{"php":"^7@stable"}} - --- stdout.golden -- -{ - "constraint": "^7@stable", - "versions": [ - "7.0.0", - "7.0.1", - "7.0.2", - "7.0.3", - "7.0.4", - "7.0.5", - "7.0.6", - "7.0.7", - "7.0.8", - "7.0.9", - "7.0.10", - "7.0.11", - "7.0.12", - "7.0.13", - "7.0.14", - "7.0.15", - "7.0.16", - "7.0.17", - "7.0.18", - "7.0.19", - "7.0.20", - "7.0.21", - "7.0.22", - "7.0.23", - "7.0.24", - "7.0.25", - "7.0.26", - "7.0.27", - "7.0.28", - "7.0.29", - "7.0.30", - "7.0.31", - "7.0.32", - "7.0.33", - "7.1.0", - "7.1.1", - "7.1.2", - "7.1.3", - "7.1.4", - "7.1.5", - "7.1.6", - "7.1.7", - "7.1.8", - "7.1.9", - "7.1.10", - "7.1.11", - "7.1.12", - "7.1.13", - "7.1.14", - "7.1.15", - "7.1.16", - "7.1.17", - "7.1.18", - "7.1.19", - "7.1.20", - "7.1.21", - "7.1.22", - "7.1.23", - "7.1.24", - "7.1.25", - "7.1.26", - "7.1.27", - "7.1.28", - "7.1.29", - "7.1.30", - "7.1.31", - "7.1.32", - "7.1.33", - "7.2.0", - "7.2.1", - "7.2.2", - "7.2.3", - "7.2.4", - "7.2.5", - "7.2.6", - "7.2.7", - "7.2.8", - "7.2.9", - "7.2.10", - "7.2.11", - "7.2.12", - "7.2.13", - "7.2.14", - "7.2.15", - "7.2.16", - "7.2.17", - "7.2.18", - "7.2.19", - "7.2.20", - "7.2.21", - "7.2.22", - "7.2.23", - "7.2.24", - "7.2.25", - "7.2.26", - "7.2.27", - "7.2.28", - "7.2.29", - "7.2.30", - "7.2.31", - "7.2.32", - "7.2.33", - "7.2.34", - "7.3.0", - "7.3.1", - "7.3.2", - "7.3.3", - "7.3.4", - "7.3.5", - "7.3.6", - "7.3.7", - "7.3.8", - "7.3.9", - "7.3.10", - "7.3.11", - "7.3.12", - "7.3.13", - "7.3.14", - "7.3.15", - "7.3.16", - "7.3.17", - "7.3.18", - "7.3.19", - "7.3.20", - "7.3.21", - "7.3.22", - "7.3.23", - "7.3.24", - "7.3.25", - "7.3.26", - "7.3.27", - "7.3.28", - "7.3.29", - "7.3.30", - "7.3.31", - "7.3.32", - "7.3.33", - "7.4.0", - "7.4.1", - "7.4.2", - "7.4.3", - "7.4.4", - "7.4.5", - "7.4.6", - "7.4.7", - "7.4.8", - "7.4.9", - "7.4.10", - "7.4.11", - "7.4.12", - "7.4.13", - "7.4.14", - "7.4.15", - "7.4.16", - "7.4.18", - "7.4.19", - "7.4.20", - "7.4.21", - "7.4.22", - "7.4.23", - "7.4.24", - "7.4.25", - "7.4.26", - "7.4.27", - "7.4.28", - "7.4.29", - "7.4.30", - "7.4.32", - "7.4.33" - ], - "lowest": "7.0.0", - "highest": "7.4.33" -} diff --git a/internal/composer/success/testdata/_--mode_full_____8.2_.txtar b/internal/composer/success/testdata/_--mode_full_____8.2_.txtar new file mode 100644 index 0000000..8a2466c --- /dev/null +++ b/internal/composer/success/testdata/_--mode_full_____8.2_.txtar @@ -0,0 +1,22 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '"--mode=full"__"^8.2"' case + +exec php-matrix composer --mode=full +stdout . +! stderr . + +exec php-matrix composer --mode=full --source=auto +stdout . +! stderr . + +exec php-matrix composer --mode=full --source=php.net +stdout . +! stderr . + +exec php-matrix composer --mode=full --source=offline +stdout . +! stderr . + +-- composer.json -- +{"require":{"php":"^8.2"}} diff --git a/internal/composer/success/testdata/_--mode_full_____8.2____8.4.1_.txtar b/internal/composer/success/testdata/_--mode_full_____8.2____8.4.1_.txtar new file mode 100644 index 0000000..f7c8ea9 --- /dev/null +++ b/internal/composer/success/testdata/_--mode_full_____8.2____8.4.1_.txtar @@ -0,0 +1,22 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '"--mode=full"__"^8.2 <= 8.4.1"' case + +exec php-matrix composer --mode=full +stdout . +! stderr . + +exec php-matrix composer --mode=full --source=auto +stdout . +! stderr . + +exec php-matrix composer --mode=full --source=php.net +stdout . +! stderr . + +exec php-matrix composer --mode=full --source=offline +stdout . +! stderr . + +-- composer.json -- +{"require":{"php":"^8.2 <= 8.4.1"}} diff --git a/internal/composer/success/testdata/_--mode_full_____8.2_____8.4.0_.txtar b/internal/composer/success/testdata/_--mode_full_____8.2_____8.4.0_.txtar new file mode 100644 index 0000000..64e0451 --- /dev/null +++ b/internal/composer/success/testdata/_--mode_full_____8.2_____8.4.0_.txtar @@ -0,0 +1,22 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '"--mode=full"__"^8.2 || ~8.4.0"' case + +exec php-matrix composer --mode=full +stdout . +! stderr . + +exec php-matrix composer --mode=full --source=auto +stdout . +! stderr . + +exec php-matrix composer --mode=full --source=php.net +stdout . +! stderr . + +exec php-matrix composer --mode=full --source=offline +stdout . +! stderr . + +-- composer.json -- +{"require":{"php":"^8.2 || ~8.4.0"}} diff --git a/internal/composer/success/testdata/_--mode_full_____8.3.4_.txtar b/internal/composer/success/testdata/_--mode_full_____8.3.4_.txtar new file mode 100644 index 0000000..cacec3f --- /dev/null +++ b/internal/composer/success/testdata/_--mode_full_____8.3.4_.txtar @@ -0,0 +1,22 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '"--mode=full"__"^8.3.4"' case + +exec php-matrix composer --mode=full +stdout . +! stderr . + +exec php-matrix composer --mode=full --source=auto +stdout . +! stderr . + +exec php-matrix composer --mode=full --source=php.net +stdout . +! stderr . + +exec php-matrix composer --mode=full --source=offline +stdout . +! stderr . + +-- composer.json -- +{"require":{"php":"^8.3.4"}} diff --git a/internal/composer/success/testdata/_--mode_full_____8_.txtar b/internal/composer/success/testdata/_--mode_full_____8_.txtar new file mode 100644 index 0000000..7bba494 --- /dev/null +++ b/internal/composer/success/testdata/_--mode_full_____8_.txtar @@ -0,0 +1,22 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '"--mode=full"__"^8"' case + +exec php-matrix composer --mode=full +stdout . +! stderr . + +exec php-matrix composer --mode=full --source=auto +stdout . +! stderr . + +exec php-matrix composer --mode=full --source=php.net +stdout . +! stderr . + +exec php-matrix composer --mode=full --source=offline +stdout . +! stderr . + +-- composer.json -- +{"require":{"php":"^8"}} diff --git a/internal/composer/success/testdata/_--mode_full_____8_rc_.txtar b/internal/composer/success/testdata/_--mode_full_____8_rc_.txtar new file mode 100644 index 0000000..567f63b --- /dev/null +++ b/internal/composer/success/testdata/_--mode_full_____8_rc_.txtar @@ -0,0 +1,22 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '"--mode=full"__"^8@rc"' case + +exec php-matrix composer --mode=full +stdout . +! stderr . + +exec php-matrix composer --mode=full --source=auto +stdout . +! stderr . + +exec php-matrix composer --mode=full --source=php.net +stdout . +! stderr . + +exec php-matrix composer --mode=full --source=offline +stdout . +! stderr . + +-- composer.json -- +{"require":{"php":"^8@rc"}} diff --git a/internal/composer/success/testdata/_--mode_full______.txtar b/internal/composer/success/testdata/_--mode_full______.txtar index 42d6ad7..5281dca 100644 --- a/internal/composer/success/testdata/_--mode_full______.txtar +++ b/internal/composer/success/testdata/_--mode_full______.txtar @@ -3,515 +3,20 @@ # Test the '"--mode=full"__"*"' case exec php-matrix composer --mode=full -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix composer --mode=full --source=auto -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix composer --mode=full --source=php.net -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix composer --mode=full --source=offline -cmp stdout stdout.golden +stdout . ! stderr . -- composer.json -- {"require":{"php":"*"}} - --- stdout.golden -- -{ - "constraint": "*", - "versions": [ - "5.0.0", - "5.0.1", - "5.0.2", - "5.0.3", - "5.0.4", - "5.0.5", - "5.1.0", - "5.1.1", - "5.1.2", - "5.1.3", - "5.1.4", - "5.1.5", - "5.1.6", - "5.2.0", - "5.2.1", - "5.2.2", - "5.2.3", - "5.2.4", - "5.2.5", - "5.2.6", - "5.2.8", - "5.2.9", - "5.2.10", - "5.2.11", - "5.2.12", - "5.2.13", - "5.2.14", - "5.2.15", - "5.2.16", - "5.2.17", - "5.3.0", - "5.3.1", - "5.3.2", - "5.3.3", - "5.3.4", - "5.3.5", - "5.3.6", - "5.3.7", - "5.3.8", - "5.3.9", - "5.3.10", - "5.3.11", - "5.3.12", - "5.3.13", - "5.3.14", - "5.3.15", - "5.3.16", - "5.3.17", - "5.3.18", - "5.3.19", - "5.3.20", - "5.3.21", - "5.3.22", - "5.3.23", - "5.3.24", - "5.3.25", - "5.3.26", - "5.3.27", - "5.3.28", - "5.3.29", - "5.4.0", - "5.4.1", - "5.4.2", - "5.4.3", - "5.4.4", - "5.4.5", - "5.4.6", - "5.4.7", - "5.4.8", - "5.4.9", - "5.4.10", - "5.4.11", - "5.4.12", - "5.4.13", - "5.4.14", - "5.4.15", - "5.4.16", - "5.4.17", - "5.4.18", - "5.4.19", - "5.4.20", - "5.4.21", - "5.4.22", - "5.4.23", - "5.4.24", - "5.4.25", - "5.4.26", - "5.4.27", - "5.4.28", - "5.4.29", - "5.4.30", - "5.4.31", - "5.4.32", - "5.4.33", - "5.4.34", - "5.4.35", - "5.4.36", - "5.4.37", - "5.4.38", - "5.4.39", - "5.4.40", - "5.4.41", - "5.4.42", - "5.4.43", - "5.4.44", - "5.4.45", - "5.5.0", - "5.5.1", - "5.5.2", - "5.5.3", - "5.5.4", - "5.5.5", - "5.5.6", - "5.5.7", - "5.5.8", - "5.5.9", - "5.5.10", - "5.5.11", - "5.5.12", - "5.5.13", - "5.5.14", - "5.5.15", - "5.5.16", - "5.5.17", - "5.5.18", - "5.5.19", - "5.5.20", - "5.5.21", - "5.5.22", - "5.5.23", - "5.5.24", - "5.5.25", - "5.5.26", - "5.5.27", - "5.5.28", - "5.5.29", - "5.5.30", - "5.5.31", - "5.5.32", - "5.5.33", - "5.5.34", - "5.5.35", - "5.5.36", - "5.5.37", - "5.5.38", - "5.6.0", - "5.6.1", - "5.6.2", - "5.6.3", - "5.6.4", - "5.6.5", - "5.6.6", - "5.6.7", - "5.6.8", - "5.6.9", - "5.6.10", - "5.6.11", - "5.6.12", - "5.6.13", - "5.6.14", - "5.6.15", - "5.6.16", - "5.6.17", - "5.6.18", - "5.6.19", - "5.6.20", - "5.6.21", - "5.6.22", - "5.6.23", - "5.6.24", - "5.6.25", - "5.6.26", - "5.6.27", - "5.6.28", - "5.6.29", - "5.6.30", - "5.6.31", - "5.6.32", - "5.6.33", - "5.6.34", - "5.6.35", - "5.6.36", - "5.6.37", - "5.6.38", - "5.6.39", - "5.6.40", - "7.0.0", - "7.0.1", - "7.0.2", - "7.0.3", - "7.0.4", - "7.0.5", - "7.0.6", - "7.0.7", - "7.0.8", - "7.0.9", - "7.0.10", - "7.0.11", - "7.0.12", - "7.0.13", - "7.0.14", - "7.0.15", - "7.0.16", - "7.0.17", - "7.0.18", - "7.0.19", - "7.0.20", - "7.0.21", - "7.0.22", - "7.0.23", - "7.0.24", - "7.0.25", - "7.0.26", - "7.0.27", - "7.0.28", - "7.0.29", - "7.0.30", - "7.0.31", - "7.0.32", - "7.0.33", - "7.1.0", - "7.1.1", - "7.1.2", - "7.1.3", - "7.1.4", - "7.1.5", - "7.1.6", - "7.1.7", - "7.1.8", - "7.1.9", - "7.1.10", - "7.1.11", - "7.1.12", - "7.1.13", - "7.1.14", - "7.1.15", - "7.1.16", - "7.1.17", - "7.1.18", - "7.1.19", - "7.1.20", - "7.1.21", - "7.1.22", - "7.1.23", - "7.1.24", - "7.1.25", - "7.1.26", - "7.1.27", - "7.1.28", - "7.1.29", - "7.1.30", - "7.1.31", - "7.1.32", - "7.1.33", - "7.2.0", - "7.2.1", - "7.2.2", - "7.2.3", - "7.2.4", - "7.2.5", - "7.2.6", - "7.2.7", - "7.2.8", - "7.2.9", - "7.2.10", - "7.2.11", - "7.2.12", - "7.2.13", - "7.2.14", - "7.2.15", - "7.2.16", - "7.2.17", - "7.2.18", - "7.2.19", - "7.2.20", - "7.2.21", - "7.2.22", - "7.2.23", - "7.2.24", - "7.2.25", - "7.2.26", - "7.2.27", - "7.2.28", - "7.2.29", - "7.2.30", - "7.2.31", - "7.2.32", - "7.2.33", - "7.2.34", - "7.3.0", - "7.3.1", - "7.3.2", - "7.3.3", - "7.3.4", - "7.3.5", - "7.3.6", - "7.3.7", - "7.3.8", - "7.3.9", - "7.3.10", - "7.3.11", - "7.3.12", - "7.3.13", - "7.3.14", - "7.3.15", - "7.3.16", - "7.3.17", - "7.3.18", - "7.3.19", - "7.3.20", - "7.3.21", - "7.3.22", - "7.3.23", - "7.3.24", - "7.3.25", - "7.3.26", - "7.3.27", - "7.3.28", - "7.3.29", - "7.3.30", - "7.3.31", - "7.3.32", - "7.3.33", - "7.4.0", - "7.4.1", - "7.4.2", - "7.4.3", - "7.4.4", - "7.4.5", - "7.4.6", - "7.4.7", - "7.4.8", - "7.4.9", - "7.4.10", - "7.4.11", - "7.4.12", - "7.4.13", - "7.4.14", - "7.4.15", - "7.4.16", - "7.4.18", - "7.4.19", - "7.4.20", - "7.4.21", - "7.4.22", - "7.4.23", - "7.4.24", - "7.4.25", - "7.4.26", - "7.4.27", - "7.4.28", - "7.4.29", - "7.4.30", - "7.4.32", - "7.4.33", - "8.0.0", - "8.0.1", - "8.0.2", - "8.0.3", - "8.0.5", - "8.0.6", - "8.0.7", - "8.0.8", - "8.0.9", - "8.0.10", - "8.0.11", - "8.0.12", - "8.0.13", - "8.0.14", - "8.0.15", - "8.0.16", - "8.0.17", - "8.0.18", - "8.0.19", - "8.0.20", - "8.0.21", - "8.0.22", - "8.0.23", - "8.0.24", - "8.0.25", - "8.0.26", - "8.0.27", - "8.0.28", - "8.0.29", - "8.0.30", - "8.1.0", - "8.1.1", - "8.1.2", - "8.1.3", - "8.1.4", - "8.1.5", - "8.1.6", - "8.1.7", - "8.1.8", - "8.1.9", - "8.1.10", - "8.1.11", - "8.1.12", - "8.1.13", - "8.1.14", - "8.1.15", - "8.1.16", - "8.1.17", - "8.1.18", - "8.1.19", - "8.1.20", - "8.1.21", - "8.1.22", - "8.1.23", - "8.1.24", - "8.1.25", - "8.1.26", - "8.1.27", - "8.1.28", - "8.1.29", - "8.1.30", - "8.1.31", - "8.1.32", - "8.1.33", - "8.2.0", - "8.2.1", - "8.2.2", - "8.2.3", - "8.2.4", - "8.2.5", - "8.2.6", - "8.2.7", - "8.2.8", - "8.2.9", - "8.2.10", - "8.2.11", - "8.2.12", - "8.2.13", - "8.2.14", - "8.2.15", - "8.2.16", - "8.2.17", - "8.2.18", - "8.2.19", - "8.2.20", - "8.2.21", - "8.2.22", - "8.2.23", - "8.2.24", - "8.2.25", - "8.2.26", - "8.2.27", - "8.2.28", - "8.2.29", - "8.3.0", - "8.3.1", - "8.3.2", - "8.3.3", - "8.3.4", - "8.3.6", - "8.3.7", - "8.3.8", - "8.3.9", - "8.3.10", - "8.3.11", - "8.3.12", - "8.3.13", - "8.3.14", - "8.3.15", - "8.3.16", - "8.3.17", - "8.3.19", - "8.3.20", - "8.3.21", - "8.3.22", - "8.3.23", - "8.3.24", - "8.3.25", - "8.3.26", - "8.4.1", - "8.4.2", - "8.4.3", - "8.4.4", - "8.4.5", - "8.4.6", - "8.4.7", - "8.4.8", - "8.4.10", - "8.4.11", - "8.4.12", - "8.4.13" - ], - "lowest": "5.0.0", - "highest": "8.4.13" -} diff --git a/internal/composer/success/testdata/_--mode_full______7.4_.txtar b/internal/composer/success/testdata/_--mode_full______7.4_.txtar new file mode 100644 index 0000000..7e533f2 --- /dev/null +++ b/internal/composer/success/testdata/_--mode_full______7.4_.txtar @@ -0,0 +1,22 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '"--mode=full"__">=7.4"' case + +exec php-matrix composer --mode=full +stdout . +! stderr . + +exec php-matrix composer --mode=full --source=auto +stdout . +! stderr . + +exec php-matrix composer --mode=full --source=php.net +stdout . +! stderr . + +exec php-matrix composer --mode=full --source=offline +stdout . +! stderr . + +-- composer.json -- +{"require":{"php":">=7.4"}} diff --git a/internal/composer/success/testdata/_--mode_full_____stable_.txtar b/internal/composer/success/testdata/_--mode_full_____stable_.txtar index 7b1ead3..9fd8c88 100644 --- a/internal/composer/success/testdata/_--mode_full_____stable_.txtar +++ b/internal/composer/success/testdata/_--mode_full_____stable_.txtar @@ -3,515 +3,20 @@ # Test the '"--mode=full"__"@stable"' case exec php-matrix composer --mode=full -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix composer --mode=full --source=auto -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix composer --mode=full --source=php.net -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix composer --mode=full --source=offline -cmp stdout stdout.golden +stdout . ! stderr . -- composer.json -- {"require":{"php":"@stable"}} - --- stdout.golden -- -{ - "constraint": "@stable", - "versions": [ - "5.0.0", - "5.0.1", - "5.0.2", - "5.0.3", - "5.0.4", - "5.0.5", - "5.1.0", - "5.1.1", - "5.1.2", - "5.1.3", - "5.1.4", - "5.1.5", - "5.1.6", - "5.2.0", - "5.2.1", - "5.2.2", - "5.2.3", - "5.2.4", - "5.2.5", - "5.2.6", - "5.2.8", - "5.2.9", - "5.2.10", - "5.2.11", - "5.2.12", - "5.2.13", - "5.2.14", - "5.2.15", - "5.2.16", - "5.2.17", - "5.3.0", - "5.3.1", - "5.3.2", - "5.3.3", - "5.3.4", - "5.3.5", - "5.3.6", - "5.3.7", - "5.3.8", - "5.3.9", - "5.3.10", - "5.3.11", - "5.3.12", - "5.3.13", - "5.3.14", - "5.3.15", - "5.3.16", - "5.3.17", - "5.3.18", - "5.3.19", - "5.3.20", - "5.3.21", - "5.3.22", - "5.3.23", - "5.3.24", - "5.3.25", - "5.3.26", - "5.3.27", - "5.3.28", - "5.3.29", - "5.4.0", - "5.4.1", - "5.4.2", - "5.4.3", - "5.4.4", - "5.4.5", - "5.4.6", - "5.4.7", - "5.4.8", - "5.4.9", - "5.4.10", - "5.4.11", - "5.4.12", - "5.4.13", - "5.4.14", - "5.4.15", - "5.4.16", - "5.4.17", - "5.4.18", - "5.4.19", - "5.4.20", - "5.4.21", - "5.4.22", - "5.4.23", - "5.4.24", - "5.4.25", - "5.4.26", - "5.4.27", - "5.4.28", - "5.4.29", - "5.4.30", - "5.4.31", - "5.4.32", - "5.4.33", - "5.4.34", - "5.4.35", - "5.4.36", - "5.4.37", - "5.4.38", - "5.4.39", - "5.4.40", - "5.4.41", - "5.4.42", - "5.4.43", - "5.4.44", - "5.4.45", - "5.5.0", - "5.5.1", - "5.5.2", - "5.5.3", - "5.5.4", - "5.5.5", - "5.5.6", - "5.5.7", - "5.5.8", - "5.5.9", - "5.5.10", - "5.5.11", - "5.5.12", - "5.5.13", - "5.5.14", - "5.5.15", - "5.5.16", - "5.5.17", - "5.5.18", - "5.5.19", - "5.5.20", - "5.5.21", - "5.5.22", - "5.5.23", - "5.5.24", - "5.5.25", - "5.5.26", - "5.5.27", - "5.5.28", - "5.5.29", - "5.5.30", - "5.5.31", - "5.5.32", - "5.5.33", - "5.5.34", - "5.5.35", - "5.5.36", - "5.5.37", - "5.5.38", - "5.6.0", - "5.6.1", - "5.6.2", - "5.6.3", - "5.6.4", - "5.6.5", - "5.6.6", - "5.6.7", - "5.6.8", - "5.6.9", - "5.6.10", - "5.6.11", - "5.6.12", - "5.6.13", - "5.6.14", - "5.6.15", - "5.6.16", - "5.6.17", - "5.6.18", - "5.6.19", - "5.6.20", - "5.6.21", - "5.6.22", - "5.6.23", - "5.6.24", - "5.6.25", - "5.6.26", - "5.6.27", - "5.6.28", - "5.6.29", - "5.6.30", - "5.6.31", - "5.6.32", - "5.6.33", - "5.6.34", - "5.6.35", - "5.6.36", - "5.6.37", - "5.6.38", - "5.6.39", - "5.6.40", - "7.0.0", - "7.0.1", - "7.0.2", - "7.0.3", - "7.0.4", - "7.0.5", - "7.0.6", - "7.0.7", - "7.0.8", - "7.0.9", - "7.0.10", - "7.0.11", - "7.0.12", - "7.0.13", - "7.0.14", - "7.0.15", - "7.0.16", - "7.0.17", - "7.0.18", - "7.0.19", - "7.0.20", - "7.0.21", - "7.0.22", - "7.0.23", - "7.0.24", - "7.0.25", - "7.0.26", - "7.0.27", - "7.0.28", - "7.0.29", - "7.0.30", - "7.0.31", - "7.0.32", - "7.0.33", - "7.1.0", - "7.1.1", - "7.1.2", - "7.1.3", - "7.1.4", - "7.1.5", - "7.1.6", - "7.1.7", - "7.1.8", - "7.1.9", - "7.1.10", - "7.1.11", - "7.1.12", - "7.1.13", - "7.1.14", - "7.1.15", - "7.1.16", - "7.1.17", - "7.1.18", - "7.1.19", - "7.1.20", - "7.1.21", - "7.1.22", - "7.1.23", - "7.1.24", - "7.1.25", - "7.1.26", - "7.1.27", - "7.1.28", - "7.1.29", - "7.1.30", - "7.1.31", - "7.1.32", - "7.1.33", - "7.2.0", - "7.2.1", - "7.2.2", - "7.2.3", - "7.2.4", - "7.2.5", - "7.2.6", - "7.2.7", - "7.2.8", - "7.2.9", - "7.2.10", - "7.2.11", - "7.2.12", - "7.2.13", - "7.2.14", - "7.2.15", - "7.2.16", - "7.2.17", - "7.2.18", - "7.2.19", - "7.2.20", - "7.2.21", - "7.2.22", - "7.2.23", - "7.2.24", - "7.2.25", - "7.2.26", - "7.2.27", - "7.2.28", - "7.2.29", - "7.2.30", - "7.2.31", - "7.2.32", - "7.2.33", - "7.2.34", - "7.3.0", - "7.3.1", - "7.3.2", - "7.3.3", - "7.3.4", - "7.3.5", - "7.3.6", - "7.3.7", - "7.3.8", - "7.3.9", - "7.3.10", - "7.3.11", - "7.3.12", - "7.3.13", - "7.3.14", - "7.3.15", - "7.3.16", - "7.3.17", - "7.3.18", - "7.3.19", - "7.3.20", - "7.3.21", - "7.3.22", - "7.3.23", - "7.3.24", - "7.3.25", - "7.3.26", - "7.3.27", - "7.3.28", - "7.3.29", - "7.3.30", - "7.3.31", - "7.3.32", - "7.3.33", - "7.4.0", - "7.4.1", - "7.4.2", - "7.4.3", - "7.4.4", - "7.4.5", - "7.4.6", - "7.4.7", - "7.4.8", - "7.4.9", - "7.4.10", - "7.4.11", - "7.4.12", - "7.4.13", - "7.4.14", - "7.4.15", - "7.4.16", - "7.4.18", - "7.4.19", - "7.4.20", - "7.4.21", - "7.4.22", - "7.4.23", - "7.4.24", - "7.4.25", - "7.4.26", - "7.4.27", - "7.4.28", - "7.4.29", - "7.4.30", - "7.4.32", - "7.4.33", - "8.0.0", - "8.0.1", - "8.0.2", - "8.0.3", - "8.0.5", - "8.0.6", - "8.0.7", - "8.0.8", - "8.0.9", - "8.0.10", - "8.0.11", - "8.0.12", - "8.0.13", - "8.0.14", - "8.0.15", - "8.0.16", - "8.0.17", - "8.0.18", - "8.0.19", - "8.0.20", - "8.0.21", - "8.0.22", - "8.0.23", - "8.0.24", - "8.0.25", - "8.0.26", - "8.0.27", - "8.0.28", - "8.0.29", - "8.0.30", - "8.1.0", - "8.1.1", - "8.1.2", - "8.1.3", - "8.1.4", - "8.1.5", - "8.1.6", - "8.1.7", - "8.1.8", - "8.1.9", - "8.1.10", - "8.1.11", - "8.1.12", - "8.1.13", - "8.1.14", - "8.1.15", - "8.1.16", - "8.1.17", - "8.1.18", - "8.1.19", - "8.1.20", - "8.1.21", - "8.1.22", - "8.1.23", - "8.1.24", - "8.1.25", - "8.1.26", - "8.1.27", - "8.1.28", - "8.1.29", - "8.1.30", - "8.1.31", - "8.1.32", - "8.1.33", - "8.2.0", - "8.2.1", - "8.2.2", - "8.2.3", - "8.2.4", - "8.2.5", - "8.2.6", - "8.2.7", - "8.2.8", - "8.2.9", - "8.2.10", - "8.2.11", - "8.2.12", - "8.2.13", - "8.2.14", - "8.2.15", - "8.2.16", - "8.2.17", - "8.2.18", - "8.2.19", - "8.2.20", - "8.2.21", - "8.2.22", - "8.2.23", - "8.2.24", - "8.2.25", - "8.2.26", - "8.2.27", - "8.2.28", - "8.2.29", - "8.3.0", - "8.3.1", - "8.3.2", - "8.3.3", - "8.3.4", - "8.3.6", - "8.3.7", - "8.3.8", - "8.3.9", - "8.3.10", - "8.3.11", - "8.3.12", - "8.3.13", - "8.3.14", - "8.3.15", - "8.3.16", - "8.3.17", - "8.3.19", - "8.3.20", - "8.3.21", - "8.3.22", - "8.3.23", - "8.3.24", - "8.3.25", - "8.3.26", - "8.4.1", - "8.4.2", - "8.4.3", - "8.4.4", - "8.4.5", - "8.4.6", - "8.4.7", - "8.4.8", - "8.4.10", - "8.4.11", - "8.4.12", - "8.4.13" - ], - "lowest": "5.0.0", - "highest": "8.4.13" -} diff --git a/internal/composer/success/testdata/_--mode_minor-only_____7__7.2_.txtar b/internal/composer/success/testdata/_--mode_minor-only____7_stable_.txtar similarity index 73% rename from internal/composer/success/testdata/_--mode_minor-only_____7__7.2_.txtar rename to internal/composer/success/testdata/_--mode_minor-only____7_stable_.txtar index 129eafc..e4f217f 100644 --- a/internal/composer/success/testdata/_--mode_minor-only_____7__7.2_.txtar +++ b/internal/composer/success/testdata/_--mode_minor-only____7_stable_.txtar @@ -1,6 +1,6 @@ # DO NOT EDIT THIS FILE # This file is generated by "internal/composer/success/main.go" -# Test the '"--mode=minor-only"__"^7 ^7.2"' case +# Test the '"--mode=minor-only"__"7@stable"' case exec php-matrix composer --mode=minor-only cmp stdout stdout.golden @@ -19,16 +19,14 @@ cmp stdout stdout.golden ! stderr . -- composer.json -- -{"require":{"php":"^7 ^7.2"}} +{"require":{"php":"7@stable"}} -- stdout.golden -- { - "constraint": "^7 ^7.2", + "constraint": "7@stable", "versions": [ - "7.2", - "7.3", - "7.4" + "7.0" ], - "lowest": "7.2", - "highest": "7.4" + "lowest": "7.0", + "highest": "7.0" } diff --git a/internal/composer/success/testdata/_--mode_minor-only_____7.1.2_____8.1.2_.txtar b/internal/composer/success/testdata/_--mode_minor-only_____7.1.2_____8.0.3_.txtar similarity index 78% rename from internal/composer/success/testdata/_--mode_minor-only_____7.1.2_____8.1.2_.txtar rename to internal/composer/success/testdata/_--mode_minor-only_____7.1.2_____8.0.3_.txtar index ac844b8..0ee12f2 100644 --- a/internal/composer/success/testdata/_--mode_minor-only_____7.1.2_____8.1.2_.txtar +++ b/internal/composer/success/testdata/_--mode_minor-only_____7.1.2_____8.0.3_.txtar @@ -1,6 +1,6 @@ # DO NOT EDIT THIS FILE # This file is generated by "internal/composer/success/main.go" -# Test the '"--mode=minor-only"__"^7.1.2 || ~8.1.2"' case +# Test the '"--mode=minor-only"__"^7.1.2 || ~8.0.3"' case exec php-matrix composer --mode=minor-only cmp stdout stdout.golden @@ -19,18 +19,18 @@ cmp stdout stdout.golden ! stderr . -- composer.json -- -{"require":{"php":"^7.1.2 || ~8.1.2"}} +{"require":{"php":"^7.1.2 || ~8.0.3"}} -- stdout.golden -- { - "constraint": "^7.1.2 || ~8.1.2", + "constraint": "^7.1.2 || ~8.0.3", "versions": [ "7.1", "7.2", "7.3", "7.4", - "8.1" + "8.0" ], "lowest": "7.1", - "highest": "8.1" + "highest": "8.0" } diff --git a/internal/composer/success/testdata/_--mode_minor-only_____7.4_____8.4_.txtar b/internal/composer/success/testdata/_--mode_minor-only_____7.4_____8.4_.txtar new file mode 100644 index 0000000..ef16f2b --- /dev/null +++ b/internal/composer/success/testdata/_--mode_minor-only_____7.4_____8.4_.txtar @@ -0,0 +1,22 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '"--mode=minor-only"__"^7.4 || ^8.4"' case + +exec php-matrix composer --mode=minor-only +stdout . +! stderr . + +exec php-matrix composer --mode=minor-only --source=auto +stdout . +! stderr . + +exec php-matrix composer --mode=minor-only --source=php.net +stdout . +! stderr . + +exec php-matrix composer --mode=minor-only --source=offline +stdout . +! stderr . + +-- composer.json -- +{"require":{"php":"^7.4 || ^8.4"}} diff --git a/internal/composer/success/testdata/_--mode_minor-only_____7_stable_.txtar b/internal/composer/success/testdata/_--mode_minor-only_____7__7.2.3_.txtar similarity index 76% rename from internal/composer/success/testdata/_--mode_minor-only_____7_stable_.txtar rename to internal/composer/success/testdata/_--mode_minor-only_____7__7.2.3_.txtar index c6fd490..1fa6c11 100644 --- a/internal/composer/success/testdata/_--mode_minor-only_____7_stable_.txtar +++ b/internal/composer/success/testdata/_--mode_minor-only_____7__7.2.3_.txtar @@ -1,6 +1,6 @@ # DO NOT EDIT THIS FILE # This file is generated by "internal/composer/success/main.go" -# Test the '"--mode=minor-only"__"^7@stable"' case +# Test the '"--mode=minor-only"__"^7 <7.2.3"' case exec php-matrix composer --mode=minor-only cmp stdout stdout.golden @@ -19,18 +19,16 @@ cmp stdout stdout.golden ! stderr . -- composer.json -- -{"require":{"php":"^7@stable"}} +{"require":{"php":"^7 <7.2.3"}} -- stdout.golden -- { - "constraint": "^7@stable", + "constraint": "^7 <7.2.3", "versions": [ "7.0", "7.1", - "7.2", - "7.3", - "7.4" + "7.2" ], "lowest": "7.0", - "highest": "7.4" + "highest": "7.2" } diff --git a/internal/composer/success/testdata/_--mode_minor-only_____8.2_.txtar b/internal/composer/success/testdata/_--mode_minor-only_____8.2_.txtar new file mode 100644 index 0000000..cf1a732 --- /dev/null +++ b/internal/composer/success/testdata/_--mode_minor-only_____8.2_.txtar @@ -0,0 +1,22 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '"--mode=minor-only"__"^8.2"' case + +exec php-matrix composer --mode=minor-only +stdout . +! stderr . + +exec php-matrix composer --mode=minor-only --source=auto +stdout . +! stderr . + +exec php-matrix composer --mode=minor-only --source=php.net +stdout . +! stderr . + +exec php-matrix composer --mode=minor-only --source=offline +stdout . +! stderr . + +-- composer.json -- +{"require":{"php":"^8.2"}} diff --git a/internal/composer/success/testdata/_--mode_minor-only_____8.2____8.4.1_.txtar b/internal/composer/success/testdata/_--mode_minor-only_____8.2____8.4.1_.txtar new file mode 100644 index 0000000..f1f425f --- /dev/null +++ b/internal/composer/success/testdata/_--mode_minor-only_____8.2____8.4.1_.txtar @@ -0,0 +1,22 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '"--mode=minor-only"__"^8.2 <= 8.4.1"' case + +exec php-matrix composer --mode=minor-only +stdout . +! stderr . + +exec php-matrix composer --mode=minor-only --source=auto +stdout . +! stderr . + +exec php-matrix composer --mode=minor-only --source=php.net +stdout . +! stderr . + +exec php-matrix composer --mode=minor-only --source=offline +stdout . +! stderr . + +-- composer.json -- +{"require":{"php":"^8.2 <= 8.4.1"}} diff --git a/internal/composer/success/testdata/_--mode_minor-only_____8.2_____8.4.0_.txtar b/internal/composer/success/testdata/_--mode_minor-only_____8.2_____8.4.0_.txtar new file mode 100644 index 0000000..58f07dc --- /dev/null +++ b/internal/composer/success/testdata/_--mode_minor-only_____8.2_____8.4.0_.txtar @@ -0,0 +1,22 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '"--mode=minor-only"__"^8.2 || ~8.4.0"' case + +exec php-matrix composer --mode=minor-only +stdout . +! stderr . + +exec php-matrix composer --mode=minor-only --source=auto +stdout . +! stderr . + +exec php-matrix composer --mode=minor-only --source=php.net +stdout . +! stderr . + +exec php-matrix composer --mode=minor-only --source=offline +stdout . +! stderr . + +-- composer.json -- +{"require":{"php":"^8.2 || ~8.4.0"}} diff --git a/internal/composer/success/testdata/_--mode_minor-only_____8.3.4_.txtar b/internal/composer/success/testdata/_--mode_minor-only_____8.3.4_.txtar new file mode 100644 index 0000000..50a69b8 --- /dev/null +++ b/internal/composer/success/testdata/_--mode_minor-only_____8.3.4_.txtar @@ -0,0 +1,22 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '"--mode=minor-only"__"^8.3.4"' case + +exec php-matrix composer --mode=minor-only +stdout . +! stderr . + +exec php-matrix composer --mode=minor-only --source=auto +stdout . +! stderr . + +exec php-matrix composer --mode=minor-only --source=php.net +stdout . +! stderr . + +exec php-matrix composer --mode=minor-only --source=offline +stdout . +! stderr . + +-- composer.json -- +{"require":{"php":"^8.3.4"}} diff --git a/internal/composer/success/testdata/_--mode_minor-only_____8_.txtar b/internal/composer/success/testdata/_--mode_minor-only_____8_.txtar new file mode 100644 index 0000000..429127d --- /dev/null +++ b/internal/composer/success/testdata/_--mode_minor-only_____8_.txtar @@ -0,0 +1,22 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '"--mode=minor-only"__"^8"' case + +exec php-matrix composer --mode=minor-only +stdout . +! stderr . + +exec php-matrix composer --mode=minor-only --source=auto +stdout . +! stderr . + +exec php-matrix composer --mode=minor-only --source=php.net +stdout . +! stderr . + +exec php-matrix composer --mode=minor-only --source=offline +stdout . +! stderr . + +-- composer.json -- +{"require":{"php":"^8"}} diff --git a/internal/composer/success/testdata/_--mode_minor-only_____8_rc_.txtar b/internal/composer/success/testdata/_--mode_minor-only_____8_rc_.txtar new file mode 100644 index 0000000..ef6e73e --- /dev/null +++ b/internal/composer/success/testdata/_--mode_minor-only_____8_rc_.txtar @@ -0,0 +1,22 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '"--mode=minor-only"__"^8@rc"' case + +exec php-matrix composer --mode=minor-only +stdout . +! stderr . + +exec php-matrix composer --mode=minor-only --source=auto +stdout . +! stderr . + +exec php-matrix composer --mode=minor-only --source=php.net +stdout . +! stderr . + +exec php-matrix composer --mode=minor-only --source=offline +stdout . +! stderr . + +-- composer.json -- +{"require":{"php":"^8@rc"}} diff --git a/internal/composer/success/testdata/_--mode_minor-only______.txtar b/internal/composer/success/testdata/_--mode_minor-only______.txtar index 4de523a..151d52f 100644 --- a/internal/composer/success/testdata/_--mode_minor-only______.txtar +++ b/internal/composer/success/testdata/_--mode_minor-only______.txtar @@ -3,46 +3,20 @@ # Test the '"--mode=minor-only"__"*"' case exec php-matrix composer --mode=minor-only -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix composer --mode=minor-only --source=auto -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix composer --mode=minor-only --source=php.net -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix composer --mode=minor-only --source=offline -cmp stdout stdout.golden +stdout . ! stderr . -- composer.json -- {"require":{"php":"*"}} - --- stdout.golden -- -{ - "constraint": "*", - "versions": [ - "5.0", - "5.1", - "5.2", - "5.3", - "5.4", - "5.5", - "5.6", - "7.0", - "7.1", - "7.2", - "7.3", - "7.4", - "8.0", - "8.1", - "8.2", - "8.3", - "8.4" - ], - "lowest": "5.0", - "highest": "8.4" -} diff --git a/internal/composer/success/testdata/_--mode_minor-only______7.4_.txtar b/internal/composer/success/testdata/_--mode_minor-only______7.4_.txtar new file mode 100644 index 0000000..6c1232c --- /dev/null +++ b/internal/composer/success/testdata/_--mode_minor-only______7.4_.txtar @@ -0,0 +1,22 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '"--mode=minor-only"__">=7.4"' case + +exec php-matrix composer --mode=minor-only +stdout . +! stderr . + +exec php-matrix composer --mode=minor-only --source=auto +stdout . +! stderr . + +exec php-matrix composer --mode=minor-only --source=php.net +stdout . +! stderr . + +exec php-matrix composer --mode=minor-only --source=offline +stdout . +! stderr . + +-- composer.json -- +{"require":{"php":">=7.4"}} diff --git a/internal/composer/success/testdata/_--mode_minor-only_____stable_.txtar b/internal/composer/success/testdata/_--mode_minor-only_____stable_.txtar index 04c36f9..92ba92d 100644 --- a/internal/composer/success/testdata/_--mode_minor-only_____stable_.txtar +++ b/internal/composer/success/testdata/_--mode_minor-only_____stable_.txtar @@ -3,46 +3,20 @@ # Test the '"--mode=minor-only"__"@stable"' case exec php-matrix composer --mode=minor-only -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix composer --mode=minor-only --source=auto -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix composer --mode=minor-only --source=php.net -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix composer --mode=minor-only --source=offline -cmp stdout stdout.golden +stdout . ! stderr . -- composer.json -- {"require":{"php":"@stable"}} - --- stdout.golden -- -{ - "constraint": "@stable", - "versions": [ - "5.0", - "5.1", - "5.2", - "5.3", - "5.4", - "5.5", - "5.6", - "7.0", - "7.1", - "7.2", - "7.3", - "7.4", - "8.0", - "8.1", - "8.2", - "8.3", - "8.4" - ], - "lowest": "5.0", - "highest": "8.4" -} diff --git a/internal/composer/success/testdata/______7__7.2_.txtar b/internal/composer/success/testdata/_____7_stable_.txtar similarity index 72% rename from internal/composer/success/testdata/______7__7.2_.txtar rename to internal/composer/success/testdata/_____7_stable_.txtar index 365432a..621cca1 100644 --- a/internal/composer/success/testdata/______7__7.2_.txtar +++ b/internal/composer/success/testdata/_____7_stable_.txtar @@ -1,6 +1,6 @@ # DO NOT EDIT THIS FILE # This file is generated by "internal/composer/success/main.go" -# Test the '""__"^7 ^7.2"' case +# Test the '""__"7@stable"' case exec php-matrix composer cmp stdout stdout.golden @@ -19,16 +19,14 @@ cmp stdout stdout.golden ! stderr . -- composer.json -- -{"require":{"php":"^7 ^7.2"}} +{"require":{"php":"7@stable"}} -- stdout.golden -- { - "constraint": "^7 ^7.2", + "constraint": "7@stable", "versions": [ - "7.2", - "7.3", - "7.4" + "7.0" ], - "lowest": "7.2", - "highest": "7.4" + "lowest": "7.0", + "highest": "7.0" } diff --git a/internal/composer/success/testdata/______7.1.2_____8.1.2_.txtar b/internal/composer/success/testdata/______7.1.2_____8.0.3_.txtar similarity index 77% rename from internal/composer/success/testdata/______7.1.2_____8.1.2_.txtar rename to internal/composer/success/testdata/______7.1.2_____8.0.3_.txtar index a739ca8..a7cebe8 100644 --- a/internal/composer/success/testdata/______7.1.2_____8.1.2_.txtar +++ b/internal/composer/success/testdata/______7.1.2_____8.0.3_.txtar @@ -1,6 +1,6 @@ # DO NOT EDIT THIS FILE # This file is generated by "internal/composer/success/main.go" -# Test the '""__"^7.1.2 || ~8.1.2"' case +# Test the '""__"^7.1.2 || ~8.0.3"' case exec php-matrix composer cmp stdout stdout.golden @@ -19,18 +19,18 @@ cmp stdout stdout.golden ! stderr . -- composer.json -- -{"require":{"php":"^7.1.2 || ~8.1.2"}} +{"require":{"php":"^7.1.2 || ~8.0.3"}} -- stdout.golden -- { - "constraint": "^7.1.2 || ~8.1.2", + "constraint": "^7.1.2 || ~8.0.3", "versions": [ "7.1", "7.2", "7.3", "7.4", - "8.1" + "8.0" ], "lowest": "7.1", - "highest": "8.1" + "highest": "8.0" } diff --git a/internal/composer/success/testdata/______7.4_____8.4_.txtar b/internal/composer/success/testdata/______7.4_____8.4_.txtar new file mode 100644 index 0000000..1f13d20 --- /dev/null +++ b/internal/composer/success/testdata/______7.4_____8.4_.txtar @@ -0,0 +1,22 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '""__"^7.4 || ^8.4"' case + +exec php-matrix composer +stdout . +! stderr . + +exec php-matrix composer --source=auto +stdout . +! stderr . + +exec php-matrix composer --source=php.net +stdout . +! stderr . + +exec php-matrix composer --source=offline +stdout . +! stderr . + +-- composer.json -- +{"require":{"php":"^7.4 || ^8.4"}} diff --git a/internal/composer/success/testdata/______7_stable_.txtar b/internal/composer/success/testdata/______7__7.2.3_.txtar similarity index 75% rename from internal/composer/success/testdata/______7_stable_.txtar rename to internal/composer/success/testdata/______7__7.2.3_.txtar index 7b3486b..deb9ebb 100644 --- a/internal/composer/success/testdata/______7_stable_.txtar +++ b/internal/composer/success/testdata/______7__7.2.3_.txtar @@ -1,6 +1,6 @@ # DO NOT EDIT THIS FILE # This file is generated by "internal/composer/success/main.go" -# Test the '""__"^7@stable"' case +# Test the '""__"^7 <7.2.3"' case exec php-matrix composer cmp stdout stdout.golden @@ -19,18 +19,16 @@ cmp stdout stdout.golden ! stderr . -- composer.json -- -{"require":{"php":"^7@stable"}} +{"require":{"php":"^7 <7.2.3"}} -- stdout.golden -- { - "constraint": "^7@stable", + "constraint": "^7 <7.2.3", "versions": [ "7.0", "7.1", - "7.2", - "7.3", - "7.4" + "7.2" ], "lowest": "7.0", - "highest": "7.4" + "highest": "7.2" } diff --git a/internal/composer/success/testdata/______8.2_.txtar b/internal/composer/success/testdata/______8.2_.txtar new file mode 100644 index 0000000..90e1f11 --- /dev/null +++ b/internal/composer/success/testdata/______8.2_.txtar @@ -0,0 +1,22 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '""__"^8.2"' case + +exec php-matrix composer +stdout . +! stderr . + +exec php-matrix composer --source=auto +stdout . +! stderr . + +exec php-matrix composer --source=php.net +stdout . +! stderr . + +exec php-matrix composer --source=offline +stdout . +! stderr . + +-- composer.json -- +{"require":{"php":"^8.2"}} diff --git a/internal/composer/success/testdata/______8.2____8.4.1_.txtar b/internal/composer/success/testdata/______8.2____8.4.1_.txtar new file mode 100644 index 0000000..d953ceb --- /dev/null +++ b/internal/composer/success/testdata/______8.2____8.4.1_.txtar @@ -0,0 +1,22 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '""__"^8.2 <= 8.4.1"' case + +exec php-matrix composer +stdout . +! stderr . + +exec php-matrix composer --source=auto +stdout . +! stderr . + +exec php-matrix composer --source=php.net +stdout . +! stderr . + +exec php-matrix composer --source=offline +stdout . +! stderr . + +-- composer.json -- +{"require":{"php":"^8.2 <= 8.4.1"}} diff --git a/internal/composer/success/testdata/______8.2_____8.4.0_.txtar b/internal/composer/success/testdata/______8.2_____8.4.0_.txtar new file mode 100644 index 0000000..83340e8 --- /dev/null +++ b/internal/composer/success/testdata/______8.2_____8.4.0_.txtar @@ -0,0 +1,22 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '""__"^8.2 || ~8.4.0"' case + +exec php-matrix composer +stdout . +! stderr . + +exec php-matrix composer --source=auto +stdout . +! stderr . + +exec php-matrix composer --source=php.net +stdout . +! stderr . + +exec php-matrix composer --source=offline +stdout . +! stderr . + +-- composer.json -- +{"require":{"php":"^8.2 || ~8.4.0"}} diff --git a/internal/composer/success/testdata/______8.3.4_.txtar b/internal/composer/success/testdata/______8.3.4_.txtar new file mode 100644 index 0000000..18b4123 --- /dev/null +++ b/internal/composer/success/testdata/______8.3.4_.txtar @@ -0,0 +1,22 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '""__"^8.3.4"' case + +exec php-matrix composer +stdout . +! stderr . + +exec php-matrix composer --source=auto +stdout . +! stderr . + +exec php-matrix composer --source=php.net +stdout . +! stderr . + +exec php-matrix composer --source=offline +stdout . +! stderr . + +-- composer.json -- +{"require":{"php":"^8.3.4"}} diff --git a/internal/composer/success/testdata/______8_.txtar b/internal/composer/success/testdata/______8_.txtar new file mode 100644 index 0000000..ce2c6ce --- /dev/null +++ b/internal/composer/success/testdata/______8_.txtar @@ -0,0 +1,22 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '""__"^8"' case + +exec php-matrix composer +stdout . +! stderr . + +exec php-matrix composer --source=auto +stdout . +! stderr . + +exec php-matrix composer --source=php.net +stdout . +! stderr . + +exec php-matrix composer --source=offline +stdout . +! stderr . + +-- composer.json -- +{"require":{"php":"^8"}} diff --git a/internal/composer/success/testdata/______8_rc_.txtar b/internal/composer/success/testdata/______8_rc_.txtar new file mode 100644 index 0000000..05c7877 --- /dev/null +++ b/internal/composer/success/testdata/______8_rc_.txtar @@ -0,0 +1,22 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '""__"^8@rc"' case + +exec php-matrix composer +stdout . +! stderr . + +exec php-matrix composer --source=auto +stdout . +! stderr . + +exec php-matrix composer --source=php.net +stdout . +! stderr . + +exec php-matrix composer --source=offline +stdout . +! stderr . + +-- composer.json -- +{"require":{"php":"^8@rc"}} diff --git a/internal/composer/success/testdata/_______.txtar b/internal/composer/success/testdata/_______.txtar index 6e0598e..f7e65fd 100644 --- a/internal/composer/success/testdata/_______.txtar +++ b/internal/composer/success/testdata/_______.txtar @@ -3,46 +3,20 @@ # Test the '""__"*"' case exec php-matrix composer -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix composer --source=auto -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix composer --source=php.net -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix composer --source=offline -cmp stdout stdout.golden +stdout . ! stderr . -- composer.json -- {"require":{"php":"*"}} - --- stdout.golden -- -{ - "constraint": "*", - "versions": [ - "5.0", - "5.1", - "5.2", - "5.3", - "5.4", - "5.5", - "5.6", - "7.0", - "7.1", - "7.2", - "7.3", - "7.4", - "8.0", - "8.1", - "8.2", - "8.3", - "8.4" - ], - "lowest": "5.0", - "highest": "8.4" -} diff --git a/internal/composer/success/testdata/_______7.4_.txtar b/internal/composer/success/testdata/_______7.4_.txtar new file mode 100644 index 0000000..6f0c6ae --- /dev/null +++ b/internal/composer/success/testdata/_______7.4_.txtar @@ -0,0 +1,22 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/composer/success/main.go" +# Test the '""__">=7.4"' case + +exec php-matrix composer +stdout . +! stderr . + +exec php-matrix composer --source=auto +stdout . +! stderr . + +exec php-matrix composer --source=php.net +stdout . +! stderr . + +exec php-matrix composer --source=offline +stdout . +! stderr . + +-- composer.json -- +{"require":{"php":">=7.4"}} diff --git a/internal/composer/success/testdata/______stable_.txtar b/internal/composer/success/testdata/______stable_.txtar index 5b74712..95dbc3a 100644 --- a/internal/composer/success/testdata/______stable_.txtar +++ b/internal/composer/success/testdata/______stable_.txtar @@ -3,46 +3,20 @@ # Test the '""__"@stable"' case exec php-matrix composer -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix composer --source=auto -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix composer --source=php.net -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix composer --source=offline -cmp stdout stdout.golden +stdout . ! stderr . -- composer.json -- {"require":{"php":"@stable"}} - --- stdout.golden -- -{ - "constraint": "@stable", - "versions": [ - "5.0", - "5.1", - "5.2", - "5.3", - "5.4", - "5.5", - "5.6", - "7.0", - "7.1", - "7.2", - "7.3", - "7.4", - "8.0", - "8.1", - "8.2", - "8.3", - "8.4" - ], - "lowest": "5.0", - "highest": "8.4" -} diff --git a/internal/constraint/fail/main.go b/internal/constraint/fail/main.go index a435f6e..e373148 100644 --- a/internal/constraint/fail/main.go +++ b/internal/constraint/fail/main.go @@ -69,7 +69,9 @@ func (d data) Write(f *os.File) error { } func main() { - var cases []data + num := len(internal.Modes) * len(rawCases) + cases := make([]data, 0, num) + for _, mode := range internal.Modes { for _, r := range rawCases { cases = append(cases, data{ diff --git a/internal/constraint/success/main.go b/internal/constraint/success/main.go index c97e115..88120ae 100644 --- a/internal/constraint/success/main.go +++ b/internal/constraint/success/main.go @@ -8,7 +8,7 @@ import ( "github.com/typisttech/php-matrix/internal" ) -const fileTemplateRaw = `# DO NOT EDIT THIS FILE +const eolTemplateRaw = `# DO NOT EDIT THIS FILE # This file is generated by "internal/constraint/success/main.go" # Test the '{{ .Name }}' case @@ -32,11 +32,34 @@ cmp stdout stdout.golden -- stdout.golden -- ` -var fileTemplate = template.Must(template.New("").Parse(fileTemplateRaw)) +const supportedTemplateRaw = `# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '{{ .Name }}' case + +exec php-matrix constraint '{{ .Constraint }}' {{ .Mode }} +stdout . +! stderr . + +exec php-matrix constraint '{{ .Constraint }}' {{ .Mode }} --source=auto +stdout . +! stderr . + +exec php-matrix constraint '{{ .Constraint }}' {{ .Mode }} --source=php.net +stdout . +! stderr . + +exec php-matrix constraint '{{ .Constraint }}' {{ .Mode }} --source=offline +stdout . +! stderr . +` + +var eolFileTemplate = template.Must(template.New("").Parse(eolTemplateRaw)) +var supportedFileTemplate = template.Must(template.New("").Parse(supportedTemplateRaw)) type data struct { - Mode string - Constraint string + Mode string + Constraint string + fileTemplate *template.Template } func (d data) Name() string { @@ -44,16 +67,27 @@ func (d data) Name() string { } func (d data) Write(f *os.File) error { - return fileTemplate.Execute(f, d) + return d.fileTemplate.Execute(f, d) } func main() { - var cases []data + num := len(internal.Modes) * (len(internal.EOLConstraints) + len(internal.SupportedConstraints)) + cases := make([]data, 0, num) + for _, mode := range internal.Modes { - for _, constraint := range internal.Constraints { + for _, constraint := range internal.EOLConstraints { + cases = append(cases, data{ + Mode: mode, + Constraint: constraint, + fileTemplate: eolFileTemplate, + }) + } + + for _, constraint := range internal.SupportedConstraints { cases = append(cases, data{ - Mode: mode, - Constraint: constraint, + Mode: mode, + Constraint: constraint, + fileTemplate: supportedFileTemplate, }) } } diff --git a/internal/constraint/success/testdata/_--mode_full____7_stable_.txtar b/internal/constraint/success/testdata/_--mode_full____7_stable_.txtar new file mode 100644 index 0000000..dbceccb --- /dev/null +++ b/internal/constraint/success/testdata/_--mode_full____7_stable_.txtar @@ -0,0 +1,30 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '"--mode=full"__"7@stable"' case + +exec php-matrix constraint '7@stable' --mode=full +cmp stdout stdout.golden +! stderr . + +exec php-matrix constraint '7@stable' --mode=full --source=auto +cmp stdout stdout.golden +! stderr . + +exec php-matrix constraint '7@stable' --mode=full --source=php.net +cmp stdout stdout.golden +! stderr . + +exec php-matrix constraint '7@stable' --mode=full --source=offline +cmp stdout stdout.golden +! stderr . + + +-- stdout.golden -- +{ + "constraint": "7@stable", + "versions": [ + "7.0.0" + ], + "lowest": "7.0.0", + "highest": "7.0.0" +} diff --git a/internal/constraint/success/testdata/_--mode_full_____7.1.2_____8.1.2_.txtar b/internal/constraint/success/testdata/_--mode_full_____7.1.2_____8.0.3_.txtar similarity index 74% rename from internal/constraint/success/testdata/_--mode_full_____7.1.2_____8.1.2_.txtar rename to internal/constraint/success/testdata/_--mode_full_____7.1.2_____8.0.3_.txtar index 9c29c84..be517c2 100644 --- a/internal/constraint/success/testdata/_--mode_full_____7.1.2_____8.1.2_.txtar +++ b/internal/constraint/success/testdata/_--mode_full_____7.1.2_____8.0.3_.txtar @@ -1,27 +1,27 @@ # DO NOT EDIT THIS FILE # This file is generated by "internal/constraint/success/main.go" -# Test the '"--mode=full"__"^7.1.2 || ~8.1.2"' case +# Test the '"--mode=full"__"^7.1.2 || ~8.0.3"' case -exec php-matrix constraint '^7.1.2 || ~8.1.2' --mode=full +exec php-matrix constraint '^7.1.2 || ~8.0.3' --mode=full cmp stdout stdout.golden ! stderr . -exec php-matrix constraint '^7.1.2 || ~8.1.2' --mode=full --source=auto +exec php-matrix constraint '^7.1.2 || ~8.0.3' --mode=full --source=auto cmp stdout stdout.golden ! stderr . -exec php-matrix constraint '^7.1.2 || ~8.1.2' --mode=full --source=php.net +exec php-matrix constraint '^7.1.2 || ~8.0.3' --mode=full --source=php.net cmp stdout stdout.golden ! stderr . -exec php-matrix constraint '^7.1.2 || ~8.1.2' --mode=full --source=offline +exec php-matrix constraint '^7.1.2 || ~8.0.3' --mode=full --source=offline cmp stdout stdout.golden ! stderr . -- stdout.golden -- { - "constraint": "^7.1.2 || ~8.1.2", + "constraint": "^7.1.2 || ~8.0.3", "versions": [ "7.1.2", "7.1.3", @@ -156,39 +156,34 @@ cmp stdout stdout.golden "7.4.30", "7.4.32", "7.4.33", - "8.1.2", - "8.1.3", - "8.1.4", - "8.1.5", - "8.1.6", - "8.1.7", - "8.1.8", - "8.1.9", - "8.1.10", - "8.1.11", - "8.1.12", - "8.1.13", - "8.1.14", - "8.1.15", - "8.1.16", - "8.1.17", - "8.1.18", - "8.1.19", - "8.1.20", - "8.1.21", - "8.1.22", - "8.1.23", - "8.1.24", - "8.1.25", - "8.1.26", - "8.1.27", - "8.1.28", - "8.1.29", - "8.1.30", - "8.1.31", - "8.1.32", - "8.1.33" + "8.0.3", + "8.0.5", + "8.0.6", + "8.0.7", + "8.0.8", + "8.0.9", + "8.0.10", + "8.0.11", + "8.0.12", + "8.0.13", + "8.0.14", + "8.0.15", + "8.0.16", + "8.0.17", + "8.0.18", + "8.0.19", + "8.0.20", + "8.0.21", + "8.0.22", + "8.0.23", + "8.0.24", + "8.0.25", + "8.0.26", + "8.0.27", + "8.0.28", + "8.0.29", + "8.0.30" ], "lowest": "7.1.2", - "highest": "8.1.33" + "highest": "8.0.30" } diff --git a/internal/constraint/success/testdata/_--mode_full_____7.4_____8.4_.txtar b/internal/constraint/success/testdata/_--mode_full_____7.4_____8.4_.txtar new file mode 100644 index 0000000..056a460 --- /dev/null +++ b/internal/constraint/success/testdata/_--mode_full_____7.4_____8.4_.txtar @@ -0,0 +1,19 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '"--mode=full"__"^7.4 || ^8.4"' case + +exec php-matrix constraint '^7.4 || ^8.4' --mode=full +stdout . +! stderr . + +exec php-matrix constraint '^7.4 || ^8.4' --mode=full --source=auto +stdout . +! stderr . + +exec php-matrix constraint '^7.4 || ^8.4' --mode=full --source=php.net +stdout . +! stderr . + +exec php-matrix constraint '^7.4 || ^8.4' --mode=full --source=offline +stdout . +! stderr . diff --git a/internal/constraint/success/testdata/_--mode_full_____7__7.2.3_.txtar b/internal/constraint/success/testdata/_--mode_full_____7__7.2.3_.txtar new file mode 100644 index 0000000..05da5d1 --- /dev/null +++ b/internal/constraint/success/testdata/_--mode_full_____7__7.2.3_.txtar @@ -0,0 +1,100 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '"--mode=full"__"^7 <7.2.3"' case + +exec php-matrix constraint '^7 <7.2.3' --mode=full +cmp stdout stdout.golden +! stderr . + +exec php-matrix constraint '^7 <7.2.3' --mode=full --source=auto +cmp stdout stdout.golden +! stderr . + +exec php-matrix constraint '^7 <7.2.3' --mode=full --source=php.net +cmp stdout stdout.golden +! stderr . + +exec php-matrix constraint '^7 <7.2.3' --mode=full --source=offline +cmp stdout stdout.golden +! stderr . + + +-- stdout.golden -- +{ + "constraint": "^7 <7.2.3", + "versions": [ + "7.0.0", + "7.0.1", + "7.0.2", + "7.0.3", + "7.0.4", + "7.0.5", + "7.0.6", + "7.0.7", + "7.0.8", + "7.0.9", + "7.0.10", + "7.0.11", + "7.0.12", + "7.0.13", + "7.0.14", + "7.0.15", + "7.0.16", + "7.0.17", + "7.0.18", + "7.0.19", + "7.0.20", + "7.0.21", + "7.0.22", + "7.0.23", + "7.0.24", + "7.0.25", + "7.0.26", + "7.0.27", + "7.0.28", + "7.0.29", + "7.0.30", + "7.0.31", + "7.0.32", + "7.0.33", + "7.1.0", + "7.1.1", + "7.1.2", + "7.1.3", + "7.1.4", + "7.1.5", + "7.1.6", + "7.1.7", + "7.1.8", + "7.1.9", + "7.1.10", + "7.1.11", + "7.1.12", + "7.1.13", + "7.1.14", + "7.1.15", + "7.1.16", + "7.1.17", + "7.1.18", + "7.1.19", + "7.1.20", + "7.1.21", + "7.1.22", + "7.1.23", + "7.1.24", + "7.1.25", + "7.1.26", + "7.1.27", + "7.1.28", + "7.1.29", + "7.1.30", + "7.1.31", + "7.1.32", + "7.1.33", + "7.2.0", + "7.2.1", + "7.2.2" + ], + "lowest": "7.0.0", + "highest": "7.2.2" +} diff --git a/internal/constraint/success/testdata/_--mode_full_____7__7.2_.txtar b/internal/constraint/success/testdata/_--mode_full_____7__7.2_.txtar deleted file mode 100644 index 0caf937..0000000 --- a/internal/constraint/success/testdata/_--mode_full_____7__7.2_.txtar +++ /dev/null @@ -1,130 +0,0 @@ -# DO NOT EDIT THIS FILE -# This file is generated by "internal/constraint/success/main.go" -# Test the '"--mode=full"__"^7 ^7.2"' case - -exec php-matrix constraint '^7 ^7.2' --mode=full -cmp stdout stdout.golden -! stderr . - -exec php-matrix constraint '^7 ^7.2' --mode=full --source=auto -cmp stdout stdout.golden -! stderr . - -exec php-matrix constraint '^7 ^7.2' --mode=full --source=php.net -cmp stdout stdout.golden -! stderr . - -exec php-matrix constraint '^7 ^7.2' --mode=full --source=offline -cmp stdout stdout.golden -! stderr . - - --- stdout.golden -- -{ - "constraint": "^7 ^7.2", - "versions": [ - "7.2.0", - "7.2.1", - "7.2.2", - "7.2.3", - "7.2.4", - "7.2.5", - "7.2.6", - "7.2.7", - "7.2.8", - "7.2.9", - "7.2.10", - "7.2.11", - "7.2.12", - "7.2.13", - "7.2.14", - "7.2.15", - "7.2.16", - "7.2.17", - "7.2.18", - "7.2.19", - "7.2.20", - "7.2.21", - "7.2.22", - "7.2.23", - "7.2.24", - "7.2.25", - "7.2.26", - "7.2.27", - "7.2.28", - "7.2.29", - "7.2.30", - "7.2.31", - "7.2.32", - "7.2.33", - "7.2.34", - "7.3.0", - "7.3.1", - "7.3.2", - "7.3.3", - "7.3.4", - "7.3.5", - "7.3.6", - "7.3.7", - "7.3.8", - "7.3.9", - "7.3.10", - "7.3.11", - "7.3.12", - "7.3.13", - "7.3.14", - "7.3.15", - "7.3.16", - "7.3.17", - "7.3.18", - "7.3.19", - "7.3.20", - "7.3.21", - "7.3.22", - "7.3.23", - "7.3.24", - "7.3.25", - "7.3.26", - "7.3.27", - "7.3.28", - "7.3.29", - "7.3.30", - "7.3.31", - "7.3.32", - "7.3.33", - "7.4.0", - "7.4.1", - "7.4.2", - "7.4.3", - "7.4.4", - "7.4.5", - "7.4.6", - "7.4.7", - "7.4.8", - "7.4.9", - "7.4.10", - "7.4.11", - "7.4.12", - "7.4.13", - "7.4.14", - "7.4.15", - "7.4.16", - "7.4.18", - "7.4.19", - "7.4.20", - "7.4.21", - "7.4.22", - "7.4.23", - "7.4.24", - "7.4.25", - "7.4.26", - "7.4.27", - "7.4.28", - "7.4.29", - "7.4.30", - "7.4.32", - "7.4.33" - ], - "lowest": "7.2.0", - "highest": "7.4.33" -} diff --git a/internal/constraint/success/testdata/_--mode_full_____7_stable_.txtar b/internal/constraint/success/testdata/_--mode_full_____7_stable_.txtar deleted file mode 100644 index 23b543c..0000000 --- a/internal/constraint/success/testdata/_--mode_full_____7_stable_.txtar +++ /dev/null @@ -1,198 +0,0 @@ -# DO NOT EDIT THIS FILE -# This file is generated by "internal/constraint/success/main.go" -# Test the '"--mode=full"__"^7@stable"' case - -exec php-matrix constraint '^7@stable' --mode=full -cmp stdout stdout.golden -! stderr . - -exec php-matrix constraint '^7@stable' --mode=full --source=auto -cmp stdout stdout.golden -! stderr . - -exec php-matrix constraint '^7@stable' --mode=full --source=php.net -cmp stdout stdout.golden -! stderr . - -exec php-matrix constraint '^7@stable' --mode=full --source=offline -cmp stdout stdout.golden -! stderr . - - --- stdout.golden -- -{ - "constraint": "^7@stable", - "versions": [ - "7.0.0", - "7.0.1", - "7.0.2", - "7.0.3", - "7.0.4", - "7.0.5", - "7.0.6", - "7.0.7", - "7.0.8", - "7.0.9", - "7.0.10", - "7.0.11", - "7.0.12", - "7.0.13", - "7.0.14", - "7.0.15", - "7.0.16", - "7.0.17", - "7.0.18", - "7.0.19", - "7.0.20", - "7.0.21", - "7.0.22", - "7.0.23", - "7.0.24", - "7.0.25", - "7.0.26", - "7.0.27", - "7.0.28", - "7.0.29", - "7.0.30", - "7.0.31", - "7.0.32", - "7.0.33", - "7.1.0", - "7.1.1", - "7.1.2", - "7.1.3", - "7.1.4", - "7.1.5", - "7.1.6", - "7.1.7", - "7.1.8", - "7.1.9", - "7.1.10", - "7.1.11", - "7.1.12", - "7.1.13", - "7.1.14", - "7.1.15", - "7.1.16", - "7.1.17", - "7.1.18", - "7.1.19", - "7.1.20", - "7.1.21", - "7.1.22", - "7.1.23", - "7.1.24", - "7.1.25", - "7.1.26", - "7.1.27", - "7.1.28", - "7.1.29", - "7.1.30", - "7.1.31", - "7.1.32", - "7.1.33", - "7.2.0", - "7.2.1", - "7.2.2", - "7.2.3", - "7.2.4", - "7.2.5", - "7.2.6", - "7.2.7", - "7.2.8", - "7.2.9", - "7.2.10", - "7.2.11", - "7.2.12", - "7.2.13", - "7.2.14", - "7.2.15", - "7.2.16", - "7.2.17", - "7.2.18", - "7.2.19", - "7.2.20", - "7.2.21", - "7.2.22", - "7.2.23", - "7.2.24", - "7.2.25", - "7.2.26", - "7.2.27", - "7.2.28", - "7.2.29", - "7.2.30", - "7.2.31", - "7.2.32", - "7.2.33", - "7.2.34", - "7.3.0", - "7.3.1", - "7.3.2", - "7.3.3", - "7.3.4", - "7.3.5", - "7.3.6", - "7.3.7", - "7.3.8", - "7.3.9", - "7.3.10", - "7.3.11", - "7.3.12", - "7.3.13", - "7.3.14", - "7.3.15", - "7.3.16", - "7.3.17", - "7.3.18", - "7.3.19", - "7.3.20", - "7.3.21", - "7.3.22", - "7.3.23", - "7.3.24", - "7.3.25", - "7.3.26", - "7.3.27", - "7.3.28", - "7.3.29", - "7.3.30", - "7.3.31", - "7.3.32", - "7.3.33", - "7.4.0", - "7.4.1", - "7.4.2", - "7.4.3", - "7.4.4", - "7.4.5", - "7.4.6", - "7.4.7", - "7.4.8", - "7.4.9", - "7.4.10", - "7.4.11", - "7.4.12", - "7.4.13", - "7.4.14", - "7.4.15", - "7.4.16", - "7.4.18", - "7.4.19", - "7.4.20", - "7.4.21", - "7.4.22", - "7.4.23", - "7.4.24", - "7.4.25", - "7.4.26", - "7.4.27", - "7.4.28", - "7.4.29", - "7.4.30", - "7.4.32", - "7.4.33" - ], - "lowest": "7.0.0", - "highest": "7.4.33" -} diff --git a/internal/constraint/success/testdata/_--mode_full_____8.2_.txtar b/internal/constraint/success/testdata/_--mode_full_____8.2_.txtar new file mode 100644 index 0000000..20b90fc --- /dev/null +++ b/internal/constraint/success/testdata/_--mode_full_____8.2_.txtar @@ -0,0 +1,19 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '"--mode=full"__"^8.2"' case + +exec php-matrix constraint '^8.2' --mode=full +stdout . +! stderr . + +exec php-matrix constraint '^8.2' --mode=full --source=auto +stdout . +! stderr . + +exec php-matrix constraint '^8.2' --mode=full --source=php.net +stdout . +! stderr . + +exec php-matrix constraint '^8.2' --mode=full --source=offline +stdout . +! stderr . diff --git a/internal/constraint/success/testdata/_--mode_full_____8.2____8.4.1_.txtar b/internal/constraint/success/testdata/_--mode_full_____8.2____8.4.1_.txtar new file mode 100644 index 0000000..e38f820 --- /dev/null +++ b/internal/constraint/success/testdata/_--mode_full_____8.2____8.4.1_.txtar @@ -0,0 +1,19 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '"--mode=full"__"^8.2 <= 8.4.1"' case + +exec php-matrix constraint '^8.2 <= 8.4.1' --mode=full +stdout . +! stderr . + +exec php-matrix constraint '^8.2 <= 8.4.1' --mode=full --source=auto +stdout . +! stderr . + +exec php-matrix constraint '^8.2 <= 8.4.1' --mode=full --source=php.net +stdout . +! stderr . + +exec php-matrix constraint '^8.2 <= 8.4.1' --mode=full --source=offline +stdout . +! stderr . diff --git a/internal/constraint/success/testdata/_--mode_full_____8.2_____8.4.0_.txtar b/internal/constraint/success/testdata/_--mode_full_____8.2_____8.4.0_.txtar new file mode 100644 index 0000000..0763622 --- /dev/null +++ b/internal/constraint/success/testdata/_--mode_full_____8.2_____8.4.0_.txtar @@ -0,0 +1,19 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '"--mode=full"__"^8.2 || ~8.4.0"' case + +exec php-matrix constraint '^8.2 || ~8.4.0' --mode=full +stdout . +! stderr . + +exec php-matrix constraint '^8.2 || ~8.4.0' --mode=full --source=auto +stdout . +! stderr . + +exec php-matrix constraint '^8.2 || ~8.4.0' --mode=full --source=php.net +stdout . +! stderr . + +exec php-matrix constraint '^8.2 || ~8.4.0' --mode=full --source=offline +stdout . +! stderr . diff --git a/internal/constraint/success/testdata/_--mode_full_____8.3.4_.txtar b/internal/constraint/success/testdata/_--mode_full_____8.3.4_.txtar new file mode 100644 index 0000000..80444ca --- /dev/null +++ b/internal/constraint/success/testdata/_--mode_full_____8.3.4_.txtar @@ -0,0 +1,19 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '"--mode=full"__"^8.3.4"' case + +exec php-matrix constraint '^8.3.4' --mode=full +stdout . +! stderr . + +exec php-matrix constraint '^8.3.4' --mode=full --source=auto +stdout . +! stderr . + +exec php-matrix constraint '^8.3.4' --mode=full --source=php.net +stdout . +! stderr . + +exec php-matrix constraint '^8.3.4' --mode=full --source=offline +stdout . +! stderr . diff --git a/internal/constraint/success/testdata/_--mode_full_____8_.txtar b/internal/constraint/success/testdata/_--mode_full_____8_.txtar new file mode 100644 index 0000000..87287ca --- /dev/null +++ b/internal/constraint/success/testdata/_--mode_full_____8_.txtar @@ -0,0 +1,19 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '"--mode=full"__"^8"' case + +exec php-matrix constraint '^8' --mode=full +stdout . +! stderr . + +exec php-matrix constraint '^8' --mode=full --source=auto +stdout . +! stderr . + +exec php-matrix constraint '^8' --mode=full --source=php.net +stdout . +! stderr . + +exec php-matrix constraint '^8' --mode=full --source=offline +stdout . +! stderr . diff --git a/internal/constraint/success/testdata/_--mode_full_____8_rc_.txtar b/internal/constraint/success/testdata/_--mode_full_____8_rc_.txtar new file mode 100644 index 0000000..eab7bc9 --- /dev/null +++ b/internal/constraint/success/testdata/_--mode_full_____8_rc_.txtar @@ -0,0 +1,19 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '"--mode=full"__"^8@rc"' case + +exec php-matrix constraint '^8@rc' --mode=full +stdout . +! stderr . + +exec php-matrix constraint '^8@rc' --mode=full --source=auto +stdout . +! stderr . + +exec php-matrix constraint '^8@rc' --mode=full --source=php.net +stdout . +! stderr . + +exec php-matrix constraint '^8@rc' --mode=full --source=offline +stdout . +! stderr . diff --git a/internal/constraint/success/testdata/_--mode_full______.txtar b/internal/constraint/success/testdata/_--mode_full______.txtar index aed7d28..6d5b770 100644 --- a/internal/constraint/success/testdata/_--mode_full______.txtar +++ b/internal/constraint/success/testdata/_--mode_full______.txtar @@ -3,513 +3,17 @@ # Test the '"--mode=full"__"*"' case exec php-matrix constraint '*' --mode=full -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix constraint '*' --mode=full --source=auto -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix constraint '*' --mode=full --source=php.net -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix constraint '*' --mode=full --source=offline -cmp stdout stdout.golden +stdout . ! stderr . - - --- stdout.golden -- -{ - "constraint": "*", - "versions": [ - "5.0.0", - "5.0.1", - "5.0.2", - "5.0.3", - "5.0.4", - "5.0.5", - "5.1.0", - "5.1.1", - "5.1.2", - "5.1.3", - "5.1.4", - "5.1.5", - "5.1.6", - "5.2.0", - "5.2.1", - "5.2.2", - "5.2.3", - "5.2.4", - "5.2.5", - "5.2.6", - "5.2.8", - "5.2.9", - "5.2.10", - "5.2.11", - "5.2.12", - "5.2.13", - "5.2.14", - "5.2.15", - "5.2.16", - "5.2.17", - "5.3.0", - "5.3.1", - "5.3.2", - "5.3.3", - "5.3.4", - "5.3.5", - "5.3.6", - "5.3.7", - "5.3.8", - "5.3.9", - "5.3.10", - "5.3.11", - "5.3.12", - "5.3.13", - "5.3.14", - "5.3.15", - "5.3.16", - "5.3.17", - "5.3.18", - "5.3.19", - "5.3.20", - "5.3.21", - "5.3.22", - "5.3.23", - "5.3.24", - "5.3.25", - "5.3.26", - "5.3.27", - "5.3.28", - "5.3.29", - "5.4.0", - "5.4.1", - "5.4.2", - "5.4.3", - "5.4.4", - "5.4.5", - "5.4.6", - "5.4.7", - "5.4.8", - "5.4.9", - "5.4.10", - "5.4.11", - "5.4.12", - "5.4.13", - "5.4.14", - "5.4.15", - "5.4.16", - "5.4.17", - "5.4.18", - "5.4.19", - "5.4.20", - "5.4.21", - "5.4.22", - "5.4.23", - "5.4.24", - "5.4.25", - "5.4.26", - "5.4.27", - "5.4.28", - "5.4.29", - "5.4.30", - "5.4.31", - "5.4.32", - "5.4.33", - "5.4.34", - "5.4.35", - "5.4.36", - "5.4.37", - "5.4.38", - "5.4.39", - "5.4.40", - "5.4.41", - "5.4.42", - "5.4.43", - "5.4.44", - "5.4.45", - "5.5.0", - "5.5.1", - "5.5.2", - "5.5.3", - "5.5.4", - "5.5.5", - "5.5.6", - "5.5.7", - "5.5.8", - "5.5.9", - "5.5.10", - "5.5.11", - "5.5.12", - "5.5.13", - "5.5.14", - "5.5.15", - "5.5.16", - "5.5.17", - "5.5.18", - "5.5.19", - "5.5.20", - "5.5.21", - "5.5.22", - "5.5.23", - "5.5.24", - "5.5.25", - "5.5.26", - "5.5.27", - "5.5.28", - "5.5.29", - "5.5.30", - "5.5.31", - "5.5.32", - "5.5.33", - "5.5.34", - "5.5.35", - "5.5.36", - "5.5.37", - "5.5.38", - "5.6.0", - "5.6.1", - "5.6.2", - "5.6.3", - "5.6.4", - "5.6.5", - "5.6.6", - "5.6.7", - "5.6.8", - "5.6.9", - "5.6.10", - "5.6.11", - "5.6.12", - "5.6.13", - "5.6.14", - "5.6.15", - "5.6.16", - "5.6.17", - "5.6.18", - "5.6.19", - "5.6.20", - "5.6.21", - "5.6.22", - "5.6.23", - "5.6.24", - "5.6.25", - "5.6.26", - "5.6.27", - "5.6.28", - "5.6.29", - "5.6.30", - "5.6.31", - "5.6.32", - "5.6.33", - "5.6.34", - "5.6.35", - "5.6.36", - "5.6.37", - "5.6.38", - "5.6.39", - "5.6.40", - "7.0.0", - "7.0.1", - "7.0.2", - "7.0.3", - "7.0.4", - "7.0.5", - "7.0.6", - "7.0.7", - "7.0.8", - "7.0.9", - "7.0.10", - "7.0.11", - "7.0.12", - "7.0.13", - "7.0.14", - "7.0.15", - "7.0.16", - "7.0.17", - "7.0.18", - "7.0.19", - "7.0.20", - "7.0.21", - "7.0.22", - "7.0.23", - "7.0.24", - "7.0.25", - "7.0.26", - "7.0.27", - "7.0.28", - "7.0.29", - "7.0.30", - "7.0.31", - "7.0.32", - "7.0.33", - "7.1.0", - "7.1.1", - "7.1.2", - "7.1.3", - "7.1.4", - "7.1.5", - "7.1.6", - "7.1.7", - "7.1.8", - "7.1.9", - "7.1.10", - "7.1.11", - "7.1.12", - "7.1.13", - "7.1.14", - "7.1.15", - "7.1.16", - "7.1.17", - "7.1.18", - "7.1.19", - "7.1.20", - "7.1.21", - "7.1.22", - "7.1.23", - "7.1.24", - "7.1.25", - "7.1.26", - "7.1.27", - "7.1.28", - "7.1.29", - "7.1.30", - "7.1.31", - "7.1.32", - "7.1.33", - "7.2.0", - "7.2.1", - "7.2.2", - "7.2.3", - "7.2.4", - "7.2.5", - "7.2.6", - "7.2.7", - "7.2.8", - "7.2.9", - "7.2.10", - "7.2.11", - "7.2.12", - "7.2.13", - "7.2.14", - "7.2.15", - "7.2.16", - "7.2.17", - "7.2.18", - "7.2.19", - "7.2.20", - "7.2.21", - "7.2.22", - "7.2.23", - "7.2.24", - "7.2.25", - "7.2.26", - "7.2.27", - "7.2.28", - "7.2.29", - "7.2.30", - "7.2.31", - "7.2.32", - "7.2.33", - "7.2.34", - "7.3.0", - "7.3.1", - "7.3.2", - "7.3.3", - "7.3.4", - "7.3.5", - "7.3.6", - "7.3.7", - "7.3.8", - "7.3.9", - "7.3.10", - "7.3.11", - "7.3.12", - "7.3.13", - "7.3.14", - "7.3.15", - "7.3.16", - "7.3.17", - "7.3.18", - "7.3.19", - "7.3.20", - "7.3.21", - "7.3.22", - "7.3.23", - "7.3.24", - "7.3.25", - "7.3.26", - "7.3.27", - "7.3.28", - "7.3.29", - "7.3.30", - "7.3.31", - "7.3.32", - "7.3.33", - "7.4.0", - "7.4.1", - "7.4.2", - "7.4.3", - "7.4.4", - "7.4.5", - "7.4.6", - "7.4.7", - "7.4.8", - "7.4.9", - "7.4.10", - "7.4.11", - "7.4.12", - "7.4.13", - "7.4.14", - "7.4.15", - "7.4.16", - "7.4.18", - "7.4.19", - "7.4.20", - "7.4.21", - "7.4.22", - "7.4.23", - "7.4.24", - "7.4.25", - "7.4.26", - "7.4.27", - "7.4.28", - "7.4.29", - "7.4.30", - "7.4.32", - "7.4.33", - "8.0.0", - "8.0.1", - "8.0.2", - "8.0.3", - "8.0.5", - "8.0.6", - "8.0.7", - "8.0.8", - "8.0.9", - "8.0.10", - "8.0.11", - "8.0.12", - "8.0.13", - "8.0.14", - "8.0.15", - "8.0.16", - "8.0.17", - "8.0.18", - "8.0.19", - "8.0.20", - "8.0.21", - "8.0.22", - "8.0.23", - "8.0.24", - "8.0.25", - "8.0.26", - "8.0.27", - "8.0.28", - "8.0.29", - "8.0.30", - "8.1.0", - "8.1.1", - "8.1.2", - "8.1.3", - "8.1.4", - "8.1.5", - "8.1.6", - "8.1.7", - "8.1.8", - "8.1.9", - "8.1.10", - "8.1.11", - "8.1.12", - "8.1.13", - "8.1.14", - "8.1.15", - "8.1.16", - "8.1.17", - "8.1.18", - "8.1.19", - "8.1.20", - "8.1.21", - "8.1.22", - "8.1.23", - "8.1.24", - "8.1.25", - "8.1.26", - "8.1.27", - "8.1.28", - "8.1.29", - "8.1.30", - "8.1.31", - "8.1.32", - "8.1.33", - "8.2.0", - "8.2.1", - "8.2.2", - "8.2.3", - "8.2.4", - "8.2.5", - "8.2.6", - "8.2.7", - "8.2.8", - "8.2.9", - "8.2.10", - "8.2.11", - "8.2.12", - "8.2.13", - "8.2.14", - "8.2.15", - "8.2.16", - "8.2.17", - "8.2.18", - "8.2.19", - "8.2.20", - "8.2.21", - "8.2.22", - "8.2.23", - "8.2.24", - "8.2.25", - "8.2.26", - "8.2.27", - "8.2.28", - "8.2.29", - "8.3.0", - "8.3.1", - "8.3.2", - "8.3.3", - "8.3.4", - "8.3.6", - "8.3.7", - "8.3.8", - "8.3.9", - "8.3.10", - "8.3.11", - "8.3.12", - "8.3.13", - "8.3.14", - "8.3.15", - "8.3.16", - "8.3.17", - "8.3.19", - "8.3.20", - "8.3.21", - "8.3.22", - "8.3.23", - "8.3.24", - "8.3.25", - "8.3.26", - "8.4.1", - "8.4.2", - "8.4.3", - "8.4.4", - "8.4.5", - "8.4.6", - "8.4.7", - "8.4.8", - "8.4.10", - "8.4.11", - "8.4.12", - "8.4.13" - ], - "lowest": "5.0.0", - "highest": "8.4.13" -} diff --git a/internal/constraint/success/testdata/_--mode_full______7.4_.txtar b/internal/constraint/success/testdata/_--mode_full______7.4_.txtar new file mode 100644 index 0000000..b908ae1 --- /dev/null +++ b/internal/constraint/success/testdata/_--mode_full______7.4_.txtar @@ -0,0 +1,19 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '"--mode=full"__">=7.4"' case + +exec php-matrix constraint '>=7.4' --mode=full +stdout . +! stderr . + +exec php-matrix constraint '>=7.4' --mode=full --source=auto +stdout . +! stderr . + +exec php-matrix constraint '>=7.4' --mode=full --source=php.net +stdout . +! stderr . + +exec php-matrix constraint '>=7.4' --mode=full --source=offline +stdout . +! stderr . diff --git a/internal/constraint/success/testdata/_--mode_full_____stable_.txtar b/internal/constraint/success/testdata/_--mode_full_____stable_.txtar index 79dacb0..75f77c1 100644 --- a/internal/constraint/success/testdata/_--mode_full_____stable_.txtar +++ b/internal/constraint/success/testdata/_--mode_full_____stable_.txtar @@ -3,513 +3,17 @@ # Test the '"--mode=full"__"@stable"' case exec php-matrix constraint '@stable' --mode=full -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix constraint '@stable' --mode=full --source=auto -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix constraint '@stable' --mode=full --source=php.net -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix constraint '@stable' --mode=full --source=offline -cmp stdout stdout.golden +stdout . ! stderr . - - --- stdout.golden -- -{ - "constraint": "@stable", - "versions": [ - "5.0.0", - "5.0.1", - "5.0.2", - "5.0.3", - "5.0.4", - "5.0.5", - "5.1.0", - "5.1.1", - "5.1.2", - "5.1.3", - "5.1.4", - "5.1.5", - "5.1.6", - "5.2.0", - "5.2.1", - "5.2.2", - "5.2.3", - "5.2.4", - "5.2.5", - "5.2.6", - "5.2.8", - "5.2.9", - "5.2.10", - "5.2.11", - "5.2.12", - "5.2.13", - "5.2.14", - "5.2.15", - "5.2.16", - "5.2.17", - "5.3.0", - "5.3.1", - "5.3.2", - "5.3.3", - "5.3.4", - "5.3.5", - "5.3.6", - "5.3.7", - "5.3.8", - "5.3.9", - "5.3.10", - "5.3.11", - "5.3.12", - "5.3.13", - "5.3.14", - "5.3.15", - "5.3.16", - "5.3.17", - "5.3.18", - "5.3.19", - "5.3.20", - "5.3.21", - "5.3.22", - "5.3.23", - "5.3.24", - "5.3.25", - "5.3.26", - "5.3.27", - "5.3.28", - "5.3.29", - "5.4.0", - "5.4.1", - "5.4.2", - "5.4.3", - "5.4.4", - "5.4.5", - "5.4.6", - "5.4.7", - "5.4.8", - "5.4.9", - "5.4.10", - "5.4.11", - "5.4.12", - "5.4.13", - "5.4.14", - "5.4.15", - "5.4.16", - "5.4.17", - "5.4.18", - "5.4.19", - "5.4.20", - "5.4.21", - "5.4.22", - "5.4.23", - "5.4.24", - "5.4.25", - "5.4.26", - "5.4.27", - "5.4.28", - "5.4.29", - "5.4.30", - "5.4.31", - "5.4.32", - "5.4.33", - "5.4.34", - "5.4.35", - "5.4.36", - "5.4.37", - "5.4.38", - "5.4.39", - "5.4.40", - "5.4.41", - "5.4.42", - "5.4.43", - "5.4.44", - "5.4.45", - "5.5.0", - "5.5.1", - "5.5.2", - "5.5.3", - "5.5.4", - "5.5.5", - "5.5.6", - "5.5.7", - "5.5.8", - "5.5.9", - "5.5.10", - "5.5.11", - "5.5.12", - "5.5.13", - "5.5.14", - "5.5.15", - "5.5.16", - "5.5.17", - "5.5.18", - "5.5.19", - "5.5.20", - "5.5.21", - "5.5.22", - "5.5.23", - "5.5.24", - "5.5.25", - "5.5.26", - "5.5.27", - "5.5.28", - "5.5.29", - "5.5.30", - "5.5.31", - "5.5.32", - "5.5.33", - "5.5.34", - "5.5.35", - "5.5.36", - "5.5.37", - "5.5.38", - "5.6.0", - "5.6.1", - "5.6.2", - "5.6.3", - "5.6.4", - "5.6.5", - "5.6.6", - "5.6.7", - "5.6.8", - "5.6.9", - "5.6.10", - "5.6.11", - "5.6.12", - "5.6.13", - "5.6.14", - "5.6.15", - "5.6.16", - "5.6.17", - "5.6.18", - "5.6.19", - "5.6.20", - "5.6.21", - "5.6.22", - "5.6.23", - "5.6.24", - "5.6.25", - "5.6.26", - "5.6.27", - "5.6.28", - "5.6.29", - "5.6.30", - "5.6.31", - "5.6.32", - "5.6.33", - "5.6.34", - "5.6.35", - "5.6.36", - "5.6.37", - "5.6.38", - "5.6.39", - "5.6.40", - "7.0.0", - "7.0.1", - "7.0.2", - "7.0.3", - "7.0.4", - "7.0.5", - "7.0.6", - "7.0.7", - "7.0.8", - "7.0.9", - "7.0.10", - "7.0.11", - "7.0.12", - "7.0.13", - "7.0.14", - "7.0.15", - "7.0.16", - "7.0.17", - "7.0.18", - "7.0.19", - "7.0.20", - "7.0.21", - "7.0.22", - "7.0.23", - "7.0.24", - "7.0.25", - "7.0.26", - "7.0.27", - "7.0.28", - "7.0.29", - "7.0.30", - "7.0.31", - "7.0.32", - "7.0.33", - "7.1.0", - "7.1.1", - "7.1.2", - "7.1.3", - "7.1.4", - "7.1.5", - "7.1.6", - "7.1.7", - "7.1.8", - "7.1.9", - "7.1.10", - "7.1.11", - "7.1.12", - "7.1.13", - "7.1.14", - "7.1.15", - "7.1.16", - "7.1.17", - "7.1.18", - "7.1.19", - "7.1.20", - "7.1.21", - "7.1.22", - "7.1.23", - "7.1.24", - "7.1.25", - "7.1.26", - "7.1.27", - "7.1.28", - "7.1.29", - "7.1.30", - "7.1.31", - "7.1.32", - "7.1.33", - "7.2.0", - "7.2.1", - "7.2.2", - "7.2.3", - "7.2.4", - "7.2.5", - "7.2.6", - "7.2.7", - "7.2.8", - "7.2.9", - "7.2.10", - "7.2.11", - "7.2.12", - "7.2.13", - "7.2.14", - "7.2.15", - "7.2.16", - "7.2.17", - "7.2.18", - "7.2.19", - "7.2.20", - "7.2.21", - "7.2.22", - "7.2.23", - "7.2.24", - "7.2.25", - "7.2.26", - "7.2.27", - "7.2.28", - "7.2.29", - "7.2.30", - "7.2.31", - "7.2.32", - "7.2.33", - "7.2.34", - "7.3.0", - "7.3.1", - "7.3.2", - "7.3.3", - "7.3.4", - "7.3.5", - "7.3.6", - "7.3.7", - "7.3.8", - "7.3.9", - "7.3.10", - "7.3.11", - "7.3.12", - "7.3.13", - "7.3.14", - "7.3.15", - "7.3.16", - "7.3.17", - "7.3.18", - "7.3.19", - "7.3.20", - "7.3.21", - "7.3.22", - "7.3.23", - "7.3.24", - "7.3.25", - "7.3.26", - "7.3.27", - "7.3.28", - "7.3.29", - "7.3.30", - "7.3.31", - "7.3.32", - "7.3.33", - "7.4.0", - "7.4.1", - "7.4.2", - "7.4.3", - "7.4.4", - "7.4.5", - "7.4.6", - "7.4.7", - "7.4.8", - "7.4.9", - "7.4.10", - "7.4.11", - "7.4.12", - "7.4.13", - "7.4.14", - "7.4.15", - "7.4.16", - "7.4.18", - "7.4.19", - "7.4.20", - "7.4.21", - "7.4.22", - "7.4.23", - "7.4.24", - "7.4.25", - "7.4.26", - "7.4.27", - "7.4.28", - "7.4.29", - "7.4.30", - "7.4.32", - "7.4.33", - "8.0.0", - "8.0.1", - "8.0.2", - "8.0.3", - "8.0.5", - "8.0.6", - "8.0.7", - "8.0.8", - "8.0.9", - "8.0.10", - "8.0.11", - "8.0.12", - "8.0.13", - "8.0.14", - "8.0.15", - "8.0.16", - "8.0.17", - "8.0.18", - "8.0.19", - "8.0.20", - "8.0.21", - "8.0.22", - "8.0.23", - "8.0.24", - "8.0.25", - "8.0.26", - "8.0.27", - "8.0.28", - "8.0.29", - "8.0.30", - "8.1.0", - "8.1.1", - "8.1.2", - "8.1.3", - "8.1.4", - "8.1.5", - "8.1.6", - "8.1.7", - "8.1.8", - "8.1.9", - "8.1.10", - "8.1.11", - "8.1.12", - "8.1.13", - "8.1.14", - "8.1.15", - "8.1.16", - "8.1.17", - "8.1.18", - "8.1.19", - "8.1.20", - "8.1.21", - "8.1.22", - "8.1.23", - "8.1.24", - "8.1.25", - "8.1.26", - "8.1.27", - "8.1.28", - "8.1.29", - "8.1.30", - "8.1.31", - "8.1.32", - "8.1.33", - "8.2.0", - "8.2.1", - "8.2.2", - "8.2.3", - "8.2.4", - "8.2.5", - "8.2.6", - "8.2.7", - "8.2.8", - "8.2.9", - "8.2.10", - "8.2.11", - "8.2.12", - "8.2.13", - "8.2.14", - "8.2.15", - "8.2.16", - "8.2.17", - "8.2.18", - "8.2.19", - "8.2.20", - "8.2.21", - "8.2.22", - "8.2.23", - "8.2.24", - "8.2.25", - "8.2.26", - "8.2.27", - "8.2.28", - "8.2.29", - "8.3.0", - "8.3.1", - "8.3.2", - "8.3.3", - "8.3.4", - "8.3.6", - "8.3.7", - "8.3.8", - "8.3.9", - "8.3.10", - "8.3.11", - "8.3.12", - "8.3.13", - "8.3.14", - "8.3.15", - "8.3.16", - "8.3.17", - "8.3.19", - "8.3.20", - "8.3.21", - "8.3.22", - "8.3.23", - "8.3.24", - "8.3.25", - "8.3.26", - "8.4.1", - "8.4.2", - "8.4.3", - "8.4.4", - "8.4.5", - "8.4.6", - "8.4.7", - "8.4.8", - "8.4.10", - "8.4.11", - "8.4.12", - "8.4.13" - ], - "lowest": "5.0.0", - "highest": "8.4.13" -} diff --git a/internal/constraint/success/testdata/_--mode_minor-only____7_stable_.txtar b/internal/constraint/success/testdata/_--mode_minor-only____7_stable_.txtar new file mode 100644 index 0000000..06cb893 --- /dev/null +++ b/internal/constraint/success/testdata/_--mode_minor-only____7_stable_.txtar @@ -0,0 +1,30 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '"--mode=minor-only"__"7@stable"' case + +exec php-matrix constraint '7@stable' --mode=minor-only +cmp stdout stdout.golden +! stderr . + +exec php-matrix constraint '7@stable' --mode=minor-only --source=auto +cmp stdout stdout.golden +! stderr . + +exec php-matrix constraint '7@stable' --mode=minor-only --source=php.net +cmp stdout stdout.golden +! stderr . + +exec php-matrix constraint '7@stable' --mode=minor-only --source=offline +cmp stdout stdout.golden +! stderr . + + +-- stdout.golden -- +{ + "constraint": "7@stable", + "versions": [ + "7.0" + ], + "lowest": "7.0", + "highest": "7.0" +} diff --git a/internal/constraint/success/testdata/_--mode_minor-only_____7.1.2_____8.1.2_.txtar b/internal/constraint/success/testdata/_--mode_minor-only_____7.1.2_____8.0.3_.txtar similarity index 51% rename from internal/constraint/success/testdata/_--mode_minor-only_____7.1.2_____8.1.2_.txtar rename to internal/constraint/success/testdata/_--mode_minor-only_____7.1.2_____8.0.3_.txtar index 9f5391e..ae177e4 100644 --- a/internal/constraint/success/testdata/_--mode_minor-only_____7.1.2_____8.1.2_.txtar +++ b/internal/constraint/success/testdata/_--mode_minor-only_____7.1.2_____8.0.3_.txtar @@ -1,34 +1,34 @@ # DO NOT EDIT THIS FILE # This file is generated by "internal/constraint/success/main.go" -# Test the '"--mode=minor-only"__"^7.1.2 || ~8.1.2"' case +# Test the '"--mode=minor-only"__"^7.1.2 || ~8.0.3"' case -exec php-matrix constraint '^7.1.2 || ~8.1.2' --mode=minor-only +exec php-matrix constraint '^7.1.2 || ~8.0.3' --mode=minor-only cmp stdout stdout.golden ! stderr . -exec php-matrix constraint '^7.1.2 || ~8.1.2' --mode=minor-only --source=auto +exec php-matrix constraint '^7.1.2 || ~8.0.3' --mode=minor-only --source=auto cmp stdout stdout.golden ! stderr . -exec php-matrix constraint '^7.1.2 || ~8.1.2' --mode=minor-only --source=php.net +exec php-matrix constraint '^7.1.2 || ~8.0.3' --mode=minor-only --source=php.net cmp stdout stdout.golden ! stderr . -exec php-matrix constraint '^7.1.2 || ~8.1.2' --mode=minor-only --source=offline +exec php-matrix constraint '^7.1.2 || ~8.0.3' --mode=minor-only --source=offline cmp stdout stdout.golden ! stderr . -- stdout.golden -- { - "constraint": "^7.1.2 || ~8.1.2", + "constraint": "^7.1.2 || ~8.0.3", "versions": [ "7.1", "7.2", "7.3", "7.4", - "8.1" + "8.0" ], "lowest": "7.1", - "highest": "8.1" + "highest": "8.0" } diff --git a/internal/constraint/success/testdata/_--mode_minor-only_____7.4_____8.4_.txtar b/internal/constraint/success/testdata/_--mode_minor-only_____7.4_____8.4_.txtar new file mode 100644 index 0000000..99bafdd --- /dev/null +++ b/internal/constraint/success/testdata/_--mode_minor-only_____7.4_____8.4_.txtar @@ -0,0 +1,19 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '"--mode=minor-only"__"^7.4 || ^8.4"' case + +exec php-matrix constraint '^7.4 || ^8.4' --mode=minor-only +stdout . +! stderr . + +exec php-matrix constraint '^7.4 || ^8.4' --mode=minor-only --source=auto +stdout . +! stderr . + +exec php-matrix constraint '^7.4 || ^8.4' --mode=minor-only --source=php.net +stdout . +! stderr . + +exec php-matrix constraint '^7.4 || ^8.4' --mode=minor-only --source=offline +stdout . +! stderr . diff --git a/internal/constraint/success/testdata/_--mode_minor-only_____7__7.2.3_.txtar b/internal/constraint/success/testdata/_--mode_minor-only_____7__7.2.3_.txtar new file mode 100644 index 0000000..cd6cc08 --- /dev/null +++ b/internal/constraint/success/testdata/_--mode_minor-only_____7__7.2.3_.txtar @@ -0,0 +1,32 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '"--mode=minor-only"__"^7 <7.2.3"' case + +exec php-matrix constraint '^7 <7.2.3' --mode=minor-only +cmp stdout stdout.golden +! stderr . + +exec php-matrix constraint '^7 <7.2.3' --mode=minor-only --source=auto +cmp stdout stdout.golden +! stderr . + +exec php-matrix constraint '^7 <7.2.3' --mode=minor-only --source=php.net +cmp stdout stdout.golden +! stderr . + +exec php-matrix constraint '^7 <7.2.3' --mode=minor-only --source=offline +cmp stdout stdout.golden +! stderr . + + +-- stdout.golden -- +{ + "constraint": "^7 <7.2.3", + "versions": [ + "7.0", + "7.1", + "7.2" + ], + "lowest": "7.0", + "highest": "7.2" +} diff --git a/internal/constraint/success/testdata/_--mode_minor-only_____7__7.2_.txtar b/internal/constraint/success/testdata/_--mode_minor-only_____7__7.2_.txtar deleted file mode 100644 index 1391abe..0000000 --- a/internal/constraint/success/testdata/_--mode_minor-only_____7__7.2_.txtar +++ /dev/null @@ -1,32 +0,0 @@ -# DO NOT EDIT THIS FILE -# This file is generated by "internal/constraint/success/main.go" -# Test the '"--mode=minor-only"__"^7 ^7.2"' case - -exec php-matrix constraint '^7 ^7.2' --mode=minor-only -cmp stdout stdout.golden -! stderr . - -exec php-matrix constraint '^7 ^7.2' --mode=minor-only --source=auto -cmp stdout stdout.golden -! stderr . - -exec php-matrix constraint '^7 ^7.2' --mode=minor-only --source=php.net -cmp stdout stdout.golden -! stderr . - -exec php-matrix constraint '^7 ^7.2' --mode=minor-only --source=offline -cmp stdout stdout.golden -! stderr . - - --- stdout.golden -- -{ - "constraint": "^7 ^7.2", - "versions": [ - "7.2", - "7.3", - "7.4" - ], - "lowest": "7.2", - "highest": "7.4" -} diff --git a/internal/constraint/success/testdata/_--mode_minor-only_____7_stable_.txtar b/internal/constraint/success/testdata/_--mode_minor-only_____7_stable_.txtar deleted file mode 100644 index e22866c..0000000 --- a/internal/constraint/success/testdata/_--mode_minor-only_____7_stable_.txtar +++ /dev/null @@ -1,34 +0,0 @@ -# DO NOT EDIT THIS FILE -# This file is generated by "internal/constraint/success/main.go" -# Test the '"--mode=minor-only"__"^7@stable"' case - -exec php-matrix constraint '^7@stable' --mode=minor-only -cmp stdout stdout.golden -! stderr . - -exec php-matrix constraint '^7@stable' --mode=minor-only --source=auto -cmp stdout stdout.golden -! stderr . - -exec php-matrix constraint '^7@stable' --mode=minor-only --source=php.net -cmp stdout stdout.golden -! stderr . - -exec php-matrix constraint '^7@stable' --mode=minor-only --source=offline -cmp stdout stdout.golden -! stderr . - - --- stdout.golden -- -{ - "constraint": "^7@stable", - "versions": [ - "7.0", - "7.1", - "7.2", - "7.3", - "7.4" - ], - "lowest": "7.0", - "highest": "7.4" -} diff --git a/internal/constraint/success/testdata/_--mode_minor-only_____8.2_.txtar b/internal/constraint/success/testdata/_--mode_minor-only_____8.2_.txtar new file mode 100644 index 0000000..b931c19 --- /dev/null +++ b/internal/constraint/success/testdata/_--mode_minor-only_____8.2_.txtar @@ -0,0 +1,19 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '"--mode=minor-only"__"^8.2"' case + +exec php-matrix constraint '^8.2' --mode=minor-only +stdout . +! stderr . + +exec php-matrix constraint '^8.2' --mode=minor-only --source=auto +stdout . +! stderr . + +exec php-matrix constraint '^8.2' --mode=minor-only --source=php.net +stdout . +! stderr . + +exec php-matrix constraint '^8.2' --mode=minor-only --source=offline +stdout . +! stderr . diff --git a/internal/constraint/success/testdata/_--mode_minor-only_____8.2____8.4.1_.txtar b/internal/constraint/success/testdata/_--mode_minor-only_____8.2____8.4.1_.txtar new file mode 100644 index 0000000..bdc1c88 --- /dev/null +++ b/internal/constraint/success/testdata/_--mode_minor-only_____8.2____8.4.1_.txtar @@ -0,0 +1,19 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '"--mode=minor-only"__"^8.2 <= 8.4.1"' case + +exec php-matrix constraint '^8.2 <= 8.4.1' --mode=minor-only +stdout . +! stderr . + +exec php-matrix constraint '^8.2 <= 8.4.1' --mode=minor-only --source=auto +stdout . +! stderr . + +exec php-matrix constraint '^8.2 <= 8.4.1' --mode=minor-only --source=php.net +stdout . +! stderr . + +exec php-matrix constraint '^8.2 <= 8.4.1' --mode=minor-only --source=offline +stdout . +! stderr . diff --git a/internal/constraint/success/testdata/_--mode_minor-only_____8.2_____8.4.0_.txtar b/internal/constraint/success/testdata/_--mode_minor-only_____8.2_____8.4.0_.txtar new file mode 100644 index 0000000..41f2703 --- /dev/null +++ b/internal/constraint/success/testdata/_--mode_minor-only_____8.2_____8.4.0_.txtar @@ -0,0 +1,19 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '"--mode=minor-only"__"^8.2 || ~8.4.0"' case + +exec php-matrix constraint '^8.2 || ~8.4.0' --mode=minor-only +stdout . +! stderr . + +exec php-matrix constraint '^8.2 || ~8.4.0' --mode=minor-only --source=auto +stdout . +! stderr . + +exec php-matrix constraint '^8.2 || ~8.4.0' --mode=minor-only --source=php.net +stdout . +! stderr . + +exec php-matrix constraint '^8.2 || ~8.4.0' --mode=minor-only --source=offline +stdout . +! stderr . diff --git a/internal/constraint/success/testdata/_--mode_minor-only_____8.3.4_.txtar b/internal/constraint/success/testdata/_--mode_minor-only_____8.3.4_.txtar new file mode 100644 index 0000000..9690921 --- /dev/null +++ b/internal/constraint/success/testdata/_--mode_minor-only_____8.3.4_.txtar @@ -0,0 +1,19 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '"--mode=minor-only"__"^8.3.4"' case + +exec php-matrix constraint '^8.3.4' --mode=minor-only +stdout . +! stderr . + +exec php-matrix constraint '^8.3.4' --mode=minor-only --source=auto +stdout . +! stderr . + +exec php-matrix constraint '^8.3.4' --mode=minor-only --source=php.net +stdout . +! stderr . + +exec php-matrix constraint '^8.3.4' --mode=minor-only --source=offline +stdout . +! stderr . diff --git a/internal/constraint/success/testdata/_--mode_minor-only_____8_.txtar b/internal/constraint/success/testdata/_--mode_minor-only_____8_.txtar new file mode 100644 index 0000000..5472caf --- /dev/null +++ b/internal/constraint/success/testdata/_--mode_minor-only_____8_.txtar @@ -0,0 +1,19 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '"--mode=minor-only"__"^8"' case + +exec php-matrix constraint '^8' --mode=minor-only +stdout . +! stderr . + +exec php-matrix constraint '^8' --mode=minor-only --source=auto +stdout . +! stderr . + +exec php-matrix constraint '^8' --mode=minor-only --source=php.net +stdout . +! stderr . + +exec php-matrix constraint '^8' --mode=minor-only --source=offline +stdout . +! stderr . diff --git a/internal/constraint/success/testdata/_--mode_minor-only_____8_rc_.txtar b/internal/constraint/success/testdata/_--mode_minor-only_____8_rc_.txtar new file mode 100644 index 0000000..0b545d2 --- /dev/null +++ b/internal/constraint/success/testdata/_--mode_minor-only_____8_rc_.txtar @@ -0,0 +1,19 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '"--mode=minor-only"__"^8@rc"' case + +exec php-matrix constraint '^8@rc' --mode=minor-only +stdout . +! stderr . + +exec php-matrix constraint '^8@rc' --mode=minor-only --source=auto +stdout . +! stderr . + +exec php-matrix constraint '^8@rc' --mode=minor-only --source=php.net +stdout . +! stderr . + +exec php-matrix constraint '^8@rc' --mode=minor-only --source=offline +stdout . +! stderr . diff --git a/internal/constraint/success/testdata/_--mode_minor-only______.txtar b/internal/constraint/success/testdata/_--mode_minor-only______.txtar index bc7a144..d9d28bb 100644 --- a/internal/constraint/success/testdata/_--mode_minor-only______.txtar +++ b/internal/constraint/success/testdata/_--mode_minor-only______.txtar @@ -3,44 +3,17 @@ # Test the '"--mode=minor-only"__"*"' case exec php-matrix constraint '*' --mode=minor-only -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix constraint '*' --mode=minor-only --source=auto -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix constraint '*' --mode=minor-only --source=php.net -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix constraint '*' --mode=minor-only --source=offline -cmp stdout stdout.golden +stdout . ! stderr . - - --- stdout.golden -- -{ - "constraint": "*", - "versions": [ - "5.0", - "5.1", - "5.2", - "5.3", - "5.4", - "5.5", - "5.6", - "7.0", - "7.1", - "7.2", - "7.3", - "7.4", - "8.0", - "8.1", - "8.2", - "8.3", - "8.4" - ], - "lowest": "5.0", - "highest": "8.4" -} diff --git a/internal/constraint/success/testdata/_--mode_minor-only______7.4_.txtar b/internal/constraint/success/testdata/_--mode_minor-only______7.4_.txtar new file mode 100644 index 0000000..b554afc --- /dev/null +++ b/internal/constraint/success/testdata/_--mode_minor-only______7.4_.txtar @@ -0,0 +1,19 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '"--mode=minor-only"__">=7.4"' case + +exec php-matrix constraint '>=7.4' --mode=minor-only +stdout . +! stderr . + +exec php-matrix constraint '>=7.4' --mode=minor-only --source=auto +stdout . +! stderr . + +exec php-matrix constraint '>=7.4' --mode=minor-only --source=php.net +stdout . +! stderr . + +exec php-matrix constraint '>=7.4' --mode=minor-only --source=offline +stdout . +! stderr . diff --git a/internal/constraint/success/testdata/_--mode_minor-only_____stable_.txtar b/internal/constraint/success/testdata/_--mode_minor-only_____stable_.txtar index 645a1b8..93b4788 100644 --- a/internal/constraint/success/testdata/_--mode_minor-only_____stable_.txtar +++ b/internal/constraint/success/testdata/_--mode_minor-only_____stable_.txtar @@ -3,44 +3,17 @@ # Test the '"--mode=minor-only"__"@stable"' case exec php-matrix constraint '@stable' --mode=minor-only -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix constraint '@stable' --mode=minor-only --source=auto -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix constraint '@stable' --mode=minor-only --source=php.net -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix constraint '@stable' --mode=minor-only --source=offline -cmp stdout stdout.golden +stdout . ! stderr . - - --- stdout.golden -- -{ - "constraint": "@stable", - "versions": [ - "5.0", - "5.1", - "5.2", - "5.3", - "5.4", - "5.5", - "5.6", - "7.0", - "7.1", - "7.2", - "7.3", - "7.4", - "8.0", - "8.1", - "8.2", - "8.3", - "8.4" - ], - "lowest": "5.0", - "highest": "8.4" -} diff --git a/internal/constraint/success/testdata/_____7_stable_.txtar b/internal/constraint/success/testdata/_____7_stable_.txtar new file mode 100644 index 0000000..c7833fb --- /dev/null +++ b/internal/constraint/success/testdata/_____7_stable_.txtar @@ -0,0 +1,30 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '""__"7@stable"' case + +exec php-matrix constraint '7@stable' +cmp stdout stdout.golden +! stderr . + +exec php-matrix constraint '7@stable' --source=auto +cmp stdout stdout.golden +! stderr . + +exec php-matrix constraint '7@stable' --source=php.net +cmp stdout stdout.golden +! stderr . + +exec php-matrix constraint '7@stable' --source=offline +cmp stdout stdout.golden +! stderr . + + +-- stdout.golden -- +{ + "constraint": "7@stable", + "versions": [ + "7.0" + ], + "lowest": "7.0", + "highest": "7.0" +} diff --git a/internal/constraint/success/testdata/______7.1.2_____8.1.2_.txtar b/internal/constraint/success/testdata/______7.1.2_____8.0.3_.txtar similarity index 51% rename from internal/constraint/success/testdata/______7.1.2_____8.1.2_.txtar rename to internal/constraint/success/testdata/______7.1.2_____8.0.3_.txtar index 9f8def4..f022c48 100644 --- a/internal/constraint/success/testdata/______7.1.2_____8.1.2_.txtar +++ b/internal/constraint/success/testdata/______7.1.2_____8.0.3_.txtar @@ -1,34 +1,34 @@ # DO NOT EDIT THIS FILE # This file is generated by "internal/constraint/success/main.go" -# Test the '""__"^7.1.2 || ~8.1.2"' case +# Test the '""__"^7.1.2 || ~8.0.3"' case -exec php-matrix constraint '^7.1.2 || ~8.1.2' +exec php-matrix constraint '^7.1.2 || ~8.0.3' cmp stdout stdout.golden ! stderr . -exec php-matrix constraint '^7.1.2 || ~8.1.2' --source=auto +exec php-matrix constraint '^7.1.2 || ~8.0.3' --source=auto cmp stdout stdout.golden ! stderr . -exec php-matrix constraint '^7.1.2 || ~8.1.2' --source=php.net +exec php-matrix constraint '^7.1.2 || ~8.0.3' --source=php.net cmp stdout stdout.golden ! stderr . -exec php-matrix constraint '^7.1.2 || ~8.1.2' --source=offline +exec php-matrix constraint '^7.1.2 || ~8.0.3' --source=offline cmp stdout stdout.golden ! stderr . -- stdout.golden -- { - "constraint": "^7.1.2 || ~8.1.2", + "constraint": "^7.1.2 || ~8.0.3", "versions": [ "7.1", "7.2", "7.3", "7.4", - "8.1" + "8.0" ], "lowest": "7.1", - "highest": "8.1" + "highest": "8.0" } diff --git a/internal/constraint/success/testdata/______7.4_____8.4_.txtar b/internal/constraint/success/testdata/______7.4_____8.4_.txtar new file mode 100644 index 0000000..b7b5327 --- /dev/null +++ b/internal/constraint/success/testdata/______7.4_____8.4_.txtar @@ -0,0 +1,19 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '""__"^7.4 || ^8.4"' case + +exec php-matrix constraint '^7.4 || ^8.4' +stdout . +! stderr . + +exec php-matrix constraint '^7.4 || ^8.4' --source=auto +stdout . +! stderr . + +exec php-matrix constraint '^7.4 || ^8.4' --source=php.net +stdout . +! stderr . + +exec php-matrix constraint '^7.4 || ^8.4' --source=offline +stdout . +! stderr . diff --git a/internal/constraint/success/testdata/______7_stable_.txtar b/internal/constraint/success/testdata/______7__7.2.3_.txtar similarity index 50% rename from internal/constraint/success/testdata/______7_stable_.txtar rename to internal/constraint/success/testdata/______7__7.2.3_.txtar index ba0bdf5..44d2c39 100644 --- a/internal/constraint/success/testdata/______7_stable_.txtar +++ b/internal/constraint/success/testdata/______7__7.2.3_.txtar @@ -1,34 +1,32 @@ # DO NOT EDIT THIS FILE # This file is generated by "internal/constraint/success/main.go" -# Test the '""__"^7@stable"' case +# Test the '""__"^7 <7.2.3"' case -exec php-matrix constraint '^7@stable' +exec php-matrix constraint '^7 <7.2.3' cmp stdout stdout.golden ! stderr . -exec php-matrix constraint '^7@stable' --source=auto +exec php-matrix constraint '^7 <7.2.3' --source=auto cmp stdout stdout.golden ! stderr . -exec php-matrix constraint '^7@stable' --source=php.net +exec php-matrix constraint '^7 <7.2.3' --source=php.net cmp stdout stdout.golden ! stderr . -exec php-matrix constraint '^7@stable' --source=offline +exec php-matrix constraint '^7 <7.2.3' --source=offline cmp stdout stdout.golden ! stderr . -- stdout.golden -- { - "constraint": "^7@stable", + "constraint": "^7 <7.2.3", "versions": [ "7.0", "7.1", - "7.2", - "7.3", - "7.4" + "7.2" ], "lowest": "7.0", - "highest": "7.4" + "highest": "7.2" } diff --git a/internal/constraint/success/testdata/______7__7.2_.txtar b/internal/constraint/success/testdata/______7__7.2_.txtar deleted file mode 100644 index aede392..0000000 --- a/internal/constraint/success/testdata/______7__7.2_.txtar +++ /dev/null @@ -1,32 +0,0 @@ -# DO NOT EDIT THIS FILE -# This file is generated by "internal/constraint/success/main.go" -# Test the '""__"^7 ^7.2"' case - -exec php-matrix constraint '^7 ^7.2' -cmp stdout stdout.golden -! stderr . - -exec php-matrix constraint '^7 ^7.2' --source=auto -cmp stdout stdout.golden -! stderr . - -exec php-matrix constraint '^7 ^7.2' --source=php.net -cmp stdout stdout.golden -! stderr . - -exec php-matrix constraint '^7 ^7.2' --source=offline -cmp stdout stdout.golden -! stderr . - - --- stdout.golden -- -{ - "constraint": "^7 ^7.2", - "versions": [ - "7.2", - "7.3", - "7.4" - ], - "lowest": "7.2", - "highest": "7.4" -} diff --git a/internal/constraint/success/testdata/______8.2_.txtar b/internal/constraint/success/testdata/______8.2_.txtar new file mode 100644 index 0000000..6cb99f6 --- /dev/null +++ b/internal/constraint/success/testdata/______8.2_.txtar @@ -0,0 +1,19 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '""__"^8.2"' case + +exec php-matrix constraint '^8.2' +stdout . +! stderr . + +exec php-matrix constraint '^8.2' --source=auto +stdout . +! stderr . + +exec php-matrix constraint '^8.2' --source=php.net +stdout . +! stderr . + +exec php-matrix constraint '^8.2' --source=offline +stdout . +! stderr . diff --git a/internal/constraint/success/testdata/______8.2____8.4.1_.txtar b/internal/constraint/success/testdata/______8.2____8.4.1_.txtar new file mode 100644 index 0000000..162b679 --- /dev/null +++ b/internal/constraint/success/testdata/______8.2____8.4.1_.txtar @@ -0,0 +1,19 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '""__"^8.2 <= 8.4.1"' case + +exec php-matrix constraint '^8.2 <= 8.4.1' +stdout . +! stderr . + +exec php-matrix constraint '^8.2 <= 8.4.1' --source=auto +stdout . +! stderr . + +exec php-matrix constraint '^8.2 <= 8.4.1' --source=php.net +stdout . +! stderr . + +exec php-matrix constraint '^8.2 <= 8.4.1' --source=offline +stdout . +! stderr . diff --git a/internal/constraint/success/testdata/______8.2_____8.4.0_.txtar b/internal/constraint/success/testdata/______8.2_____8.4.0_.txtar new file mode 100644 index 0000000..bd0e3c6 --- /dev/null +++ b/internal/constraint/success/testdata/______8.2_____8.4.0_.txtar @@ -0,0 +1,19 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '""__"^8.2 || ~8.4.0"' case + +exec php-matrix constraint '^8.2 || ~8.4.0' +stdout . +! stderr . + +exec php-matrix constraint '^8.2 || ~8.4.0' --source=auto +stdout . +! stderr . + +exec php-matrix constraint '^8.2 || ~8.4.0' --source=php.net +stdout . +! stderr . + +exec php-matrix constraint '^8.2 || ~8.4.0' --source=offline +stdout . +! stderr . diff --git a/internal/constraint/success/testdata/______8.3.4_.txtar b/internal/constraint/success/testdata/______8.3.4_.txtar new file mode 100644 index 0000000..941a553 --- /dev/null +++ b/internal/constraint/success/testdata/______8.3.4_.txtar @@ -0,0 +1,19 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '""__"^8.3.4"' case + +exec php-matrix constraint '^8.3.4' +stdout . +! stderr . + +exec php-matrix constraint '^8.3.4' --source=auto +stdout . +! stderr . + +exec php-matrix constraint '^8.3.4' --source=php.net +stdout . +! stderr . + +exec php-matrix constraint '^8.3.4' --source=offline +stdout . +! stderr . diff --git a/internal/constraint/success/testdata/______8_.txtar b/internal/constraint/success/testdata/______8_.txtar new file mode 100644 index 0000000..69d1059 --- /dev/null +++ b/internal/constraint/success/testdata/______8_.txtar @@ -0,0 +1,19 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '""__"^8"' case + +exec php-matrix constraint '^8' +stdout . +! stderr . + +exec php-matrix constraint '^8' --source=auto +stdout . +! stderr . + +exec php-matrix constraint '^8' --source=php.net +stdout . +! stderr . + +exec php-matrix constraint '^8' --source=offline +stdout . +! stderr . diff --git a/internal/constraint/success/testdata/______8_rc_.txtar b/internal/constraint/success/testdata/______8_rc_.txtar new file mode 100644 index 0000000..71bfd46 --- /dev/null +++ b/internal/constraint/success/testdata/______8_rc_.txtar @@ -0,0 +1,19 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '""__"^8@rc"' case + +exec php-matrix constraint '^8@rc' +stdout . +! stderr . + +exec php-matrix constraint '^8@rc' --source=auto +stdout . +! stderr . + +exec php-matrix constraint '^8@rc' --source=php.net +stdout . +! stderr . + +exec php-matrix constraint '^8@rc' --source=offline +stdout . +! stderr . diff --git a/internal/constraint/success/testdata/_______.txtar b/internal/constraint/success/testdata/_______.txtar index ed5da9a..930480a 100644 --- a/internal/constraint/success/testdata/_______.txtar +++ b/internal/constraint/success/testdata/_______.txtar @@ -3,44 +3,17 @@ # Test the '""__"*"' case exec php-matrix constraint '*' -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix constraint '*' --source=auto -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix constraint '*' --source=php.net -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix constraint '*' --source=offline -cmp stdout stdout.golden +stdout . ! stderr . - - --- stdout.golden -- -{ - "constraint": "*", - "versions": [ - "5.0", - "5.1", - "5.2", - "5.3", - "5.4", - "5.5", - "5.6", - "7.0", - "7.1", - "7.2", - "7.3", - "7.4", - "8.0", - "8.1", - "8.2", - "8.3", - "8.4" - ], - "lowest": "5.0", - "highest": "8.4" -} diff --git a/internal/constraint/success/testdata/_______7.4_.txtar b/internal/constraint/success/testdata/_______7.4_.txtar new file mode 100644 index 0000000..b39caf2 --- /dev/null +++ b/internal/constraint/success/testdata/_______7.4_.txtar @@ -0,0 +1,19 @@ +# DO NOT EDIT THIS FILE +# This file is generated by "internal/constraint/success/main.go" +# Test the '""__">=7.4"' case + +exec php-matrix constraint '>=7.4' +stdout . +! stderr . + +exec php-matrix constraint '>=7.4' --source=auto +stdout . +! stderr . + +exec php-matrix constraint '>=7.4' --source=php.net +stdout . +! stderr . + +exec php-matrix constraint '>=7.4' --source=offline +stdout . +! stderr . diff --git a/internal/constraint/success/testdata/______stable_.txtar b/internal/constraint/success/testdata/______stable_.txtar index 943f6ea..6279a06 100644 --- a/internal/constraint/success/testdata/______stable_.txtar +++ b/internal/constraint/success/testdata/______stable_.txtar @@ -3,44 +3,17 @@ # Test the '""__"@stable"' case exec php-matrix constraint '@stable' -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix constraint '@stable' --source=auto -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix constraint '@stable' --source=php.net -cmp stdout stdout.golden +stdout . ! stderr . exec php-matrix constraint '@stable' --source=offline -cmp stdout stdout.golden +stdout . ! stderr . - - --- stdout.golden -- -{ - "constraint": "@stable", - "versions": [ - "5.0", - "5.1", - "5.2", - "5.3", - "5.4", - "5.5", - "5.6", - "7.0", - "7.1", - "7.2", - "7.3", - "7.4", - "8.0", - "8.1", - "8.2", - "8.3", - "8.4" - ], - "lowest": "5.0", - "highest": "8.4" -} diff --git a/src/Console/Source.php b/src/Console/Source.php index 26b546d..4edc73c 100644 --- a/src/Console/Source.php +++ b/src/Console/Source.php @@ -51,7 +51,7 @@ private function explanation(): string return match ($this) { self::Auto => 'Use offline in minor-only mode. Otherwise, fetch from php.net', self::PhpNet => 'Fetch releases information from php.net', - self::Offline => 'Use hardcoded releases information', + self::Offline => 'Use hardcoded releases information', }; } } diff --git a/src/Releases/OfflineReleases.php b/src/Releases/OfflineReleases.php index b8da6e4..db0a9fe 100644 --- a/src/Releases/OfflineReleases.php +++ b/src/Releases/OfflineReleases.php @@ -8,7 +8,7 @@ class OfflineReleases implements ReleasesInterface { - private const string ALL_VERSIONS_FILE = __DIR__.'/../../resources/all-versions.json'; + private const string ALL_VERSIONS_FILE = __DIR__.'/../../data/all-versions.json'; /** * @return string[] diff --git a/tests/TestCase.php b/tests/TestCase.php index b70ba3e..e788f55 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -8,12 +8,12 @@ abstract class TestCase extends BaseTestCase { protected const string DATA_DIR = __DIR__.'/data'; - protected const string ALL_VERSIONS_FILE = __DIR__.'/../resources/all-versions.json'; + protected const string ALL_VERSIONS_FILE = __DIR__.'/../data/all-versions.json'; protected const array RELEASES_JSONS = [ - self::DATA_DIR.'/releases-5.json', - self::DATA_DIR.'/releases-7.json', - self::DATA_DIR.'/releases-8.json', + self::DATA_DIR.'/versions/v5.json', + self::DATA_DIR.'/versions/v7.json', + self::DATA_DIR.'/versions/v8.json', ]; /** diff --git a/tests/data/releases-5.json b/tests/data/versions/v5.json similarity index 100% rename from tests/data/releases-5.json rename to tests/data/versions/v5.json diff --git a/tests/data/releases-7.json b/tests/data/versions/v7.json similarity index 100% rename from tests/data/releases-7.json rename to tests/data/versions/v7.json diff --git a/tests/data/releases-8.json b/tests/data/versions/v8.json similarity index 100% rename from tests/data/releases-8.json rename to tests/data/versions/v8.json