Skip to content

Upgrade to PHP 7.1+#64

Closed
codemasher wants to merge 3 commits into
php-fig:masterfrom
codemasher:type-hints-php7.1
Closed

Upgrade to PHP 7.1+#64
codemasher wants to merge 3 commits into
php-fig:masterfrom
codemasher:type-hints-php7.1

Conversation

@codemasher

Copy link
Copy Markdown

Hi, i'd like to see the common psr interfaces upgraded to PHP 7! Can we please have this in near future?

@Jean85

Jean85 commented Aug 5, 2019

Copy link
Copy Markdown
Member

We've already said that this is not doable to the current PSR. We started a conversation about making PSRs evolve in this regard on our ML: https://groups.google.com/d/topic/php-fig/OyC3plRYhqg/discussion

@tdtm

tdtm commented Aug 19, 2020

Copy link
Copy Markdown

Considering this was approved: php-fig/fig-standards#1195, could this now be considered again as v2.0.0?

@arnested

arnested commented Aug 20, 2020

Copy link
Copy Markdown

But that doesn't match the specification?

Every method accepts a string as the message, or an object with a __toString() method. Implementors MAY have special handling for the passed objects. If that is not the case, implementors MUST cast it to a string.

@stof

stof commented Aug 20, 2020

Copy link
Copy Markdown
Contributor

indeed, typehinting string does not match the specification, as the actual type is string|Stringable

@Jean85

Jean85 commented Aug 21, 2020

Copy link
Copy Markdown
Member

the actual type is string|Stringable

That would be attainable with PHP 8 though...

@stof

stof commented Aug 21, 2020

Copy link
Copy Markdown
Contributor

@Jean85 I think making PHP 8 the min supported version is too early...

@Jean85

Jean85 commented Aug 21, 2020

Copy link
Copy Markdown
Member

Since the PSR is immutable and the behavior can't change, it would be just an upgrade step, as paved by the related bylaw: https://www.php-fig.org/bylaws/psr-evolution/

Obviously I would wait for PHP 8 to be released, but still...

Comment thread .gitignore
@@ -1 +1,3 @@
vendor
composer.lock
.idea

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👎 This belongs in your global ignore file.

@Crell

Crell commented Jul 14, 2021

Copy link
Copy Markdown
Collaborator

Closing in favor of #76 and #77, which were just approved.

@Crell Crell closed this Jul 14, 2021
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.

7 participants