diff --git a/lib/Alchemy/Phrasea/Application/Helper/FilesystemAware.php b/lib/Alchemy/Phrasea/Application/Helper/FilesystemAware.php index 213b356f31..ba384831f3 100644 --- a/lib/Alchemy/Phrasea/Application/Helper/FilesystemAware.php +++ b/lib/Alchemy/Phrasea/Application/Helper/FilesystemAware.php @@ -9,8 +9,10 @@ */ namespace Alchemy\Phrasea\Application\Helper; +use Alchemy\Phrasea\Filesystem\PhraseanetFilesystem as Filesystem; use Neutron\TemporaryFilesystem\Manager; -use Symfony\Component\Filesystem\Filesystem; + +// use Symfony\Component\Filesystem\Filesystem; trait FilesystemAware { diff --git a/lib/Alchemy/Phrasea/Command/Developer/Behat.php b/lib/Alchemy/Phrasea/Command/Developer/Behat.php index 717334e915..f4e8e3df45 100644 --- a/lib/Alchemy/Phrasea/Command/Developer/Behat.php +++ b/lib/Alchemy/Phrasea/Command/Developer/Behat.php @@ -12,9 +12,11 @@ namespace Alchemy\Phrasea\Command\Developer; use Alchemy\Phrasea\Command\Command; +use Alchemy\Phrasea\Filesystem\PhraseanetFilesystem as Filesystem; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Filesystem\Filesystem; + +// use Symfony\Component\Filesystem\Filesystem; class Behat extends Command { diff --git a/lib/Alchemy/Phrasea/Command/Developer/RegenerateSqliteDb.php b/lib/Alchemy/Phrasea/Command/Developer/RegenerateSqliteDb.php index 9d1f07394f..03f12ebd99 100644 --- a/lib/Alchemy/Phrasea/Command/Developer/RegenerateSqliteDb.php +++ b/lib/Alchemy/Phrasea/Command/Developer/RegenerateSqliteDb.php @@ -15,6 +15,7 @@ use Alchemy\Phrasea\Border\File; use Alchemy\Phrasea\Border\Manager; use Alchemy\Phrasea\Command\Command; use Alchemy\Phrasea\ControllerProvider\Api\V2; +use Alchemy\Phrasea\Filesystem\PhraseanetFilesystem as Filesystem; use Alchemy\Phrasea\Media\SubdefSubstituer; use Alchemy\Phrasea\Model\Entities\AggregateToken; use Alchemy\Phrasea\Model\Entities\ApiApplication; @@ -48,7 +49,9 @@ use Doctrine\ORM\Tools\SchemaTool; use Gedmo\Timestampable\TimestampableListener; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Filesystem\Filesystem; + +// use Symfony\Component\Filesystem\Filesystem; + class RegenerateSqliteDb extends Command { diff --git a/lib/Alchemy/Phrasea/Controller/Admin/FeedController.php b/lib/Alchemy/Phrasea/Controller/Admin/FeedController.php index 4180cb1d84..6ae0aaf195 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/FeedController.php +++ b/lib/Alchemy/Phrasea/Controller/Admin/FeedController.php @@ -11,6 +11,7 @@ namespace Alchemy\Phrasea\Controller\Admin; use Alchemy\Phrasea\Controller\Controller; +use Alchemy\Phrasea\Filesystem\PhraseanetFilesystem as Filesystem; use Alchemy\Phrasea\Model\Entities\Feed; use Alchemy\Phrasea\Model\Entities\FeedPublisher; use Alchemy\Phrasea\Model\Repositories\FeedPublisherRepository; @@ -20,12 +21,12 @@ use Doctrine\Common\Persistence\ObjectManager; use MediaAlchemyst\Alchemyst; use MediaAlchemyst\Specification\Image; use MediaVorus\Media\MediaInterface; -use MediaVorus\MediaVorus; -use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; +// use Symfony\Component\Filesystem\Filesystem; + class FeedController extends Controller { public function listFeedsAction() diff --git a/lib/Alchemy/Phrasea/ControllerProvider/Minifier.php b/lib/Alchemy/Phrasea/ControllerProvider/Minifier.php index 93e76f7b61..7564c344cf 100644 --- a/lib/Alchemy/Phrasea/ControllerProvider/Minifier.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Minifier.php @@ -12,11 +12,13 @@ namespace Alchemy\Phrasea\ControllerProvider; use Alchemy\Phrasea\Controller\MinifierController; +use Alchemy\Phrasea\Filesystem\PhraseanetFilesystem as Filesystem; +use Silex\Application; use Silex\ControllerCollection; use Silex\ControllerProviderInterface; -use Silex\Application; use Silex\ServiceProviderInterface; -use Symfony\Component\Filesystem\Filesystem; + +// use Symfony\Component\Filesystem\Filesystem; class Minifier implements ControllerProviderInterface, ServiceProviderInterface { diff --git a/lib/Alchemy/Phrasea/Core/Thumbnail/AbstractThumbnailManager.php b/lib/Alchemy/Phrasea/Core/Thumbnail/AbstractThumbnailManager.php index eb570c383e..1e19d9f8f1 100644 --- a/lib/Alchemy/Phrasea/Core/Thumbnail/AbstractThumbnailManager.php +++ b/lib/Alchemy/Phrasea/Core/Thumbnail/AbstractThumbnailManager.php @@ -3,14 +3,16 @@ namespace Alchemy\Phrasea\Core\Thumbnail; use Alchemy\Phrasea\Application; +use Alchemy\Phrasea\Filesystem\PhraseanetFilesystem as Filesystem; use MediaAlchemyst\Alchemyst; use MediaAlchemyst\Specification\Image as ImageSpecification; use MediaVorus\Media\Image; use MediaVorus\Media\MediaInterface; use MediaVorus\Media\Video; -use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\HttpFoundation\File\File; +//use Symfony\Component\Filesystem\Filesystem; + abstract class AbstractThumbnailManager { /** diff --git a/lib/Alchemy/Phrasea/Filesystem/FilesystemService.php b/lib/Alchemy/Phrasea/Filesystem/FilesystemService.php index dac1798834..df376fbd78 100644 --- a/lib/Alchemy/Phrasea/Filesystem/FilesystemService.php +++ b/lib/Alchemy/Phrasea/Filesystem/FilesystemService.php @@ -17,11 +17,11 @@ use MediaAlchemyst\Specification\SpecificationInterface; class FilesystemService { /** - * @var \Symfony\Component\Filesystem\Filesystem + * @var PhraseanetFilesystem */ private $filesystem; - public function __construct(\Symfony\Component\Filesystem\Filesystem $filesystem) + public function __construct(PhraseanetFilesystem $filesystem) { $this->filesystem = $filesystem; } diff --git a/lib/Alchemy/Phrasea/Filesystem/FilesystemServiceProvider.php b/lib/Alchemy/Phrasea/Filesystem/FilesystemServiceProvider.php index 2b181f6ef4..fb8ed864f4 100644 --- a/lib/Alchemy/Phrasea/Filesystem/FilesystemServiceProvider.php +++ b/lib/Alchemy/Phrasea/Filesystem/FilesystemServiceProvider.php @@ -10,11 +10,13 @@ namespace Alchemy\Phrasea\Filesystem; +use Alchemy\Phrasea\Filesystem\PhraseanetFilesystem as Filesystem; use Neutron\TemporaryFilesystem\Manager; use Neutron\TemporaryFilesystem\TemporaryFilesystem; use Silex\Application; use Silex\ServiceProviderInterface; -use Symfony\Component\Filesystem\Filesystem; + +//use Symfony\Component\Filesystem\Filesystem; class FilesystemServiceProvider implements ServiceProviderInterface { diff --git a/lib/Alchemy/Phrasea/Filesystem/LazaretFilesystemService.php b/lib/Alchemy/Phrasea/Filesystem/LazaretFilesystemService.php index 113bf6839b..171aec6318 100644 --- a/lib/Alchemy/Phrasea/Filesystem/LazaretFilesystemService.php +++ b/lib/Alchemy/Phrasea/Filesystem/LazaretFilesystemService.php @@ -11,11 +11,13 @@ namespace Alchemy\Phrasea\Filesystem; use Alchemy\Phrasea\Border\File; +use Alchemy\Phrasea\Filesystem\PhraseanetFilesystem as Filesystem; use MediaAlchemyst\Alchemyst; use MediaAlchemyst\Exception\ExceptionInterface; use MediaAlchemyst\Specification\Image as ImageSpecification; -use Symfony\Component\Filesystem\Exception\IOException; -use Symfony\Component\Filesystem\Filesystem; + +// use Symfony\Component\Filesystem\Filesystem; + class LazaretFilesystemService { diff --git a/lib/Alchemy/Phrasea/Filesystem/LazaretPathBooker.php b/lib/Alchemy/Phrasea/Filesystem/LazaretPathBooker.php index b6b6fa5bec..e39fe269e0 100644 --- a/lib/Alchemy/Phrasea/Filesystem/LazaretPathBooker.php +++ b/lib/Alchemy/Phrasea/Filesystem/LazaretPathBooker.php @@ -10,8 +10,11 @@ namespace Alchemy\Phrasea\Filesystem; +use Alchemy\Phrasea\Filesystem\PhraseanetFilesystem as Filesystem; use Symfony\Component\Filesystem\Exception\IOException; -use Symfony\Component\Filesystem\Filesystem; + +// use Symfony\Component\Filesystem\Filesystem; + class LazaretPathBooker { diff --git a/lib/Alchemy/Phrasea/Filesystem/PhraseanetFileSystem.php b/lib/Alchemy/Phrasea/Filesystem/PhraseanetFileSystem.php new file mode 100644 index 0000000000..6683900ba0 --- /dev/null +++ b/lib/Alchemy/Phrasea/Filesystem/PhraseanetFileSystem.php @@ -0,0 +1,15 @@ +cache = $cache; } + /** + * @param databox[] $databoxes + */ + public function getGlobalStructureConflictsFromDataboxes(array $databoxes) + { + $fieldsByName = []; + foreach ($databoxes as $databox) { + foreach ($databox->get_meta_structure() as $fieldStructure) { + $name = $fieldStructure->get_name(); + } + } + } + /** * @param databox[] $databoxes * diff --git a/lib/Alchemy/Phrasea/Status/XmlStatusStructureProvider.php b/lib/Alchemy/Phrasea/Status/XmlStatusStructureProvider.php index 4103753942..19d95628d1 100644 --- a/lib/Alchemy/Phrasea/Status/XmlStatusStructureProvider.php +++ b/lib/Alchemy/Phrasea/Status/XmlStatusStructureProvider.php @@ -11,7 +11,9 @@ namespace Alchemy\Phrasea\Status; -use Symfony\Component\Filesystem\Filesystem; +// use Symfony\Component\Filesystem\Filesystem; +use Alchemy\Phrasea\Filesystem\PhraseanetFilesystem as Filesystem; + /** * Provides status structure definition from XML diff --git a/lib/classes/appbox.php b/lib/classes/appbox.php index c75b5cb40e..34ee8e9622 100644 --- a/lib/classes/appbox.php +++ b/lib/classes/appbox.php @@ -17,14 +17,16 @@ use Alchemy\Phrasea\Core\LazyLocator; use Alchemy\Phrasea\Core\Version\AppboxVersionRepository; use Alchemy\Phrasea\Databox\DataboxConnectionProvider; use Alchemy\Phrasea\Databox\DataboxRepository; +use Alchemy\Phrasea\Filesystem\PhraseanetFilesystem as Filesystem; use Doctrine\ORM\Tools\SchemaTool; use MediaAlchemyst\Alchemyst; -use Symfony\Component\Filesystem\Filesystem; -use Symfony\Component\HttpFoundation\File\File as SymfoFile; use Symfony\Component\Finder\Finder; +use Symfony\Component\HttpFoundation\File\File as SymfoFile; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use vierbergenlars\SemVer\version; +// use Symfony\Component\Filesystem\Filesystem; + class appbox extends base { /** diff --git a/lib/classes/module/console/systemClearCache.php b/lib/classes/module/console/systemClearCache.php index 44b6678db0..d52d522fb2 100644 --- a/lib/classes/module/console/systemClearCache.php +++ b/lib/classes/module/console/systemClearCache.php @@ -10,10 +10,9 @@ */ use Alchemy\Phrasea\Command\Command; -use Symfony\Component\Finder\Finder; -use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Finder\Finder; class module_console_systemClearCache extends Command { diff --git a/lib/classes/patch/384alpha2a.php b/lib/classes/patch/384alpha2a.php index 2b405e1a6e..7d17324d3d 100644 --- a/lib/classes/patch/384alpha2a.php +++ b/lib/classes/patch/384alpha2a.php @@ -10,8 +10,11 @@ */ use Alchemy\Phrasea\Application; +use Alchemy\Phrasea\Filesystem\PhraseanetFilesystem as Filesystem; use Symfony\Component\Finder\Finder; -use Symfony\Component\Filesystem\Filesystem; + +// use Symfony\Component\Filesystem\Filesystem; + class patch_384alpha2a implements patchInterface { diff --git a/lib/classes/patch/386alpha3a.php b/lib/classes/patch/386alpha3a.php index 632b244896..5734fd693a 100644 --- a/lib/classes/patch/386alpha3a.php +++ b/lib/classes/patch/386alpha3a.php @@ -10,8 +10,6 @@ */ use Alchemy\Phrasea\Application; -use Symfony\Component\Finder\Finder; -use Symfony\Component\Filesystem\Filesystem; class patch_386alpha3a implements patchInterface { diff --git a/lib/classes/patch/386alpha4a.php b/lib/classes/patch/386alpha4a.php index c6b2e9875a..0abf0b22ee 100644 --- a/lib/classes/patch/386alpha4a.php +++ b/lib/classes/patch/386alpha4a.php @@ -10,8 +10,6 @@ */ use Alchemy\Phrasea\Application; -use Symfony\Component\Finder\Finder; -use Symfony\Component\Filesystem\Filesystem; class patch_386alpha4a implements patchInterface { diff --git a/lib/classes/set/export.php b/lib/classes/set/export.php index 40ba2a2e5a..53dca0a69e 100644 --- a/lib/classes/set/export.php +++ b/lib/classes/set/export.php @@ -9,6 +9,7 @@ */ use Alchemy\Phrasea\Application; +use Alchemy\Phrasea\Filesystem\PhraseanetFilesystem as Filesystem; use Alchemy\Phrasea\Model\Entities\Token; use Alchemy\Phrasea\Model\Entities\User; use Alchemy\Phrasea\Model\Repositories\BasketRepository; @@ -17,7 +18,8 @@ use Alchemy\Phrasea\Model\Serializer\CaptionSerializer; use Alchemy\Phrasea\Out\Module\PDFCgu; use Assert\Assertion; use Doctrine\DBAL\Connection; -use Symfony\Component\Filesystem\Filesystem; + +// use Symfony\Component\Filesystem\Filesystem; class set_export extends set_abstract diff --git a/tests/Alchemy/Tests/Phrasea/Command/Plugin/PluginCommandTestCase.php b/tests/Alchemy/Tests/Phrasea/Command/Plugin/PluginCommandTestCase.php index 69a1c57197..9caf8d5bae 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/Plugin/PluginCommandTestCase.php +++ b/tests/Alchemy/Tests/Phrasea/Command/Plugin/PluginCommandTestCase.php @@ -45,7 +45,7 @@ class PluginCommandTestCase extends \PhraseanetTestCase protected function createFilesystemMock() { - return $this->getMockBuilder('Symfony\Component\Filesystem\Filesystem') + return $this->getMockBuilder('Alchemy\Phrasea\Filesystem\PhraseanetFilesystem') ->disableOriginalConstructor() ->getMock(); } diff --git a/tests/Alchemy/Tests/Phrasea/Command/Setup/PluginResetTest.php b/tests/Alchemy/Tests/Phrasea/Command/Setup/PluginResetTest.php index 0468cbef0d..6a82307a56 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/Setup/PluginResetTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/Setup/PluginResetTest.php @@ -20,7 +20,7 @@ class PluginResetTest extends \PhraseanetTestCase $capturedSource = null; - self::$DI['cli']['filesystem'] = $this->getMockBuilder('Symfony\Component\Filesystem\Filesystem') + self::$DI['cli']['filesystem'] = $this->getMockBuilder('Alchemy\Phrasea\Filesystem\PhraseanetFilesystem') ->disableOriginalConstructor() ->getMock(); self::$DI['cli']['filesystem']->expects($this->once()) diff --git a/tests/Alchemy/Tests/Phrasea/Filesystem/FilesystemServiceTest.php b/tests/Alchemy/Tests/Phrasea/Filesystem/FilesystemServiceTest.php index daa522a4dc..063259d944 100644 --- a/tests/Alchemy/Tests/Phrasea/Filesystem/FilesystemServiceTest.php +++ b/tests/Alchemy/Tests/Phrasea/Filesystem/FilesystemServiceTest.php @@ -11,8 +11,11 @@ namespace Alchemy\Tests\Phrasea\Filesystem; use Alchemy\Phrasea\Filesystem\FilesystemService; +use Alchemy\Phrasea\Filesystem\PhraseanetFilesystem as Filesystem; use Alchemy\Phrasea\Model\RecordInterface; -use Symfony\Component\Filesystem\Filesystem; + +// use Symfony\Component\Filesystem\Filesystem; + class FilesystemServiceTest extends \PHPUnit_Framework_TestCase { diff --git a/tests/Alchemy/Tests/Phrasea/Filesystem/LazaretPathBookerTest.php b/tests/Alchemy/Tests/Phrasea/Filesystem/LazaretPathBookerTest.php index b07fdfebde..0ac3a19da1 100644 --- a/tests/Alchemy/Tests/Phrasea/Filesystem/LazaretPathBookerTest.php +++ b/tests/Alchemy/Tests/Phrasea/Filesystem/LazaretPathBookerTest.php @@ -11,9 +11,12 @@ namespace Alchemy\Tests\Phrasea\Filesystem; use Alchemy\Phrasea\Filesystem\LazaretPathBooker; +use Alchemy\Phrasea\Filesystem\PhraseanetFilesystem as Filesystem; use org\bovigo\vfs\vfsStream; use org\bovigo\vfs\vfsStreamDirectory; -use Symfony\Component\Filesystem\Filesystem; + +// use Symfony\Component\Filesystem\Filesystem; + class LazaretPathBookerTest extends \PHPUnit_Framework_TestCase { diff --git a/tests/Alchemy/Tests/Phrasea/Plugin/Management/AssetsManagerTest.php b/tests/Alchemy/Tests/Phrasea/Plugin/Management/AssetsManagerTest.php index b708269fc9..3c72b29b0c 100644 --- a/tests/Alchemy/Tests/Phrasea/Plugin/Management/AssetsManagerTest.php +++ b/tests/Alchemy/Tests/Phrasea/Plugin/Management/AssetsManagerTest.php @@ -95,7 +95,7 @@ class AssetsManagerTest extends \PhraseanetTestCase private function getFilesystemMock() { - return $this->getMockBuilder('Symfony\Component\Filesystem\Filesystem') + return $this->getMockBuilder('Alchemy\Phrasea\Filesystem\PhraseanetFilesystem') ->disableOriginalConstructor() ->getMock(); } diff --git a/tests/Alchemy/Tests/Phrasea/Plugin/Management/ComposerInstallerTest.php b/tests/Alchemy/Tests/Phrasea/Plugin/Management/ComposerInstallerTest.php index 772224fe92..3f2227728d 100644 --- a/tests/Alchemy/Tests/Phrasea/Plugin/Management/ComposerInstallerTest.php +++ b/tests/Alchemy/Tests/Phrasea/Plugin/Management/ComposerInstallerTest.php @@ -2,11 +2,14 @@ namespace Alchemy\Tests\Phrasea\Plugin\Management; +use Alchemy\Phrasea\Filesystem\PhraseanetFilesystem as Filesystem; use Alchemy\Phrasea\Plugin\Management\ComposerInstaller; use Alchemy\Phrasea\Utilities\ComposerSetup; use Guzzle\Http\Client as Guzzle; use Symfony\Component\Process\ExecutableFinder; -use Symfony\Component\Filesystem\Filesystem; + +// use Symfony\Component\Filesystem\Filesystem; + /** * @group functional diff --git a/tests/Alchemy/Tests/Phrasea/Plugin/PluginTestCase.php b/tests/Alchemy/Tests/Phrasea/Plugin/PluginTestCase.php index 1106bc41ac..cda20da1df 100644 --- a/tests/Alchemy/Tests/Phrasea/Plugin/PluginTestCase.php +++ b/tests/Alchemy/Tests/Phrasea/Plugin/PluginTestCase.php @@ -22,7 +22,7 @@ class PluginTestCase extends \PhraseanetTestCase protected function createFilesystemMock() { - return $this->getMock('Symfony\Component\Filesystem\Filesystem'); + return $this->getMock('Alchemy\Phrasea\Filesystem\PhraseanetFilesystem'); } protected function getSchema()