version: "3"
internal: true

tasks:
  update:
    desc: "Update PHP dependencies within major versions (composer update)"
    silent: false
    cmds:
      - cmd: |
          cd packages/php && composer update
        ignore_error: false

  upgrade:
    desc: "Upgrade PHP dependencies to latest including breaking changes (composer update --with-all-dependencies)"
    silent: false
    cmds:
      - cmd: |
          command -v composer >/dev/null 2>&1 || { echo "Composer not found, skipping PHP upgrade"; exit 0; }
          cd packages/php && composer update --with-all-dependencies
        ignore_error: false
