1095 Commits

Author SHA1 Message Date
Michael Wallner
b0b82692d7 release v3.3.0 v3.3.0 2024-10-17 19:33:59 +02:00
Christoph M. Becker
9243f1ff40 Update libmemcached to 1.1.4 for Windows CI 2024-10-16 09:30:55 +02:00
Christoph M. Becker
089a367fe2 Update setup-php-sdk to v0.10 2024-10-15 07:48:05 +02:00
Christoph M. Becker
c6f7d8d2be Cater to yet missing libmemcached-vs17
Using libmemcached-vs16 instead should be fine.
2024-10-15 07:48:05 +02:00
Christoph M. Becker
8877b9ac8a Use new download server
windows.php.net is in the process of being replaced by
downloads.php.net, so we switch right away.
2024-10-15 07:48:05 +02:00
Christoph M. Becker
cf30549f25 Test PHP 8.4 on Windows, too
While caching speeds up the Windows builds, allocating an available
runner takes some time (especially for many pushes in a short time).
Thus we only build PHP 8.4 x64,zts, which should already suffice to
detect most issues.
2024-10-15 07:48:05 +02:00
Christoph M. Becker
61957273e3 Actually enable caching 2024-10-15 07:48:05 +02:00
Christoph M. Becker
6189c32892 Use setup-php-sdk caching
While a new release is pending, it seems worthwhile to make use of the
caching as soon as possible to speed up Windows CI.
2024-10-15 07:48:05 +02:00
Michael Wallner
25a192cde2 release v3.3.0RC1
- Add #515 option to locally enforce payload size limit
    - Add #539 zstd support
    - Add #540 compression_level option
    - Mark password as a sensitive param for PHP 8.2
    - Fix Windows PHP 8 compatibility
    - Fix #518 Windows msgpack support
    - Fix #522 signed integer overflow
    - Fix #523 incorrect PHP reflection type for Memcached::cas $cas_token
    - Fix #546 don't check key automatically, unless client-side verify_key is enabled
