Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

several extensions enabled by default on php7.2, but non 7.0 #143

Closed
clxmstaab opened this issue Jan 8, 2020 · 7 comments · Fixed by #144
Closed

several extensions enabled by default on php7.2, but non 7.0 #143

clxmstaab opened this issue Jan 8, 2020 · 7 comments · Fixed by #144

Comments

@clxmstaab
Copy link

Describe the bug
using a action which installs via composer sabre/xml I am gettin an error when using php7.0 because of a missing ext-dom extension but on php 7.2 build it works fine

image

in the php 7.0 build the ext-dom extension needs to be explicitly activated via github-action workflow config, but on php 7.2 it works out of the box.

is this difference intentional?

@clxmstaab
Copy link
Author

my github action worfklow is:

name: PHP Checks

on: [push]

jobs:

  phpstan:
    name: PHPStan
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Setup PHP
      uses: shivammathur/setup-php@v1
      with:
        php-version: 7.2
        coverage: none
    - run: |
        composer install --prefer-dist --no-progress # install the apps dependencies
        composer bin phpstan install --no-progress
    - run: composer phpstan -- --no-progress

  php-cs-fixer:
    name: PHP-CS-Fixer
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Setup PHP
      uses: shivammathur/setup-php@v1
      with:
        php-version: 7.0
        coverage: none
    - run: |
        composer install --prefer-dist --no-progress # install the apps dependencies
        composer bin php-cs-fixer install --no-progress
    - run: composer csfix -- --dry-run --diff --verbose

@clxmstaab
Copy link
Author

ext-dom usually is a builtin-extension.. it seems it was explicitly disabled on the php7.0 builds?

@clxmstaab
Copy link
Author

its seems the same issue exists for ext-gmp.

@shivammathur
Copy link
Owner

@clxmstaab For ext-dom It is not "explicitly disabled", it is not a part of php7.0 package in ppa:ondrej/php, but packaged separately as php-xml.

I will update the script to install php-xml along with PHP in the next release.

@clxmstaab
Copy link
Author

clxmstaab commented Jan 8, 2020

hmm and ext-mbstring also

@clxmstaab clxmstaab changed the title ext-dom is enabled on default on php7.2, but not on 7.0 several extensions enabled by default on php7.2, but non 7.0 Jan 8, 2020
@shivammathur
Copy link
Owner

In addition to ext-gmp, there are other extensions also like zip, bcmath, pspell, ldap, gd, enchant which are not there in PHP 5.6 and PHP 7.0 and can be installed by specifying in extensions input. Every project does not need them, so I did not install them by default.

I will update the script to add ext-mbstring and ext-xml by default as they are widely used.

@staabm
Copy link

staabm commented Jan 8, 2020

Thanks for the fast feedback. Great job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants