Skip to content

Proposal: Drop support for PHP versions that are EOL - #161

Closed
tux-rampage wants to merge 1 commit into
webmozarts:masterfrom
tux-rampage:feature/update-php-support
Closed

Proposal: Drop support for PHP versions that are EOL#161
tux-rampage wants to merge 1 commit into
webmozarts:masterfrom
tux-rampage:feature/update-php-support

Conversation

@tux-rampage

Copy link
Copy Markdown

All PHP versions < 7.2 are end of life and should no longer be used. It is harmful to support these outdated versions in the future.

Why?

  • PHPUnit cannot be upgraded to 8 and above
  • Newer language features cannot be adopted resulting in bloated or less readable code
  • Users should not be encouraged to build technical debt

@Ocramius Ocramius left a comment

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.

Yes please \o/

@zerkms

zerkms commented Jun 26, 2020

Copy link
Copy Markdown
Contributor

Would this PR also add native typing to the Assert class as well then?

@orklah

orklah commented Jun 27, 2020

Copy link
Copy Markdown

Would this PR also add native typing to the Assert class as well then?

Seems complicated in most assertions. For example, if Assert::string can only takes string, it defeats its whole purpose (taking something else and fail the assertion).

@zerkms

zerkms commented Jun 27, 2020

Copy link
Copy Markdown
Contributor

@orklah I only meant those that can be typed: eg

     * @param mixed  $value
     * @param string $message

$message can be typed as string everywhere.

So, only places where @param at this very moment has non-mixed type (while I think that first argument should be mixed everywhere, but this would be a breaking change).

@Ocramius

Copy link
Copy Markdown
Contributor

don't think we should have mixed everywhere, especially due to purity and PHP magic 😞

But yes, where we have type declarations, we can now have native type checks.

Please remember to not accept Stringable BTW 😅

@zerkms

zerkms commented Jun 27, 2020

Copy link
Copy Markdown
Contributor

don't think we should have mixed everywhere, especially due to purity and PHP magic

I thought that too, but having alnum with string parameter requires you to first assert for string. It bloats code for no reason.

@Ocramius

Copy link
Copy Markdown
Contributor

Depends: I use that kind of assertion mostly where strings are already the current type, and maybe they are even already ensured to be not empty 🤷‍♀️

Even then, adding more precise assertions is powerful, and we probably want a DSL for grouping them together instead.

@zerkms

zerkms commented Jun 27, 2020

Copy link
Copy Markdown
Contributor

and we probably want a DSL for grouping them together instead.

oh nononononononononononononononononononononononononononononononononononononononononononononononononononononono

But anyway, you people enjoy your Saturday :-D

@Ocramius

Copy link
Copy Markdown
Contributor

Well, you know that beberlei/assert has lazy composable assertions: I really wonder if we could port assertion composition into types, and therefore teach it to psalm 💪

@ptondereau

ptondereau commented Oct 19, 2020

Copy link
Copy Markdown

It could be useful to also update phpunit version (^9.3) to have a full support a php 8 without ignoring platform requirements

@Nyholm

Nyholm commented Jan 18, 2021

Copy link
Copy Markdown
Contributor

Thank you. This suggestion has been merged into master.

I did not merge this PR because most of it changes/all had conflicts or were obsolete. I hope you don't mind.

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.

8 participants