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

Update to Laravel 5.1 #24

Merged
merged 3 commits into from
Jun 24, 2015
Merged

Update to Laravel 5.1 #24

merged 3 commits into from
Jun 24, 2015

Conversation

chaosfinity
Copy link
Contributor

Rebase #22 to master

As far as continuing support for Laravel 4 I can work on that. It would be a provider that delegates to the correct provider based on version.

For your concern about being able to change the response by making a new event listener on Laravel 5 you can do that with middleware just watching for the response types that are returned by the controller. If developers still want to catch exceptions instead of using middleware to convert the response there could be a config option to throw exceptions as before. What do you think?

Catch response of execute for conversion
Update PayumServiceProvder.php for Laravel 5.1

HttpRedirect is a child of HttpResponse moved the reply conversion for HttpRedirect above HttpResponse so redirects are handled as intended
@makasim
Copy link
Member

makasim commented Jun 18, 2015

If developers still want to catch exceptions instead of using middleware to convert the response there could be a config option to throw exceptions as before. What do you think?

That's ok to keep it simple, So let's keep it as it is now and see later

@makasim
Copy link
Member

makasim commented Jun 19, 2015

As far as continuing support for Laravel 4 I can work on that. It would be a provider that delegates to the correct provider based on version.

@chaosfinity It would be great if you can do in a BC way.

…Laravel version

Added configuration option for controlling reply exceptions
@chaosfinity
Copy link
Contributor Author

The service provider now delegates to a version specific provider.

To allow the v4 provider to throw reply exceptions and the v5 to convert the reply directly I did have to add a configuration option. I did not document the config option so the path can be changed if you dont like the "payum-laravel-package.settings.throwReplyExceptions" path.

"illuminate/support": "~4.0",
"illuminate/container": "~5.1",
"illuminate/routing": "~5.1",
"illuminate/support": "~5.1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chaosfinity could you change this to "~4.0|~5.1"?

Add laravel version 4 back to composer.json
makasim added a commit that referenced this pull request Jun 24, 2015
@makasim makasim merged commit 144dab3 into Payum:master Jun 24, 2015
@makasim
Copy link
Member

makasim commented Jun 24, 2015

Thanks.

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