Skip to content

Commit

Permalink
Merge pull request #8 from daniellienert/update-3
Browse files Browse the repository at this point in the history
Update the code for Neos 3.0 compatibility
  • Loading branch information
daniellienert authored Mar 11, 2017
2 parents a600736 + f611e50 commit 10a894a
Show file tree
Hide file tree
Showing 15 changed files with 131 additions and 57 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ language: php
matrix:
include:
- php: 7.0
- php: 5.6
sudo: false
before_install:
- export NEOS_TARGET_VERSION=2.3
- export NEOS_TARGET_VERSION=3.0
- cd ..
- git clone https://github.com/neos/neos-base-distribution.git -b ${NEOS_TARGET_VERSION}
- cd neos-base-distribution
Expand Down
8 changes: 4 additions & 4 deletions Classes/Command/MetaDataCommandController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

use Neos\MetaData\Extractor\Domain\ExtractionManager;
use Neos\MetaData\Extractor\Exception\ExtractorException;
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Flow\Cli\CommandController;
use TYPO3\Media\Domain\Model\Asset;
use TYPO3\Media\Domain\Repository\AssetRepository;
use Neos\Flow\Annotations as Flow;
use Neos\Flow\Cli\CommandController;
use Neos\Media\Domain\Model\Asset;
use Neos\Media\Domain\Repository\AssetRepository;

/**
* @Flow\Scope("singleton")
Expand Down
16 changes: 8 additions & 8 deletions Classes/Domain/ExtractionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
use Neos\MetaData\Extractor\Domain\Extractor\ExtractorInterface;
use Neos\MetaData\Extractor\Exception\ExtractorException;
use Neos\MetaData\MetaDataManager;
use TYPO3\Media\Domain\Model\ImageVariant;
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Flow\Object\ObjectManager;
use TYPO3\Flow\Reflection\ReflectionService;
use TYPO3\Flow\Resource\Resource as FlowResource;
use TYPO3\Media\Domain\Model\Asset;
use TYPO3\Media\Domain\Model\AssetCollection;
use TYPO3\Media\Domain\Model\Tag;
use Neos\Media\Domain\Model\ImageVariant;
use Neos\Flow\Annotations as Flow;
use Neos\Flow\ObjectManagement\ObjectManager;
use Neos\Flow\Reflection\ReflectionService;
use Neos\Flow\ResourceManagement\PersistentResource as FlowResource;
use Neos\Media\Domain\Model\Asset;
use Neos\Media\Domain\Model\AssetCollection;
use Neos\Media\Domain\Model\Tag;

/**
* ExtractionManager
Expand Down
4 changes: 2 additions & 2 deletions Classes/Domain/Extractor/AbstractExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
* source code.
*/

use TYPO3\Flow\Utility\MediaTypes;
use TYPO3\Flow\Resource\Resource as PersistentResource;
use Neos\Utility\MediaTypes;
use Neos\Flow\ResourceManagement\PersistentResource as PersistentResource;

