Skip to content

Update version command - #17

Merged
josephscott merged 3 commits into
josephscott:trunkfrom
joanhey:version-command
Sep 10, 2025
Merged

josephscott merged 3 commits into
josephscott:trunkfrom
joanhey:version-command

Conversation

@joanhey

@joanhey joanhey commented Jan 5, 2023 •

Copy link
Copy Markdown
Contributor

Now show VERSION 0.0.4.

Video showing the previous behavior, without VERSION and ERROR.

Grabacion_deepin-terminal_20230105124840.mp4

PD: without VERSION it's working OK with the php extension, but possibly will fail with another client.
It's faster to use telnet or nc directly, instead of pass any command via pipe | . It's the good thing of use a text protocol.

@josephscott

Copy link
Copy Markdown
Owner

Good catch! There are three tests that fail after this change, those will need to be updated too.

@joanhey

joanhey commented Jan 6, 2023

Copy link
Copy Markdown
Contributor Author

I wanted to test the Github action. And fix the tests 1 by 1.

@joanhey

joanhey commented Jan 7, 2023 •

Copy link
Copy Markdown
Contributor Author

Seems that the tests pass without problems.

The problem is the hand-coded port, in the tests.
That we change it in the Github action PR, to use the constant.

@josephscott

Copy link
Copy Markdown
Owner

What tests are you running that they passed?

I was able to make it pass by increasing the Marmerine version:

const MARMERINE_VERSION = '1.6.17';

Then run ./vendor/bin/pest tests/VersionTest.php and it passes. I think the PHP memcached client is expecting a certain version level.

I'm running this under PHP 8.1.12, Pecl memcached 3.1.5, libmemcached 1.0.18, MacOS 11.

@joanhey

joanhey commented Jan 14, 2023

Copy link
Copy Markdown
Contributor Author

The php memcached extension, make a lot of versions checks.

One in the getVersion , that call s_server_cursor_version_cb
https://github.com/php-memcached-dev/php-memcached/blob/ce2dfa5e649e01e4b4df925ebaef95ca75a3f353/php_memcached.c#L3580-L3590

So we can have this change, for when we have an higher marmerine version.

@josephscott

Copy link
Copy Markdown
Owner

Noting here for myself and others who might come across this some day. Having the memcached server return a version less than 1.0.0 causes the Memcached::getVersion() method to fail. They were only working so far because we weren't returning a properly formatted version response. Fixing that to be correct ends up breaking these tests.

So I have disabled the tests that were running into that in - 7d8863d

@josephscott
josephscott merged commit 05b0b91 into josephscott:trunk Sep 10, 2025
1 check passed
@joanhey
joanhey deleted the version-command branch September 10, 2025 08:27
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