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

Deprecating all ::fromArray() methods in in the package #153

Merged
merged 4 commits into from
Nov 18, 2022

Conversation

Ocramius
Copy link
Member

Q A
Documentation yes
Bugfix no
BC Break no
New Feature no
RFC no
QA yes

Description

Deprecating all ::fromArray() methods in in the package

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.

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]>
Copy link
Member

@froschdesign froschdesign left a 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.

docs/book/generator/examples.md Show resolved Hide resolved
docs/book/generator/examples.md Outdated Show resolved Hide resolved
Co-authored-by: Frank Brückner <[email protected]>
Signed-off-by: Marco Pivetta <[email protected]>
@Ocramius Ocramius self-assigned this Nov 18, 2022
@Ocramius Ocramius merged commit b28e602 into 4.8.x Nov 18, 2022
@Ocramius Ocramius deleted the deprecation/deprecate-from-array-api branch November 18, 2022 14:15
@tyteen4a03
Copy link

@Ocramius
Copy link
Member Author

@tyteen4a03 by someone, yes: are you volunteering? 😁

@tyteen4a03
Copy link

tyteen4a03 commented Aug 22, 2023

@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.

@Ocramius
Copy link
Member Author

@tyteen4a03 aha! Thanks for checking: that's indeed for us to find out then /cc @froschdesign

@froschdesign
Copy link
Member

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.

@froschdesign
Copy link
Member

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

Successfully merging this pull request may close these issues.

3 participants