rybakit / msgpack.php

A pure PHP implementation of the MessagePack serialization format / msgpack.org[PHP]
MIT License
389 stars 18 forks source link

Use array_is_list() for detecting array/map #36

Open rybakit opened 3 years ago

rybakit commented 3 years ago

This will require bumping the minimum PHP version to 8.1 or implementing a polyfill. Given this new function, perhaps the FORCE_ARR, FORCE_MAP, and DETECT_ARR_MAP options are no longer as useful and can be removed.

flexchar commented 11 months ago

I think it's a good idea to bump the version and encourage community to upgrade theirs. :)

VaelVictus commented 9 months ago

8.1 has been out for over two years now and 0.91 is working for prior versions anyway. Ultimately people will be choosing msgpack for perf reasons, so I vote yes.

Thanks for making this library.

rybakit commented 2 months ago

Dropping support for PHP versions below 8.1 is fine with me. However, this change will induce other adjustments beyond just using array_is_list(). Since PHP 8.0 introduced support for named arguments, it would be a good opportunity to revisit the use of bitwise options and consider replacing them with named arguments and enums for a cleaner API. There may also be additional changes that I haven't fully explored yet.