Skip to content

Some refactoring, tests, doc blocks #25

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

Closed
wants to merge 10 commits into from

Conversation

splitbrain
Copy link

This refactors the library into separate files per class as suggested by @tm1000 in #18. It also introduces unit testing with some initial tests. More tests at a deeper level would make sense though (currently it just checks the overall outcome). I also added doc blocks to make things bit easier to understand and for better type hinting in IDEs. This also incorporates #23. After merging, automated unit testing at travis-ci should be set up.

If you're not interested in this, feel free to close.

This introduces an Interface that defines what a suitable HTTPClient
needs to provide and makes it possible to pass an alternative
implementation in the Lescript constructor.
Users may want to modify some behaviour of the library in sub classes.
Making the inner workings accessible make that easier.
This implements the basic foundations for unit tests to LeScript. It
uses the PHP builtin webserver and ngrok for having publically
accessible domains that LeScript can work on.
* master:
  Example for #12 - adding LE registration contact
  Fix analogic#18 - make HTTP client exchangable Fix analogic#19 - Allow Defining challenge type Add #12 - adding LE registration contact
* protected:
  Made all private methods/fields protected
This makes it easier to maintain. A build script to create a single file
again could be added if wanted.
the methods are still rather large, but this was the simples possible
split for now. It might be more sensible for $accountDetails to be a
member variable.
@tm1000
Copy link
Contributor

tm1000 commented Aug 21, 2016

This is really impressive and should be merged. 👍

One note: Does this require a major version bump? I suppose not. It looks like it's backwards compatible.

@skrivy
Copy link

skrivy commented Feb 28, 2017

Would you mind merging this?

@Humni
Copy link

Humni commented Jun 16, 2017

This should be merged. Is this repo managed still?

@analogic
Copy link
Owner

I appreciate this pull request but it is far from the original purpose of Lescript - to be a simple single file without deps.

@analogic analogic closed this Apr 11, 2023
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

Successfully merging this pull request may close these issues.

5 participants