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 nullable types for PHP 8.4 #208

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

heelc29
Copy link

@heelc29 heelc29 commented Jul 12, 2024

Fixes

Deprecated: voku\helper\UTF8::extract_text(): Implicitly marking parameter $length as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 1622

Deprecated: voku\helper\UTF8::file_get_contents(): Implicitly marking parameter $offset as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 1842

Deprecated: voku\helper\UTF8::file_get_contents(): Implicitly marking parameter $max_length as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 1842

Deprecated: voku\helper\UTF8::getSupportInfo(): Implicitly marking parameter $key as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 2580

Deprecated: voku\helper\UTF8::html_entity_decode(): Implicitly marking parameter $flags as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 3029

Deprecated: voku\helper\UTF8::lcfirst(): Implicitly marking parameter $lang as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 4301

Deprecated: voku\helper\UTF8::lcwords(): Implicitly marking parameter $lang as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 4365

Deprecated: voku\helper\UTF8::ltrim(): Implicitly marking parameter $chars as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 4444

Deprecated: voku\helper\UTF8::rtrim(): Implicitly marking parameter $chars as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 5625

Deprecated: voku\helper\UTF8::str_camelize(): Implicitly marking parameter $lang as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 5762

Deprecated: voku\helper\UTF8::str_delimit(): Implicitly marking parameter $lang as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 6022

Deprecated: voku\helper\UTF8::str_replace(): Implicitly marking parameter $count as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 7678

Deprecated: voku\helper\UTF8::str_slice(): Implicitly marking parameter $end as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 7913

Deprecated: voku\helper\UTF8::str_titleize(): Implicitly marking parameter $ignore as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 8704

Deprecated: voku\helper\UTF8::str_titleize(): Implicitly marking parameter $lang as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 8704

Deprecated: voku\helper\UTF8::str_titleize(): Implicitly marking parameter $word_define_chars as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 8704

Deprecated: voku\helper\UTF8::str_to_lines(): Implicitly marking parameter $remove_short_values as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 9064

Deprecated: voku\helper\UTF8::str_to_words(): Implicitly marking parameter $remove_short_values as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 9111

Deprecated: voku\helper\UTF8::str_upper_camelize(): Implicitly marking parameter $lang as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 9352

Deprecated: voku\helper\UTF8::strcspn(): Implicitly marking parameter $length as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 9515

Deprecated: voku\helper\UTF8::strip_tags(): Implicitly marking parameter $allowable_tags as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 9652

Deprecated: voku\helper\UTF8::strspn(): Implicitly marking parameter $length as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 11118

Deprecated: voku\helper\UTF8::strtocasefold(): Implicitly marking parameter $lang as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 11348

Deprecated: voku\helper\UTF8::strtolower(): Implicitly marking parameter $lang as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 11403

Deprecated: voku\helper\UTF8::strtoupper(): Implicitly marking parameter $lang as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 11483

Deprecated: voku\helper\UTF8::substr(): Implicitly marking parameter $length as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 11698

Deprecated: voku\helper\UTF8::substr_compare(): Implicitly marking parameter $length as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 11868

Deprecated: voku\helper\UTF8::substr_count(): Implicitly marking parameter $length as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 11926

Deprecated: voku\helper\UTF8::substr_count_in_byte(): Implicitly marking parameter $length as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 12018

Deprecated: voku\helper\UTF8::substr_in_byte(): Implicitly marking parameter $length as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 12172

Deprecated: voku\helper\UTF8::titlecase(): Implicitly marking parameter $lang as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 12566

Deprecated: voku\helper\UTF8::trim(): Implicitly marking parameter $chars as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 12984

Deprecated: voku\helper\UTF8::ucfirst(): Implicitly marking parameter $lang as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 13030

Deprecated: voku\helper\UTF8::wordwrap_per_line(): Implicitly marking parameter $delimiter as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 13496

Deprecated: voku\helper\UTF8::reduce_string_array(): Implicitly marking parameter $remove_short_values as nullable is deprecated, the explicit nullable type must be used instead in voku\portable-utf8\src\voku\helper\UTF8.php on line 13827

Proposed Changes

  • avoid deprecation with PHP 8.4

This change is Reviewable

@Fneufneu
Copy link

Fneufneu commented Sep 5, 2024

PHP 8.4 will be out soon, can we merge this plz ?

@Hackwar
Copy link

Hackwar commented Nov 20, 2024

Just trying to get some more attention for this. We are using this in https://github.com/joomla/joomla-cms and currently encounter the problem when updating to PHP 8.4. Merging this and a new release would be really great.

@YepYuYu
Copy link

YepYuYu commented Nov 22, 2024

PHP has been released with 8.4.1 and this issue is still not addressed.

@TomA-R
Copy link

TomA-R commented Dec 2, 2024

hey @voku, is there a timeline for getting this reviewed by any chance? Thanks a lot in advance!

@ToshY
Copy link

ToshY commented Dec 5, 2024

@voku Could you please take a look at this tiny PR, merge it, and create a new tag for it? Shouldn't take more than 5 minutes of your time. Would help a bunch of people. Thanks in advance.

@laoneo
Copy link

laoneo commented Dec 10, 2024

This change is very much needed, hopefully we see it soon in a release.

@JasonStainton
Copy link

+1 getting this pushed through. I've never seen so many deprecations warnings 😅

@mohammadhzp
Copy link

mohammadhzp commented Dec 13, 2024

Here is a tmp workaround to be able to update to PHP 8.4 for now:

"repositories": [
        {
            "type": "package",
            "package": {
                "name": "voku/portable-utf8",
                "version": "6.0.14",
                "source": {
                    "type": "git",
                    "url": "https://github.com/joomla-backports/portable-utf8.git",
                    "reference": "joomla-5.3"
                }
            }
        }
    ]

Edit: Here is another approach done by Joomla team itself.

P.S: This will install the Joomla team fork of portable utf8

@Hackwar
Copy link

Hackwar commented Dec 13, 2024

Please don't use the fork from the Joomla team. We are not sure if we are going to use that fork and don't plan to support it. We are actually only using it because a dependency of us (wamania/stemmer) is using it and we did provide a PR to that dependency to convert away from portable-utf8 to the Joomla Framework string package instead, which has enough capabilities to replace this library.

@mohammadhzp
Copy link

Please don't use the fork from the Joomla team. We are not sure if we are going to use that fork and don't plan to support it. We are actually only using it because a dependency of us (wamania/stemmer) is using it and we did provide a PR to that dependency to convert away from portable-utf8 to the Joomla Framework string package instead, which has enough capabilities to replace this library.

Thank you for clarification. Not supporting it is totally logical and understandable. however as of right now that library does not require any attention and there is no other safe option either. so just please keep it as is for a short period of time until the current MR is merged or an alternative comes up.

@Kint0ki
Copy link

Kint0ki commented Dec 14, 2024

This PR has been open for over 6 months now, and seeing both the repo and @voku's activity, doesn't seem this will get merged anytime soon. An actual maintained fork would be the nice to have instead.

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