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

The breeze of OOP #10

Closed
szepeviktor opened this issue Dec 20, 2020 · 4 comments
Closed

The breeze of OOP #10

szepeviktor opened this issue Dec 20, 2020 · 4 comments

Comments

@szepeviktor
Copy link

Hello 👋! I'm experimenting with an OOP-only solution for requirements checking.

    (new Requirements())
        ->php('7.4')
        ->wp('4.9')
        ->multisite(false)
        ->plugins(['polylang/polylang.php'])
        ->packages(['psr/container', 'psr/log-implementation'])
        ->passes() // Returns a boolean.

Implementing here https://github.com/szepeviktor/small-project/blob/master/src/Requirements.php

Are you interested?

@szepeviktor
Copy link
Author

All this comes from a theoretical research szepeviktor/starter-plugin#6
"The Ultimate WordPress Plugin Main File"

@cliffordp
Copy link

@szepeviktor sounds like a similar task over on mine. For your reference: cliffordp/cliff-wp-plugin-boilerplate#72

@szepeviktor
Copy link
Author

szepeviktor commented Dec 24, 2020

Thank you for your reply :)

I'm talking about OOP here. Both your current solution and micropackage/requirements uses an array which to me is an "I-just-hold-data" container, not a self-aware object.

With Requirements and Config I try to break out of WordPressy thinking, out of "PHP4-like" code.
https://github.com/szepeviktor/small-project/tree/master/src

@szepeviktor
Copy link
Author

Closing it as a duplicate.

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