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

PHPC-2343: Require PHP 8.1 #1631

Merged
merged 13 commits into from
Sep 9, 2024
Merged

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Sep 5, 2024

PHPC-2343

Best viewed commit by commit, as this removes a lot of compatibility logic necessary for older PHP versions.

@alcaeus alcaeus self-assigned this Sep 5, 2024
@alcaeus alcaeus marked this pull request as ready for review September 5, 2024 09:00
@alcaeus alcaeus requested review from GromNaN and jmikola and removed request for GromNaN September 5, 2024 09:00
@@ -60,24 +60,6 @@ ZEND_TSRMLS_CACHE_EXTERN()

zend_object_handlers* phongo_get_std_object_handlers(void);

#define PHONGO_CE_FINAL(ce) \
Copy link
Member Author

Choose a reason for hiding this comment

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

This macro was unused for a while.

#else
#define PHONGO_CE_DISABLE_SERIALIZATION(ce) \
do { \
ce->ce_flags |= ZEND_ACC_NOT_SERIALIZABLE; \
Copy link
Member Author

Choose a reason for hiding this comment

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

I was able to replace this macro with a non-serializable annotation in the stub files 🎉

@@ -65,31 +65,6 @@
#define PHONGO_BREAK_INTENTIONALLY_MISSING
#endif

#if PHP_VERSION_ID >= 80000
Copy link
Member Author

Choose a reason for hiding this comment

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

I've replaced all these macros with their underlying symbols

Copy link
Member

@jmikola jmikola left a comment

Choose a reason for hiding this comment

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

Reviewed all commits independently. LGTM.

Copy link
Member

@GromNaN GromNaN left a comment

Choose a reason for hiding this comment

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

LGTM for the stubs, with a question.

@@ -7,6 +7,7 @@

namespace MongoDB\Driver;

/** @not-serializable */
Copy link
Member

Choose a reason for hiding this comment

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

Is this new? Which software understand this attribute? If found this RFC that would introduce an attribute for that.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is used by the gen_stub tool to add the ZEND_ACC_NOT_SERIALIZABLE flag to the class definition: https://github.com/php/php-src/blob/2f3224ea4105c3bebb7db0bee0a57e62dc560a66/build/gen_stub.php#L3472..L3474

GromNaN

This comment was marked as duplicate.

GromNaN

This comment was marked as duplicate.

@alcaeus alcaeus merged commit 2ddd588 into mongodb:master Sep 9, 2024
61 checks passed
@alcaeus alcaeus deleted the phpc-2343-require-php-8.1 branch September 9, 2024 06:37
alcaeus added a commit that referenced this pull request Sep 16, 2024
* v1.x:
  Update branch names for GHA workflows (#1646)
  PHPC-2343: Require PHP 8.1 (#1631)
alcaeus added a commit that referenced this pull request Sep 17, 2024
* v1.x:
  Update branch names for GHA workflows (#1646)
  PHPC-2343: Require PHP 8.1 (#1631)
alcaeus added a commit that referenced this pull request Sep 30, 2024
* v1.x:
  PHPC-2458: Deprecate float arg for UTCDateTime constructor (#1695)
  Document how to run part of the test suite (#1690)
  Bump version to 1.21-dev (#1661)
  Update branch names for GHA workflows (#1646)
  PHPC-2343: Require PHP 8.1 (#1631)
alcaeus added a commit that referenced this pull request Oct 15, 2024
* v1.x:
  PHPC-2460: Use zend_zval_type_name instead of internal macros (#1714)
  PHPC-2464: Emit deprecation notice for negative "limit" Query option (#1710)
  PHPC-2458: Deprecate float arg for UTCDateTime constructor (#1695)
  Document how to run part of the test suite (#1690)
  Bump version to 1.21-dev (#1661)
  Update branch names for GHA workflows (#1646)
  PHPC-2343: Require PHP 8.1 (#1631)
alcaeus added a commit that referenced this pull request Oct 17, 2024
* v1.x:
  PHPC-2460: Use zend_zval_type_name instead of internal macros (#1714)
  PHPC-2464: Emit deprecation notice for negative "limit" Query option (#1710)
  PHPC-2458: Deprecate float arg for UTCDateTime constructor (#1695)
  Document how to run part of the test suite (#1690)
  Bump version to 1.21-dev (#1661)
  Update branch names for GHA workflows (#1646)
  PHPC-2343: Require PHP 8.1 (#1631)
alcaeus added a commit that referenced this pull request Oct 29, 2024
* v1.x:
  PHPC-1247: Update links to PHP.net docs (#1735)
  PHPC-2460: Use zend_zval_type_name instead of internal macros (#1714)
  PHPC-2464: Emit deprecation notice for negative "limit" Query option (#1710)
  PHPC-2458: Deprecate float arg for UTCDateTime constructor (#1695)
  Document how to run part of the test suite (#1690)
  Bump version to 1.21-dev (#1661)
  Update branch names for GHA workflows (#1646)
  PHPC-2343: Require PHP 8.1 (#1631)
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.

3 participants