partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit a27660c6eab709e115cca0c687cccd238ac52909
parent b6fd7a524f42164557c162276b04490fb0bd02b1
Author: Felicitus <felicitus@felicitus.org>
Date:   Mon, 13 Jul 2015 23:43:44 +0200

Migrated FootprintTree to Symfony2 / DunglasAPIBundle. Also fixed the TempImageListeer to act on new entities as well.

Diffstat:
Mapp/AppKernel.php | 11+++++++++--
Mapp/config/config.yml | 121+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------
Mcomposer.json | 11+++++++----
Mcomposer.lock | 2727++++++++++++++++++++++++++++++++++++++++++++-----------------------------------
Dmigrations.yml | 6------
Asrc/PartKeepr/CategoryBundle/Entity/AbstractCategory.php | 245+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/PartKeepr/CategoryBundle/Exception/MissingParentCategoryException.php | 7+++++++
Asrc/PartKeepr/CategoryBundle/Exception/RootMayNotBeMovedException.php | 7+++++++
Asrc/PartKeepr/CategoryBundle/PartKeeprCategoryBundle.php | 8++++++++
Asrc/PartKeepr/CoreBundle/DoctrineMigrations/BaseMigration.php | 42++++++++++++++++++++++++++++++++++++++++++
Asrc/PartKeepr/CoreBundle/DoctrineMigrations/Version20150708120022.php | 109+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/PartKeepr/DoctrineReflectionBundle/Resources/views/model.js.twig | 2+-
Msrc/PartKeepr/DoctrineReflectionBundle/Services/ReflectionService.php | 62++++++++++++++++++++++++++++++++++++++------------------------
Msrc/PartKeepr/FootprintBundle/Controller/FootprintCategoryController.php | 54++++++++++++++++++++++++++++++++++++++++--------------
Msrc/PartKeepr/FootprintBundle/Entity/Footprint.php | 386++++++++++++++++++++++++++++++++++++++++---------------------------------------
Msrc/PartKeepr/FootprintBundle/Entity/FootprintCategory.php | 55+++++++++++++++++++++++++++++++++++++++++--------------
Msrc/PartKeepr/FootprintBundle/PartKeeprFootprintBundle.php | 1-
Msrc/PartKeepr/FrontendBundle/Controller/IndexController.php | 42++++++++++++++++++++++++------------------
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/CategoryEditor/CategoryEditorForm.js | 1+
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/CategoryEditor/CategoryEditorTree.js | 397+++++++++++++++++++++++++++++++++++++------------------------------------------
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/CategoryEditor/CategoryEditorWindow.js | 127++++++++++++++++++++++++++++++++++++++++---------------------------------------
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/CategoryTree.js | 110+------------------------------------------------------------------------------
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Editor/EditorComponent.js | 11++++++++---
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Footprint/FootprintEditorComponent.js | 85+++++++++++++++++++++++++++++++++++++++++++++++--------------------------------
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/Footprint/FootprintTree.js | 11++++++-----
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Data/HydraProxy.js | 77+++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Data/HydraReader.js | 2+-
Asrc/PartKeepr/FrontendBundle/Resources/public/js/Data/HydraTreeModel.js | 21+++++++++++++++++++++
Msrc/PartKeepr/PartBundle/Entity/PartCategory.php | 15++++++++-------
Msrc/PartKeepr/UploadedFileBundle/EventListener/TemporaryFileEventListener.php | 2+-
Dsrc/backend/PartKeepr/Category/AbstractCategory.php | 203-------------------------------------------------------------------------------
Dsrc/backend/PartKeepr/Category/AbstractCategoryManager.php | 223-------------------------------------------------------------------------------
Dsrc/backend/PartKeepr/Category/AbstractCategoryService.php | 145-------------------------------------------------------------------------------
33 files changed, 2802 insertions(+), 2524 deletions(-)

