Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

134 lines (93 sloc) 4.919 kb
Sag Changes
Version 0.5.1
Fixed Bugs
* Previously PUT was caching CouchDB's response, which created unexpected
results (the actual data being POST'd was expected to be cached). This is
now fixed: that data provided to post() is combined with the server's
response to create a cacheable object whose headers will not be entirely
accurate. POST is still not cached because CouchDB does not respond with an
E-tag to cache against. Thanks to Peter Kruithof for reporting and original
patch. (closes #17)
* setAttachment() now properly URL encodes the ?rev parameter when you
specify the document's _rev (last function parameter). Thanks to skyshard
for reporting the issue and the fix. (closes #19)
Version 0.5.0
Breaking Changes
* These Sag class functions now return the class's current instance ($this):
decode, setDatabase, setOpenTimeout, setRWTimeout, setCache,
setStaleDefault. This allows configuration functions to be chained before
you make a call to CouchDB. (closes #14)
* Sag->setDatabase() will now URL encode database names that are passed to
it. This may break your code if you were already encoding database names
before passing them. For example,
`$sag->setDatabase(urlencode('some/db'));` will no longer work as expected.
Instead use `$sag->setDatabase('some/db');`.
New Features
* Sag now supports connection pooling for sockets with HTTP's Connection:
Keep-Alive. This means Sag no longer opens and closes a socket for each
request made (better performance). No management is provided for the
maximum number of sockets that can be kept open, since this should be done
at the operating system level (ulimit or pam for Linux/Unix). (closes #15)
* Adding support for CouchDB 1.1.x, while dropping support for 0.11.x - most
of, or all of, 0.11.x will still work with Sag.
* Added the examples/ directory with an example of how one could store PHP
session data in CouchDB. Related blog post:
* Added tests/bootstrap.php to make running the tests easier.
Fixed Bugs
* All functions that take query parameters as function parameters, such as
'startkey' in Sag->getAllDocs(), now URL encode those parameters before
adding them to the URL. However, functions that you pass whole URLs to,
like Sag->get(), do not deconstruct the URL for parameters - you must do
your own URL encoding when providing a full URL to a function.
* Sag->bulk() no longer attempts to cache. This is not a breaking change,
because it was never able to successfully cache before.
Version 0.4.0
New Features
* When initiated, Sag checks the PHP environment for unsupported
error_reporting values. Thanks to Simeon Willbanks. (closes #8, #9)
* setStaleDefault() was created to easily allow developers the choice of
making all of their GET and HEAD requests use stale=ok or not. This is
great for production systems that do all their querying against stale
views, allowing another process to trigger index updates based on the
_changes feed.
* Now when calling setDatabase() you can tell it to create the database if it
does not exist (uses an HTTP GET to check if it exists). If the database
does not exist, then createDatabase() is called to create it.
Fixed Bugs
* Fixed a bug where an invalid Content-Size was being sent even if no data
was passed to the packet.
* Fixed a bug in POST where an incorrect variable name was being used,
allowing improper paths to be sent to CouchDB.
* When caching, bulk() now iterates over the documents it's trying to update
and sends them to the cache. If a document's _deleted property is true,
then it's removed from the cache.
Version 0.3
New Features
* Cookie based authentication. Thanks to Benjamin Young. (closes #1)
* Cache results with the SagCache interface. Currently supports caching to
disk with SagFileCache.
* Support for HEAD requests. Thanks to Doug Cone. (closes #3)
* You can now POST to any URI in the database, adding a second $uri parameter
to the post() function. Allows POST'ing to views. Thanks to Peter Kruithof.
(closes #7)
* Exposing CouchDB's runtime _stats interface with the getStats() function.
Fixed Bugs
* getAllDocs() no longer always includes documents. Thanks to
Version 0.2
* Officially adding support for 1.0.x and dropping support for 0.10.x.
New Features
* Native support for attachments.
* Internal support for different Content-Type values.
* Can set timeout on socket connection.
* Can set timeout on socket read/write.
Fixed Bugs
* Removed leading white space in header values.
* Fixed ending line breaks when sending data via a PUT.
Jump to Line
Something went wrong with that request. Please try again.