Skip to content

Update minimum PHP version to 7.1.0#120

Open
eyupcanakman wants to merge 1 commit intovoku:masterfrom
eyupcanakman:fix/php-version-requirement
Open

Update minimum PHP version to 7.1.0#120
eyupcanakman wants to merge 1 commit intovoku:masterfrom
eyupcanakman:fix/php-version-requirement

Conversation

@eyupcanakman
Copy link

@eyupcanakman eyupcanakman commented Feb 14, 2026

Summary

Fixes #111.

composer.json declares "php": ">=7.0.0" but the codebase uses nullable return types (e.g. ?SimpleHtmlDomInterface in SimpleHtmlDom::parentNode()) which require PHP 7.1+. This means composer install succeeds on PHP 7.0 but the code fails at runtime with a parse error.

This PR updates the minimum PHP version from >=7.0.0 to >=7.1.0 so Composer correctly rejects PHP 7.0 installations.

Evidence

src/voku/helper/SimpleHtmlDom.php:      public function parentNode(): ?SimpleHtmlDomInterface
src/voku/helper/SimpleHtmlDomBlank.php:  public function parentNode(): ?SimpleHtmlDomInterface

Nullable return types (?Type) were introduced in PHP 7.1 (RFC: https://wiki.php.net/rfc/nullable_types).

Test plan

  • composer validate passes with no errors

This change is Reviewable

Summary by CodeRabbit

  • Chores
    • Updated minimum PHP version requirement to 7.1.0.

@coderabbitai
Copy link

coderabbitai bot commented Feb 14, 2026

Walkthrough

Updated the minimum PHP version requirement in composer.json from 7.0.0 to 7.1.0 to align with nullable type declarations used in the codebase.

Changes

Cohort / File(s) Summary
PHP Version Constraint
composer.json
Updated the "require" section PHP version constraint from ">=7.0.0" to ">=7.1.0" to support nullable type syntax.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A version bump, so small yet fine,
PHP 7.1, no longer nine-nought,
Nullable types now align,
With features that the code has sought! ✨

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Update minimum PHP version to 7.1.0' clearly and concisely summarizes the main change in the changeset.
Linked Issues check ✅ Passed The PR updates composer.json to require PHP >=7.1.0, directly addressing issue #111's requirement for nullable type support introduced in PHP 7.1.
Out of Scope Changes check ✅ Passed The PR contains only a single, focused change to composer.json updating the PHP version constraint, which is directly scoped to the linked issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into master

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link

Summary of Changes

Hello @eyupcanakman, 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 resolves a critical compatibility issue by adjusting the declared minimum PHP version to align with the actual requirements of the codebase. Previously, the project allowed installation on PHP 7.0, but the presence of PHP 7.1-specific features like nullable return types led to runtime failures. By updating the composer.json to require PHP 7.1.0 or higher, this change guarantees that users will only install the project on compatible environments, thereby preventing unexpected parse errors and ensuring stable operation.

Highlights

  • PHP Version Requirement Update: The minimum PHP version required for the project has been updated from ">=7.0.0" to ">=7.1.0" in the composer.json file.
  • Runtime Compatibility Fix: This change addresses a compatibility issue where the codebase utilizes PHP 7.1 features, specifically nullable return types, which caused runtime parse errors on PHP 7.0 environments despite Composer allowing installation.
  • Improved Dependency Management: Updating the requirement ensures that Composer correctly identifies and enforces the necessary PHP version, preventing installations on incompatible PHP 7.0 setups and ensuring stable operation.
Changelog
  • composer.json
    • Updated the minimum PHP version requirement from ">=7.0.0" to ">=7.1.0".
Activity
  • The pull request was created by eyupcanakman.
  • No further human activity (comments, reviews) has been recorded yet.
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.

@sonarqubecloud
Copy link

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 correctly updates the minimum PHP version in composer.json to >=7.1.0. This is an important fix because the codebase uses nullable return types, a feature introduced in PHP 7.1. This change prevents the project from being installed on incompatible PHP versions, thus avoiding potential runtime errors. The change is well-justified and correctly implemented.

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.

php version for requirement needs be >= 7.1.0

1 participant