Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Improve composer.lock behavior with ignore-cache #260

Open
wants to merge 5 commits into
base: v3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: add require-lock-file option test
  • Loading branch information
flagbrad committed Sep 7, 2024
commit 8644e462fc8c779edd38fff7f600c498bbaf28d7
2 changes: 1 addition & 1 deletion tests/expect/composer_install_01.exp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S expect -f

set timeout 3
spawn ../../bin/composer_install.sh "" "" "" "" "" "composer.lock"
spawn ../../bin/composer_install.sh "" "" "" "" "" "composer.lock" ""
match_max 100000

expect "::debug::Using the following Composer command: '*/php */composer install --no-interaction --no-progress --ansi'"
Expand Down
2 changes: 1 addition & 1 deletion tests/expect/composer_install_02.exp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S expect -f

set timeout 3
spawn ../../bin/composer_install.sh "lowest" "" "" "" "" "composer.lock"
spawn ../../bin/composer_install.sh "lowest" "" "" "" "" "composer.lock" ""
match_max 100000

expect "::debug::Using the following Composer command: '*/php */composer update --no-interaction --no-progress --ansi --prefer-lowest --prefer-stable'"
Expand Down
2 changes: 1 addition & 1 deletion tests/expect/composer_install_03.exp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S expect -f

set timeout 3
spawn ../../bin/composer_install.sh "highest" "" "" "" "" "composer.lock"
spawn ../../bin/composer_install.sh "highest" "" "" "" "" "composer.lock" ""
match_max 100000

expect "::debug::Using the following Composer command: '*/php */composer update --no-interaction --no-progress --ansi'"
Expand Down
2 changes: 1 addition & 1 deletion tests/expect/composer_install_04.exp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S expect -f

set timeout 3
spawn ../../bin/composer_install.sh "locked" "" "" "" "" "composer.lock"
spawn ../../bin/composer_install.sh "locked" "" "" "" "" "composer.lock" ""
match_max 100000

expect "::debug::Using the following Composer command: '*/php */composer install --no-interaction --no-progress --ansi'"
Expand Down
2 changes: 1 addition & 1 deletion tests/expect/composer_install_05.exp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S expect -f

set timeout 3
spawn ../../bin/composer_install.sh "" "--ignore-platform-reqs --optimize-autoloader" "" "" "" "composer.lock"
spawn ../../bin/composer_install.sh "" "--ignore-platform-reqs --optimize-autoloader" "" "" "" "composer.lock" ""
match_max 100000

expect "::debug::Using the following Composer command: '*/php */composer install --no-interaction --no-progress --ansi --ignore-platform-reqs --optimize-autoloader'"
Expand Down
2 changes: 1 addition & 1 deletion tests/expect/composer_install_06.exp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S expect -f

set timeout 3
spawn ../../bin/composer_install.sh "lowest" "--ignore-platform-reqs --optimize-autoloader" "" "" "" "composer.lock"
spawn ../../bin/composer_install.sh "lowest" "--ignore-platform-reqs --optimize-autoloader" "" "" "" "composer.lock" ""
match_max 100000

expect "::debug::Using the following Composer command: '*/php */composer update --no-interaction --no-progress --ansi --prefer-lowest --prefer-stable --ignore-platform-reqs --optimize-autoloader'"
Expand Down
2 changes: 1 addition & 1 deletion tests/expect/composer_install_07.exp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S expect -f

set timeout 3
spawn ../../bin/composer_install.sh "highest" "--ignore-platform-reqs --optimize-autoloader" "" "" "" "composer.lock"
spawn ../../bin/composer_install.sh "highest" "--ignore-platform-reqs --optimize-autoloader" "" "" "" "composer.lock" ""
match_max 100000

expect "::debug::Using the following Composer command: '*/php */composer update --no-interaction --no-progress --ansi --ignore-platform-reqs --optimize-autoloader'"
Expand Down
2 changes: 1 addition & 1 deletion tests/expect/composer_install_08.exp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S expect -f

