ZF-8578: Zend_Service_Amazon_S3::cleanBucket() does not clean all objects as documentation implies

Description

From what I see in trunk cleanBucket is still removing only objects returned by

$objects = $this->getObjectsByBucket($bucket);

This is wrong as it would return default value by amazon which is 1000 objects hence not cleaning whole bucket

Several options: - Documentation asks for users to call cleanBucket() until false returned - cleanBucket() makes use of $params argument that is currently in trunk (no stable release of it)

More on this

Excerpt from http://developer.amazonwebservices.com/connect/… Efficiently Deleting Objects

Deleting a large number of objects for which you don't have an external list can be made faster and easier by using the marker function of the LIST operation. Call LIST to get an initial set of objects to DELETE. Step through the list deleting each and saving the key of the last object in the list. Call LIST again using the last object deleted as a marker, and repeat this process until all desired objects have been deleted.

Comments

Fixed on trunk (commit 24047): added a while to delete more than 1000 objects using the suggestion reported here (Efficiently Deleting Objects): http://developer.amazonwebservices.com/connect/…

Resolved in branches/release-1.11 (commit 24048)