Skip to content

Upgrades PHP generator version#329

Merged
fcarrero merged 3 commits intomasterfrom
upgrade-php-generator
Dec 18, 2025
Merged

Upgrades PHP generator version#329
fcarrero merged 3 commits intomasterfrom
upgrade-php-generator

Conversation

@fcarrero
Copy link
Contributor

Updates the PHP generator to the latest version.

Includes an exclude card networks field in the checkout.

Fixes an issue where the expiration date was incorrect.

Updates the PHP generator to the latest version.

Includes an exclude card networks field in the checkout.

Fixes an issue where the expiration date was incorrect.
@gemini-code-assist
Copy link

Summary of Changes

Hello @fcarrero, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on updating the underlying PHP generator to a newer version, which in turn facilitates the introduction of new features and bug fixes. Key changes include adding functionality to exclude specific card networks from checkout options and correcting the validation logic for checkout link expiration dates. These updates aim to improve the flexibility of payment configurations and enhance the reliability of checkout processes.

Highlights

  • PHP Generator Upgrade: The PHP generator has been updated from version 7.9.0 to 7.12.0, bringing the codebase in line with the latest generation standards and potentially introducing new features or stability improvements from the OpenAPI Generator project.
  • New Checkout Feature: A new exclude_card_networks field has been added to the checkout functionality, allowing users to specify card networks to be excluded from payment options during the checkout process. This enhances flexibility and control over payment methods.
  • Expiration Date Logic Fix: An issue where the expiration date for checkout links was incorrectly validated has been resolved. The valid range for expires_at is now correctly set from 10 minutes to 365 days from the creation date, addressing a previous bug that limited the range to 2 to 365 days from the next day.
  • Package Version Bump: The overall package version has been incremented from 7.0.7 to 7.0.8, reflecting the updates and new features introduced in this pull request.
  • Internal Codebase Improvements: Several internal improvements have been made, including the addition of a FormDataProcessor for handling form data, and updates to type hints in model constructors for better type safety and code quality.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request successfully upgrades the PHP generator version, which is reflected consistently across most of the project files. The introduction of the exclude_card_networks field in the checkout process and the fix for the expiration date are valuable additions. The code modernization, such as using nullable types in constructors, is also a welcome improvement. However, I've identified a critical compatibility issue in the newly added lib/FormDataProcessor.php file that needs to be addressed, as it could break the application in environments running older PHP versions. There's also a minor inconsistency in the generator version noted in the same file.

Removes the form data processor class.

This class is no longer required due to updates in the code generator.
@fcarrero fcarrero merged commit f1b3074 into master Dec 18, 2025
11 checks passed
@fcarrero fcarrero deleted the upgrade-php-generator branch December 18, 2025 17:11
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