set timeout 3
spawn ../../bin/composer_install.sh "locked" "--ignore-platform-reqs --optimize-autoloader" "" "" "" "composer.lock"
spawn ../../bin/composer_install.sh "locked" "--ignore-platform-reqs --optimize-autoloader" "" "" "" "composer.lock" ""
match_max 100000

expect "::debug::Using the following Composer command: '*/php */composer install --no-interaction --no-progress --ansi --ignore-platform-reqs --optimize-autoloader'"
Expand Down
2 changes: 1 addition & 1 deletion tests/expect/composer_install_09.exp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S expect -f

set timeout 3
spawn ../../bin/composer_install.sh "" "" "../fixtures/with-lock-file" "" "" "../fixtures/with-lock-file/composer.lock"
spawn ../../bin/composer_install.sh "" "" "../fixtures/with-lock-file" "" "" "../fixtures/with-lock-file/composer.lock" ""
match_max 100000

expect "::debug::Using the following Composer command: '*/php */composer install --no-interaction --no-progress --ansi --working-dir ../fixtures/with-lock-file'"
Expand Down
2 changes: 1 addition & 1 deletion tests/expect/composer_install_10.exp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S expect -f

set timeout 3
spawn ../../bin/composer_install.sh "lowest" "" "../fixtures/with-lock-file" "" "" "../fixtures/with-lock-file/composer.lock"
spawn ../../bin/composer_install.sh "lowest" "" "../fixtures/with-lock-file" "" "" "../fixtures/with-lock-file/composer.lock" ""
match_max 100000

expect "::debug::Using the following Composer command: '*/php */composer update --no-interaction --no-progress --ansi --prefer-lowest --prefer-stable --working-dir ../fixtures/with-lock-file'"
Expand Down
2 changes: 1 addition & 1 deletion tests/expect/composer_install_11.exp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S expect -f

set timeout 3
spawn ../../bin/composer_install.sh "highest" "" "../fixtures/with-lock-file" "" "" "../fixtures/with-lock-file/composer.lock"
spawn ../../bin/composer_install.sh "highest" "" "../fixtures/with-lock-file" "" "" "../fixtures/with-lock-file/composer.lock" ""
match_max 100000

expect "::debug::Using the following Composer command: '*/php */composer update --no-interaction --no-progress --ansi --working-dir ../fixtures/with-lock-file'"
Expand Down
2 changes: 1 addition & 1 deletion tests/expect/composer_install_12.exp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S expect -f

set timeout 3
spawn ../../bin/composer_install.sh "locked" "" "../fixtures/with-lock-file" "" "" "../fixtures/with-lock-file/composer.lock"
spawn ../../bin/composer_install.sh "locked" "" "../fixtures/with-lock-file" "" "" "../fixtures/with-lock-file/composer.lock" ""
match_max 100000

expect "::debug::Using the following Composer command: '*/php */composer install --no-interaction --no-progress --ansi --working-dir ../fixtures/with-lock-file'"
Expand Down
2 changes: 1 addition & 1 deletion tests/expect/composer_install_13.exp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S expect -f

set timeout 3
spawn ../../bin/composer_install.sh "" "--ignore-platform-reqs --optimize-autoloader" "../fixtures/with-lock-file" "" "" "../fixtures/with-lock-file/composer.lock"
spawn ../../bin/composer_install.sh "" "--ignore-platform-reqs --optimize-autoloader" "../fixtures/with-lock-file" "" "" "../fixtures/with-lock-file/composer.lock" ""
match_max 100000

expect "::debug::Using the following Composer command: '*/php */composer install --no-interaction --no-progress --ansi --ignore-platform-reqs --optimize-autoloader --working-dir ../fixtures/with-lock-file'"
Expand Down
2 changes: 1 addition & 1 deletion tests/expect/composer_install_14.exp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S expect -f

