Skip to content

fix: avoid deprecation messages for PHP 8.4#834

Merged
tiwarishubham635 merged 8 commits intotwilio:mainfrom
phpfui:PHP8.4
Jan 8, 2025
Merged

fix: avoid deprecation messages for PHP 8.4#834
tiwarishubham635 merged 8 commits intotwilio:mainfrom
phpfui:PHP8.4

Conversation

@phpfui
Copy link
Contributor

@phpfui phpfui commented Nov 22, 2024

Fixes

This PR makes the minimal changes needed to avoid depreciation messages for PHP 8.4. It does not contain any logic changes:

  • Removes E_STRING in tests/bootstrap.php
  • Add ? to parameter types that default to null
  • Make explict $value property in \Twilio\TwiML\GenericNode

All changes should be compatible with PHP 7.1, which is the lowest supported PHP version.

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the Contribution Guidelines and my PR follows them
  • I have titled the PR appropriately
  • I have updated my branch with the main branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation about the functionality in the appropriate .md file
  • I have added inline documentation to the code I modified

If you have questions, please file a support ticket, or create a GitHub Issue in this repository.

@phpfui
Copy link
Contributor Author

phpfui commented Dec 3, 2024

Is there anything I need to do to get this merged?

Thanks.

This reverts commit aa90ec7.
fix: Reverted depreciation change for PHPUnit
fix: PHP 8.4 support added
@oojacoboo
Copy link

Be nice to get this merged in and versioned. Anyone that isn't ignoring deprecations will be blocked from using 8.4

@oojacoboo
Copy link

@phpfui can you get the tests passing here? I don't know what's up with the Twilio team - guess still on vacation...

@phpfui phpfui changed the title Php8.4 fix - Php8.4 Jan 7, 2025
@phpfui phpfui changed the title fix - Php8.4 Fix: Php8.4 Jan 7, 2025
@phpfui phpfui changed the title Fix: Php8.4 fix: Php8.4 Jan 7, 2025
@phpfui
Copy link
Contributor Author

phpfui commented Jan 7, 2025

I have not seen this prefix thing before, but looks like it works now.

Can we get a merge here to support 8.4? PHP 8.4 was released two months ago.

@tiwarishubham635
Copy link
Contributor

Hi! Let me review this once

Copy link
Contributor

@tiwarishubham635 tiwarishubham635 left a comment

Choose a reason for hiding this comment

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

The changes look more or less good to me. Can you please verify once of the places where ? needs to be added? Also, do we really need to give ?string $contentType = null, or can we straightaway write ?string $contentType and use nullable types? Please check once

@oojacoboo
Copy link

Also, please add PHP 8.4 to the test-suite. Based on my comment above, I suspect the deprecations are not fully resolved.

@phpfui
Copy link
Contributor Author

phpfui commented Jan 7, 2025

I did not see any other depreciations when running PHPUnit with PHP 8.4, so I think we are good assuming your tests have 100% code coverage.

Copy link
Contributor

@tiwarishubham635 tiwarishubham635 left a comment

Choose a reason for hiding this comment

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

Looks good to me

@tiwarishubham635 tiwarishubham635 changed the title fix: Php8.4 fix: avoid deprecation messages for PHP 8.4 Jan 8, 2025
@tiwarishubham635 tiwarishubham635 merged commit 6753a82 into twilio:main Jan 8, 2025
21 checks passed
@tiwarishubham635
Copy link
Contributor

Reverted these changes due to failing tests - https://github.com/twilio/twilio-php/actions/runs/12664947059/job/35293855625

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.

4 participants