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

PHP ecosystem catch up #44

Merged
merged 3 commits into from
Dec 21, 2016
Merged

PHP ecosystem catch up #44

merged 3 commits into from
Dec 21, 2016

Conversation

augustohp
Copy link
Collaborator

@augustohp augustohp commented Dec 17, 2016

Catch up with the PHP ecosystem after 2 years, the idea is to update what we can without braking current compatibility and tag a stable version 1.0 of the library.

  • Favor PHPUnit 5 API but use PHP 4.8 to execute suite (let's tag a 1.0 release compatible with PHP 5.3).
  • Favor composer scripts instead of commands.
  • Some test cases without the suffix Test.php are not being executed.
  • Remove functional tests.
  • Continuous Integration updates:
    • Favor an environment variable to disable TLS.
    • Configures a build matrix for Travis.
    • Mark non maintained PHP versions as allowed failures.
    • Only send coverage after a success.

@cdaguerre
Copy link
Owner

Hey @augustohp Great idea.
Would you like to maintain this project?

@augustohp
Copy link
Collaborator Author

Hey @augustohp Great idea.
Would you like to maintain this project?

I can definitely help. 😄

@augustohp augustohp changed the title Make tests compatible with PHPUnit 5 API PHP ecosystem catchup Dec 21, 2016
@augustohp augustohp changed the title PHP ecosystem catchup PHP ecosystem catch up Dec 21, 2016
augustohp and others added 3 commits December 21, 2016 16:20
Updates the usage of the mock API. PHPUnit 5 is the current stable
release so upgrading this will ensure a bigger life time to the
test suite. The constraint on `composer.json` still uses 4.8 as version
as it is still compatible with PHP 5.3, the intention is to tag a 1.0
version of this package with PHP 5.3 compatibility to later drop it.

Creates scripts to ease tests during development and continuous
integration. Bootstrapping can be done completely via Composer and
PHPUnit configuration.

Configures a [build matrix][1] for Travis:

* Favor an environment variable to disable TLS.
* Mark non maintained PHP versions as allowed failures.
* Favor composer scripts instead of commands.
* Only send coverage after a success.

There are still problems needing fixes regarding the test suite, they
need to be addressed separately as they will cause bigger conflicts while
merging this code with other (pending) contributions:

* Some test cases without the suffix `Test.php` are not being executed.
* Avoid exclusion of functional tests.
* Separate test cases directory from concrete classes being used.

[1]: https://docs.travis-ci.com/user/customizing-the-build/#Build-Matrix
No tests in this suite were executed, anyway. We can always recover them
from the version control system, but maybe we will never do that since
unit tests are way better.

In order to have functional tests, one would still need to solve the
issue of authentication. Providing a token for continuous integration
would expose that token to anyone, which is not cool even if the user is
just intended for that.
Without the suffix "Test.php" in the file names, they were being
ignored. Some fixes and cleanup were made but the majority of the tests
do not rely on real responses from the Trello API, which needs to be
fixed on a next occasion - therefore the @todos added.
@augustohp augustohp modified the milestone: 1.0 Dec 21, 2016
@augustohp augustohp merged commit 5284d06 into cdaguerre:master Dec 21, 2016
@augustohp augustohp deleted the maintenance/2-years-catch-up branch December 21, 2016 20:33
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.

None yet

2 participants