Skip to content

Add ReturnTypeWillChange for PHP 8.1#42

Closed
szepeviktor wants to merge 1 commit into
masterfrom
add/ReturnTypeWillChange
Closed

Add ReturnTypeWillChange for PHP 8.1#42
szepeviktor wants to merge 1 commit into
masterfrom
add/ReturnTypeWillChange

Conversation

@szepeviktor
Copy link
Copy Markdown
Member

@Mte90 👀

From #41

@szepeviktor
Copy link
Copy Markdown
Member Author

szepeviktor commented Jul 20, 2022

@johnbillion Please start me up with 1 sentence how to insert #[\ReturnTypeWillChange] before methods listed in this PR.
Thank you.


Maybe here?

wordpress-stubs/visitor.php

Lines 150 to 152 in e04781a

if (! isset($this->functionMap[$this->currentSymbolName])) {
return null;
}

@Mte90
Copy link
Copy Markdown

Mte90 commented Jul 20, 2022

I executed phpstan with those tags and I saw no errors as there also other uses of that attribute in the stubs https://github.com/WordPress/wordpress-develop/search?q=ReturnTypeWillChange

@szepeviktor
Copy link
Copy Markdown
Member Author

szepeviktor commented Jul 20, 2022

I saw no errors as there also other uses of that attribute

Are these the droids you're looking for? WordPress/Requests#505

@Mte90
Copy link
Copy Markdown

Mte90 commented Jul 20, 2022

Yeah I remember that there are various tickets for php 8 in wordpress but they are still WIP...

@szepeviktor
Copy link
Copy Markdown
Member Author

there are various tickets for php 8 in wordpress

  1. WordPress core is not fully PHP 8.1 compatible
  2. The current WordPress ecosystem is not PHP 8.0 compatible
  3. WordPress installations live happily on PHP 7.4 as of 2022

Currently WP v6 contains WordPress/Request v1!
WordPress/Request v2 has these problems fixed.

I couldn't find the issue but I had the idea to exclude packages included in WP core.

  • ID3
  • PHPMailer
  • WordPress/Request
  • SimplePie

Would like to be involved?

@Mte90
Copy link
Copy Markdown

Mte90 commented Jul 20, 2022

I don't see errors from those packages... maybe they are written the right way

@szepeviktor
Copy link
Copy Markdown
Member Author

This is a dead end.
769dd33

@szepeviktor szepeviktor deleted the add/ReturnTypeWillChange branch July 22, 2022 18:34
@Mte90
Copy link
Copy Markdown

Mte90 commented Jul 25, 2022

Well the important part is that at least there will be less issues with this project :-D

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.

2 participants