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

Add support for PHP 8.1 #388

Merged
merged 3 commits into from
Sep 23, 2021
Merged

Add support for PHP 8.1 #388

merged 3 commits into from
Sep 23, 2021

Conversation

GrahamCampbell
Copy link
Contributor

@GrahamCampbell GrahamCampbell commented Sep 5, 2021

This PR gets this library working on PHP 8.1. The new PHP 7.4 style serialisation is now mandatory, from PHP 8.1 onwards. I've checked that the two incompatible serialisation formats are in fact compatible. The old style can be deserialized just fine: https://3v4l.org/XfUS3. This means upgrading is easy and no risk. On PHP 7.2 and 7.3, there are no changes. On PHP 7.4+, the old style gets deserialized properly, and going forward, the new style will be used for serialisation.

@codecov
Copy link

codecov bot commented Sep 5, 2021

Codecov Report

Merging #388 (d868221) into main (fe665a0) will decrease coverage by 0.78%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #388      +/-   ##
============================================
- Coverage     96.91%   96.13%   -0.79%     
- Complexity      533      555      +22     
============================================
  Files            64       64              
  Lines          1522     1551      +29     
============================================
+ Hits           1475     1491      +16     
- Misses           47       60      +13     
Impacted Files Coverage Δ
src/Fields/SerializableFieldsTrait.php 80.00% <100.00%> (-20.00%) ⬇️
src/Lazy/LazyUuidFromString.php 98.81% <100.00%> (-1.19%) ⬇️
src/Type/Decimal.php 92.85% <100.00%> (-7.15%) ⬇️
src/Type/Hexadecimal.php 90.90% <100.00%> (-9.10%) ⬇️
src/Type/Integer.php 93.93% <100.00%> (-6.07%) ⬇️
src/Type/Time.php 88.88% <100.00%> (-11.12%) ⬇️
src/Uuid.php 96.55% <100.00%> (+0.16%) ⬆️
... and 3 more

@GrahamCampbell GrahamCampbell mentioned this pull request Sep 5, 2021
7 tasks
@GrahamCampbell
Copy link
Contributor Author

Hmm, tried to get it to upload coverage from two different runs, hoping it would merge them. Seems not. We need PHP less than 7.4 and PHP at least 7.4 to get 100% coverage on these changes, together.

@GrahamCampbell
Copy link
Contributor Author

Friendly ping, @ramsey. cc @nunomaduro

@ramsey
Copy link
Owner

ramsey commented Sep 20, 2021

I'll try to take a look this week. 🙂

@ramsey ramsey merged commit e9cf671 into ramsey:main Sep 23, 2021
@ramsey
Copy link
Owner

ramsey commented Sep 23, 2021

Thank you for contributing! 🎉

@GrahamCampbell GrahamCampbell deleted the php-81 branch September 23, 2021 20:46
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