set timeout 3
spawn ../../bin/composer_install.sh "lowest" "--ignore-platform-reqs --optimize-autoloader" "../fixtures/with-lock-file" "" "" "../fixtures/with-lock-file/composer.lock"
spawn ../../bin/composer_install.sh "lowest" "--ignore-platform-reqs --optimize-autoloader" "../fixtures/with-lock-file" "" "" "../fixtures/with-lock-file/composer.lock" ""
match_max 100000

expect "::debug::Using the following Composer command: '*/php */composer update --no-interaction --no-progress --ansi --prefer-lowest --prefer-stable --ignore-platform-reqs --optimize-autoloader --working-dir ../fixtures/with-lock-file'"
Expand Down
2 changes: 1 addition & 1 deletion tests/expect/composer_install_15.exp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S expect -f

set timeout 3
spawn ../../bin/composer_install.sh "highest" "--ignore-platform-reqs --optimize-autoloader" "../fixtures/with-lock-file" "" "" "../fixtures/with-lock-file/composer.lock"
spawn ../../bin/composer_install.sh "highest" "--ignore-platform-reqs --optimize-autoloader" "../fixtures/with-lock-file" "" "" "../fixtures/with-lock-file/composer.lock" ""
match_max 100000

expect "::debug::Using the following Composer command: '*/php */composer update --no-interaction --no-progress --ansi --ignore-platform-reqs --optimize-autoloader --working-dir ../fixtures/with-lock-file'"
Expand Down
2 changes: 1 addition & 1 deletion tests/expect/composer_install_16.exp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S expect -f

set timeout 3
spawn ../../bin/composer_install.sh "locked" "--ignore-platform-reqs --optimize-autoloader" "../fixtures/with-lock-file" "" "" "../fixtures/with-lock-file/composer.lock"
spawn ../../bin/composer_install.sh "locked" "--ignore-platform-reqs --optimize-autoloader" "../fixtures/with-lock-file" "" "" "../fixtures/with-lock-file/composer.lock" ""
match_max 100000

expect "::debug::Using the following Composer command: '*/php */composer install --no-interaction --no-progress --ansi --ignore-platform-reqs --optimize-autoloader --working-dir ../fixtures/with-lock-file'"
Expand Down
2 changes: 1 addition & 1 deletion tests/expect/composer_install_17.exp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S expect -f

set timeout 3
spawn ../../bin/composer_install.sh "foobar" "" "" "" "" "composer.lock"
spawn ../../bin/composer_install.sh "foobar" "" "" "" "" "composer.lock" ""
match_max 100000

expect "::debug::Using the following Composer command: '*/php */composer install --no-interaction --no-progress --ansi'"
Expand Down
2 changes: 1 addition & 1 deletion tests/expect/composer_install_18.exp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S expect -f

set timeout 3
spawn ../../bin/composer_install.sh "" "" "" "" "../fixtures/composer.phar" "composer.lock"
spawn ../../bin/composer_install.sh "" "" "" "" "../fixtures/composer.phar" "composer.lock" ""
match_max 100000

expect "::debug::Using the following Composer command: '*/php ../fixtures/composer.phar install --no-interaction --no-progress --ansi'"
Expand Down
2 changes: 1 addition & 1 deletion tests/expect/composer_install_19.exp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env -S expect -f

set timeout 3
spawn ../../bin/composer_install.sh "" "" "../fixtures/no-lock-file" "" "" ""
spawn ../../bin/composer_install.sh "" "" "../fixtures/no-lock-file" "" "" "" ""
match_max 100000

expect "::debug::Using the following Composer command: '*/php */composer update --no-interaction --no-progress --ansi --working-dir ../fixtures/no-lock-file'"
Expand Down
8 changes: 8 additions & 0 deletions tests/expect/composer_install_20.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env -S expect -f

set timeout 3
spawn ../../bin/composer_install.sh "" "" "../fixtures/no-lock-file" "" "" "" "true"
match_max 100000

expect "::error title=Composer Lock File Not Found::Unable to find 'composer.lock'"
expect eof