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

Payum v2 with php 8.1 as minimum requirements #928

Open
14 tasks
johnkrovitch opened this issue Mar 14, 2022 · 10 comments · Fixed by #932
Open
14 tasks

Payum v2 with php 8.1 as minimum requirements #928

johnkrovitch opened this issue Mar 14, 2022 · 10 comments · Fixed by #932
Milestone

Comments

@johnkrovitch
Copy link

johnkrovitch commented Mar 14, 2022

Hi,

I use Payum with Sylius quite a lot. I'm satisfied with general working, but I think there is a place for improvement in the code, especially in the gateway working and the actions system. It can benefit from having strong typing, interfaces and in the general process design. It can use all the new features provided in PHP 8. But this will require a new major version as some old code should be broken.

Are you planning to do this ? Are you interested in a contribution to start the movement ?

Have a nice day ! Thank you !

  • Update the composer.json of Payum main library
  • Update the composer.json of Payum Bundle
  • Update the composer.json of AuthorizeNet/Aim]
  • Update the composer.json of Be2Bill
  • Update the composer.json of Core
  • Update the composer.json of Klarna
  • Update the composer.json of Offline
  • Update the composer.json of Payex
  • Update the composer.json of Paypal
  • Update the composer.json of Skeleton
  • Update the composer.json of Sofort
  • Update the composer.json of Stripe
  • Integrate the New Language Level Features
  • Add strong typing
@Chris53897
Copy link
Contributor

@johnkrovitch I like this idea. Doing all this is a lot of work. I think the best way is to split the steps.
A first step could be to move to php >= 8. Modify all the composer.json Files so all Parts get an installable set in dev-section. That is not the case yet. Integrate the New Language Level Features.
Second Step add strong typing and other BC breaks like you described.

@johnkrovitch
Copy link
Author

Thank you for your response. I will add a check list for thing to do and link issue when created

@Chris53897
Copy link
Contributor

Just to be sure. I am a not a maintainer. Just a user who has interest in improving this repo.

@johnkrovitch
Copy link
Author

Same here. I use a lot with Sylius, and will be very happy if this repo is improved. I will wait for a maintainer feedback before starting anything.

@pierredup
Copy link
Member

I'm generally in favour of adding more strong types across the codebase, and this is something that I've been thinking of for a while. I also want to be conscious about an upgrade path, even if we release a new major version, I want to keep the BC breaks as minimal as possible, to ease the migration for users to the next major version.
I think that also means that we can release a last minor version in the 1.x range which includes all the deprecation notices (and can be released at the same time as the next major version).

I would also prefer to have PHP 8 as the minimum version instead of 8.1, just to make the package more accessible for a wider audience.

@Prometee
Copy link

Prometee commented May 3, 2022

It's also maybe good to drop support for legacy gateways and focus on the Payum core library too, WDYT ?

@johnkrovitch
Copy link
Author

Thanks for your responses.

Concerning php, php 8.0 will reach the end of active support in six months. So I don't know if it is safe to plan an upgrade to this version, and aiming for 8.1 will allow to use new features like enums (for payments states for instance). And the migration from 8.0 to 8.1 is quite easy.

And about BC breaks, I think it is necessary to break some thing in the major version to prevent to carry a lot of legacy. I think of non-standard ArrayAccess for instance.
But if it is rejected, minor changes are good to take too :)

@pierredup
Copy link
Member

I have created a 1.x branch, and updated master to be 2.0-dev, and have also added a milestone and GH project for 2.0.
Any PRs to update functionality for 2.0, should have a corresponding PR for 1.x which contains deprecations.

As for the PHP version, since PHP 8.0 will still be supported until the end of next year (for security fixes), I don't see the need to drop it just yet. The features in 8.1 are awesome and it would be great to use enums (and some of the other features), but we should also keep in mind the projects that include this package. I think this is something that we can re-assess as we get closer to the 2.0 release

@oulfr
Copy link

oulfr commented Jun 11, 2023

Is there any update on the progress of the version 2 release? It has been a year now, and we have noticed that there are many deprecated methods in the current version. It's becoming difficult to determine which class to use and which ones will be removed. If you need assistance, we are more than willing to help. We can even split the work into micro tasks to make it more manageable. Please let us know how we can contribute to the project.
It will be great if we focus in the core version because not every body use it for symfony or sylius

@pierredup
Copy link
Member

pierredup commented Apr 4, 2024

I have published a roadmap for version 2 at https://github.com/orgs/Payum/discussions/977. If there are any items that you feel you want to contribute, feel free to create a PR, or open a dedicated issue for discussion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

5 participants