diff --git a/app/AppKernel.php b/app/AppKernel.php @@ -16,10 +16,12 @@ class AppKernel extends Kernel * Temporary constructor to inject the service container. * * @todo Remove this after successful migration to SF2 + * * @param string $environment * @param bool $debug */ - public function __construct ($environment, $debug) { + public function __construct($environment, $debug) + { parent::__construct($environment, $debug); AppKernel::$kernel = $this; @@ -31,11 +33,13 @@ class AppKernel extends Kernel * @todo Remove this after successful migration to SF2 * @return null|\Symfony\Component\DependencyInjection\ContainerInterface */ - public static function getMigrationContainer () { + public static function getMigrationContainer() + { if (self::$kernel instanceof \AppKernel) { if (!self::$kernel->getContainer() instanceof Container) { self::$kernel->boot(); } + return self::$kernel->getContainer(); } @@ -60,7 +64,9 @@ class AppKernel extends Kernel new PartKeepr\RESTBundle\PartKeeprRESTBundle(), //new PartKeepr\ApiDocBundle\PartKeeprApiDocBundle(), new Dunglas\ApiBundle\DunglasApiBundle(), + new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(), new Brainbits\FugueIconsBundle\BrainbitsFugueIconsBundle(), + new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(), ); // Developer bundles @@ -72,6 +78,7 @@ class AppKernel extends Kernel } // PartKeepr bundles + $bundles[] = new PartKeepr\CategoryBundle\PartKeeprCategoryBundle(); $bundles[] = new PartKeepr\UploadedFileBundle\PartKeeprUploadedFileBundle(); $bundles[] = new PartKeepr\FrontendBundle\PartKeeprFrontendBundle(); $bundles[] = new PartKeepr\SiPrefixBundle\PartKeeprSiPrefixBundle(); diff --git a/app/config/config.yml b/app/config/config.yml @@ -72,18 +72,38 @@ doctrine: orm: auto_generate_proxy_classes: %kernel.debug% - auto_mapping: true - mappings: - model: - type: annotation - dir: %kernel.root_dir%/../src/backend/PartKeepr/ - prefix: PartKeepr - is_bundle: false + entity_managers: + default: + auto_mapping: true + mappings: + model: + type: annotation + dir: %kernel.root_dir%/../src/backend/PartKeepr/ + prefix: PartKeepr + is_bundle: false + gedmo_tree: + type: annotation + prefix: Gedmo\Tree\Entity + dir: "%kernel.root_dir%/../vendor/gedmo/doctrine-extensions/lib/Gedmo/Tree/Entity" + alias: GedmoTree # this one is optional and will default to the name set for the mapping + is_bundle: false + +stof_doctrine_extensions: + default_locale: en_US + orm: + default: + tree: true twig: exception_controller: 'FOS\RestBundle\Controller\ExceptionController::showAction' +doctrine_migrations: + dir_name: %kernel.root_dir%/../src/PartKeepr/CoreBundle/DoctrineMigrations + namespace: PartKeepr\CoreBundle\DoctrineMigrations + table_name: SchemaVersions + name: Application Migrations + dunglas_api: title: "PartKeepr" description: "The PartKeepr REST API" @@ -109,7 +129,7 @@ services: - "@partkeepr_uploadedfile_service" - "@annotation_reader" - "@property_accessor" - tags: [ { name: "kernel.event_listener", event: "api.pre_update", method: "onPreUpdate" } ] + tags: [ { name: "kernel.event_listener", event: "api.pre_update", method: "replaceTemporaryImage" }, { name: "kernel.event_listener", event: "api.pre_create", method: "replaceTemporaryImage" } ] resource.order_filter: parent: "api.doctrine.orm.order_filter" arguments: [ ~ ] # This line can also be omitted @@ -127,6 +147,91 @@ services: arguments: - { groups: [ "default" ] } + resource.footprint: + parent: "api.resource" + arguments: [ "PartKeepr\FootprintBundle\Entity\Footprint" ] + tags: [ { name: "api.resource" } ] + calls: + - method: "initFilters" + arguments: [ [ "@resource.order_filter" ] ] + - method: "initNormalizationContext" + arguments: [ { groups: [ "default" ] } ] + - method: "initDenormalizationContext" + arguments: + - { groups: [ "default" ] } + + resource.footprint_image: + parent: "api.resource" + arguments: [ "PartKeepr\FootprintBundle\Entity\FootprintImage" ] + tags: [ { name: "api.resource" } ] + calls: + - method: "initFilters" + arguments: [ [ "@resource.order_filter" ] ] + - method: "initNormalizationContext" + arguments: [ { groups: [ "default" ] } ] + - method: "initDenormalizationContext" + arguments: + - { groups: [ "default" ] } + + resource.footprint_attachment: + parent: "api.resource" + arguments: [ "PartKeepr\FootprintBundle\Entity\FootprintAttachment" ] + tags: [ { name: "api.resource" } ] + calls: + - method: "initFilters" + arguments: [ [ "@resource.order_filter" ] ] + - method: "initNormalizationContext" + arguments: [ { groups: [ "default" ] } ] + - method: "initDenormalizationContext" + arguments: + - { groups: [ "default" ] } + + resource.footprint_category.item_operation.move: + class: "Dunglas\ApiBundle\Api\Operation\Operation" + public: false + factory: [ "@api.operation_factory", "createItemOperation" ] + arguments: + - "@resource.footprint_category" # Resource + - [ "PUT" ] # Methods + - "/footprint_categories/{id}/move" # Path + - "PartKeeprFootprintBundle:FootprintCategory:move" # Controller + - "FootprintCategoryMove" # Route name + - # Context (will be present in Hydra documentation) + "@type": "hydra:Operation" + "hydra:title": "A custom operation" + "returns": "xmls:string" + + resource.footprint_category.item_operation.get: + class: "Dunglas\ApiBundle\Api\Operation\Operation" + public: false + factory: [ "@api.operation_factory", "createItemOperation" ] + arguments: [ "@resource.footprint_category", "GET" ] + + resource.footprint_category.item_operation.put: + class: "Dunglas\ApiBundle\Api\Operation\Operation" + public: false + factory: [ "@api.operation_factory", "createItemOperation" ] + arguments: [ "@resource.footprint_category", "PUT" ] + + resource.footprint_category.item_operation.delete: + class: "Dunglas\ApiBundle\Api\Operation\Operation" + public: false + factory: [ "@api.operation_factory", "createItemOperation" ] + arguments: [ "@resource.footprint_category", "DELETE" ] + + resource.footprint_category: + parent: "api.resource" + arguments: [ "PartKeepr\FootprintBundle\Entity\FootprintCategory" ] + tags: [ { name: "api.resource" } ] + calls: + - method: "initItemOperations" + arguments: [ [ "@resource.footprint_category.item_operation.get", "@resource.footprint_category.item_operation.put", "@resource.footprint_category.item_operation.delete", "@resource.footprint_category.item_operation.move" ] ] + - method: "initNormalizationContext" + arguments: [ { groups: [ "default" ] } ] + - method: "initDenormalizationContext" + arguments: + - { groups: [ "default" ] } + resource.manufacturer: parent: "api.resource" arguments: [ "PartKeepr\\ManufacturerBundle\Entity\Manufacturer" ] diff --git a/composer.json b/composer.json @@ -46,8 +46,14 @@ "imagine/imagine": "^0.6.2", "ramsey/uuid": "dev-master", "moontoast/math": "^1.1", + "doctrine/migrations": "dev-master", + "doctrine/doctrine-migrations-bundle": "dev-master", + "stof/doctrine-extensions-bundle": "~1.1@dev" + }, + "require-dev": { + "phpunit/phpunit": "4.7.*", "codeclimate/php-test-reporter": "dev-master", - "phpunit/phpunit": "4.7.*" + "liip/functional-test-bundle": "~1.1" }, "autoload": { "psr-0": { @@ -79,8 +85,5 @@ "partkeepr/extjs6" ] } - }, - "require-dev": { - "liip/functional-test-bundle": "~1.1" } } diff --git a/composer.lock b/composer.lock @@ -4,9 +4,49 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "1bca15a58a5af49ed2e99c6607d9580e", + "hash": "ca8731155fcfd71b751d51f7373b28a5", "packages": [ { + "name": "behat/transliterator", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/Behat/Transliterator.git", + "reference": "c93521d3462a554332d1ef5bb0e9b5b8ca4106c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Behat/Transliterator/zipball/c93521d3462a554332d1ef5bb0e9b5b8ca4106c4", + "reference": "c93521d3462a554332d1ef5bb0e9b5b8ca4106c4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "Behat\\Transliterator": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Artistic-1.0" + ], + "description": "String transliterator", + "keywords": [ + "i18n", + "slug", + "transliterator" + ], + "time": "2014-05-15 22:08:22" + }, + { "name": "brainbits/fugue-icons-bundle", "version": "3.5.6", "source": { @@ -100,64 +140,6 @@ "time": "2013-09-19 20:56:46" }, { - "name": "codeclimate/php-test-reporter", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/codeclimate/php-test-reporter.git", - "reference": "418ae782307841ac50fe26daa4cfe04520b0de9c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/codeclimate/php-test-reporter/zipball/418ae782307841ac50fe26daa4cfe04520b0de9c", - "reference": "418ae782307841ac50fe26daa4cfe04520b0de9c", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "php": ">=5.3", - "satooshi/php-coveralls": "0.6.*", - "symfony/console": ">=2.0" - }, - "require-dev": { - "ext-xdebug": "*", - "phpunit/phpunit": "3.7.*@stable" - }, - "bin": [ - "composer/bin/test-reporter" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.1.x-dev" - } - }, - "autoload": { - "psr-0": { - "CodeClimate\\Component": "src/", - "CodeClimate\\Bundle": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Code Climate", - "email": "hello@codeclimate.com", - "homepage": "https://codeclimate.com" - } - ], - "description": "PHP client for reporting test coverage to Code Climate", - "homepage": "https://github.com/codeclimate/php-test-reporter", - "keywords": [ - "codeclimate", - "coverage" - ], - "time": "2015-04-18 14:43:54" - }, - { "name": "composer/installers", "version": "v1.0.21", "source": { @@ -880,6 +862,65 @@ "time": "2013-09-05 11:23:37" }, { + "name": "doctrine/doctrine-migrations-bundle", + "version": "dev-master", + "target-dir": "Doctrine/Bundle/MigrationsBundle", + "source": { + "type": "git", + "url": "https://github.com/doctrine/DoctrineMigrationsBundle.git", + "reference": "861d3564c03b3867845ffd87d9b19f49dc673c69" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/DoctrineMigrationsBundle/zipball/861d3564c03b3867845ffd87d9b19f49dc673c69", + "reference": "861d3564c03b3867845ffd87d9b19f49dc673c69", + "shasum": "" + }, + "require": { + "doctrine/doctrine-bundle": "~1.0", + "doctrine/migrations": "~1.0@dev", + "php": ">=5.3.2", + "symfony/framework-bundle": "~2.3|~3.0" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "2.1.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Bundle\\MigrationsBundle": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Doctrine Project", + "homepage": "http://www.doctrine-project.org" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony DoctrineMigrationsBundle", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "dbal", + "migrations", + "schema" + ], + "time": "2015-06-16 12:48:54" + }, + { "name": "doctrine/inflector", "version": "v1.0.1", "source": { @@ -1055,6 +1096,70 @@ "time": "2014-09-09 13:34:57" }, { + "name": "doctrine/migrations", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/doctrine/migrations.git", + "reference": "78954cce4962a4655ff47c0751eb78021fbaf2cc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/migrations/zipball/78954cce4962a4655ff47c0751eb78021fbaf2cc", + "reference": "78954cce4962a4655ff47c0751eb78021fbaf2cc", + "shasum": "" + }, + "require": { + "doctrine/dbal": "~2.2", + "php": ">=5.4.0", + "symfony/console": "~2.3", + "symfony/yaml": "~2.3" + }, + "require-dev": { + "doctrine/coding-standard": "dev-master", + "doctrine/orm": "2.*", + "johnkary/phpunit-speedtrap": "~1.0@dev", + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "~4.7", + "satooshi/php-coveralls": "0.6.*" + }, + "suggest": { + "symfony/console": "to run the migration from the console" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\DBAL\\Migrations": "lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1" + ], + "authors": [ + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + } + ], + "description": "Database Schema migrations using Doctrine DBAL", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "database", + "migrations" + ], + "time": "2015-07-05 21:24:36" + }, + { "name": "doctrine/orm", "version": "v2.5.0", "source": { @@ -1137,12 +1242,12 @@ "source": { "type": "git", "url": "https://github.com/dunglas/DunglasApiBundle.git", - "reference": "2d60104618e78423e1ea6cbdbe8250280cac638b" + "reference": "04922993be1e1f082de81435160897abb87da12c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dunglas/DunglasApiBundle/zipball/2d60104618e78423e1ea6cbdbe8250280cac638b", - "reference": "2d60104618e78423e1ea6cbdbe8250280cac638b", + "url": "https://api.github.com/repos/dunglas/DunglasApiBundle/zipball/04922993be1e1f082de81435160897abb87da12c", + "reference": "04922993be1e1f082de81435160897abb87da12c", "shasum": "" }, "require": { @@ -1203,7 +1308,7 @@ "json", "rest" ], - "time": "2015-07-07 04:55:13" + "time": "2015-07-09 12:53:29" }, { "name": "dunglas/php-property-info", @@ -1393,70 +1498,44 @@ "time": "2015-06-16 08:39:26" }, { - "name": "guzzle/guzzle", - "version": "v3.9.3", + "name": "gedmo/doctrine-extensions", + "version": "v2.3.12", "source": { "type": "git", - "url": "https://github.com/guzzle/guzzle3.git", - "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9" + "url": "https://github.com/Atlantic18/DoctrineExtensions.git", + "reference": "c3ff3c73c95b01e107af33d4fe3abf80794e2df9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/0645b70d953bc1c067bbc8d5bc53194706b628d9", - "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9", + "url": "https://api.github.com/repos/Atlantic18/DoctrineExtensions/zipball/c3ff3c73c95b01e107af33d4fe3abf80794e2df9", + "reference": "c3ff3c73c95b01e107af33d4fe3abf80794e2df9", "shasum": "" }, "require": { - "ext-curl": "*", - "php": ">=5.3.3", - "symfony/event-dispatcher": "~2.1" - }, - "replace": { - "guzzle/batch": "self.version", - "guzzle/cache": "self.version", - "guzzle/common": "self.version", - "guzzle/http": "self.version", - "guzzle/inflection": "self.version", - "guzzle/iterator": "self.version", - "guzzle/log": "self.version", - "guzzle/parser": "self.version", - "guzzle/plugin": "self.version", - "guzzle/plugin-async": "self.version", - "guzzle/plugin-backoff": "self.version", - "guzzle/plugin-cache": "self.version", - "guzzle/plugin-cookie": "self.version", - "guzzle/plugin-curlauth": "self.version", - "guzzle/plugin-error-response": "self.version", - "guzzle/plugin-history": "self.version", - "guzzle/plugin-log": "self.version", - "guzzle/plugin-md5": "self.version", - "guzzle/plugin-mock": "self.version", - "guzzle/plugin-oauth": "self.version", - "guzzle/service": "self.version", - "guzzle/stream": "self.version" + "behat/transliterator": "~1.0", + "doctrine/common": "~2.4", + "php": ">=5.3.2" }, "require-dev": { - "doctrine/cache": "~1.3", - "monolog/monolog": "~1.0", - "phpunit/phpunit": "3.7.*", - "psr/log": "~1.0", - "symfony/class-loader": "~2.1", - "zendframework/zend-cache": "2.*,<2.3", - "zendframework/zend-log": "2.*,<2.3" + "doctrine/mongodb-odm": ">=1.0.0-BETA11", + "doctrine/orm": "~2.4", + "phpunit/phpunit": "~4.4", + "phpunit/phpunit-mock-objects": "~2.3", + "symfony/yaml": "~2.3" }, "suggest": { - "guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated." + "doctrine/mongodb-odm": "to use the extensions with the MongoDB ODM", + "doctrine/orm": "to use the extensions with the ORM" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.9-dev" + "dev-master": "2.3.x-dev" } }, "autoload": { "psr-0": { - "Guzzle": "src/", - "Guzzle\\Tests": "tests/" + "Gedmo\\": "lib/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1465,27 +1544,36 @@ ], "authors": [ { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" + "name": "David Buchmann", + "email": "david@liip.ch" }, { - "name": "Guzzle Community", - "homepage": "https://github.com/guzzle/guzzle/contributors" + "name": "Gediminas Morkevicius", + "email": "gediminas.morkevicius@gmail.com" + }, + { + "name": "Gustavo Falco", + "email": "comfortablynumb84@gmail.com" } ], - "description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle", - "homepage": "http://guzzlephp.org/", + "description": "Doctrine2 behavioral extensions", + "homepage": "http://gediminasm.org/", "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" - ], - "time": "2015-03-18 18:23:50" + "Blameable", + "behaviors", + "doctrine2", + "extensions", + "gedmo", + "loggable", + "nestedset", + "sluggable", + "sortable", + "timestampable", + "translatable", + "tree", + "uploadable" + ], + "time": "2015-02-24 21:41:37" }, { "name": "imagine/imagine", @@ -2201,36 +2289,23 @@ "time": "2015-02-03 12:10:50" }, { - "name": "phpspec/prophecy", - "version": "v1.4.1", + "name": "psr/log", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373" + "url": "https://github.com/php-fig/log.git", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373", - "reference": "3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", + "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", "shasum": "" }, - "require": { - "doctrine/instantiator": "^1.0.2", - "phpdocumentor/reflection-docblock": "~2.0", - "sebastian/comparator": "~1.1" - }, - "require-dev": { - "phpspec/phpspec": "~2.0" - }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, "autoload": { "psr-0": { - "Prophecy\\": "src/" + "Psr\\Log\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -2239,412 +2314,456 @@ ], "authors": [ { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", + "description": "Common interface for logging libraries", "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" + "log", + "psr", + "psr-3" ], - "time": "2015-04-27 22:15:08" + "time": "2012-12-21 11:40:51" }, { - "name": "phpunit/php-code-coverage", - "version": "2.1.7", + "name": "ramsey/uuid", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "07e27765596d72c378a6103e80da5d84e802f1e4" + "url": "https://github.com/ramsey/uuid.git", + "reference": "94ea59389111ceadf5f9ed2d1c658b0e35f4525d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/07e27765596d72c378a6103e80da5d84e802f1e4", - "reference": "07e27765596d72c378a6103e80da5d84e802f1e4", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/94ea59389111ceadf5f9ed2d1c658b0e35f4525d", + "reference": "94ea59389111ceadf5f9ed2d1c658b0e35f4525d", "shasum": "" }, "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "~1.0", - "sebastian/version": "~1.0" + "php": ">=5.4" + }, + "replace": { + "rhumsaa/uuid": "self.version" }, "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" + "ircmaxell/random-lib": "^1.1", + "jakub-onderka/php-parallel-lint": "^0.9.0", + "moontoast/math": "^1.1", + "phpunit/phpunit": "^4.7", + "satooshi/php-coveralls": "^0.6.1", + "squizlabs/php_codesniffer": "^2.3" }, "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" + "ircmaxell/random-lib": "Provides RandomLib to use with the RandomLibAdapter", + "moontoast/math": "Support for converting UUID to 128-bit integer (in string form).", + "ramsey/uuid-console": "A console application for generating UUIDs with ramsey/uuid", + "ramsey/uuid-doctrine": "Allow the use of a UUID as Doctrine field type." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Ramsey\\Uuid\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "name": "Marijn Huizendveld", + "email": "marijn.huizendveld@gmail.com" + }, + { + "name": "Thibaud Fabre", + "email": "thibaud@aztech.io" + }, + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "http://benramsey.com" } ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", + "homepage": "https://github.com/ramsey/uuid", "keywords": [ - "coverage", - "testing", - "xunit" + "guid", + "identifier", + "uuid" ], - "time": "2015-06-30 06:52:35" + "time": "2015-06-22 01:20:55" }, { - "name": "phpunit/php-file-iterator", - "version": "1.4.0", + "name": "sensio/distribution-bundle", + "version": "v4.0.0", + "target-dir": "Sensio/Bundle/DistributionBundle", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "a923bb15680d0089e2316f7a4af8f437046e96bb" + "url": "https://github.com/sensiolabs/SensioDistributionBundle.git", + "reference": "97929c0a642977acead3d911b2c5c1a944739d40" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a923bb15680d0089e2316f7a4af8f437046e96bb", - "reference": "a923bb15680d0089e2316f7a4af8f437046e96bb", + "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/97929c0a642977acead3d911b2c5c1a944739d40", + "reference": "97929c0a642977acead3d911b2c5c1a944739d40", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.9", + "sensiolabs/security-checker": "~2.0", + "symfony/class-loader": "~2.2", + "symfony/framework-bundle": "~2.3", + "symfony/process": "~2.2" }, - "type": "library", + "require-dev": { + "symfony/form": "~2.2", + "symfony/validator": "~2.2", + "symfony/yaml": "~2.2" + }, + "suggest": { + "symfony/form": "If you want to use the configurator", + "symfony/validator": "If you want to use the configurator", + "symfony/yaml": "If you want to use the configurator" + }, + "type": "symfony-bundle", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "4.0.x-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-0": { + "Sensio\\Bundle\\DistributionBundle": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "description": "Base bundle for Symfony Distributions", "keywords": [ - "filesystem", - "iterator" + "configuration", + "distribution" ], - "time": "2015-04-02 05:19:05" + "time": "2015-06-11 20:55:01" }, { - "name": "phpunit/php-text-template", - "version": "1.2.1", + "name": "sensio/framework-extra-bundle", + "version": "v3.0.9", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + "url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git", + "reference": "0616fd568da051adc19ca63006cc808531ba2da4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/0616fd568da051adc19ca63006cc808531ba2da4", + "reference": "0616fd568da051adc19ca63006cc808531ba2da4", "shasum": "" }, "require": { - "php": ">=5.3.3" + "doctrine/common": "~2.2", + "symfony/framework-bundle": "~2.3" + }, + "require-dev": { + "symfony/expression-language": "~2.4", + "symfony/security-bundle": "~2.4" + }, + "suggest": { + "symfony/expression-language": "", + "symfony/psr-http-message-bridge": "To use the PSR-7 converters", + "symfony/security-bundle": "" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } }, - "type": "library", "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Sensio\\Bundle\\FrameworkExtraBundle\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "description": "This bundle provides a way to configure your controllers with annotations", "keywords": [ - "template" + "annotations", + "controllers" ], - "time": "2015-06-21 13:50:34" + "time": "2015-06-05 13:59:21" }, { - "name": "phpunit/php-timer", - "version": "1.0.6", + "name": "sensio/generator-bundle", + "version": "v2.5.3", + "target-dir": "Sensio/Bundle/GeneratorBundle", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "83fe1bdc5d47658b727595c14da140da92b3d66d" + "url": "https://github.com/sensiolabs/SensioGeneratorBundle.git", + "reference": "e50108c2133ee5c9c484555faed50c17a61221d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/83fe1bdc5d47658b727595c14da140da92b3d66d", - "reference": "83fe1bdc5d47658b727595c14da140da92b3d66d", + "url": "https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/zipball/e50108c2133ee5c9c484555faed50c17a61221d3", + "reference": "e50108c2133ee5c9c484555faed50c17a61221d3", "shasum": "" }, "require": { - "php": ">=5.3.3" + "symfony/console": "~2.5", + "symfony/framework-bundle": "~2.2" + }, + "require-dev": { + "doctrine/orm": "~2.2,>=2.2.3", + "symfony/doctrine-bridge": "~2.2", + "twig/twig": "~1.11" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "2.5.x-dev" + } }, - "type": "library", "autoload": { - "classmap": [ - "src/" - ] + "psr-0": { + "Sensio\\Bundle\\GeneratorBundle": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2015-06-13 07:35:30" + "description": "This bundle generates code for you", + "time": "2015-03-17 06:36:52" }, { - "name": "phpunit/php-token-stream", - "version": "1.4.3", + "name": "sensiolabs/security-checker", + "version": "v2.0.5", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "7a9b0969488c3c54fd62b4d504b3ec758fd005d9" + "url": "https://github.com/sensiolabs/security-checker.git", + "reference": "2c2a71f1c77d9765c12638c4724d9ca23658a810" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/7a9b0969488c3c54fd62b4d504b3ec758fd005d9", - "reference": "7a9b0969488c3c54fd62b4d504b3ec758fd005d9", + "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/2c2a71f1c77d9765c12638c4724d9ca23658a810", + "reference": "2c2a71f1c77d9765c12638c4724d9ca23658a810", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" + "ext-curl": "*", + "symfony/console": "~2.0" }, + "bin": [ + "security-checker" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "2.0-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-0": { + "SensioLabs\\Security": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Fabien Potencier", + "email": "fabien.potencier@gmail.com" } ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2015-06-19 03:43:16" + "description": "A security checker for your composer.lock", + "time": "2015-05-28 14:22:40" }, { - "name": "phpunit/phpunit", - "version": "4.7.6", + "name": "stof/doctrine-extensions-bundle", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "0ebabb4cda7d066be8391dfdbaf57fe70ac9a99b" + "url": "https://github.com/stof/StofDoctrineExtensionsBundle.git", + "reference": "2ff8473e33e224af87dc00d48a552a35a75115af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0ebabb4cda7d066be8391dfdbaf57fe70ac9a99b", - "reference": "0ebabb4cda7d066be8391dfdbaf57fe70ac9a99b", + "url": "https://api.github.com/repos/stof/StofDoctrineExtensionsBundle/zipball/2ff8473e33e224af87dc00d48a552a35a75115af", + "reference": "2ff8473e33e224af87dc00d48a552a35a75115af", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpspec/prophecy": "~1.3,>=1.3.1", - "phpunit/php-code-coverage": "~2.1", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": ">=1.0.6", - "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.1", - "sebastian/diff": "~1.2", - "sebastian/environment": "~1.2", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.1|~3.0" + "gedmo/doctrine-extensions": "~2.3.1", + "php": ">=5.3.2", + "symfony/framework-bundle": "~2.1" }, "suggest": { - "phpunit/php-invoker": "~1.1" + "doctrine/doctrine-bundle": "to use the ORM extensions", + "doctrine/mongodb-odm-bundle": "to use the MongoDB ODM extensions" }, - "bin": [ - "phpunit" - ], - "type": "library", + "type": "symfony-bundle", "extra": { "branch-alias": { - "dev-master": "4.7.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Stof\\DoctrineExtensionsBundle\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Christophe Coevoet", + "email": "stof@notk.org" } ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", + "description": "Integration of the gedmo/doctrine-extensions with Symfony2", + "homepage": "https://github.com/stof/StofDoctrineExtensionsBundle", "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2015-06-30 06:53:57" + "behaviors", + "doctrine2", + "extensions", + "gedmo", + "loggable", + "nestedset", + "sluggable", + "sortable", + "timestampable", + "translatable", + "tree" + ], + "time": "2014-09-30 08:24:40" }, { - "name": "phpunit/phpunit-mock-objects", - "version": "2.3.5", + "name": "swiftmailer/swiftmailer", + "version": "v5.4.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "1c330b1b6e1ea8fd15f2fbea46770576e366855c" + "url": "https://github.com/swiftmailer/swiftmailer.git", + "reference": "0697e6aa65c83edf97bb0f23d8763f94e3f11421" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/1c330b1b6e1ea8fd15f2fbea46770576e366855c", - "reference": "1c330b1b6e1ea8fd15f2fbea46770576e366855c", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/0697e6aa65c83edf97bb0f23d8763f94e3f11421", + "reference": "0697e6aa65c83edf97bb0f23d8763f94e3f11421", "shasum": "" }, "require": { - "doctrine/instantiator": "~1.0,>=1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2" + "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "suggest": { - "ext-soap": "*" + "mockery/mockery": "~0.9.1,<0.9.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3.x-dev" + "dev-master": "5.4-dev" } }, "autoload": { - "classmap": [ - "src/" + "files": [ + "lib/swift_required.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "name": "Chris Corbyn" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "description": "Swiftmailer, free feature-rich PHP mailer", + "homepage": "http://swiftmailer.org", "keywords": [ - "mock", - "xunit" + "email", + "mail", + "mailer" ], - "time": "2015-07-04 05:41:32" + "time": "2015-06-06 14:19:39" }, { - "name": "psr/log", - "version": "1.0.0", + "name": "symfony/assetic-bundle", + "version": "v2.6.1", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" + "url": "https://github.com/symfony/AsseticBundle.git", + "reference": "422b0add2110f0cf9bc7a873a386ea053f4a89f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", + "url": "https://api.github.com/repos/symfony/AsseticBundle/zipball/422b0add2110f0cf9bc7a873a386ea053f4a89f0", + "reference": "422b0add2110f0cf9bc7a873a386ea053f4a89f0", "shasum": "" }, - "type": "library", + "require": { + "kriswallsmith/assetic": "~1.2", + "php": ">=5.3.0", + "symfony/console": "~2.3", + "symfony/dependency-injection": "~2.3", + "symfony/framework-bundle": "~2.3", + "symfony/yaml": "~2.3" + }, + "require-dev": { + "kriswallsmith/spork": "~0.2", + "patchwork/jsqueeze": "~1.0", + "symfony/class-loader": "~2.3", + "symfony/css-selector": "~2.3", + "symfony/dom-crawler": "~2.3", + "symfony/twig-bundle": "~2.3" + }, + "suggest": { + "kriswallsmith/spork": "to be able to dump assets in parallel", + "symfony/twig-bundle": "to use the Twig integration" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, "autoload": { - "psr-0": { - "Psr\\Log\\": "" + "psr-4": { + "Symfony\\Bundle\\AsseticBundle\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -2653,61 +2772,69 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Kris Wallsmith", + "email": "kris.wallsmith@gmail.com", + "homepage": "http://kriswallsmith.net/" } ], - "description": "Common interface for logging libraries", + "description": "Integrates Assetic into Symfony2", + "homepage": "https://github.com/symfony/AsseticBundle", "keywords": [ - "log", - "psr", - "psr-3" + "assets", + "compression", + "minification" ], - "time": "2012-12-21 11:40:51" + "time": "2015-01-27 12:45:16" }, { - "name": "ramsey/uuid", - "version": "dev-master", + "name": "symfony/doctrine-bridge", + "version": "2.7.x-dev", "source": { "type": "git", - "url": "https://github.com/ramsey/uuid.git", - "reference": "94ea59389111ceadf5f9ed2d1c658b0e35f4525d" + "url": "https://github.com/symfony/DoctrineBridge.git", + "reference": "aa7eb6751902df204c281186c2db414d154e088e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/94ea59389111ceadf5f9ed2d1c658b0e35f4525d", - "reference": "94ea59389111ceadf5f9ed2d1c658b0e35f4525d", + "url": "https://api.github.com/repos/symfony/DoctrineBridge/zipball/aa7eb6751902df204c281186c2db414d154e088e", + "reference": "aa7eb6751902df204c281186c2db414d154e088e", "shasum": "" }, "require": { - "php": ">=5.4" - }, - "replace": { - "rhumsaa/uuid": "self.version" + "doctrine/common": "~2.3", + "php": ">=5.3.9" }, "require-dev": { - "ircmaxell/random-lib": "^1.1", - "jakub-onderka/php-parallel-lint": "^0.9.0", - "moontoast/math": "^1.1", - "phpunit/phpunit": "^4.7", - "satooshi/php-coveralls": "^0.6.1", - "squizlabs/php_codesniffer": "^2.3" + "doctrine/data-fixtures": "1.0.*", + "doctrine/dbal": "~2.2", + "doctrine/orm": "~2.2,>=2.2.3", + "symfony/dependency-injection": "~2.2", + "symfony/expression-language": "~2.2", + "symfony/form": "~2.7,>=2.7.1", + "symfony/http-kernel": "~2.2", + "symfony/phpunit-bridge": "~2.7", + "symfony/property-access": "~2.3", + "symfony/security": "~2.2", + "symfony/stopwatch": "~2.2", + "symfony/translation": "~2.0,>=2.0.5", + "symfony/validator": "~2.5,>=2.5.5" }, "suggest": { - "ircmaxell/random-lib": "Provides RandomLib to use with the RandomLibAdapter", - "moontoast/math": "Support for converting UUID to 128-bit integer (in string form).", - "ramsey/uuid-console": "A console application for generating UUIDs with ramsey/uuid", - "ramsey/uuid-doctrine": "Allow the use of a UUID as Doctrine field type." + "doctrine/data-fixtures": "", + "doctrine/dbal": "", + "doctrine/orm": "", + "symfony/form": "", + "symfony/validator": "" }, - "type": "library", + "type": "symfony-bridge", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "2.7-dev" } }, "autoload": { "psr-4": { - "Ramsey\\Uuid\\": "src/" + "Symfony\\Bridge\\Doctrine\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -2716,73 +2843,53 @@ ], "authors": [ { - "name": "Marijn Huizendveld", - "email": "marijn.huizendveld@gmail.com" - }, - { - "name": "Thibaud Fabre", - "email": "thibaud@aztech.io" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { - "name": "Ben Ramsey", - "email": "ben@benramsey.com", - "homepage": "http://benramsey.com" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", - "homepage": "https://github.com/ramsey/uuid", - "keywords": [ - "guid", - "identifier", - "uuid" - ], - "time": "2015-06-22 01:20:55" + "description": "Symfony Doctrine Bridge", + "homepage": "https://symfony.com", + "time": "2015-06-28 17:13:14" }, { - "name": "satooshi/php-coveralls", - "version": "v0.6.1", + "name": "symfony/monolog-bundle", + "version": "v2.7.1", "source": { "type": "git", - "url": "https://github.com/satooshi/php-coveralls.git", - "reference": "dd0df95bd37a7cf5c5c50304dfe260ffe4b50760" + "url": "https://github.com/symfony/MonologBundle.git", + "reference": "9320b6863404c70ebe111e9040dab96f251de7ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/satooshi/php-coveralls/zipball/dd0df95bd37a7cf5c5c50304dfe260ffe4b50760", - "reference": "dd0df95bd37a7cf5c5c50304dfe260ffe4b50760", + "url": "https://api.github.com/repos/symfony/MonologBundle/zipball/9320b6863404c70ebe111e9040dab96f251de7ac", + "reference": "9320b6863404c70ebe111e9040dab96f251de7ac", "shasum": "" }, "require": { - "ext-curl": "*", - "ext-json": "*", - "ext-simplexml": "*", - "guzzle/guzzle": ">=3.0", - "php": ">=5.3", - "psr/log": "1.0.0", - "symfony/config": ">=2.0", - "symfony/console": ">=2.0", - "symfony/stopwatch": ">=2.2", - "symfony/yaml": ">=2.0" + "monolog/monolog": "~1.8", + "php": ">=5.3.2", + "symfony/config": "~2.3", + "symfony/dependency-injection": "~2.3", + "symfony/http-kernel": "~2.3", + "symfony/monolog-bridge": "~2.3" }, "require-dev": { - "apigen/apigen": "2.8.*@stable", - "pdepend/pdepend": "dev-master", - "phpmd/phpmd": "dev-master", - "phpunit/php-invoker": ">=1.1.0,<1.2.0", - "phpunit/phpunit": "3.7.*@stable", - "sebastian/finder-facade": "dev-master", - "sebastian/phpcpd": "1.4.*@stable", - "squizlabs/php_codesniffer": "1.4.*@stable", - "theseer/fdomdocument": "dev-master" + "symfony/console": "~2.3", + "symfony/yaml": "~2.3" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "2.7.x-dev" + } }, - "bin": [ - "composer/bin/coveralls" - ], - "type": "library", "autoload": { - "psr-0": { - "Contrib\\Component": "src/", - "Contrib\\Bundle": "src/" + "psr-4": { + "Symfony\\Bundle\\MonologBundle\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -2791,218 +2898,280 @@ ], "authors": [ { - "name": "Kitamura Satoshi", - "email": "with.no.parachute@gmail.com", - "homepage": "https://www.facebook.com/satooshi.jp" + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], - "description": "PHP client library for Coveralls API", - "homepage": "https://github.com/satooshi/php-coveralls", + "description": "Symfony MonologBundle", + "homepage": "http://symfony.com", "keywords": [ - "ci", - "coverage", - "github", - "test" + "log", + "logging" ], - "time": "2013-05-04 08:07:33" + "time": "2015-01-04 20:21:17" }, { - "name": "sebastian/comparator", - "version": "1.1.1", + "name": "symfony/swiftmailer-bundle", + "version": "v2.3.8", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1dd8869519a225f7f2b9eb663e225298fade819e" + "url": "https://github.com/symfony/SwiftmailerBundle.git", + "reference": "970b13d01871207e81d17b17ddda025e7e21e797" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dd8869519a225f7f2b9eb663e225298fade819e", - "reference": "1dd8869519a225f7f2b9eb663e225298fade819e", + "url": "https://api.github.com/repos/symfony/SwiftmailerBundle/zipball/970b13d01871207e81d17b17ddda025e7e21e797", + "reference": "970b13d01871207e81d17b17ddda025e7e21e797", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2" + "php": ">=5.3.2", + "swiftmailer/swiftmailer": ">=4.2.0,~5.0", + "symfony/swiftmailer-bridge": "~2.1" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "symfony/config": "~2.1", + "symfony/dependency-injection": "~2.1", + "symfony/http-kernel": "~2.1", + "symfony/yaml": "~2.1" }, - "type": "library", + "suggest": { + "psr/log": "Allows logging" + }, + "type": "symfony-bundle", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "2.3-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Symfony\\Bundle\\SwiftmailerBundle\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" }, { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2015-01-29 16:28:08" + "description": "Symfony SwiftmailerBundle", + "homepage": "http://symfony.com", + "time": "2014-12-01 17:44:50" }, { - "name": "sebastian/diff", - "version": "1.3.0", + "name": "symfony/symfony", + "version": "v2.7.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" + "url": "https://github.com/symfony/symfony.git", + "reference": "932b6e7499c670f4db6d0b871477a4a3ca161e74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", + "url": "https://api.github.com/repos/symfony/symfony/zipball/932b6e7499c670f4db6d0b871477a4a3ca161e74", + "reference": "932b6e7499c670f4db6d0b871477a4a3ca161e74", "shasum": "" }, "require": { - "php": ">=5.3.3" + "doctrine/common": "~2.3", + "php": ">=5.3.9", + "psr/log": "~1.0", + "twig/twig": "~1.18" + }, + "replace": { + "symfony/asset": "self.version", + "symfony/browser-kit": "self.version", + "symfony/class-loader": "self.version", + "symfony/config": "self.version", + "symfony/console": "self.version", + "symfony/css-selector": "self.version", + "symfony/debug": "self.version", + "symfony/debug-bundle": "self.version", + "symfony/dependency-injection": "self.version", + "symfony/doctrine-bridge": "self.version", + "symfony/dom-crawler": "self.version", + "symfony/event-dispatcher": "self.version", + "symfony/expression-language": "self.version", + "symfony/filesystem": "self.version", + "symfony/finder": "self.version", + "symfony/form": "self.version", + "symfony/framework-bundle": "self.version", + "symfony/http-foundation": "self.version", + "symfony/http-kernel": "self.version", + "symfony/intl": "self.version", + "symfony/locale": "self.version", + "symfony/monolog-bridge": "self.version", + "symfony/options-resolver": "self.version", + "symfony/process": "self.version", + "symfony/property-access": "self.version", + "symfony/proxy-manager-bridge": "self.version", + "symfony/routing": "self.version", + "symfony/security": "self.version", + "symfony/security-acl": "self.version", + "symfony/security-bundle": "self.version", + "symfony/security-core": "self.version", + "symfony/security-csrf": "self.version", + "symfony/security-http": "self.version", + "symfony/serializer": "self.version", + "symfony/stopwatch": "self.version", + "symfony/swiftmailer-bridge": "self.version", + "symfony/templating": "self.version", + "symfony/translation": "self.version", + "symfony/twig-bridge": "self.version", + "symfony/twig-bundle": "self.version", + "symfony/validator": "self.version", + "symfony/var-dumper": "self.version", + "symfony/web-profiler-bundle": "self.version", + "symfony/yaml": "self.version" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "doctrine/data-fixtures": "1.0.*", + "doctrine/dbal": "~2.2", + "doctrine/doctrine-bundle": "~1.2", + "doctrine/orm": "~2.2,>=2.2.3", + "egulias/email-validator": "~1.2", + "ircmaxell/password-compat": "~1.0", + "monolog/monolog": "~1.11", + "ocramius/proxy-manager": "~0.4|~1.0", + "symfony/phpunit-bridge": "self.version" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "2.7-dev" } }, "autoload": { - "classmap": [ - "src/" + "psr-4": { + "Symfony\\Bridge\\Doctrine\\": "src/Symfony/Bridge/Doctrine/", + "Symfony\\Bridge\\Monolog\\": "src/Symfony/Bridge/Monolog/", + "Symfony\\Bridge\\ProxyManager\\": "src/Symfony/Bridge/ProxyManager/", + "Symfony\\Bridge\\Swiftmailer\\": "src/Symfony/Bridge/Swiftmailer/", + "Symfony\\Bridge\\Twig\\": "src/Symfony/Bridge/Twig/", + "Symfony\\Bundle\\": "src/Symfony/Bundle/", + "Symfony\\Component\\": "src/Symfony/Component/" + }, + "classmap": [ + "src/Symfony/Component/HttpFoundation/Resources/stubs", + "src/Symfony/Component/Intl/Resources/stubs" + ], + "files": [ + "src/Symfony/Component/Intl/Resources/stubs/functions.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Diff implementation", - "homepage": "http://www.github.com/sebastianbergmann/diff", + "description": "The Symfony PHP framework", + "homepage": "https://symfony.com", "keywords": [ - "diff" + "framework" ], - "time": "2015-02-22 15:13:53" + "time": "2015-06-11 21:15:28" }, { - "name": "sebastian/environment", - "version": "1.2.2", + "name": "twig/extensions", + "version": "v1.2.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e" + "url": "https://github.com/twigphp/Twig-extensions.git", + "reference": "8cf4b9fe04077bd54fc73f4fde83347040c3b8cd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5a8c7d31914337b69923db26c4221b81ff5a196e", - "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e", + "url": "https://api.github.com/repos/twigphp/Twig-extensions/zipball/8cf4b9fe04077bd54fc73f4fde83347040c3b8cd", + "reference": "8cf4b9fe04077bd54fc73f4fde83347040c3b8cd", "shasum": "" }, "require": { - "php": ">=5.3.3" + "twig/twig": "~1.12" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "symfony/translation": "~2.3" + }, + "suggest": { + "symfony/translation": "Allow the time_diff output to be translated" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-0": { + "Twig_Extensions_": "lib/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", + "description": "Common additional features for Twig that do not directly belong in core", + "homepage": "http://twig.sensiolabs.org/doc/extensions/index.html", "keywords": [ - "Xdebug", - "environment", - "hhvm" + "i18n", + "text" ], - "time": "2015-01-01 10:01:08" + "time": "2014-10-30 14:30:03" }, { - "name": "sebastian/exporter", - "version": "1.2.0", + "name": "twig/twig", + "version": "v1.18.2", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "84839970d05254c73cde183a721c7af13aede943" + "url": "https://github.com/twigphp/Twig.git", + "reference": "e8e6575abf6102af53ec283f7f14b89e304fa602" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/84839970d05254c73cde183a721c7af13aede943", - "reference": "84839970d05254c73cde183a721c7af13aede943", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/e8e6575abf6102af53ec283f7f14b89e304fa602", + "reference": "e8e6575abf6102af53ec283f7f14b89e304fa602", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" + "php": ">=5.2.7" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.18-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-0": { + "Twig_": "lib/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3010,366 +3179,311 @@ ], "authors": [ { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "role": "Project Founder" }, { - "name": "Adam Harvey", - "email": "aharvey@php.net" + "name": "Twig Team", + "homepage": "http://twig.sensiolabs.org/contributors", + "role": "Contributors" } ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", + "description": "Twig, the flexible, fast, and secure template language for PHP", + "homepage": "http://twig.sensiolabs.org", "keywords": [ - "export", - "exporter" + "templating" ], - "time": "2015-01-27 07:23:06" + "time": "2015-06-06 23:31:24" }, { - "name": "sebastian/global-state", - "version": "1.0.0", + "name": "willdurand/jsonp-callback-validator", + "version": "v1.1.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01" + "url": "https://github.com/willdurand/JsonpCallbackValidator.git", + "reference": "1a7d388bb521959e612ef50c5c7b1691b097e909" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/c7428acdb62ece0a45e6306f1ae85e1c05b09c01", - "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01", + "url": "https://api.github.com/repos/willdurand/JsonpCallbackValidator/zipball/1a7d388bb521959e612ef50c5c7b1691b097e909", + "reference": "1a7d388bb521959e612ef50c5c7b1691b097e909", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.0" }, "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "~3.7" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, "autoload": { - "classmap": [ - "src/" - ] + "psr-0": { + "JsonpCallbackValidator": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "name": "William Durand", + "email": "william.durand1@gmail.com", + "homepage": "http://www.willdurand.fr" } ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2014-10-06 09:23:50" + "description": "JSONP callback validator.", + "time": "2014-01-20 22:35:06" }, { - "name": "sebastian/recursion-context", - "version": "1.0.0", + "name": "willdurand/negotiation", + "version": "1.3.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "3989662bbb30a29d20d9faa04a846af79b276252" + "url": "https://github.com/willdurand/Negotiation.git", + "reference": "d7fa4ce4a0436915b9ba9f7cb5ff37719f0a834c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/3989662bbb30a29d20d9faa04a846af79b276252", - "reference": "3989662bbb30a29d20d9faa04a846af79b276252", + "url": "https://api.github.com/repos/willdurand/Negotiation/zipball/d7fa4ce4a0436915b9ba9f7cb5ff37719f0a834c", + "reference": "d7fa4ce4a0436915b9ba9f7cb5ff37719f0a834c", "shasum": "" }, "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" + "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.3-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-0": { + "Negotiation": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" + "name": "William Durand", + "email": "william.durand1@gmail.com" } ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-01-24 09:48:32" + "description": "Content Negotiation tools for PHP provided as a standalone library.", + "homepage": "http://williamdurand.fr/Negotiation/", + "keywords": [ + "accept", + "content", + "format", + "header", + "negotiation" + ], + "time": "2014-10-02 07:26:00" }, { - "name": "sebastian/version", - "version": "1.0.6", + "name": "zendframework/zend-code", + "version": "2.5.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + "url": "https://github.com/zendframework/zend-code.git", + "reference": "5d998f261ec2a55171c71da57a11622745680153" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "url": "https://api.github.com/repos/zendframework/zend-code/zipball/5d998f261ec2a55171c71da57a11622745680153", + "reference": "5d998f261ec2a55171c71da57a11622745680153", "shasum": "" }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-06-21 13:59:46" - }, - { - "name": "sensio/distribution-bundle", - "version": "v4.0.0", - "target-dir": "Sensio/Bundle/DistributionBundle", - "source": { - "type": "git", - "url": "https://github.com/sensiolabs/SensioDistributionBundle.git", - "reference": "97929c0a642977acead3d911b2c5c1a944739d40" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/97929c0a642977acead3d911b2c5c1a944739d40", - "reference": "97929c0a642977acead3d911b2c5c1a944739d40", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "sensiolabs/security-checker": "~2.0", - "symfony/class-loader": "~2.2", - "symfony/framework-bundle": "~2.3", - "symfony/process": "~2.2" + "require": { + "php": ">=5.3.23", + "zendframework/zend-eventmanager": "~2.5" }, "require-dev": { - "symfony/form": "~2.2", - "symfony/validator": "~2.2", - "symfony/yaml": "~2.2" + "doctrine/common": ">=2.1", + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "zendframework/zend-stdlib": "~2.5", + "zendframework/zend-version": "~2.5" }, "suggest": { - "symfony/form": "If you want to use the configurator", - "symfony/validator": "If you want to use the configurator", - "symfony/yaml": "If you want to use the configurator" + "doctrine/common": "Doctrine\\Common >=2.1 for annotation features", + "zendframework/zend-stdlib": "Zend\\Stdlib component" }, - "type": "symfony-bundle", + "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0.x-dev" + "dev-master": "2.5-dev", + "dev-develop": "2.6-dev" } }, "autoload": { - "psr-0": { - "Sensio\\Bundle\\DistributionBundle": "" + "psr-4": { + "Zend\\Code\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } + "BSD-3-Clause" ], - "description": "Base bundle for Symfony Distributions", + "description": "provides facilities to generate arbitrary code using an object oriented interface", + "homepage": "https://github.com/zendframework/zend-code", "keywords": [ - "configuration", - "distribution" + "code", + "zf2" ], - "time": "2015-06-11 20:55:01" + "time": "2015-06-03 15:31:59" }, { - "name": "sensio/framework-extra-bundle", - "version": "v3.0.9", + "name": "zendframework/zend-eventmanager", + "version": "2.5.1", "source": { "type": "git", - "url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git", - "reference": "0616fd568da051adc19ca63006cc808531ba2da4" + "url": "https://github.com/zendframework/zend-eventmanager.git", + "reference": "d94a16039144936f107f906896349900fd634443" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/0616fd568da051adc19ca63006cc808531ba2da4", - "reference": "0616fd568da051adc19ca63006cc808531ba2da4", + "url": "https://api.github.com/repos/zendframework/zend-eventmanager/zipball/d94a16039144936f107f906896349900fd634443", + "reference": "d94a16039144936f107f906896349900fd634443", "shasum": "" }, "require": { - "doctrine/common": "~2.2", - "symfony/framework-bundle": "~2.3" + "php": ">=5.3.23", + "zendframework/zend-stdlib": "~2.5" }, "require-dev": { - "symfony/expression-language": "~2.4", - "symfony/security-bundle": "~2.4" - }, - "suggest": { - "symfony/expression-language": "", - "symfony/psr-http-message-bridge": "To use the PSR-7 converters", - "symfony/security-bundle": "" + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0" }, - "type": "symfony-bundle", + "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "2.5-dev", + "dev-develop": "2.6-dev" } }, "autoload": { "psr-4": { - "Sensio\\Bundle\\FrameworkExtraBundle\\": "" + "Zend\\EventManager\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } + "BSD-3-Clause" ], - "description": "This bundle provides a way to configure your controllers with annotations", + "homepage": "https://github.com/zendframework/zend-eventmanager", "keywords": [ - "annotations", - "controllers" + "eventmanager", + "zf2" ], - "time": "2015-06-05 13:59:21" + "time": "2015-06-03 15:32:01" }, { - "name": "sensio/generator-bundle", - "version": "v2.5.3", - "target-dir": "Sensio/Bundle/GeneratorBundle", + "name": "zendframework/zend-stdlib", + "version": "2.5.1", "source": { "type": "git", - "url": "https://github.com/sensiolabs/SensioGeneratorBundle.git", - "reference": "e50108c2133ee5c9c484555faed50c17a61221d3" + "url": "https://github.com/zendframework/zend-stdlib.git", + "reference": "cc8e90a60dd5d44b9730b77d07b97550091da1ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/zipball/e50108c2133ee5c9c484555faed50c17a61221d3", - "reference": "e50108c2133ee5c9c484555faed50c17a61221d3", + "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/cc8e90a60dd5d44b9730b77d07b97550091da1ae", + "reference": "cc8e90a60dd5d44b9730b77d07b97550091da1ae", "shasum": "" }, "require": { - "symfony/console": "~2.5", - "symfony/framework-bundle": "~2.2" + "php": ">=5.3.23" }, "require-dev": { - "doctrine/orm": "~2.2,>=2.2.3", - "symfony/doctrine-bridge": "~2.2", - "twig/twig": "~1.11" + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "zendframework/zend-config": "~2.5", + "zendframework/zend-eventmanager": "~2.5", + "zendframework/zend-filter": "~2.5", + "zendframework/zend-inputfilter": "~2.5", + "zendframework/zend-serializer": "~2.5", + "zendframework/zend-servicemanager": "~2.5" }, - "type": "symfony-bundle", + "suggest": { + "zendframework/zend-eventmanager": "To support aggregate hydrator usage", + "zendframework/zend-filter": "To support naming strategy hydrator usage", + "zendframework/zend-serializer": "Zend\\Serializer component", + "zendframework/zend-servicemanager": "To support hydrator plugin manager usage" + }, + "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5.x-dev" + "dev-master": "2.5-dev", + "dev-develop": "2.6-dev" } }, "autoload": { - "psr-0": { - "Sensio\\Bundle\\GeneratorBundle": "" + "psr-4": { + "Zend\\Stdlib\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } + "homepage": "https://github.com/zendframework/zend-stdlib", + "keywords": [ + "stdlib", + "zf2" ], - "description": "This bundle generates code for you", - "time": "2015-03-17 06:36:52" - }, + "time": "2015-06-03 15:32:03" + } + ], + "packages-dev": [ { - "name": "sensiolabs/security-checker", - "version": "v2.0.5", + "name": "codeclimate/php-test-reporter", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/sensiolabs/security-checker.git", - "reference": "2c2a71f1c77d9765c12638c4724d9ca23658a810" + "url": "https://github.com/codeclimate/php-test-reporter.git", + "reference": "418ae782307841ac50fe26daa4cfe04520b0de9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/2c2a71f1c77d9765c12638c4724d9ca23658a810", - "reference": "2c2a71f1c77d9765c12638c4724d9ca23658a810", + "url": "https://api.github.com/repos/codeclimate/php-test-reporter/zipball/418ae782307841ac50fe26daa4cfe04520b0de9c", + "reference": "418ae782307841ac50fe26daa4cfe04520b0de9c", "shasum": "" }, "require": { "ext-curl": "*", - "symfony/console": "~2.0" + "php": ">=5.3", + "satooshi/php-coveralls": "0.6.*", + "symfony/console": ">=2.0" + }, + "require-dev": { + "ext-xdebug": "*", + "phpunit/phpunit": "3.7.*@stable" }, "bin": [ - "security-checker" + "composer/bin/test-reporter" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "0.1.x-dev" } }, "autoload": { "psr-0": { - "SensioLabs\\Security": "" + "CodeClimate\\Component": "src/", + "CodeClimate\\Bundle": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -3378,109 +3492,84 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien.potencier@gmail.com" + "name": "Code Climate", + "email": "hello@codeclimate.com", + "homepage": "https://codeclimate.com" } ], - "description": "A security checker for your composer.lock", - "time": "2015-05-28 14:22:40" + "description": "PHP client for reporting test coverage to Code Climate", + "homepage": "https://github.com/codeclimate/php-test-reporter", + "keywords": [ + "codeclimate", + "coverage" + ], + "time": "2015-04-18 14:43:54" }, { - "name": "swiftmailer/swiftmailer", - "version": "v5.4.1", + "name": "guzzle/guzzle", + "version": "v3.9.3", "source": { "type": "git", - "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "0697e6aa65c83edf97bb0f23d8763f94e3f11421" + "url": "https://github.com/guzzle/guzzle3.git", + "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/0697e6aa65c83edf97bb0f23d8763f94e3f11421", - "reference": "0697e6aa65c83edf97bb0f23d8763f94e3f11421", + "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/0645b70d953bc1c067bbc8d5bc53194706b628d9", + "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9", "shasum": "" }, "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "mockery/mockery": "~0.9.1,<0.9.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } - }, - "autoload": { - "files": [ - "lib/swift_required.php" - ] + "ext-curl": "*", + "php": ">=5.3.3", + "symfony/event-dispatcher": "~2.1" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Chris Corbyn" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Swiftmailer, free feature-rich PHP mailer", - "homepage": "http://swiftmailer.org", - "keywords": [ - "email", - "mail", - "mailer" - ], - "time": "2015-06-06 14:19:39" - }, - { - "name": "symfony/assetic-bundle", - "version": "v2.6.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/AsseticBundle.git", - "reference": "422b0add2110f0cf9bc7a873a386ea053f4a89f0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/AsseticBundle/zipball/422b0add2110f0cf9bc7a873a386ea053f4a89f0", - "reference": "422b0add2110f0cf9bc7a873a386ea053f4a89f0", - "shasum": "" - }, - "require": { - "kriswallsmith/assetic": "~1.2", - "php": ">=5.3.0", - "symfony/console": "~2.3", - "symfony/dependency-injection": "~2.3", - "symfony/framework-bundle": "~2.3", - "symfony/yaml": "~2.3" + "replace": { + "guzzle/batch": "self.version", + "guzzle/cache": "self.version", + "guzzle/common": "self.version", + "guzzle/http": "self.version", + "guzzle/inflection": "self.version", + "guzzle/iterator": "self.version", + "guzzle/log": "self.version", + "guzzle/parser": "self.version", + "guzzle/plugin": "self.version", + "guzzle/plugin-async": "self.version", + "guzzle/plugin-backoff": "self.version", + "guzzle/plugin-cache": "self.version", + "guzzle/plugin-cookie": "self.version", + "guzzle/plugin-curlauth": "self.version", + "guzzle/plugin-error-response": "self.version", + "guzzle/plugin-history": "self.version", + "guzzle/plugin-log": "self.version", + "guzzle/plugin-md5": "self.version", + "guzzle/plugin-mock": "self.version", + "guzzle/plugin-oauth": "self.version", + "guzzle/service": "self.version", + "guzzle/stream": "self.version" }, "require-dev": { - "kriswallsmith/spork": "~0.2", - "patchwork/jsqueeze": "~1.0", - "symfony/class-loader": "~2.3", - "symfony/css-selector": "~2.3", - "symfony/dom-crawler": "~2.3", - "symfony/twig-bundle": "~2.3" + "doctrine/cache": "~1.3", + "monolog/monolog": "~1.0", + "phpunit/phpunit": "3.7.*", + "psr/log": "~1.0", + "symfony/class-loader": "~2.1", + "zendframework/zend-cache": "2.*,<2.3", + "zendframework/zend-log": "2.*,<2.3" }, "suggest": { - "kriswallsmith/spork": "to be able to dump assets in parallel", - "symfony/twig-bundle": "to use the Twig integration" + "guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated." }, - "type": "symfony-bundle", + "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "3.9-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Bundle\\AsseticBundle\\": "" + "psr-0": { + "Guzzle": "src/", + "Guzzle\\Tests": "tests/" } }, "notification-url": "https://packagist.org/downloads/", @@ -3489,69 +3578,63 @@ ], "authors": [ { - "name": "Kris Wallsmith", - "email": "kris.wallsmith@gmail.com", - "homepage": "http://kriswallsmith.net/" + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Guzzle Community", + "homepage": "https://github.com/guzzle/guzzle/contributors" } ], - "description": "Integrates Assetic into Symfony2", - "homepage": "https://github.com/symfony/AsseticBundle", + "description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle", + "homepage": "http://guzzlephp.org/", "keywords": [ - "assets", - "compression", - "minification" + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" ], - "time": "2015-01-27 12:45:16" + "time": "2015-03-18 18:23:50" }, { - "name": "symfony/doctrine-bridge", - "version": "2.7.x-dev", + "name": "liip/functional-test-bundle", + "version": "1.2.2", "source": { "type": "git", - "url": "https://github.com/symfony/DoctrineBridge.git", - "reference": "aa7eb6751902df204c281186c2db414d154e088e" + "url": "https://github.com/liip/LiipFunctionalTestBundle.git", + "reference": "57ef24d843d8e3133b201f7bfe722dcea115a546" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/DoctrineBridge/zipball/aa7eb6751902df204c281186c2db414d154e088e", - "reference": "aa7eb6751902df204c281186c2db414d154e088e", + "url": "https://api.github.com/repos/liip/LiipFunctionalTestBundle/zipball/57ef24d843d8e3133b201f7bfe722dcea115a546", + "reference": "57ef24d843d8e3133b201f7bfe722dcea115a546", "shasum": "" }, "require": { - "doctrine/common": "~2.3", - "php": ">=5.3.9" - }, - "require-dev": { - "doctrine/data-fixtures": "1.0.*", - "doctrine/dbal": "~2.2", - "doctrine/orm": "~2.2,>=2.2.3", - "symfony/dependency-injection": "~2.2", - "symfony/expression-language": "~2.2", - "symfony/form": "~2.7,>=2.7.1", - "symfony/http-kernel": "~2.2", - "symfony/phpunit-bridge": "~2.7", - "symfony/property-access": "~2.3", - "symfony/security": "~2.2", - "symfony/stopwatch": "~2.2", - "symfony/translation": "~2.0,>=2.0.5", - "symfony/validator": "~2.5,>=2.5.5" + "doctrine/common": "2.*", + "php": ">=5.3.2", + "symfony/browser-kit": "~2.0", + "symfony/framework-bundle": "~2.0" }, "suggest": { - "doctrine/data-fixtures": "", - "doctrine/dbal": "", - "doctrine/orm": "", - "symfony/form": "", - "symfony/validator": "" + "doctrine/dbal": "Required when using the fixture loading functionality with an ORM and SQLite", + "doctrine/doctrine-fixtures-bundle": "Required when using the fixture loading functionality", + "doctrine/orm": "Required when using the fixture loading functionality with an ORM and SQLite", + "nelmio/alice": "Required when using loadFixtureFiles functionality" }, - "type": "symfony-bridge", + "type": "symfony-bundle", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { "psr-4": { - "Symfony\\Bridge\\Doctrine\\": "" + "Liip\\FunctionalTestBundle\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -3560,53 +3643,51 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Liip AG", + "homepage": "http://www.liip.ch/" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Community contributions", + "homepage": "https://github.com/liip/LiipFunctionalTestBundle/contributors" } ], - "description": "Symfony Doctrine Bridge", - "homepage": "https://symfony.com", - "time": "2015-06-28 17:13:14" + "description": "This bundles provides additional functional test-cases for Symfony2 applications", + "keywords": [ + "Symfony2" + ], + "time": "2015-05-09 08:22:16" }, { - "name": "symfony/monolog-bundle", - "version": "v2.7.1", + "name": "phpspec/prophecy", + "version": "v1.4.1", "source": { "type": "git", - "url": "https://github.com/symfony/MonologBundle.git", - "reference": "9320b6863404c70ebe111e9040dab96f251de7ac" + "url": "https://github.com/phpspec/prophecy.git", + "reference": "3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/MonologBundle/zipball/9320b6863404c70ebe111e9040dab96f251de7ac", - "reference": "9320b6863404c70ebe111e9040dab96f251de7ac", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373", + "reference": "3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373", "shasum": "" }, "require": { - "monolog/monolog": "~1.8", - "php": ">=5.3.2", - "symfony/config": "~2.3", - "symfony/dependency-injection": "~2.3", - "symfony/http-kernel": "~2.3", - "symfony/monolog-bridge": "~2.3" + "doctrine/instantiator": "^1.0.2", + "phpdocumentor/reflection-docblock": "~2.0", + "sebastian/comparator": "~1.1" }, "require-dev": { - "symfony/console": "~2.3", - "symfony/yaml": "~2.3" + "phpspec/phpspec": "~2.0" }, - "type": "symfony-bundle", + "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7.x-dev" + "dev-master": "1.4.x-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Bundle\\MonologBundle\\": "" + "psr-0": { + "Prophecy\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -3615,366 +3696,545 @@ ], "authors": [ { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" }, { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" } ], - "description": "Symfony MonologBundle", - "homepage": "http://symfony.com", + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", "keywords": [ - "log", - "logging" + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" ], - "time": "2015-01-04 20:21:17" + "time": "2015-04-27 22:15:08" }, { - "name": "symfony/swiftmailer-bundle", - "version": "v2.3.8", + "name": "phpunit/php-code-coverage", + "version": "2.1.7", "source": { "type": "git", - "url": "https://github.com/symfony/SwiftmailerBundle.git", - "reference": "970b13d01871207e81d17b17ddda025e7e21e797" + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "07e27765596d72c378a6103e80da5d84e802f1e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/SwiftmailerBundle/zipball/970b13d01871207e81d17b17ddda025e7e21e797", - "reference": "970b13d01871207e81d17b17ddda025e7e21e797", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/07e27765596d72c378a6103e80da5d84e802f1e4", + "reference": "07e27765596d72c378a6103e80da5d84e802f1e4", "shasum": "" }, "require": { - "php": ">=5.3.2", - "swiftmailer/swiftmailer": ">=4.2.0,~5.0", - "symfony/swiftmailer-bridge": "~2.1" + "php": ">=5.3.3", + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "~1.3", + "sebastian/environment": "~1.0", + "sebastian/version": "~1.0" }, "require-dev": { - "symfony/config": "~2.1", - "symfony/dependency-injection": "~2.1", - "symfony/http-kernel": "~2.1", - "symfony/yaml": "~2.1" + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "~4" }, "suggest": { - "psr/log": "Allows logging" + "ext-dom": "*", + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" }, - "type": "symfony-bundle", + "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3-dev" + "dev-master": "2.1.x-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Bundle\\SwiftmailerBundle\\": "" + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2015-06-30 06:52:35" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "a923bb15680d0089e2316f7a4af8f437046e96bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a923bb15680d0089e2316f7a4af8f437046e96bb", + "reference": "a923bb15680d0089e2316f7a4af8f437046e96bb", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" } }, + "autoload": { + "classmap": [ + "src/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2015-04-02 05:19:05" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Symfony SwiftmailerBundle", - "homepage": "http://symfony.com", - "time": "2014-12-01 17:44:50" + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21 13:50:34" }, { - "name": "symfony/symfony", - "version": "v2.7.1", + "name": "phpunit/php-timer", + "version": "1.0.6", "source": { "type": "git", - "url": "https://github.com/symfony/symfony.git", - "reference": "932b6e7499c670f4db6d0b871477a4a3ca161e74" + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "83fe1bdc5d47658b727595c14da140da92b3d66d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/symfony/zipball/932b6e7499c670f4db6d0b871477a4a3ca161e74", - "reference": "932b6e7499c670f4db6d0b871477a4a3ca161e74", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/83fe1bdc5d47658b727595c14da140da92b3d66d", + "reference": "83fe1bdc5d47658b727595c14da140da92b3d66d", "shasum": "" }, "require": { - "doctrine/common": "~2.3", - "php": ">=5.3.9", - "psr/log": "~1.0", - "twig/twig": "~1.18" + "php": ">=5.3.3" }, - "replace": { - "symfony/asset": "self.version", - "symfony/browser-kit": "self.version", - "symfony/class-loader": "self.version", - "symfony/config": "self.version", - "symfony/console": "self.version", - "symfony/css-selector": "self.version", - "symfony/debug": "self.version", - "symfony/debug-bundle": "self.version", - "symfony/dependency-injection": "self.version", - "symfony/doctrine-bridge": "self.version", - "symfony/dom-crawler": "self.version", - "symfony/event-dispatcher": "self.version", - "symfony/expression-language": "self.version", - "symfony/filesystem": "self.version", - "symfony/finder": "self.version", - "symfony/form": "self.version", - "symfony/framework-bundle": "self.version", - "symfony/http-foundation": "self.version", - "symfony/http-kernel": "self.version", - "symfony/intl": "self.version", - "symfony/locale": "self.version", - "symfony/monolog-bridge": "self.version", - "symfony/options-resolver": "self.version", - "symfony/process": "self.version", - "symfony/property-access": "self.version", - "symfony/proxy-manager-bridge": "self.version", - "symfony/routing": "self.version", - "symfony/security": "self.version", - "symfony/security-acl": "self.version", - "symfony/security-bundle": "self.version", - "symfony/security-core": "self.version", - "symfony/security-csrf": "self.version", - "symfony/security-http": "self.version", - "symfony/serializer": "self.version", - "symfony/stopwatch": "self.version", - "symfony/swiftmailer-bridge": "self.version", - "symfony/templating": "self.version", - "symfony/translation": "self.version", - "symfony/twig-bridge": "self.version", - "symfony/twig-bundle": "self.version", - "symfony/validator": "self.version", - "symfony/var-dumper": "self.version", - "symfony/web-profiler-bundle": "self.version", - "symfony/yaml": "self.version" + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2015-06-13 07:35:30" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.4.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "7a9b0969488c3c54fd62b4d504b3ec758fd005d9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/7a9b0969488c3c54fd62b4d504b3ec758fd005d9", + "reference": "7a9b0969488c3c54fd62b4d504b3ec758fd005d9", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" }, "require-dev": { - "doctrine/data-fixtures": "1.0.*", - "doctrine/dbal": "~2.2", - "doctrine/doctrine-bundle": "~1.2", - "doctrine/orm": "~2.2,>=2.2.3", - "egulias/email-validator": "~1.2", - "ircmaxell/password-compat": "~1.0", - "monolog/monolog": "~1.11", - "ocramius/proxy-manager": "~0.4|~1.0", - "symfony/phpunit-bridge": "self.version" + "phpunit/phpunit": "~4.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2015-06-19 03:43:16" + }, + { + "name": "phpunit/phpunit", + "version": "4.7.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "0ebabb4cda7d066be8391dfdbaf57fe70ac9a99b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0ebabb4cda7d066be8391dfdbaf57fe70ac9a99b", + "reference": "0ebabb4cda7d066be8391dfdbaf57fe70ac9a99b", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpspec/prophecy": "~1.3,>=1.3.1", + "phpunit/php-code-coverage": "~2.1", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": ">=1.0.6", + "phpunit/phpunit-mock-objects": "~2.3", + "sebastian/comparator": "~1.1", + "sebastian/diff": "~1.2", + "sebastian/environment": "~1.2", + "sebastian/exporter": "~1.2", + "sebastian/global-state": "~1.0", + "sebastian/version": "~1.0", + "symfony/yaml": "~2.1|~3.0" + }, + "suggest": { + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.7.x-dev" } }, "autoload": { - "psr-4": { - "Symfony\\Bridge\\Doctrine\\": "src/Symfony/Bridge/Doctrine/", - "Symfony\\Bridge\\Monolog\\": "src/Symfony/Bridge/Monolog/", - "Symfony\\Bridge\\ProxyManager\\": "src/Symfony/Bridge/ProxyManager/", - "Symfony\\Bridge\\Swiftmailer\\": "src/Symfony/Bridge/Swiftmailer/", - "Symfony\\Bridge\\Twig\\": "src/Symfony/Bridge/Twig/", - "Symfony\\Bundle\\": "src/Symfony/Bundle/", - "Symfony\\Component\\": "src/Symfony/Component/" - }, "classmap": [ - "src/Symfony/Component/HttpFoundation/Resources/stubs", - "src/Symfony/Component/Intl/Resources/stubs" - ], - "files": [ - "src/Symfony/Component/Intl/Resources/stubs/functions.php" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "The Symfony PHP framework", - "homepage": "https://symfony.com", + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", "keywords": [ - "framework" + "phpunit", + "testing", + "xunit" ], - "time": "2015-06-11 21:15:28" + "time": "2015-06-30 06:53:57" }, { - "name": "twig/extensions", - "version": "v1.2.0", + "name": "phpunit/phpunit-mock-objects", + "version": "2.3.5", "source": { "type": "git", - "url": "https://github.com/twigphp/Twig-extensions.git", - "reference": "8cf4b9fe04077bd54fc73f4fde83347040c3b8cd" + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "1c330b1b6e1ea8fd15f2fbea46770576e366855c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig-extensions/zipball/8cf4b9fe04077bd54fc73f4fde83347040c3b8cd", - "reference": "8cf4b9fe04077bd54fc73f4fde83347040c3b8cd", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/1c330b1b6e1ea8fd15f2fbea46770576e366855c", + "reference": "1c330b1b6e1ea8fd15f2fbea46770576e366855c", "shasum": "" }, "require": { - "twig/twig": "~1.12" + "doctrine/instantiator": "~1.0,>=1.0.2", + "php": ">=5.3.3", + "phpunit/php-text-template": "~1.2" }, "require-dev": { - "symfony/translation": "~2.3" + "phpunit/phpunit": "~4.4" }, "suggest": { - "symfony/translation": "Allow the time_diff output to be translated" + "ext-soap": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "2.3.x-dev" } }, "autoload": { - "psr-0": { - "Twig_Extensions_": "lib/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" } ], - "description": "Common additional features for Twig that do not directly belong in core", - "homepage": "http://twig.sensiolabs.org/doc/extensions/index.html", + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", "keywords": [ - "i18n", - "text" + "mock", + "xunit" ], - "time": "2014-10-30 14:30:03" + "time": "2015-07-04 05:41:32" }, { - "name": "twig/twig", - "version": "v1.18.2", + "name": "satooshi/php-coveralls", + "version": "v0.6.1", "source": { "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "e8e6575abf6102af53ec283f7f14b89e304fa602" + "url": "https://github.com/satooshi/php-coveralls.git", + "reference": "dd0df95bd37a7cf5c5c50304dfe260ffe4b50760" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/e8e6575abf6102af53ec283f7f14b89e304fa602", - "reference": "e8e6575abf6102af53ec283f7f14b89e304fa602", + "url": "https://api.github.com/repos/satooshi/php-coveralls/zipball/dd0df95bd37a7cf5c5c50304dfe260ffe4b50760", + "reference": "dd0df95bd37a7cf5c5c50304dfe260ffe4b50760", "shasum": "" }, "require": { - "php": ">=5.2.7" + "ext-curl": "*", + "ext-json": "*", + "ext-simplexml": "*", + "guzzle/guzzle": ">=3.0", + "php": ">=5.3", + "psr/log": "1.0.0", + "symfony/config": ">=2.0", + "symfony/console": ">=2.0", + "symfony/stopwatch": ">=2.2", + "symfony/yaml": ">=2.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.18-dev" - } + "require-dev": { + "apigen/apigen": "2.8.*@stable", + "pdepend/pdepend": "dev-master", + "phpmd/phpmd": "dev-master", + "phpunit/php-invoker": ">=1.1.0,<1.2.0", + "phpunit/phpunit": "3.7.*@stable", + "sebastian/finder-facade": "dev-master", + "sebastian/phpcpd": "1.4.*@stable", + "squizlabs/php_codesniffer": "1.4.*@stable", + "theseer/fdomdocument": "dev-master" }, + "bin": [ + "composer/bin/coveralls" + ], + "type": "library", "autoload": { "psr-0": { - "Twig_": "lib/" + "Contrib\\Component": "src/", + "Contrib\\Bundle": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - }, - { - "name": "Twig Team", - "homepage": "http://twig.sensiolabs.org/contributors", - "role": "Contributors" + "name": "Kitamura Satoshi", + "email": "with.no.parachute@gmail.com", + "homepage": "https://www.facebook.com/satooshi.jp" } ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "http://twig.sensiolabs.org", + "description": "PHP client library for Coveralls API", + "homepage": "https://github.com/satooshi/php-coveralls", "keywords": [ - "templating" + "ci", + "coverage", + "github", + "test" ], - "time": "2015-06-06 23:31:24" + "time": "2013-05-04 08:07:33" }, { - "name": "willdurand/jsonp-callback-validator", - "version": "v1.1.0", + "name": "sebastian/comparator", + "version": "1.1.1", "source": { "type": "git", - "url": "https://github.com/willdurand/JsonpCallbackValidator.git", - "reference": "1a7d388bb521959e612ef50c5c7b1691b097e909" + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "1dd8869519a225f7f2b9eb663e225298fade819e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/willdurand/JsonpCallbackValidator/zipball/1a7d388bb521959e612ef50c5c7b1691b097e909", - "reference": "1a7d388bb521959e612ef50c5c7b1691b097e909", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dd8869519a225f7f2b9eb663e225298fade819e", + "reference": "1dd8869519a225f7f2b9eb663e225298fade819e", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2" }, "require-dev": { - "phpunit/phpunit": "~3.7" + "phpunit/phpunit": "~4.4" }, "type": "library", - "autoload": { - "psr-0": { - "JsonpCallbackValidator": "src/" + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" } }, + "autoload": { + "classmap": [ + "src/" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "William Durand", - "email": "william.durand1@gmail.com", - "homepage": "http://www.willdurand.fr" + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "JSONP callback validator.", - "time": "2014-01-20 22:35:06" + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2015-01-29 16:28:08" }, { - "name": "willdurand/negotiation", - "version": "1.3.4", + "name": "sebastian/diff", + "version": "1.3.0", "source": { "type": "git", - "url": "https://github.com/willdurand/Negotiation.git", - "reference": "d7fa4ce4a0436915b9ba9f7cb5ff37719f0a834c" + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/willdurand/Negotiation/zipball/d7fa4ce4a0436915b9ba9f7cb5ff37719f0a834c", - "reference": "d7fa4ce4a0436915b9ba9f7cb5ff37719f0a834c", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", + "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" }, "type": "library", "extra": { @@ -3983,243 +4243,285 @@ } }, "autoload": { - "psr-0": { - "Negotiation": "src/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "William Durand", - "email": "william.durand1@gmail.com" + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "Content Negotiation tools for PHP provided as a standalone library.", - "homepage": "http://williamdurand.fr/Negotiation/", + "description": "Diff implementation", + "homepage": "http://www.github.com/sebastianbergmann/diff", "keywords": [ - "accept", - "content", - "format", - "header", - "negotiation" + "diff" ], - "time": "2014-10-02 07:26:00" + "time": "2015-02-22 15:13:53" }, { - "name": "zendframework/zend-code", - "version": "2.5.1", + "name": "sebastian/environment", + "version": "1.2.2", "source": { "type": "git", - "url": "https://github.com/zendframework/zend-code.git", - "reference": "5d998f261ec2a55171c71da57a11622745680153" + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-code/zipball/5d998f261ec2a55171c71da57a11622745680153", - "reference": "5d998f261ec2a55171c71da57a11622745680153", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5a8c7d31914337b69923db26c4221b81ff5a196e", + "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-eventmanager": "~2.5" + "php": ">=5.3.3" }, "require-dev": { - "doctrine/common": ">=2.1", - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "zendframework/zend-stdlib": "~2.5", - "zendframework/zend-version": "~2.5" - }, - "suggest": { - "doctrine/common": "Doctrine\\Common >=2.1 for annotation features", - "zendframework/zend-stdlib": "Zend\\Stdlib component" + "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { - "psr-4": { - "Zend\\Code\\": "src/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "description": "provides facilities to generate arbitrary code using an object oriented interface", - "homepage": "https://github.com/zendframework/zend-code", + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", "keywords": [ - "code", - "zf2" + "Xdebug", + "environment", + "hhvm" ], - "time": "2015-06-03 15:31:59" + "time": "2015-01-01 10:01:08" }, { - "name": "zendframework/zend-eventmanager", - "version": "2.5.1", + "name": "sebastian/exporter", + "version": "1.2.0", "source": { "type": "git", - "url": "https://github.com/zendframework/zend-eventmanager.git", - "reference": "d94a16039144936f107f906896349900fd634443" + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "84839970d05254c73cde183a721c7af13aede943" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-eventmanager/zipball/d94a16039144936f107f906896349900fd634443", - "reference": "d94a16039144936f107f906896349900fd634443", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/84839970d05254c73cde183a721c7af13aede943", + "reference": "84839970d05254c73cde183a721c7af13aede943", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "~2.5" + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { - "psr-4": { - "Zend\\EventManager\\": "src/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-eventmanager", + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", "keywords": [ - "eventmanager", - "zf2" + "export", + "exporter" ], - "time": "2015-06-03 15:32:01" + "time": "2015-01-27 07:23:06" }, { - "name": "zendframework/zend-stdlib", - "version": "2.5.1", + "name": "sebastian/global-state", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/zendframework/zend-stdlib.git", - "reference": "cc8e90a60dd5d44b9730b77d07b97550091da1ae" + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/cc8e90a60dd5d44b9730b77d07b97550091da1ae", - "reference": "cc8e90a60dd5d44b9730b77d07b97550091da1ae", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/c7428acdb62ece0a45e6306f1ae85e1c05b09c01", + "reference": "c7428acdb62ece0a45e6306f1ae85e1c05b09c01", "shasum": "" }, "require": { - "php": ">=5.3.23" + "php": ">=5.3.3" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "zendframework/zend-config": "~2.5", - "zendframework/zend-eventmanager": "~2.5", - "zendframework/zend-filter": "~2.5", - "zendframework/zend-inputfilter": "~2.5", - "zendframework/zend-serializer": "~2.5", - "zendframework/zend-servicemanager": "~2.5" + "phpunit/phpunit": "~4.2" }, "suggest": { - "zendframework/zend-eventmanager": "To support aggregate hydrator usage", - "zendframework/zend-filter": "To support naming strategy hydrator usage", - "zendframework/zend-serializer": "Zend\\Serializer component", - "zendframework/zend-servicemanager": "To support hydrator plugin manager usage" + "ext-uopz": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" + "dev-master": "1.0-dev" } }, "autoload": { - "psr-4": { - "Zend\\Stdlib\\": "src/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-stdlib", + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", "keywords": [ - "stdlib", - "zf2" + "global state" ], - "time": "2015-06-03 15:32:03" - } - ], - "packages-dev": [ + "time": "2014-10-06 09:23:50" + }, { - "name": "liip/functional-test-bundle", - "version": "1.2.2", + "name": "sebastian/recursion-context", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/liip/LiipFunctionalTestBundle.git", - "reference": "57ef24d843d8e3133b201f7bfe722dcea115a546" + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "3989662bbb30a29d20d9faa04a846af79b276252" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/liip/LiipFunctionalTestBundle/zipball/57ef24d843d8e3133b201f7bfe722dcea115a546", - "reference": "57ef24d843d8e3133b201f7bfe722dcea115a546", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/3989662bbb30a29d20d9faa04a846af79b276252", + "reference": "3989662bbb30a29d20d9faa04a846af79b276252", "shasum": "" }, "require": { - "doctrine/common": "2.*", - "php": ">=5.3.2", - "symfony/browser-kit": "~2.0", - "symfony/framework-bundle": "~2.0" + "php": ">=5.3.3" }, - "suggest": { - "doctrine/dbal": "Required when using the fixture loading functionality with an ORM and SQLite", - "doctrine/doctrine-fixtures-bundle": "Required when using the fixture loading functionality", - "doctrine/orm": "Required when using the fixture loading functionality with an ORM and SQLite", - "nelmio/alice": "Required when using loadFixtureFiles functionality" + "require-dev": { + "phpunit/phpunit": "~4.4" }, - "type": "symfony-bundle", + "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { - "psr-4": { - "Liip\\FunctionalTestBundle\\": "" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Liip AG", - "homepage": "http://www.liip.ch/" + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" }, { - "name": "Community contributions", - "homepage": "https://github.com/liip/LiipFunctionalTestBundle/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" } ], - "description": "This bundles provides additional functional test-cases for Symfony2 applications", - "keywords": [ - "Symfony2" + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2015-01-24 09:48:32" + }, + { + "name": "sebastian/version", + "version": "1.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "shasum": "" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" ], - "time": "2015-05-09 08:22:16" + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2015-06-21 13:59:46" } ], "aliases": [], @@ -4230,6 +4532,9 @@ "symfony/doctrine-bridge": 20, "dunglas/api-bundle": 20, "ramsey/uuid": 20, + "doctrine/migrations": 20, + "doctrine/doctrine-migrations-bundle": 20, + "stof/doctrine-extensions-bundle": 20, "codeclimate/php-test-reporter": 20 }, "prefer-stable": false, diff --git a/migrations.yml b/migrations.yml @@ -1,5 +0,0 @@ ---- -name: PartKeepr -migrations_namespace: DoctrineMigrations -table_name: SchemaVersions -migrations_directory: src/backend/PartKeepr/Versions- \ No newline at end of file diff --git a/src/PartKeepr/CategoryBundle/Entity/AbstractCategory.php b/src/PartKeepr/CategoryBundle/Entity/AbstractCategory.php @@ -0,0 +1,245 @@ +<?php +namespace PartKeepr\CategoryBundle\Entity; + +use Doctrine\ORM\Mapping as ORM; +use Gedmo\Mapping\Annotation as Gedmo; +use PartKeepr\Util\BaseEntity; +use Symfony\Component\Serializer\Annotation\Groups; + +/** + * + * @ORM\MappedSuperclass() + * @ORM\Table(indexes={@ORM\Index(columns={"lft"}),@ORM\Index(columns={"rgt"})}) + * + * Represents an abstract category. This class isn't directly usable; you need to inherit it to take advantage of + * the AbstractCategoryManager. + * + * If you are interested on how NestedSets work, please read http://en.wikipedia.org/wiki/Nested_set_model + */ +class AbstractCategory extends BaseEntity +{ + /** + * The "left" property of the nested set + * @ORM\Column(type="integer") + * + * @Gedmo\TreeLeft + * @var integer + */ + private $lft; + + /** + * The "right" property of the nested set + * @ORM\Column(type="integer") + * + * @Gedmo\TreeRight + * @var integer + */ + private $rgt; + + /** + * @Gedmo\TreeLevel + * @ORM\Column(name="lvl", type="integer") + * @var integer + */ + private $lvl; + + /** + * @Gedmo\TreeRoot + * @ORM\Column(name="root", type="integer", nullable=true) + */ + private $root; + + /** + * The name of the category + * @ORM\Column(length=128) + * @Groups({"default"}) + * + * @var string + */ + private $name; + + /** + * The description of the category + * @ORM\Column(type="text",nullable=true) + * @Groups({"default"}) + * + * @var string + */ + private $description; + + /** + * Holds the category path. + * + * @ORM\Column(type="text",nullable=true) + * + * @var string + */ + private $categoryPath; + + /** + * @Groups({"default"}) + * @var bool + */ + public $expanded = true; + + /** + * Sets the name of this category + * + * @param string $name The name to set + */ + public function setName($name) + { + $this->name = $name; + } + + /** + * Returns the name of this category + * + * @return string The category name + */ + public function getName() + { + return $this->name; + } + + + /** + * Returns the level of this category + * + * @return int + */ + public function getLevel() + { + return $this->lvl; + } + + /** + * Sets the description for this category + * + * @param string $description The description of this category + */ + public function setDescription($description) + { + $this->description = $description; + } + + /** + * Returns the description of this category + * + * @return string The description + */ + public function getDescription() + { + return $this->description; + } + + /** + * Returns the "left" value of the nested set. + * + * @return int The left value + * + * (non-PHPdoc) + * @see DoctrineExtensions\NestedSet.Node::getLeftValue() + */ + public function getLeftValue() + { + return $this->lft; + } + + /** + * Sets the "left" value. + * + * @param $lft integer The left value + * (non-PHPdoc) + * + * @see DoctrineExtensions\NestedSet.Node::setLeftValue() + */ + public function setLeftValue($lft) + { + $this->lft = $lft; + } + + /** + * Returns the "right" value of the nested set. + * + * @return int The right value + * + * (non-PHPdoc) + * @see DoctrineExtensions\NestedSet.Node::getRightValue() + */ + public function getRightValue() + { + return $this->rgt; + } + + /** + * Sets the "right" value of the nested set + * + * @param $rgt int The right value + * + * (non-PHPdoc) + * + * @see DoctrineExtensions\NestedSet.Node::setRightValue() + */ + public function setRightValue($rgt) + { + $this->rgt = $rgt; + } + + public function setRoot($root) + { + $this->root = $root; + } + + /** + * Serializes the entity. + */ + public function serialize() + { + return array( + "id" => $this->getId(), + "name" => $this->getName(), + "description" => $this->getDescription(), + ); + } + + /** + * Returns a string representation of the current node. + * + * @return string The node name + * + * (non-PHPdoc) + * @see DoctrineExtensions\NestedSet.Node::__toString() + */ + public function __toString() + { + return $this->getName(); + } + + /** + * Retrieves the category path + * + * @return string The category path + */ + public function getCategoryPath() + { + return $this->categoryPath; + } + + /** + * Sets the category path. + * + * THIS IS ONLY TO BE CALLED FROM THE CATEGORYMANAGER! DON'T MESS WITH IT! + * + * @param string $categoryPath + */ + public function setCategoryPath($categoryPath) + { + $this->categoryPath = $categoryPath; + } + + public function getRoot() + { + return $this->root; + } +} diff --git a/src/PartKeepr/CategoryBundle/Exception/MissingParentCategoryException.php b/src/PartKeepr/CategoryBundle/Exception/MissingParentCategoryException.php @@ -0,0 +1,7 @@ +<?php +namespace PartKeepr\CategoryBundle\Exception; + +class MissingParentCategoryException extends \Exception +{ + +} diff --git a/src/PartKeepr/CategoryBundle/Exception/RootMayNotBeMovedException.php b/src/PartKeepr/CategoryBundle/Exception/RootMayNotBeMovedException.php @@ -0,0 +1,7 @@ +<?php +namespace PartKeepr\CategoryBundle\Exception; + +class RootMayNotBeMovedException extends \Exception +{ + +} diff --git a/src/PartKeepr/CategoryBundle/PartKeeprCategoryBundle.php b/src/PartKeepr/CategoryBundle/PartKeeprCategoryBundle.php @@ -0,0 +1,8 @@ +<?php +namespace PartKeepr\CategoryBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; + +class PartKeeprCategoryBundle extends Bundle +{ +} diff --git a/src/PartKeepr/CoreBundle/DoctrineMigrations/BaseMigration.php b/src/PartKeepr/CoreBundle/DoctrineMigrations/BaseMigration.php @@ -0,0 +1,42 @@ +<?php +namespace PartKeepr\CoreBundle\DoctrineMigrations; + +use Doctrine\DBAL\Migrations\AbstractMigration; +use Doctrine\ORM\EntityManager; +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Doctrine\ORM\Tools\SchemaTool; +use Symfony\Component\DependencyInjection\ContainerInterface; + +abstract class BaseMigration extends AbstractMigration implements ContainerAwareInterface +{ + /** + * @var ContainerInterface + */ + private $container; + + public function setContainer(ContainerInterface $container = null) + { + $this->container = $container; + } + + protected function performDatabaseUpgrade() + { + /** + * @var $entityManager EntityManager + */ + $entityManager = $this->container->get("doctrine")->getManager(); + $tool = new SchemaTool($entityManager); + + $meta = $this->container->get("doctrine")->getManager()->getMetadataFactory()->getAllMetadata(); + + $tool->updateSchema($meta, true); + } + + /** + * @return EntityManager + */ + protected function getEM() + { + return $this->container->get("doctrine")->getManager(); + } +} diff --git a/src/PartKeepr/CoreBundle/DoctrineMigrations/Version20150708120022.php b/src/PartKeepr/CoreBundle/DoctrineMigrations/Version20150708120022.php @@ -0,0 +1,109 @@ +<?php +namespace PartKeepr\CoreBundle\DoctrineMigrations; + +use Doctrine\DBAL\Schema\Schema; + + +/** + * Auto-generated Migration: Please modify to your needs! + */ +class Version20150708120022 extends BaseMigration +{ + /** + * @param Schema $schema + */ + public function up(Schema $schema) + { + $this->performDatabaseUpgrade(); + + $this->fixTree("PartCategory"); + $this->fixTree("FootprintCategory"); + + + } + + public function fixTree($table) + { + $nodes = $this->getNodeIds($table); + + $queryBuilder = $this->connection->createQueryBuilder(); + $queryBuilder->update($table) + ->set("parent_id", ":parent") + ->set("root", ":root") + ->set("lvl", ":level") + ->where("id = :id"); + + foreach ($nodes as $node) { + $parent = $this->fetchParent($table, $node["id"]); + $level = $this->getLevel($table, $node["id"]); + + if ($parent !== false) { + $this->connection->executeUpdate($queryBuilder->getSQL(), + array( + ":parent" => $parent, + ":id" => $node["id"], + ":level" => $level, + ":root" => 1, + )); + } else { + $this->connection->executeUpdate($queryBuilder->getSQL(), + array( + ":parent" => null, + ":id" => $node["id"], + ":root" => 1, + ":level" => 0, + )); + } + } + } + + public function fetchParent($table, $id) + { + $queryBuilder = $this->connection->createQueryBuilder(); + + $queryBuilder->select("parent.id") + ->from($table, "node") + ->from($table, "parent") + ->where("parent.lft < node.lft") + ->andWhere("parent.rgt > node.rgt") + ->andWhere("node.id = :nodeid") + ->orderBy("parent.rgt - parent.lft") + ->setMaxResults(1); + + return $this->connection->fetchColumn($queryBuilder->getSQL(), array(":nodeid" => $id), 0); + } + + public function getNodeIds($table) + { + $qb = $this->connection->createQueryBuilder(); + + $qb->select("id") + ->from($table) + ->orderBy("id", "ASC"); + + return $this->connection->fetchAll($qb->getSQL()); + } + + public function getLevel($table, $id) + { + $qb = $this->connection->createQueryBuilder(); + + $qb->select("COUNT(*) AS level") + ->from($table, "node") + ->from($table, "parent") + ->where("node.lft > parent.lft") + ->andWhere("node.lft < parent.rgt") + ->andWhere("node.id = :nodeid"); + + return $this->connection->fetchAssoc($qb->getSQL(), array(":nodeid" => $id))["level"]; + } + + /** + * @param Schema $schema + */ + public function down(Schema $schema) + { + // this down() migration is auto-generated, please modify it to your needs + + } +} diff --git a/src/PartKeepr/DoctrineReflectionBundle/Resources/views/model.js.twig b/src/PartKeepr/DoctrineReflectionBundle/Resources/views/model.js.twig @@ -1,5 +1,5 @@ Ext.define('{{ className }}', { - extend: 'PartKeepr.data.HydraModel', + extend: '{{ parentClass }}', alias: 'schema.{{ className }}', idProperty: "@id", diff --git a/src/PartKeepr/DoctrineReflectionBundle/Services/ReflectionService.php b/src/PartKeepr/DoctrineReflectionBundle/Services/ReflectionService.php @@ -8,7 +8,8 @@ use Doctrine\ORM\Mapping\ClassMetadata; use Doctrine\ORM\Mapping\ClassMetadataInfo; use Symfony\Component\Templating\EngineInterface; -class ReflectionService { +class ReflectionService +{ /** @var EntityManager */ protected $em; @@ -17,7 +18,8 @@ class ReflectionService { protected $reader; - public function __construct (Registry $doctrine, EngineInterface $templateEngine, Reader $reader) { + public function __construct(Registry $doctrine, EngineInterface $templateEngine, Reader $reader) + { $this->templateEngine = $templateEngine; $this->em = $doctrine->getManager(); $this->reader = $reader; @@ -25,6 +27,7 @@ class ReflectionService { /** * Returns a list of all registered entities, converted to the ExtJS naming scheme (. instead of \) + * * @return array */ public function getEntities() @@ -43,10 +46,21 @@ class ReflectionService { public function getEntity($entity) { + $bIsTree = false; + + $parentClass = "PartKeepr.data.HydraModel"; + $entity = $this->convertExtJSToPHPClassName($entity); $cm = $this->em->getClassMetadata($entity); + + if ($cm->getReflectionClass()->isSubclassOf("PartKeepr\CategoryBundle\Entity\AbstractCategory")) { + $parentClass = "PartKeepr.data.HydraTreeModel"; + $bIsTree = true; + } + + $fields = $cm->getFieldNames(); $fieldMappings = array(); @@ -79,43 +93,44 @@ class ReflectionService { $getterPlural = true; break; case ClassMetadataInfo::MANY_TO_ONE: - $associationType = "MANY_TO_ONE"; + $associationType = "MANY_TO_ONE"; $getterPlural = false; - break; + break; case ClassMetadataInfo::ONE_TO_MANY: $associationType = "ONE_TO_MANY"; $getterPlural = true; - break; - //default: -// die("Unknown association ".$association["type"]); + break; } $getter = "get".ucfirst($association["fieldName"]); $getterField = lcfirst($cm->getReflectionClass()->getShortName()).str_replace( - ".", - "", - $this->convertPHPToExtJSClassName($association["targetEntity"]) - ); + ".", + "", + $this->convertPHPToExtJSClassName($association["targetEntity"]) + ); + if ($getterPlural) { - //$getter .= "s"; $getterField .= "s"; } - - - $associationMappings[$associationType][] = array( - "name" => $association["fieldName"], - "target" => $this->convertPHPToExtJSClassName($association["targetEntity"]), - "getter" => $getter, - "getterField" => $getterField - ); + // The self-referencing association may not be written for trees, because ExtJS can't load all nodes + // in one go. + if (!($bIsTree && $association["targetEntity"] == $entity)) { + $associationMappings[$associationType][] = array( + "name" => $association["fieldName"], + "target" => $this->convertPHPToExtJSClassName($association["targetEntity"]), + "getter" => $getter, + "getterField" => $getterField, + ); + } } $renderParams = array( "fields" => $fieldMappings, "associations" => $associationMappings, - "className" => $this->convertPHPToExtJSClassName($entity) + "className" => $this->convertPHPToExtJSClassName($entity), + "parentClass" => $parentClass, ); $targetService = $this->reader->getClassAnnotation( @@ -128,7 +143,7 @@ class ReflectionService { } return $this->templateEngine->render('PartKeeprDoctrineReflectionBundle::model.js.twig', $renderParams); -} + } protected function getExtJSFieldMapping($type) { @@ -168,4 +183,4 @@ class ReflectionService { { return str_replace(".", "\\", $className); } -}- \ No newline at end of file +} diff --git a/src/PartKeepr/FootprintBundle/Controller/FootprintCategoryController.php b/src/PartKeepr/FootprintBundle/Controller/FootprintCategoryController.php @@ -1,23 +1,50 @@ <?php namespace PartKeepr\FootprintBundle\Controller; +use Dunglas\ApiBundle\Controller\ResourceController; +use FOS\RestBundle\Controller\Annotations\RequestParam; +use PartKeepr\CategoryBundle\Exception\MissingParentCategoryException; +use PartKeepr\CategoryBundle\Exception\RootMayNotBeMovedException; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; -use DoctrineExtensions\NestedSet\Config; -use FOS\RestBundle\Controller\FOSRestController; -use Symfony\Component\Routing\Annotation\Route; - -class FootprintCategoryController extends FOSRestController +class FootprintCategoryController extends ResourceController { /** - * @Route("/FootprintCategory/getAll", defaults={"method" = "get","_format" = "json"}) + * Moves a node to another node + * + * @RequestParam(name="parent",description="The ID of the new parent") + * @param Request $request The request object + * @param int $id The ID of the node to move + * + * @return Response + * + * @throws MissingParentCategoryException If the parent category is not specified or invalid + * @throws RootMayNotBeMovedException If it is attempted to move the root category */ - public function getAllAction() + public function moveAction(Request $request, $id) { - $repository = $this->get("doctrine")->getEntityManager()->getRepository('PartKeepr\FootprintBundle\Entity\FootprintCategory'); + $resource = $this->getResource($request); + $entity = $this->findOrThrowNotFound($resource, $id); + $parentId = $request->request->get("parent"); + + $parentEntity = $this->get("api.iri_converter")->getItemFromIri($parentId); + + + if ($parentEntity === null) { + throw new MissingParentCategoryException($parentId); + } + + if ($entity->getLevel() === 0) { + throw new RootMayNotBeMovedException(); + } + + $entity->setParent($parentEntity); + + $this->get("doctrine")->getManager()->flush(); + + return new Response($request->request->get("parent")); + - var_dump($repository->verify()); - $repository->recover(); - $this->get("doctrine")->getEntityManager()->flush(); - return $repository->childrenHierarchy(); } -}- \ No newline at end of file +} diff --git a/src/PartKeepr/FootprintBundle/Entity/Footprint.php b/src/PartKeepr/FootprintBundle/Entity/Footprint.php @@ -1,200 +1,204 @@ -<?php +<?php namespace PartKeepr\FootprintBundle\Entity; -use PartKeepr\DoctrineReflectionBundle\Annotation\TargetService; -use PartKeepr\Util\Deserializable; -use PartKeepr\Util\Serializable; -use PartKeepr\FootprintBundle\Entity\FootprintCategory; -use PartKeepr\Util\BaseEntity; +use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ORM\Mapping as ORM; +use PartKeepr\DoctrineReflectionBundle\Annotation\TargetService; +use PartKeepr\UploadedFile\TempUploadedFile; +use PartKeepr\Util\BaseEntity; +use Symfony\Component\Serializer\Annotation\Groups; /** * @ORM\Entity - * @TargetService(uri="/footprint") + * @TargetService(uri="/api/footprint") */ +class Footprint extends BaseEntity +{ + /** + * Holds the footprint name + * + * @ORM\Column(length=64,unique=true) + * @Groups({"default"}) + * + * @var string + */ + private $name; + + /** + * Holds the footprint description + * + * @ORM\Column(type="text",nullable=true) + * @Groups({"default"}) + * + * @var string + */ + private $description; + + /** + * The category of the footprint + * + * @ORM\ManyToOne(targetEntity="FootprintCategory") + * @Groups({"default"}) + * + * @var FootprintCategory + */ + private $category; + + /** + * Holds the footprint image + * + * @ORM\OneToOne(targetEntity="FootprintImage", mappedBy="footprint", cascade={"persist", "remove"}) + * + * @Groups({"default"}) + * + * @var FootprintImage + */ + private $image; + + /** + * Holds the footprint attachments + * + * @ORM\OneToMany(targetEntity="FootprintAttachment", mappedBy="footprint", cascade={"persist", "remove"}) + * + * @Groups({"default"}) + * + * @var FootprintAttachment + */ + private $attachments; + + /** + * Constructs a new Footprint entity + */ + public function __construct() + { + $this->attachments = new ArrayCollection(); + } + + /** + * Sets the name of this footprint + * + * @param string $name The footprint name + * + * @return void + */ + public function setName($name) + { + //$this->name = $name; + } + + /** + * Returns the name of this footprint + * + * @return string The name of this footprint + */ + public function getName() + { + return $this->name; + } + + /** + * Sets the description of this footprint + * + * @param string $description The description + * + * @return void + */ + public function setDescription($description) + { + $this->description = $description; + } + + /** + * Returns the description of this footprint + * + * @return string The description + */ + public function getDescription() + { + return $this->description; + } + + /** + * Sets the category for this footprint + * + * @param FootprintCategory $category The category + * + * @return void + */ + public function setCategory(FootprintCategory $category) + { + $this->category = $category; + } + + /** + * Returns the category of this footprint + * + * @return FootprintCategory The footprint category + */ + public function getCategory() + { + return $this->category; + } + + /** + * Sets the footprint image + * + * @param FootprintImage $image The footprint image + * + * @return void + */ + public function setImage(FootprintImage $image) + { + $this->image = $image; + $image->setFootprint($this); + } + + /** + * Returns the footprint image + * + * @return FootprintImage The footprint image + */ + public function getImage() + { + return $this->image; + } + + /** + * Returns the attachments for this footprint + * + * @return ArrayCollection The attachments + */ + public function getAttachments() + { + return $this->attachments; + } + + /** + * Adds an IC Logo. + * + * @param FootprintAttachment|TempUploadedFile $attachment Either a FootprintAttachment or a TempUploadedFile + * + * @return void + */ + public function addAttachment($attachment) + { + if ($attachment instanceof FootprintAttachment) { + $attachment->setFootprint($this); + } + + $this->attachments->add($attachment); + } -class Footprint extends BaseEntity implements Serializable, Deserializable { - /** - * Holds the footprint name - * @ORM\Column(length=64,unique=true) - * @var string - */ - private $name; - - /** - * Holds the footprint description - * @ORM\Column(type="text",nullable=true) - * @var string - */ - private $description; - - /** - * The category of the footprint - * @ORM\ManyToOne(targetEntity="PartKeepr\FootprintBundle\Entity\FootprintCategory") - * @var Category - */ - private $category; - - /** - * Holds the footprint image - * @ORM\OneToOne(targetEntity="PartKeepr\FootprintBundle\Entity\FootprintImage",mappedBy="footprint",cascade={"persist", "remove"}) - * - * @var FootprintImage - */ - private $image; - - /** - * Holds the footprint attachments - * @ORM\OneToMany(targetEntity="PartKeepr\FootprintBundle\Entity\FootprintAttachment",mappedBy="footprint",cascade={"persist", "remove"}) - * - * @var FootprintAttachment - */ - private $attachments; - - /** - * Constructs a new Footprint entity - */ - public function __construct () { - $this->attachments = new \Doctrine\Common\Collections\ArrayCollection(); - } - - /** - * Sets the name of this footprint - * - * @param string $name The footprint name - */ - public function setName ($name) { - $this->name = $name; - } - - /** - * Returns the name of this footprint - * @return string The name of this footprint - */ - public function getName () { - return $this->name; - } - - /** - * Sets the description of this footprint - * @param string $description The description - */ - public function setDescription ($description) { - $this->description = $description; - } - - /** - * Returns the description of this footprint - * @return string The description - */ - public function getDescription () { - return $this->description; - } - - /** - * Sets the category for this footprint - * -*@param \PartKeepr\FootprintBundle\Entity\FootprintCategory $category The category - */ - public function setCategory (FootprintCategory $category) { - $this->category = $category; - } - - /** - * Returns the category of this footprint - * @return FootprintCategory The footprint category - */ - public function getCategory () { - return $this->category; - } - - /** - * Sets the footprint image - * @param FootprintImage $image The footprint image - */ - public function setImage (FootprintImage $image) { - $this->image = $image; - $image->setFootprint($this); - } - - /** - * Returns the footprint image - * @return FootprintImage The footprint image - */ - public function getImage () { - return $this->image; - } - - /** - * Returns the attachments for this footprint - * @return ArrayCollection The attachments - */ - public function getAttachments () { - return $this->attachments; - } - - /** - * Serializes the footprint - * @return array the serialized footprint - */ - public function serialize () { - return array( - "id" => $this->getId(), - "name" => $this->getName(), - "description" => $this->getDescription(), - "image_id" => is_object($this->getImage()) ? $this->getImage()->getId() : null, - "category" => is_object($this->getCategory()) ? $this->getCategory()->getId() : null, - "attachments" => $this->serializeChildren($this->getAttachments()) - ); - } - - /** - * Deserializes the footprint - * @param array $parameters The array with the parameters to set - */ - public function deserialize (array $parameters) { - foreach ($parameters as $key => $value) { - switch ($key) { - case "name": - $this->setName($value); - break; - case "description": - $this->setDescription($value); - break; - case "image_id": - if ($value == "") { - echo "/** Breaking because of empty value */"; - break; } - - try { - $image = FootprintImage::loadById($value); - $this->setImage($image); - } catch (\Exception $e) { - if ($this->getImage()) { - // Image was not found, maybe a temporary image? - $this->getImage()->replaceFromTemporaryFile($value); - } else { - $image = FootprintImage::createFromTemporaryFile($value); - $this->setImage($image); - } - } - - break; - case "category": - try { - $category = FootprintCategory::loadById($value); - $this->setCategory($category); - } catch (\Exception $e) { - // Category was not found, do not change category. - } - break; - case "attachments": - $this->deserializeChildren($value, $this->getAttachments(), "PartKeepr\Footprint\FootprintAttachment"); - foreach ($this->getAttachments() as $attachment) { - $attachment->setFootprint($this); - } - break; - } - } - } + /** + * Removes an IC Logo. + * + * @param FootprintAttachment $attachment + * + * @return void + */ + public function removeAttachment(FootprintAttachment $attachment) + { + $attachment->setFootprint(null); + $this->attachments->removeElement($attachment); + } } diff --git a/src/PartKeepr/FootprintBundle/Entity/FootprintCategory.php b/src/PartKeepr/FootprintBundle/Entity/FootprintCategory.php @@ -1,29 +1,57 @@ -<?php +<?php namespace PartKeepr\FootprintBundle\Entity; -use PartKeepr\Category\AbstractCategory, - Doctrine\ORM\Mapping as ORM, - Doctrine\ORM\Mapping\Table, - Doctrine\ORM\Mapping\Index; +use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; +use PartKeepr\CategoryBundle\Entity\AbstractCategory; +use PartKeepr\DoctrineReflectionBundle\Annotation\TargetService; +use Symfony\Component\Serializer\Annotation\Groups; /** - * @ORM\Entity(repositoryClass="PartKeepr\FootprintBundle\Entity\Repository\FootprintCategoryRepository") + * @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\NestedTreeRepository") + * @Gedmo\Tree(type="nested") * @ORM\Table(indexes={@ORM\Index(columns={"lft"}),@ORM\Index(columns={"rgt"})}) * The entity for our footprint categories - * + * @TargetService(uri="/api/footprint_categories") */ -class FootprintCategory extends AbstractCategory { +class FootprintCategory extends AbstractCategory +{ /** + * @Gedmo\TreeParent * @ORM\ManyToOne(targetEntity="FootprintCategory", inversedBy="children") * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") - * - * @var int + * @Groups({"default"}) */ - private $parent; + protected $parent; /** * @ORM\OneToMany(targetEntity="FootprintCategory", mappedBy="parent") + * @ORM\OrderBy({"lft" = "ASC"}) + * @Groups({"default"}) */ - private $children; -}- \ No newline at end of file + public $children; + + /** + * ORM\OneToMany(targetEntity="Footprint", mappedBy="category") + * Groups({"default"}) + */ + public $footprints; + + /** + * Sets the parent category + * @param AbstractCategory|null $parent + */ + public function setParent(AbstractCategory $parent = null) + { + $this->parent = $parent; + } + + /** + * Returns the parent category + * @return mixed + */ + public function getParent() + { + return $this->parent; + } +} diff --git a/src/PartKeepr/FootprintBundle/PartKeeprFootprintBundle.php b/src/PartKeepr/FootprintBundle/PartKeeprFootprintBundle.php @@ -1,5 +1,4 @@ <?php - namespace PartKeepr\FootprintBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; diff --git a/src/PartKeepr/FrontendBundle/Controller/IndexController.php b/src/PartKeepr/FrontendBundle/Controller/IndexController.php @@ -2,16 +2,18 @@ namespace PartKeepr\FrontendBundle\Controller; +use Doctrine\ORM\NoResultException; +use PartKeepr\AuthBundle\Entity\User\User; +use PartKeepr\PartKeepr; +use PartKeepr\Session\SessionManager; +use PartKeepr\Util\Configuration; use Symfony\Bundle\FrameworkBundle\Controller\Controller; -use \PartKeepr\AuthBundle\Entity\User\User, - PartKeepr\PartKeepr, - PartKeepr\Session\SessionManager, - PartKeepr\Util\Configuration; - use Symfony\Component\Finder\Finder; -use Symfony\Component\Finder\Glob; use Symfony\Component\Finder\SplFileInfo; use Symfony\Component\Routing\Annotation\Route; +use Doctrine\ORM\Version as ORMVersion; +use Doctrine\DBAL\Version as DBALVersion; +use Doctrine\Common\Version as DoctrineCommonVersion; class IndexController extends Controller { @@ -26,9 +28,9 @@ class IndexController extends Controller $this->legacyAuthStuff(); $aParameters = array(); - $aParameters["doctrine_orm_version"] = \Doctrine\ORM\Version::VERSION; - $aParameters["doctrine_dbal_version"] = \Doctrine\DBAL\Version::VERSION; - $aParameters["doctrine_common_version"] = \Doctrine\Common\Version::VERSION; + $aParameters["doctrine_orm_version"] = ORMVersion::VERSION; + $aParameters["doctrine_dbal_version"] = DBALVersion::VERSION; + $aParameters["doctrine_common_version"] = DoctrineCommonVersion::VERSION; $aParameters["php_version"] = phpversion(); $maxPostSize = PartKeepr::getBytesFromHumanReadable(ini_get("post_max_size")); @@ -36,7 +38,8 @@ class IndexController extends Controller $aParameters["maxUploadSize"] = min($maxPostSize, $maxFileSize); - if (!class_exists("Imagick")) { + if (!class_exists("Imagick")) + { // @todo This check is deprecated and shouldn't be done here. Sf2 should automatically take care of this return $this->render('PartKeeprFrontendBundle::error.html.twig', @@ -44,8 +47,9 @@ class IndexController extends Controller "title" => PartKeepr::i18n("ImageMagick is not installed"), "error" => PartKeepr::i18n( "You are missing the ImageMagick extension. Please install it and restart the setup to verify that the library was installed correctly." - ) - )); + ), + ) + ); } /* ImageMagick formats */ @@ -76,7 +80,7 @@ class IndexController extends Controller $renderParams["models"] = $this->copyModels(); - return $this->render('PartKeeprFrontendBundle::index.html.twig', $renderParams); + return $this->render('PartKeeprFrontendBundle::index.html.twig', $renderParams); } /** @@ -84,7 +88,8 @@ class IndexController extends Controller * * @todo Refactor to auto-generate models to the correct directory. This is a workaround. */ - protected function copyModels () { + protected function copyModels() + { $cacheDir = $this->get("kernel")->getCacheDir(); $target = $this->get("kernel")->getRootDir()."/../web/bundles/doctrinereflection/"; @@ -103,7 +108,9 @@ class IndexController extends Controller return $models; } - protected function legacyAuthStuff () { + + protected function legacyAuthStuff() + { /* HTTP auth */ if (Configuration::getOption("partkeepr.auth.http", false) === true) { if (!isset($_SERVER["PHP_AUTH_USER"])) { @@ -113,7 +120,7 @@ class IndexController extends Controller try { $user = User::loadByName($_SERVER['PHP_AUTH_USER']); - } catch (\Doctrine\ORM\NoResultException $e) { + } catch (NoResultException $e) { $user = new User; $user->setUsername($_SERVER['PHP_AUTH_USER']); $user->setPassword("invalid"); @@ -138,4 +145,4 @@ class IndexController extends Controller } } -}- \ No newline at end of file +} diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/CategoryEditor/CategoryEditorForm.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/CategoryEditor/CategoryEditorForm.js @@ -4,6 +4,7 @@ Ext.define('PartKeepr.CategoryEditorForm', { border: false, frame: false, bodyStyle: 'background:#DBDBDB;padding: 10px;', + xtype: "CategoryEditorForm", items: [{ xtype: 'textfield', name: 'name', diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/CategoryEditor/CategoryEditorTree.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/CategoryEditor/CategoryEditorTree.js @@ -1,218 +1,193 @@ Ext.define("PartKeepr.CategoryEditorTree", { - alias: 'widget.CategoryEditorTree', - extend: 'PartKeepr.CategoryTree', - ddGroup: null, - categoryModel: null, - categoryService: null, - initComponent: function () { - if (this.ddGroup !== null) { - Ext.apply(this, { - viewConfig: { - animate: false, - plugins: { - ptype: 'treeviewdragdrop', - ddGroup: this.ddGroup - } - }}); - } - - this.createToolbar(); - - this.callParent(); - - this.getView().on("drop", Ext.bind(this.onCategoryDrop, this)); - this.getView().on("beforedrop", this.onBeforeDrop, this); - this.getView().on("itemcontextmenu", Ext.bind(this.onItemContextMenu, this)); - - this.createMenu(); - - }, - onBeforeDrop: function () { - - }, - onCategoryDrop: function (node, data, model, pos) { - var draggedRecord = data.records[0]; - var droppedOn = this.getView().getRecord(node); - - if (!draggedRecord.isCategory) { - return; - } else { - /* Must be a category */ - - var targetRecord; - - if (pos == "after" || pos == "before") { - targetRecord = droppedOn.parentNode; - } else { - targetRecord = droppedOn; - } - - this.getStore().sort("name", "ASC"); - - var call = new PartKeepr.ServiceCall(this.categoryService, "moveCategory"); - call.setLoadMessage(sprintf(i18n("Moving category %s..."), draggedRecord.get("name"))); - call.setParameter("category", draggedRecord.get("id")); - call.setParameter("target", targetRecord.get("id")); - call.doCall(); - } - - }, - - onItemContextMenu: function (view, record, item, index, event) { - if (!record.isCategory) { return; } - var menu = this.menu; - event.stopEvent(); - - menu.record = record; - - this.menuCategoryDelete.enable(); - - if (record.get("id") == 1) { - this.menuCategoryDelete.disable(); - } - - if (record.hasChildNodes()) { - this.menuCategoryDelete.disable(); - } - - menu.showAt(event.getXY()); - }, - createMenu: function () { - this.menuCategoryDelete = Ext.create("Ext.menu.Item", { - text: i18n("Delete Category"), - handler: Ext.bind(this.confirmCategoryDelete, this), - icon: 'resources/silkicons/folder_delete.png' - }); - - this.menuCategoryAdd = Ext.create("Ext.menu.Item", { - text: i18n("Add Category"), - handler: Ext.bind(this.showCategoryAddDialog, this), - icon: 'resources/silkicons/folder_add.png' - }); - - this.menuCategoryEdit = Ext.create("Ext.menu.Item", { - text: i18n("Edit Category"), - handler: Ext.bind(this.showCategoryEditDialog, this), - icon: 'resources/silkicons/folder_edit.png' - }); - - this.menu = Ext.create('widget.menu', { + alias: 'widget.CategoryEditorTree', + extend: 'PartKeepr.CategoryTree', + viewConfig: { + plugins: { + ptype: 'treeviewdragdrop', + sortOnDrop: true + } + }, + hideHeaders: true, + categoryModel: null, + categoryService: null, + columns: [ + { + xtype: 'treecolumn', + header: 'Name', + dataIndex: 'name', + flex: 1 + } + ], + initComponent: function () + { + + this.createToolbar(); + + this.callParent(); + + this.getView().on("drop", Ext.bind(this.onCategoryDrop, this)); + this.getView().on("itemcontextmenu", Ext.bind(this.onItemContextMenu, this)); + + this.createMenu(); + + }, + onCategoryDrop: function (node, data, overModel, dropPosition, eOpts) + { + var draggedRecord = data.records[0]; + var droppedOn = this.getView().getRecord(node); + + if (!(draggedRecord instanceof PartKeepr.data.HydraTreeModel)) { + return; + } else { + + + if (dropPosition === "after" || dropPosition === "before") { + targetRecord = overModel.parentNode; + } else { + targetRecord = overModel; + } + + draggedRecord.callAction("move", { + "parent": targetRecord.getId() + }); + } + }, + + onItemContextMenu: function (view, record, item, index, event) + { + if (!(record instanceof PartKeepr.data.HydraTreeModel)) { + return; + } + var menu = this.menu; + event.stopEvent(); + + menu.record = record; + + this.menuCategoryDelete.enable(); + + if (record.isRoot()) { + this.menuCategoryDelete.disable(); + } + + if (record.hasChildNodes()) { + this.menuCategoryDelete.disable(); + } + + menu.showAt(event.getXY()); + }, + createMenu: function () + { + this.menuCategoryDelete = Ext.create("Ext.menu.Item", { + text: i18n("Delete Category"), + handler: Ext.bind(this.confirmCategoryDelete, this), + icon: 'resources/silkicons/folder_delete.png' + }); + + this.menuCategoryAdd = Ext.create("Ext.menu.Item", { + text: i18n("Add Category"), + handler: Ext.bind(this.showCategoryAddDialog, this), + icon: 'resources/silkicons/folder_add.png' + }); + + this.menuCategoryEdit = Ext.create("Ext.menu.Item", { + text: i18n("Edit Category"), + handler: Ext.bind(this.showCategoryEditDialog, this), + icon: 'resources/silkicons/folder_edit.png' + }); + + this.menu = Ext.create('widget.menu', { items: [ this.menuCategoryAdd, this.menuCategoryEdit, this.menuCategoryDelete - ] + ] + }); + }, + createToolbar: function () + { + this.toolbarExpandButton = Ext.create("Ext.button.Button", { + icon: 'bundles/brainbitsfugueicons/icons/fugue/16/toggle-expand.png', + tooltip: i18n("Expand All"), + handler: this._onExpandClick, + scope: this + }); + + this.toolbarCollapseButton = Ext.create("Ext.button.Button", { + icon: 'bundles/brainbitsfugueicons/icons/fugue/16/toggle.png', + tooltip: i18n("Collapse All"), + handler: this._onCollapseClick, + scope: this + }); + + this.toolbarReloadButton = Ext.create("Ext.button.Button", { + icon: 'extjs/resources/themes/images/default/grid/refresh.gif', + tooltip: i18n("Reload"), + handler: this._onReloadClick, + scope: this }); - }, - createToolbar: function () { - this.toolbarExpandButton = Ext.create("Ext.button.Button", { - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/toggle-expand.png', - tooltip: i18n("Expand All"), - handler: this._onExpandClick, - scope: this - }); - - this.toolbarCollapseButton = Ext.create("Ext.button.Button", { - icon: 'bundles/brainbitsfugueicons/icons/fugue/16/toggle.png', - tooltip: i18n("Collapse All"), - handler: this._onCollapseClick, - scope: this - }); - - this.toolbarReloadButton = Ext.create("Ext.button.Button", { - icon: 'extjs/resources/themes/images/default/grid/refresh.gif', - tooltip: i18n("Reload"), - handler: this._onReloadClick, - scope: this - }); - - this.toolbar = Ext.create("Ext.toolbar.Toolbar", { - enableOverflow: true, - dock: 'top', - items: [ this.toolbarExpandButton, this.toolbarCollapseButton, this.toolbarReloadButton ] - }); - - Ext.apply(this, { - dockedItems: [ this.toolbar ] - }); - }, - _onReloadClick: function () { - this.loadCategories(); - }, - _onExpandClick: function () { - this.getRootNode().firstChild.expand(true); - }, - _onCollapseClick: function () { - this.getRootNode().firstChild.collapse(true); - }, - confirmCategoryDelete: function () { - Ext.Msg.confirm(i18n("Confirm Category Delete"), sprintf(i18n("Do you really wish to delete the category %s?"), this.menu.record.get("name")), this.onCategoryDelete, this); - }, - showCategoryAddDialog: function () { - var j = Ext.create("PartKeepr.CategoryEditorWindow", { - record: null, - categoryModel: this.categoryModel, - parent: this.menu.record.get("id"), - listeners: { - save: Ext.bind(this.onUpdateRecord, this) - } - }); - - j.show(); - }, - showCategoryEditDialog: function () { - var j = Ext.create("PartKeepr.CategoryEditorWindow", { - record: this.menu.record, - parent: null, - categoryModel: this.categoryModel, - listeners: { - save: Ext.bind(this.onUpdateRecord, this) - } - }); - - j.show(); - }, - onUpdateRecord: function (record) { - var currentRecord = this.getStore().getRootNode().findChild("id", record.get("id"), true); - - var label; - if (PartKeepr.getApplication().getUserPreference("partkeepr.categorytree.showdescriptions") === true) { - label = record.get("name") + " - " + record.get("description"); - } else { - label = record.get("name"); - } - - if (currentRecord === null) { - var parentRecord = this.getStore().getRootNode().findChild("id", record.get("parent"), true); - - var nodeData = { - id : record.get("id"), - name : record.get("name"), - description : record.get("description"), - text : label, - tooltip : record.get("description") - }; - - parentRecord.appendChild(nodeData); - - } else { - currentRecord.set("name", record.get("name")); - currentRecord.set("description", record.get("description")); - currentRecord.set("text", label); - currentRecord.set("tooltip", record.get("description")); - currentRecord.commit(); - } - - }, - onCategoryDelete: function (btn) { - if (btn == "yes") { - var del = this.getStore().getRootNode().findChild("id", this.menu.record.get("id"), true); - del.destroy({ - failure: function () { - this.loadCategories(); - }, - scope: this - }); - } - } + + this.toolbar = Ext.create("Ext.toolbar.Toolbar", { + enableOverflow: true, + dock: 'top', + items: [this.toolbarExpandButton, this.toolbarCollapseButton, this.toolbarReloadButton] + }); + + Ext.apply(this, { + dockedItems: [this.toolbar] + }); + }, + _onReloadClick: function () + { + this.store.load(); + }, + _onExpandClick: function () + { + this.getRootNode().expand(true); + }, + _onCollapseClick: function () + { + this.getRootNode().collapse(true); + }, + confirmCategoryDelete: function () + { + Ext.Msg.confirm(i18n("Confirm Category Delete"), + sprintf(i18n("Do you really wish to delete the category %s?"), this.menu.record.get("name")), + this.onCategoryDelete, this); + }, + showCategoryAddDialog: function () + { + var j = Ext.create("PartKeepr.CategoryEditorWindow", { + record: Ext.create(this.categoryModel), + categoryModel: this.categoryModel, + parentRecord: this.menu.record, + listeners: { + save: Ext.bind(this.onUpdateRecord, this) + } + }); + + j.show(); + }, + showCategoryEditDialog: function () + { + var j = Ext.create("PartKeepr.CategoryEditorWindow", { + record: this.menu.record, + parentRecord: null, + categoryModel: this.categoryModel, + listeners: { + save: Ext.bind(this.onUpdateRecord, this) + } + }); + + j.show(); + }, + onUpdateRecord: function (record) + { + this.store.load(); + }, + onCategoryDelete: function (btn) + { + if (btn == "yes") { + this.menu.record.erase(); + } + } }); diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/CategoryEditor/CategoryEditorWindow.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/CategoryEditor/CategoryEditorWindow.js @@ -1,65 +1,68 @@ Ext.define('PartKeepr.CategoryEditorWindow', { - extend: 'Ext.window.Window', - border: false, - width: 400, - categoryModel: null, - initComponent: function () { - - this.form = Ext.create("PartKeepr.CategoryEditorForm"); - - this.keys = [{ - key: Ext.event.Event.ENTER, - handler: this.onEnter, - scope: this - }]; - - this.buttons = [{ - text: i18n("Save"), - handler: Ext.bind(this.onSave, this) - },{ - text: i18n("Cancel"), - handler: Ext.bind(this.onCancel, this) - }]; - - this.items = this.form; + extend: 'Ext.window.Window', + border: false, + width: 400, + categoryModel: null, + layout: 'fit', + items: [ + { + xtype: "CategoryEditorForm" + } + ], + initComponent: function () + { + this.keys = [ + { + key: Ext.event.Event.ENTER, + handler: this.onEnter, + scope: this + } + ]; - this.callParent(); - - this.proxyRecord = Ext.create(this.categoryModel); - - if (this.record) { - this.proxyRecord.set("name", this.record.get("name")); - this.proxyRecord.set("description", this.record.get("description")); - this.proxyRecord.set("id", this.record.get("id")); - this.proxyRecord.phantom = false; - - this.setTitle(i18n("Edit Category")); - } else { - this.proxyRecord.set("parent", this.parent); - this.setTitle(i18n("Add Category")); - } - - this.form.getForm().loadRecord(this.proxyRecord); - - this.on("show", Ext.bind(this.onShow, this)); - - }, - onEnter: function () { - this.onSave(); - }, - onShow: function () { - this.form.items.first().focus(); - }, - onSave: function () { - this.form.getForm().updateRecord(this.proxyRecord); - this.proxyRecord.save({ - success: Ext.bind(function (response) { - this.fireEvent("save", response); - this.destroy(); - }, this) - }); - }, - onCancel: function () { - this.destroy(); - } + this.buttons = [ + { + text: i18n("Save"), + handler: Ext.bind(this.onSave, this) + }, { + text: i18n("Cancel"), + handler: Ext.bind(this.onCancel, this) + } + ]; + + this.callParent(); + + if (!this.record.phantom) { + this.setTitle(i18n("Edit Category")); + } else { + this.record.set("parent", this.parentRecord.getId()); + this.setTitle(i18n("Add Category")); + } + + this.down("CategoryEditorForm").loadRecord(this.record); + + this.on("show", Ext.bind(this._onShow, this)); + }, + onEnter: function () + { + this.onSave(); + }, + _onShow: function () { + this.down("CategoryEditorForm").items.first().focus(); + }, + onSave: function () + { + this.down("CategoryEditorForm").updateRecord(this.record); + + this.record.save({ + success: Ext.bind(function (response) + { + this.fireEvent("save", response); + this.destroy(); + }, this) + }); + }, + onCancel: function () + { + this.destroy(); + } }); diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/CategoryTree.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/CategoryTree.js @@ -1,118 +1,10 @@ Ext.define("PartKeepr.CategoryTree", { alias: 'widget.CategoryTree', extend: 'Ext.tree.Panel', - categoryService: null, categoryModel: null, - sorters: [{ - property: 'name', - direction: 'ASC' - }], viewConfig: { animate: false }, loaded: false, - rootVisible: false, - - initComponent: function () { - this.store = new Ext.data.TreeStore({ - root: { - id: "src", - name: "Foo" - }, - remoteSort: false, - folderSort: true - }); - - this.callParent(); - - this.loadCategories(); - }, - loadCategories: function () { - this.loaded = false; - - var call = new PartKeepr.ServiceCall(this.categoryService, "getAllCategories"); - call.setLoadMessage(i18n("Loading categories...")); - call.setHandler(Ext.bind(this._onCategoriesLoaded, this)); - call.doCall(); - }, - _onCategoriesLoaded: function (result) { - /* Store expand/collapse state for all nodes */ - var expandedNodes = this.getExpandedNodes(this.getRootNode()); - - this.getRootNode().removeAll(); - - this.buildCategoryTree(this.getRootNode(), result, expandedNodes); - this.loaded = true; - - this.getRootNode().expandChildren(); - - this.getStore().sort("name", "ASC"); - - this.fireEvent("categoriesLoaded"); - }, - getExpandedNodes: function (node) { - var ret = []; - if (node.get("expanded") === true) { - ret.push(node.get("id")); - } - - for (var i=0;i<node.childNodes.length;i++) { - ret = ret.concat(this.getExpandedNodes(node.childNodes[i])); - } - return ret; - }, - buildCategoryTree : function(root, data, expandedNodes) { - var label; - - if (data.description && - PartKeepr.getApplication().getUserPreference("partkeepr.categorytree.showdescriptions") === true) - { - label = data.name + " - " + data.description; - } else { - label = data.name; - } - - var nodeData = { - id : data.id, - name : data.name, - description : data.description, - text : label, - tooltip : data.description - }; - - if (Ext.Array.contains(expandedNodes, data.id)) { - Ext.apply(nodeData, { - expanded: true - }); - } - - // Hack to prevent our virtual root node from being dragged - if (data.id == 1) { - nodeData.allowDrag = false; - } - - /* We'd like to set leaf here. For some reason, the tree - * is stupid. - * - * If the node is a leaf, it's not possible to append children. I would - * have expected that the "leaf" flag is cleared when a child is appended. - * - * If the node is not a leaf, the node should (in theory) use the children - * count. However, it doesn't do that in our case and always shows the "expand" - * button unless clicked once. - */ - nodeData.leaf = false; - - Ext.data.NodeInterface.decorate(this.categoryModel); - - var newNode = Ext.create(this.categoryModel, nodeData); - - newNode = root.appendChild(newNode); - - for ( var i = 0; i < data.children.length; i++) { - this.buildCategoryTree(newNode, data.children[i], expandedNodes); - } - - return newNode; - } + rootVisible: true }); diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Editor/EditorComponent.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Editor/EditorComponent.js @@ -39,7 +39,12 @@ Ext.define('PartKeepr.EditorComponent', { * Contains the associated model to load a record for. */ model: null, - + + /** + * Defines the store to use. Defaults to {Ext.data.Store} + */ + storeType: "Ext.data.Store", + /** * Some default text messages. Can be overridden by sub classes. */ @@ -174,7 +179,7 @@ Ext.define('PartKeepr.EditorComponent', { }, // Creates a store. To be called from child's initComponent createStore: function (config) { - Ext.Object.merge(config, { + Ext.applyIf(config, { autoLoad: true, model: this.model, autoSync: false, // Do not change. If true, new (empty) records would be immediately committed to the database. @@ -182,7 +187,7 @@ Ext.define('PartKeepr.EditorComponent', { remoteSort: true, pageSize: 15}); - this.store = Ext.create('Ext.data.Store', config); + this.store = Ext.create(this.storeType, config); // Workaround for bug http://www.sencha.com/forum/showthread.php?133767-Store.sync()-does-not-update-dirty-flag&p=607093#post607093 this.store.on('write', function(store, operation) { diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Footprint/FootprintEditorComponent.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Footprint/FootprintEditorComponent.js @@ -1,36 +1,53 @@ Ext.define('PartKeepr.FootprintEditorComponent', { - extend: 'PartKeepr.EditorComponent', - alias: 'widget.FootprintEditorComponent', - navigationClass: 'PartKeepr.FootprintTree', - editorClass: 'PartKeepr.FootprintEditor', - newItemText: i18n("New Footprint"), - model: 'PartKeepr.FootprintBundle.Entity.Footprint', - initComponent: function () { - this.createStore({ - sorters: [{ - property: 'name', - direction:'ASC' - }] - }); - - this.callParent(); - }, - deleteRecord: function (r) { - var editor = this.findEditor(r.get("id")); - - if (editor !== null) { - this.editorTabPanel.remove(editor); - } - - var call = new PartKeepr.ServiceCall("Footprint", "destroy"); - call.setParameter("id", r.get("id")); - call.setHandler(Ext.bind(function () { - var oldRecordIndex = PartKeepr.getApplication().getFootprintStore().find("id", r.get("id")); - - PartKeepr.getApplication().getFootprintStore().removeAt(oldRecordIndex); - this.navigation.loadCategories(); - }, this)); - - call.doCall(); - } + extend: 'PartKeepr.EditorComponent', + alias: 'widget.FootprintEditorComponent', + navigationClass: 'PartKeepr.FootprintTree', + editorClass: 'PartKeepr.FootprintEditor', + newItemText: i18n("New Footprint"), + model: 'PartKeepr.FootprintBundle.Entity.FootprintCategory', + storeType: "Ext.data.TreeStore", + initComponent: function () { + this.createStore( + { + remoteSort: false, + folderSort: true, + rootVisible: true, + autoLoad: true, + sorters: [{ + property: 'name', + direction: 'ASC' + }], + root: { + "@id": "/~felicitus/PartKeepr/web/app_dev.php/api/footprint_categories/1" + }, + model: "PartKeepr.FootprintBundle.Entity.FootprintCategory", + proxy: { + type: "Hydra", + appendId: false, + reader: { + type: 'json' + } + } + }); + + this.callParent(); + }, + deleteRecord: function (r) { + var editor = this.findEditor(r.get("id")); + + if (editor !== null) { + this.editorTabPanel.remove(editor); + } + + var call = new PartKeepr.ServiceCall("Footprint", "destroy"); + call.setParameter("id", r.get("id")); + call.setHandler(Ext.bind(function () { + var oldRecordIndex = PartKeepr.getApplication().getFootprintStore().find("id", r.get("id")); + + PartKeepr.getApplication().getFootprintStore().removeAt(oldRecordIndex); + this.navigation.loadCategories(); + }, this)); + + call.doCall(); + } }); \ No newline at end of file diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Footprint/FootprintTree.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Footprint/FootprintTree.js @@ -3,10 +3,10 @@ Ext.define("PartKeepr.FootprintTree", { alias: 'widget.FootprintTree', ddGroup: 'FootprintTree', - categoryModel: 'PartKeepr.FootprintCategory', - categoryService: 'FootprintCategory', folderSort: true, - + + categoryModel: "PartKeepr.FootprintBundle.Entity.FootprintCategory", + /** * @cfg {String} text The path to the 'add' icon */ @@ -121,11 +121,12 @@ Ext.define("PartKeepr.FootprintTree", { */ _onCategoriesLoaded: function () { this.callParent(arguments); - + return; + var store = PartKeepr.getApplication().getFootprintStore(); var nodeData, record; - Ext.data.NodeInterface.decorate("PartKeepr.Footprint"); + Ext.data.NodeInterface.decorate("PartKeepr.FootprintBundle.Entity.FootprintCategory"); for (var i=0;i<store.getCount();i++) { record = store.getAt(i); diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Data/HydraProxy.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Data/HydraProxy.js @@ -10,36 +10,22 @@ Ext.define("PartKeepr.data.HydraProxy", { }, appendId: false, limitParam: "itemsPerPage", + defaultListenerScope: true, sortParam: "", - constructor: function (config) { + constructor: function (config) + { config.url = PartKeepr.getBasePath() + config.url; this.callParent(arguments); }, listeners: { - exception: function (reader, response, operation, eOpts) { - var request = operation.getRequest(); - - var requestParams = { - method: response.request.options.method, - request: response.request.options.jsonData, - response: response.responseText - }; - try { - var data = Ext.decode(response.responseText); - - PartKeepr.ExceptionWindow.showException(data.exception, response); - } catch (ex) { - var exception = { - message: i18n("Critical Error"), - detail: i18n("The server returned a response which we were not able to interpret.") - }; - - PartKeepr.ExceptionWindow.showException(exception, response); - } + exception: function (reader, response, operation, eOpts) + { + this.showException(response); } }, - buildUrl: function (request) { + buildUrl: function (request) + { var operation = request.getOperation(); // Set the URI to the ID, as JSON-LD operates on IRIs. @@ -65,7 +51,8 @@ Ext.define("PartKeepr.data.HydraProxy", { return this.callParent([request]); }, - getParams: function (operation) { + getParams: function (operation) + { if (!operation.isReadOperation) { return {}; } @@ -83,18 +70,56 @@ Ext.define("PartKeepr.data.HydraProxy", { return params; }, - callAction: function (record, action, parameters, callback) { + /** + * Calls a specific action on the record. + * @todo Document on how we call actions on entities + * + * + */ + callAction: function (record, action, parameters, callback) + { var url = record.getId() + "/" + action; var request = Ext.create("Ext.data.Request"); request.setMethod("PUT"); request.setUrl(url); - if (typeof parameters == "object") { + if (Ext.isObject(parameters)) { request.setParams(parameters); } - request.setCallback(callback); + request.setCallback(function (options, success, response) + { + this.processCallActionResponse(options, success, response); + + if (Ext.isFunction(callback)) { + callback(options, success, response); + } + }.bind(this)); this.sendRequest(request); + }, + processCallActionResponse: function (options, success, response) + { + if (success !== false) { + return; + } + + this.showException(response); + }, + showException: function (response) { + try { + var data = Ext.decode(response.responseText); + + var exception = Ext.create("PartKeepr.data.HydraException", data); + + PartKeepr.ExceptionWindow.showException(exception, response); + } catch (ex) { + var exception = Ext.create("PartKeepr.data.HydraException", { + title: i18n("Critical Error"), + description: i18n("The server returned a response which we were not able to interpret.") + }); + + PartKeepr.ExceptionWindow.showException(exception, response); + } } }); \ No newline at end of file diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Data/HydraReader.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Data/HydraReader.js @@ -7,7 +7,7 @@ Ext.define("PartKeepr.data.HydraReader", { getResponseData: function (response) { var data = this.callParent([response]); - if (data["@type"] == "hydra:PagedCollection") { + if (data["@type"] == "hydra:PagedCollection" || data["@type"] == "hydra:Collection") { this.setRootProperty("hydra:member"); } else { this.setRootProperty(""); diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Data/HydraTreeModel.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Data/HydraTreeModel.js @@ -0,0 +1,20 @@ +Ext.define("PartKeepr.data.HydraTreeModel", { + extend: 'Ext.data.TreeModel', + + /** + * Calls an action relative to the entity. + * + * For example, if the entity has a method called "setDefault" and your ID is + * "/PartKeepr/web/app_dev.php/api/part_measurement_units/1", callAction would call + * "/PartKeepr/web/app_dev.php/api/part_measurement_units/1/setDefault" as a result. + * + * @param {String} action The action name + * @param {Object} parameters (optional) The parameters as JS object + * @param {Function} callback (optional) A callback function + */ + callAction: function (action, parameters, callback) { + var proxy = this.getProxy(); + + proxy.callAction(this, action, parameters, callback); + } +});+ \ No newline at end of file diff --git a/src/PartKeepr/PartBundle/Entity/PartCategory.php b/src/PartKeepr/PartBundle/Entity/PartCategory.php @@ -1,26 +1,27 @@ <?php namespace PartKeepr\PartBundle\Entity; -use PartKeepr\Category\AbstractCategory, +use PartKeepr\CategoryBundle\Entity\AbstractCategory, Doctrine\ORM\Mapping as ORM; - +use Gedmo\Mapping\Annotation as Gedmo; /** - * @ORM\Entity(repositoryClass="PartKeepr\PartBundle\Entity\Repository\PartCategoryRepository") + * @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\NestedTreeRepository") * @ORM\Table(indexes={@ORM\Index(columns={"lft"}),@ORM\Index(columns={"rgt"})}) + * @Gedmo\Tree(type="nested") * The entity for our part categories * */ class PartCategory extends AbstractCategory { /** + * @Gedmo\TreeParent * @ORM\ManyToOne(targetEntity="PartCategory", inversedBy="children") * @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE") - * - * @var int */ - private $parent; + protected $parent; /** * @ORM\OneToMany(targetEntity="PartCategory", mappedBy="parent") + * @ORM\OrderBy({"lft" = "ASC"}) */ - private $children; + protected $children; } \ No newline at end of file diff --git a/src/PartKeepr/UploadedFileBundle/EventListener/TemporaryFileEventListener.php b/src/PartKeepr/UploadedFileBundle/EventListener/TemporaryFileEventListener.php @@ -43,7 +43,7 @@ class TemporaryFileEventListener * * @param DataEvent $event The event */ - public function onPreUpdate(DataEvent $event) + public function replaceTemporaryImage (DataEvent $event) { $data = $event->getData(); diff --git a/src/backend/PartKeepr/Category/AbstractCategory.php b/src/backend/PartKeepr/Category/AbstractCategory.php @@ -1,203 +0,0 @@ -<?php -namespace PartKeepr\Category; - -use Doctrine\ORM\Mapping as ORM; -use PartKeepr\Util\BaseEntity; -use PartKeepr\Util\Serializable; -use DoctrineExtensions\NestedSet\Node; - -/** - * @ORM\MappedSuperclass() - * @ORM\Table(indexes={@ORM\Index(columns={"lft"}),@ORM\Index(columns={"rgt"})}) - * - * Represents an abstract category. This class isn't directly usable; you need to inherit it to take advantage of - * the AbstractCategoryManager. - * - * If you are interested on how NestedSets work, please read http://en.wikipedia.org/wiki/Nested_set_model - */ -class AbstractCategory extends BaseEntity implements Node, Serializable { - /** - * The "left" property of the nested set - * @ORM\Column(type="integer") - * @var integer - */ - private $lft; - - /** - * The "right" property of the nested set - * @ORM\Column(type="integer") - * @var integer - */ - private $rgt; - - /** - * The name of the category - * @ORM\Column(length=128) - * @var string - */ - private $name; - - /** - * The description of the category - * @ORM\Column(type="text",nullable=true) - * @var string - */ - private $description; - - /** - * Holds the parent node ID. Note that this - * is not a persistant value, but rather calculated - * or set on the fly. - * @var int - */ - private $parent; - - /** - * Holds the category path. - * - * @ORM\Column(type="text",nullable=true) - * - * @var string - */ - private $categoryPath; - - /** - * Sets the name of this category - * @param string $name The name to set - */ - public function setName ($name) { - $this->name = $name; - } - - /** - * Returns the name of this category - * @return string The category name - */ - public function getName () { - return $this->name; - } - - /** - * Sets the parent for this category. - * - * @param int $id The parent node - */ - public function setParent ($id) { - $this->parent = $id; - } - - /** - * Returns the parent node for this node. - * @return int The parent node - */ - public function getParent () { - return $this->parent; - } - - /** - * Sets the description for this category - * @param string $description The description of this category - */ - public function setDescription ($description) { - $this->description = $description; - } - - /** - * Returns the description of this category - * @return string The description - */ - public function getDescription () { - return $this->description; - } - - /** - * Returns the "left" value of the nested set. - * - * @return int The left value - * - * (non-PHPdoc) - * @see DoctrineExtensions\NestedSet.Node::getLeftValue() - */ - public function getLeftValue() { - return $this->lft; - } - - /** - * Sets the "left" value. - * - * @param $lft integer The left value - * (non-PHPdoc) - * @see DoctrineExtensions\NestedSet.Node::setLeftValue() - */ - public function setLeftValue($lft) { - $this->lft = $lft; - } - - /** - * Returns the "right" value of the nested set. - * - * @return int The right value - * - * (non-PHPdoc) - * @see DoctrineExtensions\NestedSet.Node::getRightValue() - */ - public function getRightValue() { - return $this->rgt; - } - - /** - * Sets the "right" value of the nested set - * - * @param $rgt int The right value - * - * (non-PHPdoc) - * @see DoctrineExtensions\NestedSet.Node::setRightValue() - */ - public function setRightValue($rgt) { - $this->rgt = $rgt; - } - - /** - * Serializes the entity. - */ - public function serialize () { - return array( - "id" => $this->getId(), - "name" => $this->getName(), - "description" => $this->getDescription() - ); - } - - /** - * Returns a string representation of the current node. - * - * @return string The node name - * - * (non-PHPdoc) - * @see DoctrineExtensions\NestedSet.Node::__toString() - */ - public function __toString () { - return $this->getName(); - } - - /** - * Retrieves the category path - * - * @return string The category path - */ - public function getCategoryPath () { - return $this->categoryPath; - } - - /** - * Sets the category path. - * - * THIS IS ONLY TO BE CALLED FROM THE CATEGORYMANAGER! DON'T MESS WITH IT! - * - * @param string $categoryPath - */ - public function setCategoryPath ($categoryPath) { - $this->categoryPath = $categoryPath; - } - -} diff --git a/src/backend/PartKeepr/Category/AbstractCategoryManager.php b/src/backend/PartKeepr/Category/AbstractCategoryManager.php @@ -1,222 +0,0 @@ -<?php -namespace PartKeepr\Category; - -use PartKeepr\Util\Singleton, - PartKeepr\Category\Category, - PartKeepr\Util\SerializableException, - PartKeepr\Category\Exceptions\CategoryNotFoundException, - PartKeepr\PartKeepr, - PartKeepr\Util\Configuration, - DoctrineExtensions\NestedSet\Manager, - DoctrineExtensions\NestedSet\Config, - DoctrineExtensions\NestedSet\NodeWrapper; - -abstract class AbstractCategoryManager extends Singleton { - /** - * Holds the node manager - * @var object The node manager - */ - private $nodeManager; - - /** - * Holds the FQCN of the target entity - * @var PartKeepr\Category\AbstractCategory - */ - protected $categoryClass = "PartKeepr\Category\AbstractCategory"; - - /** - * Returns the node manager. Creates it if it doesn't exist. - * @todo Can this method be made private? - * @return Manager The node manager - */ - public function getNodeManager () { - if (!$this->nodeManager) { - $config = new Config(PartKeepr::getEM(), $this->categoryClass); - - $this->nodeManager = new Manager($config); - } - - return $this->nodeManager; - } - - /** - * Returns the child node id's for a given node id. - * @param integer $id The ID for which to retrieve the child nodes - * @return array An array of the children id's - * @todo Refactor this method name to indicate that it operates on IDs only. - */ - public function getChildNodes ($id) { - $category = $this->getCategory($id); - - $aData = array(); - - foreach ($category->getDescendants() as $cat) { - $aData[] = $cat->getNode()->getId(); - } - return $aData; - } - - /** - * Returns all categories. - * @return The category tree - */ - public function getAllCategories () { - return $this->getNodeManager()->fetchTree(1); - } - - /** - * Ensures that the root node exists. If not, this method creates it. - */ - public function ensureRootExists () { - /* Check if the root node exists */ - $rootNode = $this->getNodeManager()->fetchTree(1); - - if ($rootNode === null) { - $this->createRootNode(); - } - } - - /** - * Returns the root node for the category tree. - * @return The category root node - */ - public function getRootNode () { - return $this->getNodeManager()->fetchTree(1); - } - - /** - * Create the root node for the category tree. - */ - public function createRootNode () { - $rootNode = new $this->categoryClass(); - $rootNode->setName("Root Category"); - $rootNode->setDescription(""); - - $this->getNodeManager()->createRoot($rootNode); - } - - /** - * Adds a given category. - * @param Category $category The category to add to the tree - * @return Category the added category - */ - public function addCategory (AbstractCategory $category) { - $parent = $category->getParent(); - - if ($parent == 0) { - $parent = $this->getRootNode(); - } else { - $parent = PartKeepr::getEM()->find($this->categoryClass, $parent); - $parent = new NodeWrapper($parent, $this->getNodeManager()); - } - - $node = $parent->addChild($category); - - // Force category path update - $this->updateCategoryPaths($node); - - // Flush the category path changes - PartKeepr::getEM()->flush(); - - return $node; - } - - /** - * Deletes the given category ID. - * @param $id int The category id to delete - * @throws CategoryNotFoundException If the category wasn't found - */ - public function deleteCategory ($id) { - $this->getCategory($id)->delete(); - } - - /** - * Returns the category with the given ID. - * @param int $id The category id - * @throws CategoryNotFoundException If the category wasn't found - */ - public function getCategory ($id) { - $category = $this->loadCategoryById($id); - - return new NodeWrapper($category, $this->getNodeManager()); - } - - /** - * Returns the overall category count currently existing. - * @return int The amount of categories in the database - */ - public function getCategoryCount () { - $dql = "SELECT COUNT(c.id) FROM ".$this->categoryClass." c"; - - return PartKeepr::getEM()->createQuery($dql)->getSingleScalarResult(); - } - - /** - * Updates the category paths for a given node and all children. - * - * This method is usually called whenever a category is moved. - * - * @param NodeWrapper $startNode The node to start updating at - */ - public function updateCategoryPaths (NodeWrapper $startNode) { - $pathSeparator = Configuration::getOption("partkeepr.category.path_separator", " ➤ "); - - $startNode->getNode()->setCategoryPath($startNode->getPath($pathSeparator, true)); - - foreach ($startNode->getChildren() as $child) { - $this->updateCategoryPaths($child); - } - } - - /** - * Creates a category tree by an array of category names - * @param array $aCategoryNames - * @param Category A category where to start searching at - */ - public function createCategoryTreeByArray ($aCategoryNames, NodeWrapper $rootNode = null) { - if (count($aCategoryNames) == 0) { - return false; - } - - $categoryName = array_shift($aCategoryNames); - - if ($rootNode === null) { - $rootNode = $this->getRootNode(); - } - - $bFound = false; - foreach ($rootNode->getChildren() as $child) { - if ($child->getNode()->getName() == $categoryName) { - $bFound = true; - $category = $child->getNode(); - break; - } - } - - if ($bFound === false) { - $category = new $this->categoryClass(); - $category->setName($categoryName); - $category->setDescription(""); - $category->setParent($rootNode->getId()); - $this->addCategory($category); - } - - $result = $this->createCategoryTreeByArray($aCategoryNames,new NodeWrapper($category, $this->getNodeManager())); - - if ($result === false) { - return $category; - } else { - return $result; - } - } - - /** - * Loads a category by id - * @param string $id - */ - protected function loadCategoryById($id) { - $class = $this->categoryClass; - - return $class::loadById($id); - } -}- \ No newline at end of file diff --git a/src/backend/PartKeepr/Category/AbstractCategoryService.php b/src/backend/PartKeepr/Category/AbstractCategoryService.php @@ -1,145 +0,0 @@ -<?php -namespace PartKeepr\Category; - -use PartKeepr\PartKeepr, - PartKeepr\Service\Service, - PartKeepr\Category\CategoryManager, - DoctrineExtensions\NestedSet\NodeWrapper; - - -abstract class AbstractCategoryService extends Service { - protected $categoryManagerClass = "PartKeepr\Category\AbstractCategoryManager"; - protected $categoryClass = "PartKeepr\Category\AbstractCategory"; - - /** - * Returns all categories found in the system. - * @return array A serialized tree - */ - public function getCategories () { - $categories = $this->getCategoryManager()->getAllCategories( - $this->getParameter("parent", 0)); - - return $this->serializeTree($categories); - } - - /** - * Moves the given category from one to another category. - */ - public function moveCategory () { - $this->requireParameter("category"); - $this->requireParameter("target"); - - $category = $this->getCategoryManager()->getCategory($this->getParameter("category")); - - if (intval($this->getParameter("target", 0)) !== 0) { - - $parent = $this->getCategoryManager()->getCategory($this->getParameter("target")); - - $category->moveAsLastChildOf($parent); - $this->getCategoryManager()->updateCategoryPaths($category); - - } - } - - /** - * Deletes the given category. - */ - public function deleteCategory () { - $this->requireParameter("id"); - - $this->getCategoryManager()->deleteCategory($this->getParameter("id")); - - return array("id" => $this->getParameter("id")); - } - - /** - * Updates the given category. - */ - public function update () { - $this->requireParameter("id"); - $this->requireParameter("name"); - - $category = $this->getCategoryManager()->getCategory($this->getParameter("id")); - - $category->getNode()->setName($this->getParameter("name")); - $category->getNode()->setDescription($this->getParameter("description", "")); - - PartKeepr::getEM()->persist($category->getNode()); - - $this->getCategoryManager()->updateCategoryPaths($category); - - return array("data" => $this->serializeCategory($category)); - } - - public function create () { - $this->requireParameter("name"); - $this->requireParameter("parent"); - - $category = new $this->categoryClass; - $category->setName($this->getParameter("name")); - $category->setDescription($this->getParameter("description", "")); - $category->setParent($this->getParameter("parent")); - - $category = $this->getCategoryManager()->addCategory($category); - - $this->getCategoryManager()->updateCategoryPaths($category); - - return array("data" => $this->serializeCategory($category)); - } - - public function destroy () { - return $this->deleteCategory(); - } - - private function serializeCategory ($category) { - $data = $category->getNode()->serialize(); - - if ($category->getParent() !== null) { - $data["parent"] = $category->getParent()->getNode()->getId(); - $data["parentName"] = $category->getParent()->getNode()->getName(); - } - - return $data; - } - - /** - * Returns all categories - */ - public function getAllCategories () { - return $this->serializeTree($this->getCategoryManager()->getAllCategories()); - } - - /** - * Serializes the given NodeWrapper as array including all children. - * @param NodeWrapper $node The category nodewrapper to serialize - * @throws \Exception - */ - public function serializeTree (NodeWrapper $node = null) { - if ($node == null) { - throw new \Exception("Node must not be null!"); - } - - $aData = $node->getNode()->serialize(); - - $aData["children"] = array(); - - if (count($node->getChildren()) == 0) { - $aData["leaf"] = true; - } else { - $aData["expanded"] = true; - } - - foreach ($node->getChildren() as $child) { - $aData["children"][] = $this->serializeTree($child); - - } - - return $aData; - } - - public function getCategoryManager () { - $categoryManager = $this->categoryManagerClass; - - return $categoryManager::getInstance(); - } -}