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

Use PSR HTTP factory interface #24

Merged
merged 1 commit into from
Dec 23, 2019
Merged

Conversation

qpautrat
Copy link
Owner

@qpautrat qpautrat commented Dec 23, 2019

Context

JsonApiFactory had a concrete dependency to nyholm/psr7.
To improve usability and respect Dependency Inversion Principle we chose to use interface instead.
It allows implementer to use the implementation he wants even if sensio/framework-extra-bundle combined with symfony/psr-http-message-bridge hardly suggest to use nyholm/psr7.
That is why we think it is irrelevant to suggest an implementation because one of our requirements already dit that.

Fixes #20.

Backward Compatibility

Because we change the dependencies it means that the bundle could not work the same as before.
We need to bump to a new major version.

…ementation.

JsonApiFactory had a concrete dependancy.
To improve usability and respect Dependancy Inversion Principle we chose to use interface instead.
It allows implementer to use the implementation he wants even if sensio/framework-extra-bundle combined
with symfony/psr-http-message-bridge hardly suggest to use nyholm/psr7.
That is why we think it is irrelevant to suggest an implementation because one of our requirements already dit that.
@qpautrat qpautrat force-pushed the use-psr-http-factory-interface branch from e68f656 to 328b36b Compare December 23, 2019 15:20
src/DependencyInjection/Configuration.php Outdated Show resolved Hide resolved
composer.json Outdated Show resolved Hide resolved
@qpautrat qpautrat force-pushed the use-psr-http-factory-interface branch from 328b36b to 95f7493 Compare December 23, 2019 15:24
@qpautrat qpautrat merged commit e52844d into master Dec 23, 2019
@qpautrat qpautrat deleted the use-psr-http-factory-interface branch December 23, 2019 15:46
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.

Move 'nyholm/psr7' from require to suggest & require-dev
2 participants