Skip to content

Commit

Permalink
Add script for updating composer dependencies
Browse files Browse the repository at this point in the history
This commit includes a new file, updates.sh, which is a script that updates the composer.json file and its dependencies to their latest versions. It ensures that not only the dependencies explicitly listed in the composer.json file are updated, but also all of their dependencies. Furthermore, if any command fails, the script will stop immediately.
  • Loading branch information
MarjovanLier committed Feb 8, 2024
1 parent 7122b35 commit 6a5fbc2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions updates.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

# This script updates the composer.json file and stops on error.
# It first updates the composer dependencies to their latest versions that still satisfy the version constraints in the composer.json file.
# Then it upgrades the composer dependencies to their latest versions, ignoring the version constraints in the composer.json file.
# Finally, it bumps the version of the composer package.
# The -W (or --with-all-dependencies) option tells Composer to update not only the dependencies explicitly listed in the composer.json file, but also all of their dependencies.
# If any command fails, the script stops immediately.

composer update -W && composer upgrade -W && composer bump

0 comments on commit 6a5fbc2

Please sign in to comment.