Skip to content

Refactoring work for code quality #44

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

Merged
1 commit merged into from Aug 27, 2020
Merged

Refactoring work for code quality #44

1 commit merged into from Aug 27, 2020

Conversation

ghost
Copy link

@ghost ghost commented Aug 16, 2020

Code Quality:

  • Improved code quality and maintainability. used strict types and namespaces.
  • Created exception InvalidVerifyException.php in case verify is used with some invalid data.
  • Added documentation for all verifiers in order to allow in a future commit to generate the complete API documentation for posting on the Codeception page.

Divide and conquer:

  • Divided the verifiers into traits depending on the type of data they verify.
  • Added data validations with php issers functions and instanceof.

Preparing for the future:

  • BC. 'equalXMLStructure' and its corresponding test was the only verifier that was removed, since its code is deprecated and will be removed very soon.
  • BC. hasntKey verifier renamed to hasNotKey for clarity.
  • BC. Removed support for PHP 7.0 and its corresponding versions of phpunit and phpunit-wrapper, since the use of features available since PHP 7.1 was required and will be required, among which the is_iterable() function, nullable types, among others.

What's Next:
Continuing the work started in:

As soon as the changes are merged, I will proceed to:

  • Implement support for the complete public API of PHPUnit with the aim of making the library much more attractive for those who are considering a migration.
  • Improve documentation on available verifiers and the type of data on which they can work.

NOTE: This should be tagged as a new release, to allow users using PHP 7.0 and PHPUnit 6.x to stay on version 1.3.x to work with the library as before.

@Naktibalda waiting for review.

…ith some invalid data.

Divide and conquer: Divided the verifiers into traits depending on the type of data they verify.
Improved code quality and maintainability. used strict types and namespaces.
Added documentation for all verifiers in order to allow in a future commit to generate the complete API documentation for publication on the codeception page.
Added data validations with php issers functions.
[BC] Removed 'equalXMLStructure()' and its corresponding test since its code is deprecated
[BC] Removed support for PHP 7.0 and its corresponding versions of phpunit and phpunit-wrapper, since the use of features available since PHP 7.1 was required and will be required, among which the is_iterable () function, nullable types, among others.
@DavertMik DavertMik requested a review from Naktibalda August 16, 2020 20:26
@DavertMik
Copy link
Member

Wow, this seems a really good piece of work! Thank you!

Let's wait for @Naktibalda's review and if everything fine we can merge this and release a new major version.

@ghost ghost merged commit 6258e89 into Codeception:master Aug 27, 2020
This pull request was closed.
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.

2 participants