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

Rewrite the event examples #1

Open
evrifaessa opened this issue May 1, 2023 · 1 comment
Open

Rewrite the event examples #1

evrifaessa opened this issue May 1, 2023 · 1 comment

Comments

@evrifaessa
Copy link
Member

evrifaessa commented May 1, 2023

They are unnecessarily complex for a beginner.

We should make them simpler and demonstrate more common tools like the HTTP client.

@BelleNottelling
Copy link
Member

BelleNottelling commented Sep 19, 2023

I rather disagree with this and I seem to recall the reason for this being opened originating from someone who simply had no understanding of how to actually work with PHP code and it's not our module's job to teach them that.

The existing examples are pretty well documented and not very complex. There's examples for using the database, calling on the API programmatically, and sending email templates which are all things that the majority of modules will want to do and having those examples is valuable. Someone who understands how to work with PHP (or even most programming languages) shouldn't really have issues following these example.

What the module doesn't do a good job of describing is what the DI is, how someone can see what the DI has available, as well as a general list of packages, classes, and tools that are available for them use. Those all need to be better, and getting that covered will also make the examples in the event examples a bit clearer for anyone who is a bit confused.

But at the end of the day, I don't think the event examples themselves are problematic at all and really we just need to do a better job of describing aspects like the DI which are fundamental to writing a module for FOSSBilling.

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

No branches or pull requests

2 participants