Using Composer in PHP 8.2

I am getting this error when attempting to run tests in PHP 8.2:

0.02s$ phpenv global 8.2 2>/dev/null
8.2 is not pre-installed; installing
Downloading archive: https://storage.googleapis.com/travis-ci-language-archives/php/binaries/ubuntu/16.04/x86_64/php-8.2.tar.bz2
0.27s$ curl -sSf --retry 5 -o archive.tar.bz2 $archive_url && tar xjf archive.tar.bz2 --directory /
0.00s0.01s$ phpenv global 8.2
rbenv: composer: command not found
The `composer' command exists in these PHP versions:
  7.4
  7.4.30
  hhvm
  hhvm-stable

Anyone know how I can get Composer to run properly in 8.2?

Here’s my .yml file:

language: php
dist: xenial

services:
  - mysql

notifications:
  email:
    on_success: never
    on_failure: change

cache:
  directories:
    - $HOME/.composer/cache

matrix:
  fast_finish: true
  include:
    # Test select combinations with different dependencies.
    # To test with the latest WordPress version, use WP_VERSION=latest
    # - name: Current Versions
    #  php: 8.0
    #  env: WP_VERSION=6.3 WC_VERSION=7.8.1
    - name: Next Version
      php: 8.2
      env: WP_VERSION=6.3 WC_VERSION=7.8.1

  allow_failures:
    - name: Bleeding Edge

before_install:
  - export PATH="$HOME/.composer/vendor/bin:$PATH"
  - phpenv config-rm xdebug.ini || true

install:
  - composer install --prefer-source --no-interaction --no-ansi
  - bash tests/bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
  - cd wp-content/mu-plugins/example && composer install && composer dumpautoload -o

script:
  - ./vendor/bin/phpunit

Follow up: Switching from the xenial distribution to jammy resolved this.

language: php
dist: jammy