Skip to content

Declare dependency on bcmath extension #1106

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

Merged

Conversation

fredden
Copy link
Member

@fredden fredden commented May 26, 2025

Description

While running the test suite for this repository within a limited environment, several tests were failing without the bcmath PHP extension. This change skips these tests when the bcmath extension is not loaded. Elsewhere, we use this same syntax to skip tests which depend on the bcmath extension.

Suggested changelog entry

None required

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
    • This change is only breaking for integrators, not for external standards or end-users.
  • Documentation improvement

PR checklist

  • I have checked there is no other PR open for the same change.
  • I have read the Contribution Guidelines.
  • I grant the project the right to include and distribute the code under the BSD-3-Clause license (and I have the right to grant these rights).
  • I have added tests to cover my changes.
  • I have verified that the code complies with the projects coding standards.
  • [Required for new sniffs] I have added XML documentation for the sniff.

Copy link
Member

@jrfnl jrfnl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fredden Thanks for this PR. LGTM, the only thing that needs changing, is that this change should be pulled to the 3.x branch as these tests already exist in 3.x.

@fredden fredden force-pushed the tests/define-bcmath-requirement branch from c6c632f to bfa18e7 Compare May 26, 2025 11:42
@fredden fredden changed the base branch from 4.x to master May 26, 2025 11:43
@fredden fredden requested a review from jrfnl May 26, 2025 11:44
@jrfnl jrfnl added this to the 3.13.1 milestone May 26, 2025
Copy link
Member

@jrfnl jrfnl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @fredden ! Will merge this when I'm back in the office.

These tests fail if the 'bcmath' PHP extension is not loaded. Elsewhere, we use
this syntax to skip tests which depend on the 'bcmath' extension.
@fredden fredden force-pushed the tests/define-bcmath-requirement branch from bfa18e7 to 3661b1f Compare May 26, 2025 14:12
@jrfnl jrfnl merged commit c9858b6 into PHPCSStandards:master May 28, 2025
48 checks passed
@fredden fredden deleted the tests/define-bcmath-requirement branch May 29, 2025 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants