Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@yottalogical
Copy link
Contributor

Description

This package is listed as requiring PHP >=7.3, but it seems to use some syntax introduced in PHP 8, as well as a version of PHPUnit that requires PHP 8. This pull request makes the minimal changes necessary to use this package in PHP 7.3.

"php": ">=7.3.0",

To test, I used the following Dockerfile:

FROM php:7.3.0

COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/

RUN install-php-extensions @composer

ADD . /workos-php
WORKDIR /workos-php

RUN composer install

ENTRYPOINT ["vendor/bin/phpunit"]
docker build . -t workos-php && docker run -it --rm workos-php

Strictly speaking, it wasn't necessary to update the tests and the PHPUnit version in order to use this package as a dependency on PHP 7.3. However, I wanted to run the tests to ensure that everything still worked.

Documentation

Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.

[ ] Yes

If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.

@yottalogical yottalogical requested a review from a team as a code owner March 5, 2025 20:33
@bennnjamin
Copy link

I'm unable to proceed with SSO integration due to this exact issue.

Comment on lines +41 to +45
if: >-
matrix.php == '7.4' ||
matrix.php == '8.1' ||
matrix.php == '8.2' ||
matrix.php == '8.3'
Copy link
Member

Choose a reason for hiding this comment

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

The formatter isn't supported on php 7.3, so skip on that version.

@nicknisi
Copy link
Member

@yottalogical I pushed up one commit to this PR to get the tests to run PHp 7.3 in CI. Thanks!

Copy link
Contributor

@gcarvelli gcarvelli left a comment

Choose a reason for hiding this comment

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

Thank you for submitting this PR!

@nicknisi nicknisi merged commit 4683644 into workos:main Mar 14, 2025
5 checks passed
@nicknisi
Copy link
Member

@yottalogical and @bennnjamin this has been merged and released in v4.21.0. Thanks for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants