Skip to content

Commit 8607dcd

Browse files
committed
added CHANGELOG.md and updated README.md
1 parent 98d2c9f commit 8607dcd

File tree

3 files changed

+99
-19
lines changed

3 files changed

+99
-19
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
/.gitattributes export-ignore
33
/.gitignore export-ignore
44
/.scrutinizer.yml export-ignore
5+
/CHANGELOG.md export-ignore
56
/phpunit.xml.dist export-ignore
67
/README.md export-ignore

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
### [0.9.5] - 2017-07-13
2+
3+
* (Bugfix) Made the handler acknowledge custom session cookie parameters set with `session_set_cookie_params` (contributed by [@scottlucas](https://github.com/scottlucas))
4+
* (Improvement) Expanded integration tests to cover all supported major versions of PHP (5.6, 7.0 and 7.1).
5+
6+
### [0.9.4] - 2017-07-10
7+
8+
* (Bugfix) Prevented the handler from hanging when the `max_execution_time` directive is set to `0` (contributed by [@scottlucas](https://github.com/scottlucas))
9+
10+
### [0.9.3] - 2017-04-28
11+
12+
* (Bugfix) Made the handler compatible with PHP +7.1.2 by avoiding the call to `session_regenerate_id` inside the handler.
13+
14+
### [0.9.2] - 2017-02-20
15+
16+
* (Improvement) Set up continuous integration based on Scrutinizer.
17+
* (Feature) Added support for `timeout`, `prefix`, `auth` and `database` query params on the `session.save_path` directive, as in the native handler.
18+
19+
### [0.9.1] - 2017-02-05
20+
21+
* (Improvement) Introduced exponential backoff between session locking attempts.
22+
* (Improvement) A session ID is now never locked before checking that it doesn't need to be regenerated.
23+
24+
### 0.9.0 - 2017-02-05
25+
26+
* Initial pre-release
27+
28+
[0.9.4]: https://github.com/1ma/RedisSessionHandler/compare/v0.9.4...v0.9.5
29+
[0.9.4]: https://github.com/1ma/RedisSessionHandler/compare/v0.9.3...v0.9.4
30+
[0.9.3]: https://github.com/1ma/RedisSessionHandler/compare/v0.9.2...v0.9.3
31+
[0.9.2]: https://github.com/1ma/RedisSessionHandler/compare/v0.9.1...v0.9.2
32+
[0.9.1]: https://github.com/1ma/RedisSessionHandler/compare/v0.9.0...v0.9.1

README.md

Lines changed: 66 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ So when using RedisSessionHandler it is advised _not_ to disable `max_execution_
6262

6363
### RedisSessionHandler does not support `session.use_trans_sid=1` nor `session.use_cookies=0`
6464

65-
It just not work at all with [URL-based sessions](http://www.phpddt.com/usr/uploads/2013/09/2521893358.jpg). By design.
65+
It just don't work at all with [URL-based sessions](http://www.phpddt.com/usr/uploads/2013/09/2521893358.jpg). By design.
6666

6767

6868
### RedisSessionHandler ignores the `session.use_strict_mode` directive
@@ -109,7 +109,7 @@ First, we send a single request that will setup a new session. Then we use the s
109109
the `Set-Cookie` header to send a burst of 200 concurrent, authenticated requests.
110110

111111
```bash
112-
1ma@home:~$ http localhost/visit-counter.php
112+
$ http localhost/visit-counter.php
113113
HTTP/1.1 200 OK
114114
Cache-Control: no-store, no-cache, must-revalidate
115115
Connection: keep-alive
@@ -123,7 +123,7 @@ Transfer-Encoding: chunked
123123

124124
1
125125

126-
1ma@home:~$ hey -n 200 -H "Cookie: PHPSESSID=9mcjmlsh9gp0conq7i5rci7is8gfn6s0gh8r3eub3qpac09gnh21;" http://localhost/visit-counter.php
126+
$ hey -n 200 -H "Cookie: PHPSESSID=9mcjmlsh9gp0conq7i5rci7is8gfn6s0gh8r3eub3qpac09gnh21;" http://localhost/visit-counter.php
127127
All requests done.
128128

129129
Summary:
@@ -176,7 +176,7 @@ one, just as if it was not received at all. Unfortunately the phpredis handler i
176176
the HTTP request.
177177

178178
```bash
179-
1ma@home:~$ http -v http://localhost/visit-counter.php Cookie:PHPSESSID=madeupkey
179+
$ http -v http://localhost/visit-counter.php Cookie:PHPSESSID=madeupkey
180180
GET / HTTP/1.1
181181
Accept: */*
182182
Accept-Encoding: gzip, deflate
@@ -195,7 +195,7 @@ Pragma: no-cache
195195

196196
1
197197

198-
1ma@home:~$ redis-cli
198+
$ redis-cli
199199

200200
127.0.0.1:6379> keys *
201201
1) "PHPREDIS_SESSION:madeupkey"
@@ -218,24 +218,44 @@ In order to run the integration test suite just type `composer test` and it will
218218
the dev dependencies, setting up the testing containers and running the tests.
219219

220220
```bash
221-
1ma@home:~/RedisSessionHandler$ composer test
221+
$ composer test
222222
Loading composer repositories with package information
223223
Installing dependencies (including require-dev) from lock file
224224
Nothing to install or update
225225
Generating autoload files
226226
> docker-compose -f tests/docker-compose.yml up -d
227227
tests_redis_1 is up-to-date
228-
tests_fpm_1 is up-to-date
229-
tests_monitor_1 is up-to-date
228+
tests_fpm56_1 is up-to-date
229+
tests_fpm71_1 is up-to-date
230+
tests_fpm70_1 is up-to-date
231+
tests_redis_monitor_1 is up-to-date
230232
tests_nginx_1 is up-to-date
231-
tests_testrunner_1 is up-to-date
232-
> docker exec -t tests_testrunner_1 sh -c 'vendor/bin/phpunit'
233+
tests_runner_1 is up-to-date
234+
> docker exec -t tests_runner_1 sh -c "TARGET=php56 vendor/bin/phpunit"
233235
stty: standard input
234-
PHPUnit 5.7.21 by Sebastian Bergmann and contributors.
236+
PHPUnit 6.2.3 by Sebastian Bergmann and contributors.
235237

236238
................ 16 / 16 (100%)
237239

238-
Time: 582 ms, Memory: 6.00MB
240+
Time: 1.39 seconds, Memory: 4.00MB
241+
242+
OK (16 tests, 54 assertions)
243+
> docker exec -t tests_runner_1 sh -c "TARGET=php70 vendor/bin/phpunit"
244+
stty: standard input
245+
PHPUnit 6.2.3 by Sebastian Bergmann and contributors.
246+
247+
................ 16 / 16 (100%)
248+
249+
Time: 1.29 seconds, Memory: 4.00MB
250+
251+
OK (16 tests, 54 assertions)
252+
> docker exec -t tests_runner_1 sh -c "TARGET=php71 vendor/bin/phpunit"
253+
stty: standard input
254+
PHPUnit 6.2.3 by Sebastian Bergmann and contributors.
255+
256+
................ 16 / 16 (100%)
257+
258+
Time: 1.08 seconds, Memory: 4.00MB
239259

240260
OK (16 tests, 54 assertions)
241261
```
@@ -253,26 +273,53 @@ enabled and the FPM container will automatically choose the phpredis save handle
253273
```
254274

255275
```bash
256-
1ma@home:~/RedisSessionHandler$ composer test
276+
$ composer test
257277
Loading composer repositories with package information
258278
Installing dependencies (including require-dev) from lock file
259279
Nothing to install or update
260280
Generating autoload files
261281
> docker-compose -f tests/docker-compose.yml up -d
262282
tests_redis_1 is up-to-date
263-
tests_monitor_1 is up-to-date
264-
tests_fpm_1 is up-to-date
283+
tests_fpm56_1 is up-to-date
284+
tests_fpm71_1 is up-to-date
285+
tests_fpm70_1 is up-to-date
286+
tests_redis_monitor_1 is up-to-date
265287
tests_nginx_1 is up-to-date
266-
tests_testrunner_1 is up-to-date
267-
> docker exec -t tests_testrunner_1 sh -c 'vendor/bin/phpunit'
288+
tests_runner_1 is up-to-date
289+
> docker exec -t tests_runner_1 sh -c "TARGET=php56 vendor/bin/phpunit"
268290
stty: standard input
269-
PHPUnit 5.7.21 by Sebastian Bergmann and contributors.
291+
PHPUnit 6.2.3 by Sebastian Bergmann and contributors.
270292

271293
...FFF..FF...... 16 / 16 (100%)
272294

273-
Time: 695 ms, Memory: 6.00MB
295+
Time: 1.15 seconds, Memory: 4.00MB
274296

275297
There were 5 failures:
276298

277299
~~snip~~
278300
```
301+
302+
303+
### Manual testing
304+
305+
The `docker-compose.yml` file is configured to expose a random TCP port linked to the nginx container port 80. After running
306+
`composer env-up` or `composer test` you can see which one was assigned with `docker ps`. With that knowledge you can
307+
poke the testing webserver directly from your local machine using either a regular browser, cURL, wrk or similar tools.
308+
309+
Depending on your Docker setup you might need to replace `localhost` with the IP of the virtual machine that actually runs the Docker daemon:
310+
311+
```bash
312+
$ curl -i localhost:32768/visit-counter.php?with_custom_cookie_params
313+
HTTP/1.1 200 OK
314+
Server: nginx/1.13.1
315+
Date: Sat, 15 Jul 2017 09:40:25 GMT
316+
Content-Type: text/html; charset=UTF-8
317+
Transfer-Encoding: chunked
318+
Connection: keep-alive
319+
Set-Cookie: PHPSESSID=tqm3akv0t5gdf25lf1gcspn479aa989jp0mltc3nuun2b47c7g10; expires=Sun, 16-Jul-2017 09:40:25 GMT; Max-Age=86400; path=/; secure; HttpOnly
320+
Expires: Thu, 19 Nov 1981 08:52:00 GMT
321+
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
322+
Pragma: no-cache
323+
324+
1
325+
```

0 commit comments

Comments
 (0)