flownative / flow-aws-s3

Amazon S3 adaptor for Neos and Flow
MIT License
18 stars 33 forks source link

publishCollection S3Target #7

Closed mkuiphuis closed 7 years ago

mkuiphuis commented 8 years ago

Just updated our system from Flow 3.0 to Flow 3.0.2. After this update, clearing the cache, and warming up the cache I got the following PHP Fatal Error:

PHP Fatal error: Declaration of Flownative\Aws\S3\S3Target::publishCollection() must be compatible with TYPO3\Flow\Resource\Target\TargetInterface::publishCollection(TYPO3\Flow\Resource\CollectionInterface $collection) in //var/www/system/Packages/Application/Flownative.Aws.S3/Classes/S3Target.php on line 24

I got it working again by changing the code below:

/**
     * Publishes the whole collection to this target
     *
     * @param \TYPO3\Flow\Resource\Collection $collection The collection to publish
     * @return void
     * @throws Exception
     */
    public function publishCollection(Collection $collection)
    {
    ....
    }

into

/**
     * Publishes the whole collection to this target
     *
     * @param \TYPO3\Flow\Resource\CollectionInterface $collection The collection to publish
     * @return void
     * @throws Exception
     */
    public function publishCollection(CollectionInterface $collection)
    {
    .....
    }

(changed Collection to CollectionInterface)

I haven't tested this on Flow 3.0.0 or 3.0.1 though....

kdambekalns commented 7 years ago

Fixed since 2016-03-08 and released with version 1.1.0-beta1.