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

Update ASCII.php #102

Closed
wants to merge 1 commit into from
Closed

Update ASCII.php #102

wants to merge 1 commit into from

Conversation

arshidkv12
Copy link

https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated

php 8.4 : Implicitly marking parameter $replace_single_chars_only as nullable is deprecated, the explicit nullable type must be used instead

Copy link

Copy link
Contributor

@gilbertoalbino gilbertoalbino left a comment

Choose a reason for hiding this comment

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

Update seems reasonable for fixing PHP 8.4 requirements.

@hafezdivandari
Copy link

This syntax requires PHP 7.1+, some check failures are probably because the current build supports PHP 7.0+

@Diddyy
Copy link

Diddyy commented Oct 27, 2024

@voku Is this good to go? :)

@voku
Copy link
Owner

voku commented Oct 30, 2024

Sorry, I've been in hospital with my daughter for a few weeks. Today is my first day back at work and I'll catch up tonight/next morning.

@Diddyy
Copy link

Diddyy commented Oct 31, 2024

Sorry, I've been in hospital with my daughter for a few weeks. Today is my first day back at work and I'll catch up tonight/next morning.

No stress and no need to be sorry! Hope everything is all good :)

@MrMicky-FR
Copy link

This wasn't mentioned before, but it seems that the PHPDoc isn’t up-to-date as now $replace_single_chars_only has the same behavior with both null and false since it’s only used here:

if (!$replace_single_chars_only) {

(It was changed in this commit)

@SupianIDz
Copy link

hi @voku, when will this be merged? PHP 8.4 will be released soon.

@elijahcruz12
Copy link

hi @voku, when will this be merged? PHP 8.4 will be released soon.

It's supposed to be released this week (on the 21st). Hopefully we can get this merged within the next few days.

@mokhosh
Copy link

mokhosh commented Nov 18, 2024

I guess we could just default to false instead of making the bool nullable?

@MrMicky-FR
Copy link

I guess we could just default to false instead of making the bool nullable?

It could also be a nice solution IMHO and it also keeps compatibility with PHP 7.1, but it would be a (minor?) breaking change for codes where this argument is explicitly passed as null (which seems pretty unlikely as it’s the last parameter and null is already the default value). But this kind of decision is definitely up to @voku :)

@crynobone
Copy link

I believe #105 is a better solution.

@voku
Copy link
Owner

voku commented Nov 21, 2024

fixed via #105

@voku voku closed this Nov 21, 2024
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.

10 participants