PHP 8.1 build fails because of the following error:
curl: (22) The requested URL returned error: 404 Not Found
As you can see in this job , PHP 8.1 is not pre-installed, so it starts downloading and then gets curl error.
Why is this happening?
Any help would be appreciated.
Montana
December 23, 2021, 6:37pm
2
Try using 8.1.0
as the version if you’re trying to use PHP 8.1, here’s an example .travis.yml
I’ve created:
language: php
dist: bionic
php:
- '8.1.0'
- '8.0'
- '7.4'
- '7.3'
install: skip
script: skip
Here’s the repository for the successful build:
Thanks! But it still fails with the following error:
php: error while loading shared libraries: libargon2.so.1: cannot open shared object file: No such file or directory
Here is the logs.
Montana
December 23, 2021, 7:04pm
4
Hey @nbayramberdiyev ,
Glossing over your .travis.yml
, it’s a bit inconsistent, so what I’ve done is fixed some of the inconsistencies I saw and let’s see if that allows it to build if not, I’ll focus on argon
and do a deep dive into that.
Below is your .travis.yml
that I refactored:
language: php
os:
- linux
dist: bionic
sudo: false
cache:
directories:
- $HOME/.composer/cache
php:
- '7.4'
- '8.0'
- '8.1.0'
env:
global:
- TEST_COMMAND: '"composer test"'
branches:
except:
- /^analysis-.*$/
before_install:
- >-
if ! [ -v "$DEPENDENCIES" ]; then composer require --no-update
${DEPENDENCIES}; fi;
install:
- 'composer update ${COMPOSER_FLAGS} --prefer-source --no-interaction'
script:
- $TEST_COMMAND
after_success:
- >-
if [[ "$COVERAGE" = true ]]; then wget
https://scrutinizer-ci.com/ocular.phar; fi
- >-
if [[ "$COVERAGE" = true ]]; then php ocular.phar code-coverage:upload
--format=php-clover build/coverage.xml; fi
jobs:
fast_finish: true
allow_failures:
- php: nightly
include:
- php: '8.1.0'
name: Backward compatibillity check
env:
- DEPENDENCIES: '"roave/backward-compatibility-check"'
TEST_COMMAND: '"./vendor/bin/roave-backward-compatibility-check"'
- php: '7.4'
name: Lowest version of dependencies
env:
- COMPOSER_FLAGS: '"--prefer-stable --prefer-lowest"'
COVERAGE: 'true'
TEST_COMMAND: '"composer test-ci"'
After specifying dist: bionic
, the error is disappeared. Thank you!
Montana
December 23, 2021, 10:17pm
6
Great to hear, glad I could help you solve your problem.