v3.3.0RC1
2024-10-04 16:46:19 +02:00
Michael Wallner
2719e1ec2d prepare v3.3.0RC1
- Add #515 option to locally enforce payload size limit
- Add #539 zstd support
- Add #540 compression_level option
- Mark password as a sensitive param for PHP 8.2
- Fix Windows PHP 8 compatibility
- Fix #518 Windows msgpack support
- Fix #522 signed integer overflow
- Fix #523 incorrect PHP reflection type for Memcached::cas $cas_token
- Fix #546 don't check key automatically, unless client-side verify_key is enabled
- Fix #555 incompatible pointer types (32-bit)
2024-09-26 13:29:34 +02:00
Michael Wallner
3ca10ec762 ci: supply a name for the ubuntu workflow 2024-09-26 13:28:51 +02:00
Michael Wallner
270c06b10a Merge pull request #556 from rlerdorf/check_key_fix
The key length check was not taking the prefix into account
2024-09-26 13:20:17 +02:00
Michael Wallner
4b5decdcb8 Merge branch 'master' into check_key_fix 2024-09-26 13:13:28 +02:00
Rasmus Lerdorf
d15c2e2fdf Check for spaces in keys when using the non-binary protocol even if key verification is disabled to avoid injection issues 2024-09-26 13:11:38 +02:00
Rasmus Lerdorf
da71ae0362 Fix more tests with a slight refactor 2024-09-26 13:11:38 +02:00
Rasmus Lerdorf
198e9b3681 fix tests 2024-09-26 13:11:38 +02:00
Rasmus Lerdorf
0987380a55 If client-side verify_key is not enabled, don't check it automatically 2024-09-26 13:11:38 +02:00
James Titcumb
7227982467 Added a composer.json to enable support for PIE 2024-09-26 12:40:27 +02:00
Remi Collet
899f0d5242 Fix incompatible pointer types 2024-09-26 12:24:59 +02:00
Michael Wallner
8a6b0c7801 ci: ubuntu already ships with awesomized/libmemcached 2024-09-25 23:54:27 +02:00
Michael Wallner
93c1bc449f ci: attempt to fix windows build 2024-09-25 23:54:00 +02:00
William Van Hevelingen
d8d99f0784 docs: fix build status on README.md (#558) 2024-05-15 22:39:48 -07:00
William Van Hevelingen
abd372b454 CI: Add PHP 8.3 to the required matrix, add PHP 8.4 to experimental (#557) 2024-05-15 18:31:36 -07:00
Rasmus Lerdorf
7f31d8651b The key length check was not taking the prefix into account 2024-03-07 10:36:43 -05:00
Robert
dfd038f13c Correct whitespace formatting (#553) 2023-12-27 16:55:59 -08:00
dependabot[bot]
eb39e469d0 Bump actions/checkout from 3 to 4 (#548)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 10:33:10 -07:00
dependabot[bot]
d2b1172dff Bump actions/checkout from 2 to 3 (#534)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 07:57:32 -07:00
Rasmus Lerdorf
7fefcb7924 Make the compression_level at settable option and expand it to zlib (#540)
Make it possible to use setOption to set Memcached::OPT_COMPRESSION_LEVEL which
was missed in the original zstd PR #539

zlib compression was using the default zlib compression level of 6. With this PR
it is now possible to choose other levels for zlib as well. The default remains
at 6 so nothing will change for people upgrading unless they explicitly set a
different level.

Here is some more benchmarking data using php serialized data
https://gist.github.com/rlerdorf/b9bae385446d5a30b65e6e241e34d0a8

fastlz is not really useful at any value size anymore. Anybody looking for
lightning quick compression and decompression should use zstd at level 1.

compression_level is not applied to fastlz because it only has 2 levels and
php-memcached already switches from level 1 to 2 automatically for values larger
than 65535 bytes. Forcing it to one or the other doesn't seem useful.
2023-05-03 16:10:38 -07:00
Robert
e39a2e62f4 Add option to locally enforce payload size limit (#515)
Add a configuration option to enforce an item size limit on the client side. This avoids sending large items
over the wire and getting rejected by the server which can cause delays. The default is 0 for no limit.
The same error code RES_E2BIG is used for the client side limit as for the server side limit.
2023-04-27 08:48:49 -07:00
Pavel Djundik
7348cc11f7 Move working tests up a folder (#503)
Tests in the experimental/ folder were not executed on CI. The ones that work move up, the few
that remain in experimental/ need further investigation to get working or remove.
2023-04-27 08:35:07 -07:00
Rasmus Lerdorf
5833590296 zstd support (#539)
This adds zstd compression support.

The current two options, zlib and fastlz is basically a choice between performance and compression ratio.
You would choose zlib if you are memory-bound and fastlz if you are cpu-bound. With zstd, you get the
performance of fastlz with the compression of zlib. And often it wins on both. See this benchmark I ran
on json files of varying sizes: https://gist.github.com/rlerdorf/788f3d0144f9c5514d8fee9477cbe787

Taking just a 40k json blob, we see that zstd at compression level 3 reduces it to 8862 bytes. Our current
zlib 1 gets worse compression at 10091 bytes and takes longer both to compress and decompress.

      C Size  ratio%     C MB/s     D MB/s   SCORE      Name            File
        8037    19.9       0.58    2130.89       0.08   zstd 22         file-39.54k-json
        8204    20.3      31.85    2381.59       0.01   zstd 10         file-39.54k-json
        8371    20.7      47.52     547.12       0.01   zlib 9          file-39.54k-json
        8477    20.9      74.84     539.83       0.01   zlib 6          file-39.54k-json
        8862    21.9     449.86    2130.89       0.01   zstd 3          file-39.54k-json
        9171    22.7     554.62    2381.59       0.01   zstd 1          file-39.54k-json
       10091    24.9     153.94     481.99       0.01   zlib 1          file-39.54k-json
       10646    26.3      43.39    8097.40       0.01   lz4 16          file-39.54k-json
       10658    26.3      72.30    8097.40       0.01   lz4 10          file-39.54k-json
       13004    32.1    1396.10    6747.83       0.01   lz4 1           file-39.54k-json
       13321    32.9     440.08    1306.03       0.01   fastlz 2        file-39.54k-json
       14807    36.6     444.91    1156.77       0.01   fastlz 1        file-39.54k-json
       15517    38.3    1190.79    4048.70       0.02   zstd -10        file-39.54k-json

The fact that decompression a dramatically faster with zstd is a win for most common memcache uses
since they tend to be read-heavy. The PR also adds a `memcache.compression_level` INI switch which
currently only applies to zstd compression. It could probably be made to also apply to zlib and fastlz.
2023-04-27 08:32:10 -07:00
Aaron Stone
6926c53ac3 README.markdown: PHP 8.2 is supported 2023-04-11 11:15:46 -07:00
Remi Collet
811c8a1422 Fix #522 Signed integer overflow (#526) 2023-02-02 11:42:07 -08:00
LeoLee
1eac9f8b8e PHP 8 compatibility Windows (#528)
Use PHP_VERSION_ID instead of _MSC_VER to select the right headers. win32/php_stdint.h
was removed in PHP 8.0.0 and php_stdint.h file was removed in PHP 8.2.0 entirely:
https://github.com/php/php-src/blob/PHP-8.2/UPGRADING.INTERNALS#L26
2023-01-31 14:45:26 -08:00
Christoph M. Becker
6a58af6abc Add minimal Windows CI (#532)
For now, only building the extension is supported.
2023-01-18 09:50:05 -08:00
Aaron Stone
04a0f72eaa CI: Add libmemcached-awesome to matrix (#530) 2023-01-09 11:07:54 -08:00
Aaron Stone
3b0070aab2 CI: Add PHP 8.2 to the required matrix, add PHP 8.3 to experimental (#529) 2023-01-06 14:32:41 -08:00
Remi Collet
38c38d7b47 changelog 2022-11-16 07:56:04 +01:00
Remi Collet
121473118a Fix #523 Incorrect PHP reflection type for Memcached::cas $cas_token 2022-11-16 07:54:10 +01:00
George Peter Banyard
aa4868d0f1 Put false in union types at the end 2022-10-06 10:46:01 +02:00
LeoLee
3ff7436dd9 Windows msgpack support (#518)
Co-authored-by: lfeng <lfeng@ulucu.com>
2022-08-30 12:41:08 -07:00
Remi Collet
ce2dfa5e64 mark password as a sensitive param for 8.2 (#516)
* mark password as a sensitive param for 8.2
2022-07-28 09:28:33 +02:00
Remi Collet
fc388e65e7 fix ${var} deprecation 2022-06-03 16:56:00 +02:00
Remi Collet
1f22de7437 fix #513 skip test with old and dead libmemcached 2022-03-28 08:09:29 +02:00
Remi Collet
09e094d390 back to dev 2022-03-24 14:02:06 +01:00
Remi Collet
d1cb3ae87b Prepare 3.2.0 v3.2.0 2022-03-24 13:57:18 +01:00
Remi Collet
8f106564e6 Merge pull request #507 from cmb69/cmb/libname
Adhere to standard naming convention of Windows libs for PHP
v3.2.0RC2
2022-03-09 14:54:56 +01:00
Christoph M. Becker
4694a665d2 Adhere to standard naming convention of Windows libs for PHP
The memcached library is usually named libmemcached.lib, so we should
check for this name, too.
2022-03-09 14:49:44 +01:00
Remi Collet
ca0d9392cb Prepare 3.2.0RC2 2022-03-09 14:34:33 +01:00
Remi Collet
1f4b029003 [ci skip] fix windows build in changelog 2022-03-09 14:30:51 +01:00