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

House keeping #64

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

House keeping #64

wants to merge 2 commits into from

Conversation

augustohp
Copy link
Member

No description provided.

This is a breaking change from the previous version, as the
[ContainerInterop][1] interfaces are no longer implemented. As of their
recommendation, but not because of it 😉, we are now conforming the
[PSR-11][2] interfaces.

Not all interfaces were implemented (👀 Exceptions), so start
using them - conforming with previous exceptions thrown by
Respect\Config. Change 95ab990 modified an `\InvalidArgumentException`
to an `Exception` type, this reverts that change to conform with
previous contracts.

Rather than testing interoperability inside `ContainerTest` test case,
extract those tests into their own test case under a more friendly
namespace (`Test\Feature`) and better test names - along with the
test for the exception bullshit.

Technical debts
---------------

The test suite now holds two different organizations, one (introduced
here) unfinished. I've already dived into this code base a few times
and tests helped me a lot, but having them matching their concrete classes
might not be the best organization for that. As splitting this suite into
groups like "unit" and "integration" may not as useful as it is inside
a huge application (with dozens of dependencies), we can use something
like: "feature", "issues" and "library".

[1]: https://github.com/container-interop/container-interop
[2]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-11-container.md
@augustohp augustohp added this to the 2.1 milestone Dec 3, 2017
@augustohp augustohp requested a review from alganet December 3, 2017 16:46
@augustohp augustohp force-pushed the dev-2.1 branch 3 times, most recently from a9b68ab to ed06d62 Compare December 3, 2017 17:09
Library tests are now separated from "feature" tests, which explain
better what each feature of the component is and how it works. Works
better than a README if you ask me, or Respect\Doc for that matter -
which suffered an overhaul that I still haven't take the time to
understand.

Previous coverage is unchanged, although more tests were added for
clarity and better coverage of each feature usage.

Changes
-------

You can now indent INI declarations, every blank space before the start
of any declaration will be removed.

A bug happened when you manipulated the container by defining an item
entry with an instance.

The "ifs" surrounding `$this->configure()` were unnecessary.

Describes development dependencies better on `composer.json` to run the
test suite.
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.

1 participant