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

fix: deprecations in PHP 8.4 #1119

Merged
merged 4 commits into from
Feb 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
timeout-minutes: 20
strategy:
matrix:
php: [ '7.3', '7.4', '8.0', '8.1' ]
php: [ '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
env:
DOCKER_LOGIN: ${{ secrets.DOCKER_USERNAME && secrets.DOCKER_AUTH_TOKEN }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Please note that we utilize the [Gitflow Workflow](https://www.atlassian.com/git

##### Prerequisites #####

- PHP version 7.3, 7.4, 8.0, or 8.1
- PHP version 7.3+

##### Initial setup: #####

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ We appreciate your continued support, thank you!

## Prerequisites

- PHP version 7.3, 7.4, 8.0, or 8.1
- PHP version 7.3+
- The Twilio SendGrid service, starting at the [free level](https://sendgrid.com/free?source=sendgrid-php) to send up to 40,000 emails for the first 30 days, then send 100 emails/day free forever or check out [our pricing](https://sendgrid.com/pricing?source=sendgrid-php).
- For SMS messages, you will need a free [Twilio account](https://www.twilio.com/try-twilio?source=sendgrid-php).

Expand Down
2 changes: 1 addition & 1 deletion lib/mail/Mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function __construct(
$subject = null,
$plainTextContent = null,
$htmlContent = null,
array $globalSubstitutions = null
?array $globalSubstitutions = null
) {
if (!isset($from)
&& !isset($to)
Expand Down
6 changes: 3 additions & 3 deletions lib/stats/Stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,15 @@ public function getSubuserMonthly(
}

/**
* Validate the date format
* Validate YYYY-MM-DD date format
*
* @param string $date YYYY-MM-DD
* @param string|null $date
*
* @throws Exception
*/
protected function validateDateFormat($date)
{
if (false === DateTime::createFromFormat(self::DATE_FORMAT, $date)) {
if (is_null($date) || !DateTime::createFromFormat(self::DATE_FORMAT, $date)) {
throw new Exception('Date must be in the YYYY-MM-DD format.');
}
}
Expand Down