nanasess / setup-php

Set up your GitHub Actions workflow with a specific version of PHP 5.4 or later🎉
https://www.php.net
MIT License
37 stars 15 forks source link

Issues with Ubuntu 24.04 #296

Closed kijin closed 1 month ago

kijin commented 1 month ago

Trying out Ubuntu 24.04 on github actions, ran into a few problems so I'm reporting them here.

Both of the following problems seem to be related to lib/apt-install-php-ubuntu.sh

The apt-fast command is gone in Ubuntu 24.04

sudo: apt-fast: command not found

Replacing with apt-get seems to fix this problem. Symlinking /usr/bin/apt-get to /usr/bin/apt-fast also works.

Some PHP modules are missing

PHP 8.2 and 8.3 install and work perfectly.

PHP 8.1 and below seem to be packaged differently in Ubuntu 24.04.

E: Unable to locate package php8.1-dev
E: Couldn't find any package by glob 'php8.1-dev'
E: Couldn't find any package by regex 'php8.1-dev'
E: Unable to locate package php8.1-phpdbg
E: Couldn't find any package by glob 'php8.1-phpdbg'
E: Couldn't find any package by regex 'php8.1-phpdbg'
E: Unable to locate package php8.1-intl
E: Couldn't find any package by glob 'php8.1-intl'
E: Couldn't find any package by regex 'php8.1-intl'
E: Unable to locate package php8.1-xml
E: Couldn't find any package by glob 'php8.1-xml'
E: Couldn't find any package by regex 'php8.1-xml'
E: Unable to locate package php8.0-dev
E: Couldn't find any package by glob 'php8.0-dev'
E: Couldn't find any package by regex 'php8.0-dev'
E: Unable to locate package php8.0-phpdbg
E: Couldn't find any package by glob 'php8.0-phpdbg'
E: Couldn't find any package by regex 'php8.0-phpdbg'
E: Unable to locate package php8.0-intl
E: Couldn't find any package by glob 'php8.0-intl'
E: Couldn't find any package by regex 'php8.0-intl'
E: Unable to locate package php8.0-xml
E: Couldn't find any package by glob 'php8.0-xml'
E: Couldn't find any package by regex 'php8.0-xml'

Thanks for your great work!

sl0wik commented 1 month ago

Is there any solution that can be applied to the workflow file?

nanasess commented 1 month ago

Will be fixed soon. Can you substitute https://github.com/shivammathur/setup-php? If not, please let us know why.🙇‍♂️

kijin commented 1 month ago

Thanks.

The apt-fast problem can be fixed by symlinking it to apt-get. Here's an example from the repo you linked: https://github.com/shivammathur/setup-php/blob/9f51892bda551c29f469a2b3d8514b6d2ed84dc9/src/scripts/linux.sh#L10-L14

Not sure about the missing packages.

This is not an urgent issue at all, I just happen to prefer this github action to the other one because it's more simple and straightforward. It does exactly what I need it to and no more. :)

Are you suggesting that I should consider this github action to be on the way to being abandoned, and switch to shivammathur/setup-php?

Thank you.

nanasess commented 1 month ago

@kijin Although I have not been able to find much time recently, I will continue to maintain this package. Thanks for liking it!

nanasess commented 1 month ago

@kijin Thank you all for your contributions!, Fixed version has been pre-released. https://github.com/nanasess/setup-php/releases/tag/v4.1.0

kijin commented 1 month ago

Works like a charm, thanks!