1717 fail-fast : false
1818 matrix :
1919 os : [ubuntu-latest, macos-latest]
20- php : [8.0 ,8.1 ,8.2, 8.3]
20+ php : [8.0 ,8.1 ,8.2, 8.3, 8.4 ]
2121 steps :
2222 - uses : actions/checkout@v4
2323
@@ -27,18 +27,55 @@ jobs:
2727 run : |
2828 sudo add-apt-repository ppa:ondrej/php
2929 sudo apt-get update
30- sudo apt-get install -y php php -cli php -xml php -curl php -mbstring
30+ sudo apt-get install -y php8.2 php8.2 -cli php8.2 -xml php8.2 -curl php8.2 -mbstring
3131 php -v
3232 shell : bash
3333
3434 - name : Setup PHP (macOS)
3535 if : matrix.os == 'macos-latest'
3636 run : |
37- brew install php
38- brew link php --force
37+ brew install php@8.2
38+ brew link php@8.2 --force
3939 php -v
4040 shell : bash
4141
42+ - name : Setup PHP (Windows)
43+ if : matrix.os == 'windows-latest'
44+ run : |
45+ choco install php --version=8.2 --params '"/ExtensionList:mbstring,curl,openssl,xml"'
46+ refreshenv
47+ # Download CA bundle
48+ Invoke-WebRequest -Uri https://curl.se/ca/cacert.pem -OutFile C:\tools\cacert.pem
49+ # Configure PHP to use the CA bundle
50+ $phpIni = php --ini | Select-String "Loaded Configuration File" | ForEach-Object { $_.Line.Split()[-1] }
51+ Add-Content $phpIni "`nopenssl.cafile = C:\tools\cacert.pem"
52+ php -v
53+ shell : pwsh
54+
55+ - name : Install Composer (Windows)
56+ if : matrix.os == 'windows-latest'
57+ run : |
58+ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
59+ php composer-setup.php
60+ php -r "unlink('composer-setup.php');"
61+ mkdir -p C:\tools\composer
62+ move composer.phar C:\tools\composer\composer
63+ echo "C:\tools\composer" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
64+ shell : pwsh
65+
66+ - name : Install Composer (Unix)
67+ if : matrix.os != 'windows-latest'
68+ run : |
69+ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
70+ sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
71+ php -r "unlink('composer-setup.php');"
72+ sudo chmod +x /usr/local/bin/composer
73+ mkdir -p ~/.composer
74+ if [ "$RUNNER_OS" == "Linux" ]; then
75+ sudo chown -R $USER:$USER ~/.composer
76+ fi
77+ shell : bash
78+
4279 - name : Get Composer Cache Directory
4380 id : composer-cache
4481 run : echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
5289 restore-keys : |
5390 ${{ runner.os }}-composer-
5491
92+ - name : Install dependencies (Windows)
93+ if : matrix.os == 'windows-latest'
94+ run : composer install --prefer-dist --no-progress --ignore-platform-req=ext-pcntl
95+ shell : bash
5596
97+ - name : Install dependencies (Unix)
98+ if : matrix.os != 'windows-latest'
99+ run : composer install --prefer-dist --no-progress
100+ shell : bash
56101
57102 - name : Run test suite
58103 run : vendor/bin/phpunit
81126 run : |
82127 sudo add-apt-repository ppa:ondrej/php
83128 sudo apt-get update
84- sudo apt-get install -y php php -cli php -xml php -mbstring
129+ sudo apt-get install -y php8.2 php8.2 -cli php8.2 -xml php8.2 -mbstring
85130 shell : bash
86131
87132 - name : Install Composer
@@ -145,7 +190,7 @@ jobs:
145190 run : |
146191 sudo add-apt-repository ppa:ondrej/php
147192 sudo apt-get update
148- sudo apt-get install -y php php -cli php -xml php -mbstring
193+ sudo apt-get install -y php8.2 php8.2 -cli php8.2 -xml php8.2 -mbstring
149194 shell : bash
150195
151196 - name : Install Composer
0 commit comments