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

[8.x] Fix test suite failing in CI, add suggestion for PHP extension "bcmath" #36457

Closed
wants to merge 1 commit into from

Conversation

derekmd
Copy link
Contributor

@derekmd derekmd commented Mar 4, 2021

In v8.12.0 the validation rule multiple_of started calling global function bcmod() (#34971) which isn't part of the standard library. PHP extension "bcmath" must be installed which is typically included with distributions.

However the GitHub Actions environment setup for PHP 7.3 looks to no longer enable this extension by default so explicitly add it to the config.

@derekmd derekmd force-pushed the add-math-extension branch 4 times, most recently from e94fb5b to 753b0a9 Compare March 4, 2021 08:40
@derekmd derekmd changed the title [8.x] Fix test suite failing in CI, add suggestion for PHP extension "math" [8.x] Fix test suite failing in CI, add suggestion for PHP extension "bcmath" Mar 4, 2021
In v8.12.0 the validation rule 'multiple_of'
started calling global function bcmod() which
is part of the "bcmath" extension.

The GitHub Actions environment setup for PHP 7.3
looks to no longer enable this extension by default.
Explicitly configure it and add @requires phpdoc
to the 'multiple_of' test method.
@derekmd derekmd force-pushed the add-math-extension branch from 753b0a9 to 0761d6b Compare March 4, 2021 08:49
@driesvints
Copy link
Member

The actual issue is that we're using ubuntu-latest and GH Actions just rolled out ubuntu-20.04 which contains a PHP 7.3 build without some of the extensions included in ubuntu-18.04 & ubuntu-16.04. I'll be patching all of our repos in a bit to make explicit use of ubuntu-18.04 to make sure this doesn't happens again in the future. Someone has already sent in a PR to GH Actions to patch the ubuntu-20.04 env. When that's merged I'll be upgrading all of our builds to ubuntu-20.04

@driesvints driesvints closed this Mar 4, 2021
@driesvints
Copy link
Member

Thanks for looking into this though!

@derekmd
Copy link
Contributor Author

derekmd commented Mar 4, 2021

@driesvints: You have ended my 100% merge rate in the Laravel ecosystem and I must now commit seppuku.

Are the testValidateMultipleOf fixes for the typo & extension @requires still appropriate for 8.x? I've updated my branch to just that commit.

@driesvints
Copy link
Member

@derekmd haha, sorry man.

No since that would suppress the failing test and we wouldn't have caught this.

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 this pull request may close these issues.

2 participants