KnpLabs/Gaufrette — pull request #98 by l3l0 (2012-10-17 16:46:27+00:00)
Title: [WIP] Adaptes improvements and try to make it more simple.

[![Build Status](https://secure.travis-ci.org/l3l0/Gaufrette.png)](http://travis-ci.org/l3l0/Gaufrette)

This PR try to make adapters simple by move some logic from adapters to Filesystem class.
Some of stuff which I done:

* Base adapter is removed, logic is moved to Filesystem
* Checksum is removed from Adapter interface. Default behavior of checksum calculation is added to Filesystem (checksum from content), but it can be delegate when Adapter imeplements ChecksumCalculator
* createFile and createStream are moved to Filesystem but can be delegated to adapters which implement FileFactory or StreamFactory interface
* supportsMetadata is removed instead of new MetadataSupporter interface is added so Adapter which needed metadata should implements it.
* All adapters are simplified
* listDirectory are removed from Adapter interface and from Filesystem. I added listKeys method instead which list directories in same way for all adapters not like before. Adapter keys method should returns all keys (directories should be included). The downside of this can be performance but this can be handled in separate PR.
* I removed all phpunit unit tests and left only functional ones. Instead of phpunit I added phpspec which helps me to work when I rewrite adapters. From this PR all new added stuff should be specified using phpspec.

BC breaks:

* removed listDirectory from Adapter interface
* add isDirectory to Adapter interface
* change params of constructor for Ftp adapter
* change Namespace of Stream classes
* File class working with Filesystem not Adapter interface like before

This PR should resolves issues: #95, #91, #72, #59
Those issues is not up to date then: #96, #93, #92

Right now I need your opinion about the changes. I open for some proposition and any feedback will be appreciated. Stuff should be tested and reviewed carefully. Its right now WIP right now but after some feedback, fixes I will merge it.