abstract class AbstractExtractor implements ExtractorInterface
{
Expand Down
4 changes: 2 additions & 2 deletions Classes/Domain/Extractor/ExifExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
use Neos\MetaData\Extractor\Converter\CoordinatesConverter;
use Neos\MetaData\Extractor\Converter\NumberConverter;
use Neos\MetaData\Extractor\Converter\DateConverter;
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Flow\Resource\Resource as FlowResource;
use Neos\Flow\Annotations as Flow;
use Neos\Flow\ResourceManagement\PersistentResource as FlowResource;

/**
* @see http://www.cipa.jp/std/documents/e/DC-008-Translation-2016-E.pdf Official standard
Expand Down
2 changes: 1 addition & 1 deletion Classes/Domain/Extractor/ExtractorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

use Neos\MetaData\Domain\Collection\MetaDataCollection;
use TYPO3\Flow\Resource\Resource as PersistentResource;
use Neos\Flow\ResourceManagement\PersistentResource as PersistentResource;

interface ExtractorInterface
{
Expand Down
4 changes: 2 additions & 2 deletions Classes/Domain/Extractor/IptcIimExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
use Neos\MetaData\Extractor\Specifications\Iptc;
use Neos\MetaData\Domain\Collection\MetaDataCollection;
use Neos\MetaData\Domain\Dto;
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Flow\Resource\Resource as FlowResource;
use Neos\Flow\Annotations as Flow;
use Neos\Flow\ResourceManagement\PersistentResource as FlowResource;

/**
* @Flow\Scope("singleton")
Expand Down
19 changes: 9 additions & 10 deletions Classes/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@
*/

use Neos\MetaData\Extractor\Domain\ExtractionManager;
use TYPO3\Flow\Configuration\ConfigurationManager;
use TYPO3\Flow\Core\Booting\Sequence;
use TYPO3\Flow\Core\Booting\Step;
use TYPO3\Flow\Core\Bootstrap;
use TYPO3\Flow\Package\Package as BasePackage;
use TYPO3\Media\Domain\Model\Asset;
use TYPO3\Media\Domain\Repository\AssetRepository;
use Neos\Flow\Configuration\ConfigurationManager;
use Neos\Flow\Core\Booting\Sequence;
use Neos\Flow\Core\Booting\Step;
use Neos\Flow\Core\Bootstrap;
use Neos\Flow\Package\Package as BasePackage;

/**
* {@inheritDoc}
Expand All @@ -31,13 +29,14 @@ class Package extends BasePackage
public function boot(Bootstrap $bootstrap)
{
$dispatcher = $bootstrap->getSignalSlotDispatcher();
$dispatcher->connect(AssetRepository::class, 'assetDeleted', ExtractionManager::class, 'extractMetaData');
$dispatcher->connect(AssetService::class, 'assetRemoved', ExtractionManager::class, 'extractMetaData');
$dispatcher->connect(AssetService::class, 'assetResourceReplaced', ExtractionManager::class, 'extractMetaData');
$package = $this;
$dispatcher->connect(
Sequence::class,
'afterInvokeStep',
function (Step $step) use ($package, $bootstrap) {
if ($step->getIdentifier() === 'typo3.flow:reflectionservice') {
if ($step->getIdentifier() === 'neos.flow:reflectionservice') {
$package->registerExtractionSlot($bootstrap);
}
}
Expand All @@ -56,7 +55,7 @@ public function registerExtractionSlot(Bootstrap $bootstrap)

if (isset($settings['realtimeExtraction']['enabled']) && $settings['realtimeExtraction']['enabled'] === true) {
$dispatcher = $bootstrap->getSignalSlotDispatcher();
$dispatcher->connect(Asset::class, 'assetCreated', ExtractionManager::class, 'extractMetaData');
$dispatcher->connect(AssetService::class, 'assetCreated', ExtractionManager::class, 'extractMetaData');
}
}
}
2 changes: 1 addition & 1 deletion Classes/ResourceManagement/ResourcePersistedSlot.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

use Neos\MetaData\Extractor\Domain\ExtractionManager;
use TYPO3\Flow\Annotations as Flow;
use Neos\Flow\Annotations as Flow;

/**
* Resource Persisted Slot
Expand Down
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![StyleCI](https://styleci.io/repos/56771923/shield?branch=master)](https://styleci.io/repos/56771923) [![Build Status](https://travis-ci.org/neos/metadata-extractor.svg?branch=master)](https://travis-ci.org/neos/metadata-extractor)
[![StyleCI](https://styleci.io/repos/56771923/shield?branch=master)](https://styleci.io/repos/56771923) [![Build Status](https://travis-ci.org/neos/metadata-extractor.svg?branch=master)](https://travis-ci.org/neos/metadata-extractor) [![Latest Stable Version](https://poser.pugx.org/jms/metadata/v/stable)](https://packagist.org/packages/neos/metadata-extractor) [![Total Downloads](https://poser.pugx.org/jms/metadata/downloads)](https://packagist.org/packages/neos/metadata-extractor)

# Neos Meta Data Extractor Package
This package handles extraction of meta data from assets.
Expand Down
8 changes: 4 additions & 4 deletions Tests/Functional/AbstractExtractorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
*/

use Neos\MetaData\Domain\Dto\AbstractMetaDataDto;
use TYPO3\Flow\Resource\ResourceManager;
use TYPO3\Flow\Utility\Files;
use TYPO3\Media\Domain\Model\Asset;
use TYPO3\Media\Tests\Functional\AbstractTest;
use Neos\Flow\ResourceManagement\ResourceManager;
use Neos\Utility\Files;
use Neos\Media\Domain\Model\Asset;
use Neos\Media\Tests\Functional\AbstractTest;

abstract class AbstractExtractorTest extends AbstractTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

use Neos\MetaData\Extractor\Converter\CoordinatesConverter;
use TYPO3\Flow\Tests\UnitTestCase;
use Neos\Flow\Tests\UnitTestCase;

class CoordinatesConverterTest extends UnitTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

use Neos\MetaData\Extractor\Converter\DateConverter;
use TYPO3\Flow\Tests\UnitTestCase;
use Neos\Flow\Tests\UnitTestCase;

class DateConverterTest extends UnitTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

use Neos\MetaData\Extractor\Converter\NumberConverter;
use TYPO3\Flow\Tests\UnitTestCase;
use Neos\Flow\Tests\UnitTestCase;

class NumberConverterTest extends UnitTestCase
{
Expand Down
110 changes: 93 additions & 17 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,96 @@
{
"name": "neos/metadata-extractor",
"description": "Extracts meta data from files into a neos/metadata data structure",
"type": "neos-package",
"license": "MIT",
"require": {
"ext-exif": "*",
"neos/metadata": "*"
},
"autoload": {
"psr-4": {
"Neos\\MetaData\\Extractor\\": "Classes"
}
},
"extra": {
"neos": {
"package-key": "Neos.MetaData.Extractor"
}
"name": "neos/metadata-extractor",
"description": "Extracts meta data from files into a neos/metadata data structure",
"type": "neos-package",
"license": "MIT",
"require": {
"neos/flow": "^4.0",
"neos/media": "^3.0",
"neos/metadata": "^2.0",
"neos/utility-mediatypes": "^4.0"
},
"autoload": {
"psr-4": {
"Neos\\MetaData\\Extractor\\": "Classes"
}
},
"extra": {
"neos": {
"package-key": "Neos.MetaData.Extractor"
},
"applied-flow-migrations": [
"TYPO3.FLOW3-201201261636",
"TYPO3.Fluid-201205031303",
"TYPO3.FLOW3-201205292145",
"TYPO3.FLOW3-201206271128",
"TYPO3.FLOW3-201209201112",
"TYPO3.Flow-201209251426",
"TYPO3.Flow-201211151101",
"TYPO3.Flow-201212051340",
"TYPO3.TypoScript-130516234520",
"TYPO3.TypoScript-130516235550",
"TYPO3.TYPO3CR-130523180140",
"TYPO3.Neos.NodeTypes-201309111655",
"TYPO3.Flow-201310031523",
"TYPO3.Flow-201405111147",
"TYPO3.Neos-201407061038",
"TYPO3.Neos-201409071922",
"TYPO3.TYPO3CR-140911160326",
"TYPO3.Neos-201410010000",
"TYPO3.TYPO3CR-141101082142",
"TYPO3.Neos-20141113115300",
"TYPO3.Fluid-20141113120800",
"TYPO3.Flow-20141113121400",
"TYPO3.Fluid-20141121091700",
"TYPO3.Neos-20141218134700",
"TYPO3.Fluid-20150214130800",
"TYPO3.Neos-20150303231600",
"TYPO3.TYPO3CR-20150510103823",
"TYPO3.Flow-20151113161300",
"TYPO3.Form-20160601101500",
"TYPO3.Flow-20161115140400",
"TYPO3.Flow-20161115140430",
"Neos.Flow-20161124204700",
"Neos.Flow-20161124204701",
"Neos.Twitter.Bootstrap-20161124204912",
"Neos.Form-20161124205254",
"Neos.Flow-20161124224015",
"Neos.Party-20161124225257",
"Neos.Eel-20161124230101",
"Neos.Kickstart-20161124230102",
"Neos.Setup-20161124230842",
"Neos.Imagine-20161124231742",
"Neos.Media-20161124233100",
"Neos.NodeTypes-20161125002300",
"Neos.SiteKickstarter-20161125002311",
"Neos.Neos-20161125002322",
"Neos.ContentRepository-20161125012000",
"Neos.Fusion-20161125013710",
"Neos.Setup-20161125014759",
"Neos.SiteKickstarter-20161125095901",
"Neos.Fusion-20161125104701",
"Neos.NodeTypes-20161125104800",
"Neos.Neos-20161125104802",
"Neos.Kickstarter-20161125110814",
"Neos.Neos-20161125122412",
"Neos.Flow-20161125124112",
"TYPO3.FluidAdaptor-20161130112935",
"Neos.Fusion-20161201202543",
"Neos.Neos-20161201222211",
"Neos.Fusion-20161202215034",
"Neos.Fusion-20161219092345",
"Neos.ContentRepository-20161219093512",
"Neos.Media-20161219094126",
"Neos.Neos-20161219094403",
"Neos.Neos-20161219122512",
"Neos.Fusion-20161219130100",
"Neos.Neos-20161220163741",
"Neos.SwiftMailer-20161130105617",
"Neos.Neos-20170115114620",
"Neos.Fusion-20170120013047",
"Neos.Flow-20170125103800",
"Neos.Seo-20170127154600",
"Neos.Flow-20170127183102"
]
}
}

0 comments on commit 10a894a

Please sign in to comment.