commit 157c19b50d695653cadc70aee3b4061496caf847
parent 8a83580a21ec93cc4bb26adb2f10562573e8ea0d
Author: Felicitus <felicitus@felicitus.org>
Date: Fri, 19 Jun 2015 15:15:54 +0200
Updated to Symfony 2.7, removed JMSSerializer
Diffstat:
8 files changed, 25 insertions(+), 375 deletions(-)
diff --git a/composer.json b/composer.json
@@ -25,7 +25,7 @@
},
"require": {
"php": ">=5.3.3",
- "symfony/symfony": "~2.6",
+ "symfony/symfony": "~2.7",
"incenteev/composer-parameter-handler": "~2.0",
"doctrine/orm": "~2.4",
"doctrine/doctrine-bundle": "~1.2",
@@ -39,7 +39,6 @@
"incenteev/composer-parameter-handler": "~2.0",
"nelmio/api-doc-bundle": "2.9.0",
"friendsofsymfony/rest-bundle": "1.5.0",
- "jms/serializer-bundle": "0.13.0",
"cbsi/doctrine2-nestedset": "dev-master",
"zendmaniacs/extjs5": "dev-master",
"fortawesome/font-awesome": "4.1.0",
diff --git a/composer.lock b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "hash": "7b99c0cde2d1241109ae37818e45374a",
+ "hash": "377099a71e0b722b77a8b6255c5f54e7",
"packages": [
{
"name": "cbsi/doctrine2-nestedset",
@@ -153,16 +153,16 @@
},
{
"name": "doctrine/annotations",
- "version": "v1.2.4",
+ "version": "v1.2.6",
"source": {
"type": "git",
"url": "https://github.com/doctrine/annotations.git",
- "reference": "b5202eb9e83f8db52e0e58867e0a46e63be8332e"
+ "reference": "f4a91702ca3cd2e568c3736aa031ed00c3752af4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/annotations/zipball/b5202eb9e83f8db52e0e58867e0a46e63be8332e",
- "reference": "b5202eb9e83f8db52e0e58867e0a46e63be8332e",
+ "url": "https://api.github.com/repos/doctrine/annotations/zipball/f4a91702ca3cd2e568c3736aa031ed00c3752af4",
+ "reference": "f4a91702ca3cd2e568c3736aa031ed00c3752af4",
"shasum": ""
},
"require": {
@@ -217,7 +217,7 @@
"docblock",
"parser"
],
- "time": "2014-12-23 22:40:37"
+ "time": "2015-06-17 12:21:22"
},
{
"name": "doctrine/cache",
@@ -847,16 +847,16 @@
},
{
"name": "doctrine/instantiator",
- "version": "1.0.4",
+ "version": "1.0.5",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
- "reference": "f976e5de371104877ebc89bd8fecb0019ed9c119"
+ "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f976e5de371104877ebc89bd8fecb0019ed9c119",
- "reference": "f976e5de371104877ebc89bd8fecb0019ed9c119",
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
+ "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
"shasum": ""
},
"require": {
@@ -867,7 +867,7 @@
"ext-pdo": "*",
"ext-phar": "*",
"phpunit/phpunit": "~4.0",
- "squizlabs/php_codesniffer": "2.0.*@ALPHA"
+ "squizlabs/php_codesniffer": "~2.0"
},
"type": "library",
"extra": {
@@ -876,8 +876,8 @@
}
},
"autoload": {
- "psr-0": {
- "Doctrine\\Instantiator\\": "src"
+ "psr-4": {
+ "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -897,7 +897,7 @@
"constructor",
"instantiate"
],
- "time": "2014-10-13 12:58:55"
+ "time": "2015-06-14 21:17:01"
},
{
"name": "doctrine/lexer",
@@ -1036,12 +1036,12 @@
"source": {
"type": "git",
"url": "https://github.com/dunglas/DunglasApiBundle.git",
- "reference": "97332f2c41c06f04f39ab42567272119fe52331d"
+ "reference": "71182d20e7bc5b913e2f5169c4c793762fa3fee4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/dunglas/DunglasApiBundle/zipball/97332f2c41c06f04f39ab42567272119fe52331d",
- "reference": "97332f2c41c06f04f39ab42567272119fe52331d",
+ "url": "https://api.github.com/repos/dunglas/DunglasApiBundle/zipball/71182d20e7bc5b913e2f5169c4c793762fa3fee4",
+ "reference": "71182d20e7bc5b913e2f5169c4c793762fa3fee4",
"shasum": ""
},
"require": {
@@ -1102,7 +1102,7 @@
"json",
"rest"
],
- "time": "2015-06-12 10:19:01"
+ "time": "2015-06-19 12:12:16"
},
{
"name": "dunglas/php-property-info",
@@ -1387,233 +1387,6 @@
"time": "2014-01-12 16:20:24"
},
{
- "name": "jms/metadata",
- "version": "1.5.1",
- "source": {
- "type": "git",
- "url": "https://github.com/schmittjoh/metadata.git",
- "reference": "22b72455559a25777cfd28c4ffda81ff7639f353"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/22b72455559a25777cfd28c4ffda81ff7639f353",
- "reference": "22b72455559a25777cfd28c4ffda81ff7639f353",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.0"
- },
- "require-dev": {
- "doctrine/cache": "~1.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.5.x-dev"
- }
- },
- "autoload": {
- "psr-0": {
- "Metadata\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache"
- ],
- "authors": [
- {
- "name": "Johannes Schmitt",
- "email": "schmittjoh@gmail.com",
- "homepage": "https://github.com/schmittjoh",
- "role": "Developer of wrapped JMSSerializerBundle"
- }
- ],
- "description": "Class/method/property metadata management in PHP",
- "keywords": [
- "annotations",
- "metadata",
- "xml",
- "yaml"
- ],
- "time": "2014-07-12 07:13:19"
- },
- {
- "name": "jms/parser-lib",
- "version": "1.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/schmittjoh/parser-lib.git",
- "reference": "c509473bc1b4866415627af0e1c6cc8ac97fa51d"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/schmittjoh/parser-lib/zipball/c509473bc1b4866415627af0e1c6cc8ac97fa51d",
- "reference": "c509473bc1b4866415627af0e1c6cc8ac97fa51d",
- "shasum": ""
- },
- "require": {
- "phpoption/phpoption": ">=0.9,<2.0-dev"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0-dev"
- }
- },
- "autoload": {
- "psr-0": {
- "JMS\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache2"
- ],
- "description": "A library for easily creating recursive-descent parsers.",
- "time": "2012-11-18 18:08:43"
- },
- {
- "name": "jms/serializer",
- "version": "0.16.0",
- "source": {
- "type": "git",
- "url": "https://github.com/schmittjoh/serializer.git",
- "reference": "c8a171357ca92b6706e395c757f334902d430ea9"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/c8a171357ca92b6706e395c757f334902d430ea9",
- "reference": "c8a171357ca92b6706e395c757f334902d430ea9",
- "shasum": ""
- },
- "require": {
- "doctrine/annotations": "1.*",
- "jms/metadata": "~1.1",
- "jms/parser-lib": "1.*",
- "php": ">=5.3.2",
- "phpcollection/phpcollection": "~0.1"
- },
- "require-dev": {
- "doctrine/orm": "~2.1",
- "doctrine/phpcr-odm": "~1.0.1",
- "jackalope/jackalope-doctrine-dbal": "1.0.*",
- "propel/propel1": "~1.7",
- "symfony/filesystem": "2.*",
- "symfony/form": "~2.1",
- "symfony/translation": "~2.0",
- "symfony/validator": "~2.0",
- "symfony/yaml": "2.*",
- "twig/twig": ">=1.8,<2.0-dev"
- },
- "suggest": {
- "symfony/yaml": "Required if you'd like to serialize data to YAML format."
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "0.15-dev"
- }
- },
- "autoload": {
- "psr-0": {
- "JMS\\Serializer": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache2"
- ],
- "authors": [
- {
- "name": "Johannes Schmitt",
- "email": "schmittjoh@gmail.com",
- "homepage": "https://github.com/schmittjoh",
- "role": "Developer of wrapped JMSSerializerBundle"
- }
- ],
- "description": "Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.",
- "homepage": "http://jmsyst.com/libs/serializer",
- "keywords": [
- "deserialization",
- "jaxb",
- "json",
- "serialization",
- "xml"
- ],
- "time": "2014-03-18 08:39:00"
- },
- {
- "name": "jms/serializer-bundle",
- "version": "0.13.0",
- "target-dir": "JMS/SerializerBundle",
- "source": {
- "type": "git",
- "url": "https://github.com/schmittjoh/JMSSerializerBundle.git",
- "reference": "bb15db3e661168f4310fad48b86915ff1ca33795"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/schmittjoh/JMSSerializerBundle/zipball/bb15db3e661168f4310fad48b86915ff1ca33795",
- "reference": "bb15db3e661168f4310fad48b86915ff1ca33795",
- "shasum": ""
- },
- "require": {
- "jms/serializer": "~0.11",
- "php": ">=5.3.2",
- "symfony/framework-bundle": "~2.1"
- },
- "require-dev": {
- "doctrine/doctrine-bundle": "*",
- "doctrine/orm": "*",
- "symfony/browser-kit": "*",
- "symfony/class-loader": "*",
- "symfony/css-selector": "*",
- "symfony/finder": "*",
- "symfony/form": "*",
- "symfony/process": "*",
- "symfony/twig-bundle": "*",
- "symfony/validator": "*",
- "symfony/yaml": "*"
- },
- "suggest": {
- "jms/di-extra-bundle": "Required to get lazy loading (de)serialization visitors, ~1.3"
- },
- "type": "symfony-bundle",
- "extra": {
- "branch-alias": {
- "dev-master": "0.13-dev"
- }
- },
- "autoload": {
- "psr-0": {
- "JMS\\SerializerBundle": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache2"
- ],
- "authors": [
- {
- "name": "Johannes M. Schmitt",
- "email": "schmittjoh@gmail.com",
- "homepage": "http://jmsyst.com",
- "role": "Developer of wrapped JMSSerializerBundle"
- }
- ],
- "description": "Allows you to easily serialize, and deserialize data of any complexity",
- "homepage": "http://jmsyst.com/bundles/JMSSerializerBundle",
- "keywords": [
- "deserialization",
- "jaxb",
- "json",
- "serialization",
- "xml"
- ],
- "time": "2013-12-05 14:36:11"
- },
- {
"name": "knplabs/knp-components",
"version": "1.3.1",
"source": {
@@ -2125,56 +1898,6 @@
"time": "2014-12-12 10:59:05"
},
{
- "name": "phpcollection/phpcollection",
- "version": "0.4.0",
- "source": {
- "type": "git",
- "url": "https://github.com/schmittjoh/php-collection.git",
- "reference": "b8bf55a0a929ca43b01232b36719f176f86c7e83"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/schmittjoh/php-collection/zipball/b8bf55a0a929ca43b01232b36719f176f86c7e83",
- "reference": "b8bf55a0a929ca43b01232b36719f176f86c7e83",
- "shasum": ""
- },
- "require": {
- "phpoption/phpoption": "1.*"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "0.3-dev"
- }
- },
- "autoload": {
- "psr-0": {
- "PhpCollection": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache2"
- ],
- "authors": [
- {
- "name": "Johannes Schmitt",
- "email": "schmittjoh@gmail.com",
- "homepage": "https://github.com/schmittjoh",
- "role": "Developer of wrapped JMSSerializerBundle"
- }
- ],
- "description": "General-Purpose Collection Library for PHP",
- "keywords": [
- "collection",
- "list",
- "map",
- "sequence",
- "set"
- ],
- "time": "2014-03-11 13:46:42"
- },
- {
"name": "phpdocumentor/reflection",
"version": "1.0.7",
"source": {
@@ -2278,55 +2001,6 @@
"time": "2015-02-03 12:10:50"
},
{
- "name": "phpoption/phpoption",
- "version": "1.4.0",
- "source": {
- "type": "git",
- "url": "https://github.com/schmittjoh/php-option.git",
- "reference": "5d099bcf0393908bf4ad69cc47dafb785d51f7f5"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/5d099bcf0393908bf4ad69cc47dafb785d51f7f5",
- "reference": "5d099bcf0393908bf4ad69cc47dafb785d51f7f5",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.3-dev"
- }
- },
- "autoload": {
- "psr-0": {
- "PhpOption\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache2"
- ],
- "authors": [
- {
- "name": "Johannes Schmitt",
- "email": "schmittjoh@gmail.com",
- "homepage": "https://github.com/schmittjoh",
- "role": "Developer of wrapped JMSSerializerBundle"
- }
- ],
- "description": "Option Type for PHP",
- "keywords": [
- "language",
- "option",
- "php",
- "type"
- ],
- "time": "2014-01-09 22:37:17"
- },
- {
"name": "psr/log",
"version": "1.0.0",
"source": {
@@ -2631,12 +2305,12 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/DoctrineBridge.git",
- "reference": "ffe93357eb2f81d8fa7c476a690cbda9a4c64088"
+ "reference": "67454aa55d8351c5b53cb7cfa442cb342197cc64"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/DoctrineBridge/zipball/ffe93357eb2f81d8fa7c476a690cbda9a4c64088",
- "reference": "ffe93357eb2f81d8fa7c476a690cbda9a4c64088",
+ "url": "https://api.github.com/repos/symfony/DoctrineBridge/zipball/67454aa55d8351c5b53cb7cfa442cb342197cc64",
+ "reference": "67454aa55d8351c5b53cb7cfa442cb342197cc64",
"shasum": ""
},
"require": {
@@ -2692,7 +2366,7 @@
],
"description": "Symfony Doctrine Bridge",
"homepage": "https://symfony.com",
- "time": "2015-06-12 15:08:08"
+ "time": "2015-06-18 16:13:27"
},
{
"name": "symfony/monolog-bundle",
diff --git a/src/PartKeepr/AuthBundle/Entity/User/User.php b/src/PartKeepr/AuthBundle/Entity/User/User.php
@@ -2,7 +2,6 @@
namespace PartKeepr\AuthBundle\Entity\User;
use Doctrine\ORM\Mapping as ORM;
-use Doctrine\ORM\Mapping\Table;
use PartKeepr\PartKeepr;
use PartKeepr\UserPreference\UserPreference;
use PartKeepr\Util\BaseEntity;
diff --git a/src/PartKeepr/AuthBundle/Response/LoginResponse.php b/src/PartKeepr/AuthBundle/Response/LoginResponse.php
@@ -2,7 +2,6 @@
namespace PartKeepr\AuthBundle\Response;
use PartKeepr\UserPreference\UserPreference;
-use JMS\Serializer\Annotation as JMS;
/**
* Class LoginResponse
@@ -15,24 +14,20 @@ class LoginResponse {
/**
* Holds the session id
- * @JMS\Type("string")
*/
public $sessionId;
/**
* Holds the username
- * @JMS\Type("string")
*/
public $username;
/**
* Defines if the current user is an administrator
- * @JMS\Type("boolean")
*/
public $isAdmin;
/**
- * @JMS\Type("array<PartKeepr\UserPreference\UserPreference>");
* @var UserPreference[] The user preferences
*/
public $userPreferences;
diff --git a/src/PartKeepr/SiPrefixBundle/Entity/SiPrefix.php b/src/PartKeepr/SiPrefixBundle/Entity/SiPrefix.php
@@ -1,7 +1,6 @@
<?php
namespace PartKeepr\SiPrefixBundle\Entity;
-use JMS\Serializer\Annotation\ReadOnly;
use PartKeepr\Util\BaseEntity,
Doctrine\ORM\Mapping as ORM,
Symfony\Component\Validator\Constraints as Assert,
@@ -13,7 +12,7 @@ use PartKeepr\Util\BaseEntity,
* @link http://en.wikipedia.org/wiki/Metric_prefix
*
* @ORM\Entity
- * @TargetService(uri="/siprefix")
+ * @TargetService(uri="/api/si_prefixes")
*/
class SiPrefix
{
@@ -43,7 +42,6 @@ class SiPrefix
*
* @Assert\Type(type="string")
* @Assert\NotBlank(message="siprefix.prefix.not_blank")
- * @ReadOnly()
* @var string
*/
private $prefix;
@@ -55,7 +53,6 @@ class SiPrefix
*
* @Assert\Type(type="string")
* @Assert\NotBlank(message="siprefix.symbol.not_blank")
- * @ReadOnly()
* @var string
*/
private $symbol;
@@ -65,7 +62,6 @@ class SiPrefix
*
* @ORM\Column(type="integer")
* @Assert\Type(type="integer")
- * @ReadOnly()
* @var int
*/
private $exponent;
@@ -75,7 +71,6 @@ class SiPrefix
*
* @ORM\Column(type="integer")
* @Assert\Type(type="integer")
- * @ReadOnly()
* @var int
*/
private $base;
diff --git a/src/PartKeepr/UnitBundle/Entity/Unit.php b/src/PartKeepr/UnitBundle/Entity/Unit.php
@@ -2,11 +2,9 @@
namespace PartKeepr\UnitBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
-use JMS\Serializer\Annotation\ExclusionPolicy;
use PartKeepr\Util\BaseEntity,
PartKeepr\SiPrefixBundle\Entity\SiPrefix,
Doctrine\ORM\Mapping as ORM,
- JMS\Serializer\Annotation\Type,
PartKeepr\DoctrineReflectionBundle\Annotation\TargetService;
/**
@@ -14,7 +12,6 @@ use PartKeepr\Util\BaseEntity,
*
* @ORM\Entity
* @TargetService(uri="/unit")
- * @ExclusionPolicy("none")
**/
class Unit {
/**
@@ -39,7 +36,6 @@ class Unit {
/**
* The name of the unit (e.g. Volts, Ampere, Farad, Metres)
* @ORM\Column(type="string")
- * @Type("string")
*
* @var string
*/
@@ -48,7 +44,6 @@ class Unit {
/**
* The symbol of the unit (e.g. V, A, F, m)
* @ORM\Column(type="string")
- * @Type("string")
* @var string
*/
private $symbol;
@@ -60,7 +55,6 @@ class Unit {
* joinColumns={@ORM\JoinColumn(name="unit_id", referencedColumnName="id")},
* inverseJoinColumns={@ORM\JoinColumn(name="siprefix_id", referencedColumnName="id")}
* )
- * @Type("ArrayCollection<PartKeepr\SiPrefixBundle\Entity\SiPrefix>")
* @var ArrayCollection
*/
private $prefixes;
diff --git a/src/backend/PartKeepr/UserPreference/UserPreference.php b/src/backend/PartKeepr/UserPreference/UserPreference.php
@@ -8,7 +8,6 @@ use PartKeepr\PartKeepr;
use PartKeepr\UserPreference\Exceptions\UserPreferenceNotFoundException;
use PartKeepr\Util\Exceptions\EntityNotPersistantException;
use PartKeepr\Util\Serializable;
-use JMS\Serializer\Annotation as JMS;
/**
* Represents a user preference entry.
@@ -19,14 +18,13 @@ use JMS\Serializer\Annotation as JMS;
* Note that values are stored internally as serialized PHP values to keep their type.
*
* @ORM\Entity
- * @JMS\ExclusionPolicy("ALL")
+ *
**/
class UserPreference implements Serializable {
/**
* Defines the key of the user preference
* @ORM\Column(type="string",length=255)
* @ORM\Id
- * @JMS\Expose
* @var string
*/
private $preferenceKey;
@@ -34,9 +32,7 @@ class UserPreference implements Serializable {
/**
* Defines the value. Note that the value is internally stored as a serialized string.
*
- * @JMS\Accessor(getter="getValue",setter="setValue")
* @ORM\Column(type="text")
- * @JMS\Expose
* @var mixed
*/
private $preferenceValue;
diff --git a/src/backend/PartKeepr/Util/BaseEntity.php b/src/backend/PartKeepr/Util/BaseEntity.php
@@ -1,7 +1,6 @@
<?php
namespace PartKeepr\Util;
-use JMS\Serializer\Annotation\Type;
use Doctrine\ORM\Mapping as ORM;
/** @ORM\MappedSuperclass */
@@ -9,7 +8,6 @@ class BaseEntity {
/**
* @ORM\Id @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
- * @Type("integer")
* @var integer
*/
private $id;