php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #80298 Please remove Traits
Submitted: 2020-10-29 21:09 UTC Modified: 2020-11-04 01:10 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: pavel dot dvorak dot work at gmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 8.0.0RC3 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: pavel dot dvorak dot work at gmail dot com
New email:
PHP Version: OS:

 

 [2020-10-29 21:09 UTC] pavel dot dvorak dot work at gmail dot com
Description:
------------
Please deprecate traits, it caused me so much trouble because someone use it incorrecly (like abstract).
It creates untestable code
Thanks

Expected result:
----------------
No traits


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-10-29 21:11 UTC] rtrtrtrtrt at dfdfdfdf dot dfd
clap that one on the fingers or don#t use them

it's that simple
i don't care for traits or namespaces at all
i just don't use them, case closed

just beause someone is too stupid to use some technology properly is hardly a valid reason to remove the technology alltogether
 [2020-10-29 21:11 UTC] peehaa@php.net
-Status: Open +Status: Not a bug
 [2020-10-29 21:11 UTC] peehaa@php.net
Yes! But no, sorry :-(
 [2020-10-31 12:45 UTC] pavel dot dvorak dot work at gmail dot com
OK
I don't use them but it takes a lot off effort to discuradge other people.
 [2020-11-04 01:10 UTC] girgias@php.net
-Operating System: any +Operating System:
 [2020-11-04 01:10 UTC] girgias@php.net
Feel free to bring this up on internals and write an RFC for it.

But it's going to be hard to convince people, although I kinda agree they are sub-optimal.
 [2020-11-13 12:47 UTC] alex at alex-at dot net
Not to ask for it, just mentioning.
Actually multiple class inheritance would remove the need for traits and it's long standing thing that is desired by many out there I think. With resolution priority in order of inheritance, low to high.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 07:01:29 2024 UTC