diff --git a/app/AppKernel.php b/app/AppKernel.php index b0ebbde..f9a9831 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -22,7 +22,7 @@ public function registerBundles() new \PhpMob\MediaBundle\PhpMobMediaBundle(), new \Oneup\FlysystemBundle\OneupFlysystemBundle(), new \Liip\ImagineBundle\LiipImagineBundle(), - //new \Doctrine\Bundle\PHPCRBundle\DoctrinePHPCRBundle(), + new \Doctrine\Bundle\PHPCRBundle\DoctrinePHPCRBundle(), new \FM\ElfinderBundle\FMElfinderBundle(), // SF3 diff --git a/app/config/config.yml b/app/config/config.yml index 6e15e8c..7dae312 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -4,12 +4,12 @@ imports: - { resource: services.yml } - { resource: "@ChangMin/Resources/config/app/main.yml" } - { resource: "@PhpMobMediaBundle/Resources/config/app/main.yml" } -# - { resource: "@PhpMobMediaBundle/Resources/config/app/phpcr.yml" } + - { resource: "@PhpMobMediaBundle/Resources/config/app/phpcr.yml" } - { resource: "@PhpMobCmsBundle/Resources/config/app/main.yml" } - { resource: "@PhpMobCoreBundle/Resources/config/app/main.yml" } -#parameters: -# phpmob.flysystem.phpcr.connection: media +parameters: + phpmob.flysystem.phpcr.connection: media framework: #esi: ~ @@ -58,17 +58,17 @@ doctrine: default_table_options: charset: utf8mb4 collate: utf8mb4_unicode_ci -# media: -# driver: pdo_mysql -# host: "%database_host%" -# port: "%database_port%" -# dbname: "%database_name%" -# user: "%database_user%" -# password: "%database_password%" -# charset: utf8 -# default_table_options: -# charset: utf8 -# collate: utf8_unicode_ci + media: + driver: pdo_mysql + host: "%database_host%" + port: "%database_port%" + dbname: "%database_name%" + user: "%database_user%" + password: "%database_password%" + charset: utf8 + default_table_options: + charset: utf8 + collate: utf8_unicode_ci orm: auto_generate_proxy_classes: '%kernel.debug%' @@ -82,15 +82,3 @@ swiftmailer: username: '%mailer_user%' password: '%mailer_password%' spool: { type: memory } - -fos_rest: - exception: ~ - view: - formats: - json: true - xml: true - empty_content: 204 - format_listener: - rules: - - { path: '^/api/.*', priorities: ['json'], fallback_format: json, prefer_extension: true } - - { path: '^/', stop: true } diff --git a/composer.json b/composer.json index 9ccfbcf..d26dc2d 100644 --- a/composer.json +++ b/composer.json @@ -21,6 +21,11 @@ }, "require": { "php": "^7.1", + + "doctrine/phpcr-bundle": "^1.3", + "jackalope/jackalope-doctrine-dbal": "^1.3", + "league/flysystem-phpcr": "dev-master", + "doctrine/doctrine-cache-bundle": "^1.3", "doctrine/doctrine-fixtures-bundle": "^2.3", "doctrine/doctrine-migrations-bundle": "^1.2", diff --git a/composer.lock b/composer.lock index 3084875..40ba7ca 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "cf466ada48fdc20141d23bbbbf18b7ea", + "content-hash": "64bcbc871255e85c6bdc36bbb7e2e3e5", "packages": [ { "name": "behat/transliterator", @@ -1319,6 +1319,84 @@ ], "time": "2017-09-18T06:50:20+00:00" }, + { + "name": "doctrine/phpcr-bundle", + "version": "1.3.9", + "source": { + "type": "git", + "url": "https://github.com/doctrine/DoctrinePHPCRBundle.git", + "reference": "659238b6c7ef7b666c19a8eb0898cbeb81dca96e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/DoctrinePHPCRBundle/zipball/659238b6c7ef7b666c19a8eb0898cbeb81dca96e", + "reference": "659238b6c7ef7b666c19a8eb0898cbeb81dca96e", + "shasum": "" + }, + "require": { + "php": "^5.3.9|~7.0", + "phpcr/phpcr-implementation": "2.1.*", + "phpcr/phpcr-utils": "^1.2.7", + "symfony/doctrine-bridge": "~2.3|~3.0", + "symfony/framework-bundle": "~2.3|~3.0" + }, + "conflict": { + "phpcr/phpcr-shell": "<1.0.0-beta1", + "symfony/framework-bundle": "<2.3.27|>=2.4.0,<2.6.6" + }, + "require-dev": { + "doctrine/phpcr-odm": "^1.3.0-rc4", + "matthiasnoback/symfony-dependency-injection-test": "~0.7", + "phpunit/php-code-coverage": "~2.2", + "phpunit/phpunit": "~4.5", + "sllh/php-cs-fixer-styleci-bridge": "~1.1", + "symfony-cmf/testing": "^1.3.0", + "symfony/form": "~2.3|~3.0" + }, + "suggest": { + "burgov/key-value-form-bundle": "to edit assoc multivalue properties. require version 1.0.*", + "doctrine/data-fixtures": "if you want to use the fixture loading.", + "doctrine/doctrine-bundle": "when using jackalope-doctrine-dbal", + "doctrine/phpcr-odm": "if you want to use the odm as well. require version ^1.3", + "jackalope/jackalope-doctrine-dbal": "if you want to use jackalope-doctrine-dbal. require version ^1.3", + "jackalope/jackalope-jackrabbit": "if you want to connect to jackrabbit. require version ^1.3", + "phpcr/phpcr-shell": "If you want native access to PHPCR-Shell to manage the PHPCR repository" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Bundle\\PHPCRBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Lukas Kahwe Smith", + "email": "smith@pooteeweet.org" + } + ], + "description": "Symfony DoctrinePHPCRBundle", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "database", + "odm", + "persistence", + "phpcr" + ], + "time": "2017-07-25T06:18:31+00:00" + }, { "name": "egeloen/ckeditor-bundle", "version": "6.0.1", @@ -2180,6 +2258,126 @@ ], "time": "2014-11-20T16:49:30+00:00" }, + { + "name": "jackalope/jackalope", + "version": "1.3.3", + "source": { + "type": "git", + "url": "https://github.com/jackalope/jackalope.git", + "reference": "0e92e4c9018e32ba147411b4127f20ea6c35113f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jackalope/jackalope/zipball/0e92e4c9018e32ba147411b4127f20ea6c35113f", + "reference": "0e92e4c9018e32ba147411b4127f20ea6c35113f", + "shasum": "" + }, + "require": { + "ext-xml": "*", + "jackalope/jackalope-transport": "*", + "php": "^5.6|^7.0", + "phpcr/phpcr": "~2.1.0,>=2.1.0-beta12", + "phpcr/phpcr-utils": "^1.2.6" + }, + "provide": { + "phpcr/phpcr-implementation": "2.1.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-0": { + "Jackalope\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT", + "Apache-2.0" + ], + "authors": [ + { + "name": "Jackalope Community", + "homepage": "https://github.com/jackalope/jackalope/contributors" + } + ], + "description": "Jackalope PHPCR library", + "homepage": "http://jackalope.github.io", + "keywords": [ + "phpcr" + ], + "time": "2017-04-18T20:09:58+00:00" + }, + { + "name": "jackalope/jackalope-doctrine-dbal", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/jackalope/jackalope-doctrine-dbal.git", + "reference": "67c8f17225dd727b052dbb5a0db7e52061a1896e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jackalope/jackalope-doctrine-dbal/zipball/67c8f17225dd727b052dbb5a0db7e52061a1896e", + "reference": "67c8f17225dd727b052dbb5a0db7e52061a1896e", + "shasum": "" + }, + "require": { + "doctrine/dbal": "^2.4.5", + "jackalope/jackalope": "^1.3.0", + "php": "^5.6|^7.0", + "phpcr/phpcr": "~2.1.2", + "phpcr/phpcr-utils": "^1.2.9" + }, + "provide": { + "jackalope/jackalope-transport": "1.3.0" + }, + "require-dev": { + "phpcr/phpcr-api-tests": "2.1.17", + "phpunit/dbunit": "^1.3", + "phpunit/phpunit": "^5.7", + "psr/log": "^1.0" + }, + "bin": [ + "bin/jackalope" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-0": { + "Jackalope\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT", + "Apache-2.0" + ], + "authors": [ + { + "name": "Jackalope Community", + "homepage": "https://github.com/jackalope/jackalope-jackrabbit/contributors" + } + ], + "description": "Jackalope Transport library for Doctrine DBAL", + "homepage": "http://jackalope.github.io", + "keywords": [ + "doctrine-dbal", + "phpcr", + "transport implementation" + ], + "time": "2017-04-07T11:18:50+00:00" + }, { "name": "jdorn/sql-formatter", "version": "v1.2.17", @@ -2685,6 +2883,57 @@ "description": "An adapter decorator to enable meta-data caching.", "time": "2017-03-20T09:59:34+00:00" }, + { + "name": "league/flysystem-phpcr", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-phpcr.git", + "reference": "f48ff8e3ffbb7e7d19197317c51cbbeaee602fec" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-phpcr/zipball/f48ff8e3ffbb7e7d19197317c51cbbeaee602fec", + "reference": "f48ff8e3ffbb7e7d19197317c51cbbeaee602fec", + "shasum": "" + }, + "require": { + "league/flysystem": "~1.0", + "phpcr/phpcr-implementation": "~2.1.0" + }, + "require-dev": { + "jackalope/jackalope-doctrine-dbal": "~1.0", + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Flysystem\\Phpcr\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "David Buchmann", + "email": "david.buchmann@liip.ch" + } + ], + "description": "Flysystem adapter for the PHP content repository", + "keywords": [ + "Flysystem", + "filesystem", + "phpcr" + ], + "time": "2017-09-25 15:41:09" + }, { "name": "liip/imagine-bundle", "version": "1.9.1", @@ -3240,6 +3489,139 @@ ], "time": "2015-05-17T12:39:23+00:00" }, + { + "name": "phpcr/phpcr", + "version": "2.1.4", + "source": { + "type": "git", + "url": "https://github.com/phpcr/phpcr.git", + "reference": "db909970ca7449d69ccecd1912dedb857817eba7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpcr/phpcr/zipball/db909970ca7449d69ccecd1912dedb857817eba7", + "reference": "db909970ca7449d69ccecd1912dedb857817eba7", + "shasum": "" + }, + "require": { + "php": "^5.6|^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "psr-0": { + "PHPCR": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT", + "Apache-2.0" + ], + "authors": [ + { + "name": "Lukas Kahwe Smith", + "email": "smith@pooteeweet.org" + }, + { + "name": "David Buchmann", + "email": "david@liip.ch" + }, + { + "name": "Karsten Dambekalns", + "email": "karsten@typo3.org" + } + ], + "description": "PHP Content Repository interfaces", + "homepage": "http://phpcr.github.io", + "keywords": [ + "contentrepository", + "phpcr" + ], + "time": "2017-02-08T13:54:11+00:00" + }, + { + "name": "phpcr/phpcr-utils", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/phpcr/phpcr-utils.git", + "reference": "b222c2ad9f4772257106c77da8048f9ced5af111" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpcr/phpcr-utils/zipball/b222c2ad9f4772257106c77da8048f9ced5af111", + "reference": "b222c2ad9f4772257106c77da8048f9ced5af111", + "shasum": "" + }, + "require": { + "php": "^5.6|7.0.x|7.1.x", + "phpcr/phpcr": "~2.1.0", + "symfony/console": "~2.3|~3.0" + }, + "conflict": { + "jackalope/jackalope-jackrabbit": "<1.2.1" + }, + "require-dev": { + "phpunit/phpunit": "^5.7", + "ramsey/uuid": "^3.5" + }, + "suggest": { + "ramsey/uuid": "A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID)." + }, + "bin": [ + "bin/phpcr" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-0": { + "PHPCR\\Util": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT", + "Apache-2.0" + ], + "authors": [ + { + "name": "Lukas Kahwe Smith", + "email": "smith@pooteeweet.org" + }, + { + "name": "David Buchmann", + "email": "david@liip.ch" + }, + { + "name": "Nacho Martín", + "email": "nitram.ohcan@gmail.com" + }, + { + "name": "Daniel Barsotti", + "email": "daniel.barsotti@liip.ch" + } + ], + "description": "PHP Content Repository implementation independant utilities", + "homepage": "http://phpcr.github.io", + "keywords": [ + "cli", + "contentrepository", + "phpcr" + ], + "time": "2017-03-02T07:29:32+00:00" + }, { "name": "phpmob/twig-modify-bundle", "version": "1.1.1", @@ -6339,7 +6721,9 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "league/flysystem-phpcr": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/src/PhpMob/MediaBundle/README.md b/src/PhpMob/MediaBundle/README.md index c7a7047..ed16d9a 100644 --- a/src/PhpMob/MediaBundle/README.md +++ b/src/PhpMob/MediaBundle/README.md @@ -22,3 +22,9 @@ parameters: phpmob.flysystem.phpcr.connection: media ``` + +## Setup Phpcr + +```bash +sf doctrine:phpcr:repository:init +``` diff --git a/src/PhpMob/MediaBundle/Resources/config/app/phpcr.yml b/src/PhpMob/MediaBundle/Resources/config/app/phpcr.yml index 709041b..83a15aa 100644 --- a/src/PhpMob/MediaBundle/Resources/config/app/phpcr.yml +++ b/src/PhpMob/MediaBundle/Resources/config/app/phpcr.yml @@ -18,11 +18,11 @@ services: tags: - { name: "liip_imagine.binary.loader", loader: phpcr_loader } - phpmob.flysystem.phpcr_uploader: - decorates: phpmob.filesystem_uploader - class: PhpMob\MediaBundle\Phpcr\DataUploader - arguments: - - "@phpmob.flysystem.phpcr_adapter" +# phpmob.flysystem.phpcr_uploader: +# decorates: phpmob.filesystem_uploader +# class: PhpMob\MediaBundle\Phpcr\DataUploader +# arguments: +# - "@phpmob.flysystem.phpcr_adapter" doctrine_cache: providers: