Skip to content

Conversation

@wireblue
Copy link

This PR adds PHP 8.5 support.

Known Issues

PHP 8.5 has deprecated the PDO::MYSQL_ATTR_SSL_CA constant. Instead it should be replaced with \Pdo\Mysql::ATTR_SSL_CA.

This issue is found in Laravel's config/database.php file, which is also present in orchestral/testbench-core. Currently all tests are failing with deprecation warnings because of this. If you open vendor/orchestra/testbench-core/laravel/config/database.php and comment out those deprecated lines, the tests pass.

I can see Testbench and Laravel are aware of the issue, and it seems they're waiting on a polyfill from Symfony to be merged in.

Breaking change?

In my original issue it was suggested this PHP upgrade could be bundled with #136 to form a new major release. If the PDO::MYSQL_ATTR_SSL_CA deprecation issues aren't solved in a timely manner perhaps it would make sense to release the xero-php-oauth2 upgrades first, and the PHP bump can be released later as a minor release.

@gemini-code-assist
Copy link

Summary of Changes

Hello @wireblue, 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 aims to extend the project's compatibility to PHP 8.5, allowing it to run on the latest stable PHP version. While the core change involves a simple update to the "composer.json" file, the author has proactively highlighted a significant deprecation warning related to "PDO::MYSQL_ATTR_SSL_CA" in PHP 8.5, which currently impacts testing environments. The PR also opens a dialogue about the appropriate release strategy for this update, considering its potential implications and dependencies on external fixes.

Highlights

  • PHP 8.5 Compatibility: The project now officially supports PHP 8.5 by updating the "php" dependency constraint in "composer.json".
  • Identified Deprecation Warning: A known issue with PHP 8.5 deprecating "PDO::MYSQL_ATTR_SSL_CA" has been identified, causing test failures in Laravel/Testbench environments. This issue is being tracked by Laravel and Testbench, awaiting a Symfony polyfill.
  • Release Strategy Consideration: The author has initiated a discussion regarding the release strategy for this change, suggesting it could be bundled with other updates for a major release or released as a minor update depending on the resolution of the deprecation issue.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/run-tests.yml
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 adds support for PHP 8.5 by updating the php version constraint in composer.json. While keeping up with new PHP versions is important, this change is premature as it causes the test suite to fail, an issue you've already identified in the pull request description. My review focuses on the importance of a stable, passing test suite before merging such changes.

],
"require": {
"php": "^8.2|^8.3|^8.4",
"php": "^8.2|^8.3|^8.4|^8.5",

Choose a reason for hiding this comment

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

high

While adding support for PHP 8.5 is a good goal, this change should not be merged until the test suite passes for all supported PHP versions, including 8.5. As you've noted in the description, this change currently causes tests to fail due to deprecation warnings from dependencies. It's crucial to maintain a green build to ensure the stability and reliability of the package. I'd recommend marking this PR as a draft until the underlying dependency issues are resolved and the CI is green.

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