Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev: Restrictions on trait "ResponseTrait" #4238

Closed
DOCHIS opened this issue Feb 6, 2021 · 2 comments
Closed

Dev: Restrictions on trait "ResponseTrait" #4238

DOCHIS opened this issue Feb 6, 2021 · 2 comments
Labels

Comments

@DOCHIS
Copy link

DOCHIS commented Feb 6, 2021

About files : /system/API/ResponseTrait.php


For issues where description only supports string in ResponseTrait trait
I checked the following issues
#2176
#1702
#420

Especially "failValidationError"
In the case of functions, aren't there many cases where the description is an array?

Arrays are supported in the "fail" function,
Wouldn't it be nice if it was improved to allow returning arrays from other functions in trait?


Have a nice day
Thank you

@DOCHIS DOCHIS added the dev label Feb 6, 2021
@MGatner
Copy link
Member

MGatner commented Feb 6, 2021

It might be nice, but the string-only version is published and would require a major version because updating the signature would break any existing extensions: https://3v4l.org/s2L1T

@MGatner MGatner closed this as completed Feb 6, 2021
@MGatner
Copy link
Member

MGatner commented Feb 6, 2021

If you feel strongly about this them raise some discussion on the forums and we can add it as a request for the version 5 brainstorm: https://github.com/codeigniter4/CodeIgniter4/projects/6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants