StorageManager delete function error

Description

In the storage manager on line 269 a error is thrown when $filesystems is null:
Error: Call to a member function toArray() on null.

Another bug:
Integrated\Bundle\ContentBundle\Document\Content\Embedded\Metadata is no instance of MetadataInterface which makes the Storage object incompatible with the StorageInterface:

Catchable Fatal Error: Argument 4 passed to Integrated\Bundle\ContentBundle\Document\Content\Embedded\Storage:ostWrite() must implement interface Integrated\Common\Content\Document\Storage\Embedded\MetadataInterface, instance of Integrated\Bundle\ContentBundle\Document\Content\Embedded\Metadata given, called in /vagrant/vendor/integrated/storage-bundle/Storage/Manager.php on line 274 and defined

Another bug:
Stack Trace
in vendor/integrated/storage-bundle/Storage/Resolver.php at line 82 -
sprintf(
'No valid public path found for %s in filesystems: %s',
$storage->getIdentifier(),
implode(', ', $storage->getFilesystems())
)
);
}
at ErrorHandler ->handleError ('2', 'implode(): Invalid arguments passed', '/vagrant/vendor/integrated/storage-bundle/Storage/Resolver.php', '82', array('storage' => object(Storage), 'filesystem' => null, 'priority' => object(ArrayCollection), 'key' => 'dzg'))
at implode (', ', object(ArrayCollection))
in vendor/integrated/storage-bundle/Storage/Resolver.php at line 82 +
at Resolver ->resolve (object(Storage))
in vendor/integrated/content-bundle/Document/Content/Embedded/Storage.php at line 76 +
at Storage :ostWrite ('4a1d49ecb5a6f90ac1bf3de47c01d817.jpg', object(ArrayCollection), object(Resolver), object(Metadata))
in vendor/integrated/storage-bundle/Storage/Manager.php at line 274 +
at Manager ->delete (object(Storage))
in vendor/integrated/storage-bundle/Storage/Command/DeleteCommand.php at line 41 +
at DeleteCommand ->execute (object(Manager))
in vendor/integrated/storage-bundle/Storage/Manager.php at line 82 +
at Manager ->handle (object(DeleteCommand))
in vendor/integrated/storage-bundle/EventListener/Doctrine/ODM/FileEventListener.php at line 165 +
at FileEventListener ->onFlush (object(OnFlushEventArgs))
in vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php at line 63 +

Environment

None

Technical tasks

None

Deployment actions

None

Status

Assignee

Unassigned

Reporter

Johan Liefers

Labels

None

Product owner

None

Plan date

None

Follow up date

None

Code reviewer

Johan Liefers

Developer

None

Refiner

None

Dev hour estimate

None

Switches

None

Max. hours

None

External issue ID

None

Error message

None

Min. hours

None

Components

Fix versions

Affects versions

Priority

Major
Configure