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

Expected result:
No traits


Add a Patch

Pull Requests

Add a Pull Request


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]
-Status: Open +Status: Not a bug
 [2020-10-29 21:11 UTC]
Yes! But no, sorry :-(
 [2020-10-31 12:45 UTC] pavel dot dvorak dot work at gmail dot com
I don't use them but it takes a lot off effort to discuradge other people.
 [2020-11-04 01:10 UTC]
-Operating System: any +Operating System:
 [2020-11-04 01:10 UTC]
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-2023 The PHP Group
All rights reserved.
Last updated: Sun Dec 10 08:01:28 2023 UTC