{"id":15788313,"url":"https://github.com/mevdschee/symfony-session-tests","last_synced_at":"2025-03-31T18:24:05.260Z","repository":{"id":151764677,"uuid":"575839652","full_name":"mevdschee/symfony-session-tests","owner":"mevdschee","description":"A test suite for the Symfony session save handlers (to test locking support)","archived":false,"fork":false,"pushed_at":"2022-12-09T16:57:08.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-05T21:41:51.658Z","etag":null,"topics":["session-handler","session-management","sessions","sessionstorage","symfony"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mevdschee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-08T12:20:04.000Z","updated_at":"2023-01-31T21:48:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"b71d74f2-71e4-4550-86ec-11372e394126","html_url":"https://github.com/mevdschee/symfony-session-tests","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mevdschee%2Fsymfony-session-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mevdschee%2Fsymfony-session-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mevdschee%2Fsymfony-session-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mevdschee%2Fsymfony-session-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mevdschee","download_url":"https://codeload.github.com/mevdschee/symfony-session-tests/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246515956,"owners_count":20790145,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["session-handler","session-management","sessions","sessionstorage","symfony"],"created_at":"2024-10-04T21:41:48.132Z","updated_at":"2025-03-31T18:24:05.243Z","avatar_url":"https://github.com/mevdschee.png","language":"PHP","readme":"# Symfony session handler test suite\n\nThis repository contains a test suite for the Symfony session save handlers (to test locking support). Current handlers that can be tested (and their corresponding test mode) are:\n\n- **standard**\n  - **default** ([NativeFileSessionHandler](https://github.com/symfony/symfony/blob/6.2/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php))  \n    Uses the \"files\" session module.\n- **strict** ([docs](https://www.php.net/manual/en/session.configuration.php#ini.session.use-strict-mode) / [rfc](https://wiki.php.net/rfc/strict_sessions))\n  - **pdo_mysql** ([PdoSessionHandler](https://github.com/symfony/symfony/blob/6.3/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php))  \n    Stores data in MySQL using PDO.\n  - **memcached** ([MemcachedSessionHandler](https://github.com/symfony/symfony/blob/6.2/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php))  \n    Stores data in Memcache (fails: no locking).\n  - **redis** ([RedisSessionHandler](https://github.com/symfony/symfony/blob/6.2/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/RedisSessionHandler.php))  \n    Stores data in Redis (fails: no locking).\n\nNote that the standard mode testable handlers implement strict mode as well, but can't be tested as strict handlers.\n\n## Requirements\n\nYou can install the dependencies of this script using:\n\n    sudo apt install php-cli php-curl\n\nOptional dependencies can be installed using:\n\n    sudo apt install memcached php-memcached redis php-redis php-mysql\n\nYou can install the Symfony dependencies of this script using:\n\n    wget getcomposer.org/composer.phar\n    php composer.phar install\n\nYou need PHP 7.4 or higher to run the code.\n\n## Running the tests\n\nYou should prepare your MySQL database by running the SQL script:\n\n    cat create_mysql_symfony_session_test_db.sql | sudo mysql\n\nYou can run the tests from the command line using:\n\n    php run-tests.php\n\nThe code will execute in about 1 second per handler and test 104 HTTP calls for each handler. The following output would mean that the tests succeeded and locking is implemented correctly (which is not the case):\n\n    standard - default   : OK\n    strict   - pdo_mysql : OK\n    strict   - memcached : OK\n    strict   - redis     : OK\n\nThe word \"FAILED\" appears on a failed test and \"SKIPPED\" is shown when the PHP module is not loaded for either Redis or Memcache.\n\n## Stress testing\n\nUse this for 100 runs:\n\n    for i in `seq 1 100`; do php run-tests.php silent; done\n\nAs shown, you may use the argument \"silent\" to suppress output on successful or skipped tests.\n\n## Links\n\nBelow you find some more interesting information about Symony, Sessions and locking:\n\n- https://github.com/mintyphp/session-handlers (Locking handler implementations)\n- https://symfony.com/doc/current/session/database.html (Symfony Session documentation)\n\nEnjoy!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmevdschee%2Fsymfony-session-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmevdschee%2Fsymfony-session-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmevdschee%2Fsymfony-session-tests/lists"}