I mostly use this demo application to keep myself up to date with the various changes introduced by new (major) Symfony releases.
- redis-server (production environment)
vendor/bin/phpunit
$ curl -X POST --data-binary 'Lorem ipsum' http://pastebin.tld
# 201 Created
# Location: /54ae
# X-Paste-Token: 99d6a7cb2f
http://pastebin.tld/54ae
$ curl http://pastebin.tld/54ae
# 200 OK
Lorem ipsum
$ curl -H 'X-Paste-Token: 99d6a7cb2f' -X PUT --data-binary 'Lipsum lorem' \
http://pastebin.tld/54ae
# 204 No Content
$ curl http://pastebin.tld/54ae
# 200 OK
Lipsum lorem
$ curl -H 'X-Paste-Token: 99d6a7cb2f' -X DELETE \
http://pastebin.tld/54ae
# 204 No Content
Feel free to submit a pull request or create an issue.
alcohol/pastebin-php is licensed under the MIT license.