-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
Deprecating all ::fromArray()
methods in in the package
#153
Conversation
These methods are brittle, badly documented, and very much type-unsafe. The `src/Generator` API is mostly composed of builder objects, and `::fromArray()` is not necessary in it. Please also do not use arbitrary user input, deserialized as array, to generate code: it's a recipe for disaster. Signed-off-by: Marco Pivetta <[email protected]>
The `::fromArray()` API is now deprecated, and we should encourage the usage of a safer API from now on. Signed-off-by: Marco Pivetta <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good decision. The configuration arrays are ugly to use and difficult to document.
Only one small suggestion.
Co-authored-by: Frank Brückner <[email protected]> Signed-off-by: Marco Pivetta <[email protected]>
Signed-off-by: Marco Pivetta <[email protected]>
Hi, will https://docs.laminas.dev/laminas-code/generator/examples/ be updated? |
@tyteen4a03 by someone, yes: are you volunteering? 😁 |
@Ocramius I'm not sure what is needed from me because it looks like the docs in the repo are updated but the website doesn't render the latest version of the docs. |
@tyteen4a03 aha! Thanks for checking: that's indeed for us to find out then /cc @froschdesign |
The problem is the build process for the documentation: https://github.com/laminas/laminas-code/actions/workflows/docs-build.yml - but the logs are gone. |
@tyteen4a03 Thanks to @Xerkus |
Description
Deprecating all
::fromArray()
methods in in the packageThese methods are brittle, badly documented, and very much
type-unsafe.
The
src/Generator
API is mostly composed of builder objects,and
::fromArray()
is not necessary in it.Please also do not use arbitrary user input, deserialized as
array, to generate code: it's a recipe for disaster.