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

Test with PHP 8.4 #73

Merged
merged 2 commits into from
Oct 8, 2024
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/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: [8.1, 8.2, 8.3]
php-version: [8.1, 8.2, 8.3, 8.4]
composer: [highest, lowest]

steps:
Expand Down
2 changes: 1 addition & 1 deletion build/BuildMetadataFromXml.php
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ public static function setPossibleLengthsGeneralDesc(PhoneNumberDesc $generalDes
* @param int[] $lengths
* @param int[] $localOnlyLengths
*/
private static function setPossibleLengths(array $lengths, array $localOnlyLengths, PhoneNumberDesc $desc, PhoneNumberDesc $parentDesc = null): void
private static function setPossibleLengths(array $lengths, array $localOnlyLengths, PhoneNumberDesc $desc, ?PhoneNumberDesc $parentDesc = null): void
{
// We clear these fields since the metadata tends to inherit from the parent element for other
// fields (via a mergeFrom).
Expand Down
8 changes: 4 additions & 4 deletions src/PhoneNumberUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,9 @@ protected function __construct(MetadataSourceInterface $metadataSource, array $c
*/
public static function getInstance(
string $baseFileLocation = self::META_DATA_FILE_PREFIX,
array $countryCallingCodeToRegionCodeMap = null,
MetadataLoaderInterface $metadataLoader = null,
MetadataSourceInterface $metadataSource = null
?array $countryCallingCodeToRegionCodeMap = null,
?MetadataLoaderInterface $metadataLoader = null,
?MetadataSourceInterface $metadataSource = null
): PhoneNumberUtil {
if (static::$instance === null) {
if ($countryCallingCodeToRegionCodeMap === null) {
Expand Down Expand Up @@ -2969,7 +2969,7 @@ public function isValidNumberForRegion(PhoneNumber $number, string $regionCode):
* and the number is not in international format (does not start
* with +)
*/
public function parse(string $numberToParse, ?string $defaultRegion = null, PhoneNumber $phoneNumber = null, bool $keepRawInput = false): PhoneNumber
public function parse(string $numberToParse, ?string $defaultRegion = null, ?PhoneNumber $phoneNumber = null, bool $keepRawInput = false): PhoneNumber
{
if ($phoneNumber === null) {
$phoneNumber = new PhoneNumber();
Expand Down
Loading