* Added testing with 8.0
* Removed old service
* Moved checkout stage above image
* Changed service name
* Override config options for Redis < 7
* Exported to github env
* Print major version output
* Added double quotes
* Test fixes
* Merge cluster and standalone infrastructure
* Removed separate cluster job and merge together with standalone
* Merge stack tests into main test job
* Fixed annotation condition
* tweaks
* Moved docker-compose.yml to root folder
* Added compose file to expected
* fixed in v0.10.1
* move docker file
* Added -all profile in docker-compose
* Removed redis official image, reduce test matrix, moved docker-compose.yml
* Revert docker-compose moving
* test php 8.0 and redis 4.0
* Revert changes related to official image
---------
Co-authored-by: Till Krüss <tillkruss@users.noreply.github.com>
* Added support for new IGNORE filter
* Fixed arguments to be mandatory
* Added more test cases
* Codestyle fixes
* Added missing test case
* Updated test cases
* Added additional timeout after index creation
* Fixed broken test and removed non-related functionality
* Fixed tests version requirements
* Updated error message
* Added new assertion, fixed RESP3 JSON responses and versions
* Removed expectations for error messages
* Changed tests group for RESP3 not supported tests
* Removed 3.x test case
* Added missing test decorators
* Fixed typo
* Removed redisgraph module upload, as not a part of a redis-stack anymore
* Added support for tests running against redis cluster
* Test coverage
* Added comment about master nodes
* Codestyle fix
* Revert changes
* Revert DBNUM
* Added cluster endpoints to relay tests env configuration
* Exclude cluster tests from relay tests environment
* Removed TODO comment
* Changed cluster image version to unstable
* Updated configuration to match unstable cluster
* Fixed path
* Updated cluster CI configuration
* Removed redundant flag
* Removed backslash
* Updated file path
* Updated file path variable
* Added docker cluster initialization as additional step
* Run cluster tests as separate workflow
* Codestyle fixes
* Updated exported files
* Added additional timeout so cluster image could be settled
* Added support for different cluster image, use docker compose for cluster tests CI
* Remove unused flag
* Removed variable from volume path
* Added sleep timeout to allow docker setup after running
* Added timeout before tests run
* Updated linter settings
* Include indent changes for.sh files
* Added missing coverage
* Revert expected files and mark docker folder as exclusion
* Specify folder itself as excluded
* Moved cluster tests as separate job in tests.yml
* Updated name to contain cluster word
---------
Co-authored-by: Chayim <chayim@users.noreply.github.com>
* Add complete CI
* Fix CI
* Fix spelling
* Fix indentation
* Fix CI
* Fix CI
* Revert disabling unit tests
* Add coverage driver to CI
* Start coverage debugging
* Fix debugging
ignored, and an empty message aborts the commit.
* Stop debugging
* Move TODO-s from source to GitHub issues
* Ignore too long lines in certain files
* Revert requiring php-parallel-lint/php-parallel-lint
* formatting
* try shorter formatting
* formatting
* fix syntax
* try two paths?
* Update .editorconfig
Co-authored-by: Viktor Szépe <viktor@szepe.net>
* indentation
* make it a group
Co-authored-by: Till Krüss <tillkruss@users.noreply.github.com>
Basically assertMatchesRegularExpression() replaces assertRegExp() which
has been deprecated since PHPUnit 9.1 and will be removed in PHPUnit 10,
unfortunately we still depend on PHPUnit 8.4 to support PHP 7.2 and this
version does not have assertMatchesRegularExpression() so we implemented
it in our base testcase class with a fallback to the old assertRegExp()
when tests are executed on older versions of PHPUnit.
- Make use of more typehints for function parameters
- Make use of typehints for function return values
- Use @var where needed to give proper hints to IDEs and avoid warnings
- Replace MockObject::setMethods() with addMethods() and onlyMethods()
- Rewording of some phpdocs
This change reduces some unnecessary complexity in the library, Redis
commands do not change much after all. Developers can still implement
their own commands factory, inject new commands or override existing
ones. The "profile" client options has been renamed to "commands" and
it accepts instances of Predis\Command\FactoryInterface.
The test suite checks at runtime the version of the running instance
of Redis for integration tests to adapt itself automatically.
stream_socket_client() has the undocumented ability to open different persistent
streams by providing a path in the $address string. Previously we supported this
behaviour with a combination of "persistent" and "path" (see #139) but this can
be confusing, especially now that we support the redis:// scheme which uses the
path part of an URI string to specify a database number.
After this change, instead of using an URI string such as:
$parameters = 'tcp://127.0.0.1/first?persistent=1&database=5';
You should use the following ones:
$parameters = 'tcp://127.0.0.1?persistent=first&database=5';
$parameters = 'redis://127.0.0.1/5?persistent=first';
Avoiding "path" makes even more sense when using array connection parameters:
$parameters = [
'host' => '127.0.0.1',
'database' => 5,
'persistent' => 'first',
]
This feature is not supported when using UNIX domain sockets because the path
trick of stream_socket_client() does not play well with the actual path of the
socket file. The client will throw an InvalidArgumentException exception to
notify the user.
NOTE: unfortunately we have to disable the tests for persistent connections when
running under HHVM due to a bug in their implementation of get_resource_type()
preventing us to recognize a persistent stream from userland code.
This change is needed due to some internal changes in one of the
latest minor releases of PHPUnit 4.x that essentially broke how we
were checking for the required Redis version from method annotations.
This change targets only method annotations and aims to make the body
of tests more readable using the @requiresRedisVersion annotation.
Tests using this annotation requires to be assigned the "connected"
group of tests because they create a connection to the Redis instance
specified in phpunit.xml to fetch its the version.
This is a quick example of how this annotation can be used:
/**
* @group connected
* @requiresRedisVersion >= 2.8.9
*/
public function testExecutedOnlyWithMatchingRedisVersion()
{
}
Future improvements (currently not needed) include:
* Same annotation working on a class-level (but still applied only
to test methods with an explicitly assigned @group connected).
* Ability to specify a version range.
Meh
Meh