aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-06-01 15:49:49 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-06-01 15:49:49 +0200
commit2878416f8b4d94fb5e64c2fa61861526a7654d3d (patch)
treecbdf2d95ecdb651e2003747a28572c35b6c9da64
parent98510a4189186c8dcc3f1bf38843d935ed3d1859 (diff)
parent4346a86068781f4acdeb574d7e2af08b77b58ea7 (diff)
downloadwallabag-2878416f8b4d94fb5e64c2fa61861526a7654d3d.tar.gz
wallabag-2878416f8b4d94fb5e64c2fa61861526a7654d3d.tar.zst
wallabag-2878416f8b4d94fb5e64c2fa61861526a7654d3d.zip
Merge pull request #1167 from wallabag/v2-api-bundle
Move API stuff in ApiBundle
-rw-r--r--.travis.yml20
-rw-r--r--app/AppKernel.php3
-rw-r--r--app/SymfonyRequirements.php41
-rw-r--r--app/config/routing.yml4
-rw-r--r--app/config/routing_rest.yml2
-rw-r--r--composer.lock628
-rw-r--r--src/Wallabag/ApiBundle/Controller/WallabagRestController.php (renamed from src/Wallabag/CoreBundle/Controller/WallabagRestController.php)116
-rw-r--r--src/Wallabag/ApiBundle/DependencyInjection/Configuration.php29
-rw-r--r--src/Wallabag/ApiBundle/DependencyInjection/Security/Factory/WsseFactory.php (renamed from src/Wallabag/CoreBundle/DependencyInjection/Security/Factory/WsseFactory.php)2
-rw-r--r--src/Wallabag/ApiBundle/DependencyInjection/WallabagApiExtension.php25
-rw-r--r--src/Wallabag/ApiBundle/Resources/config/routing.yml0
-rw-r--r--src/Wallabag/ApiBundle/Resources/config/routing_rest.yml4
-rw-r--r--src/Wallabag/ApiBundle/Resources/config/services.yml12
-rw-r--r--src/Wallabag/ApiBundle/Security/Authentication/Provider/WsseProvider.php (renamed from src/Wallabag/CoreBundle/Security/Authentication/Provider/WsseProvider.php)13
-rw-r--r--src/Wallabag/ApiBundle/Security/Authentication/Token/WsseUserToken.php (renamed from src/Wallabag/CoreBundle/Security/Authentication/Token/WsseUserToken.php)3
-rw-r--r--src/Wallabag/ApiBundle/Security/Firewall/WsseListener.php (renamed from src/Wallabag/CoreBundle/Security/Firewall/WsseListener.php)4
-rw-r--r--src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php410
-rw-r--r--src/Wallabag/ApiBundle/WallabagApiBundle.php18
-rw-r--r--src/Wallabag/CoreBundle/Command/InstallCommand.php10
-rw-r--r--src/Wallabag/CoreBundle/Controller/ConfigController.php2
-rw-r--r--src/Wallabag/CoreBundle/Controller/EntryController.php16
-rw-r--r--src/Wallabag/CoreBundle/Controller/RssController.php6
-rw-r--r--src/Wallabag/CoreBundle/Controller/SecurityController.php9
-rw-r--r--src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php8
-rw-r--r--src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php6
-rw-r--r--src/Wallabag/CoreBundle/Doctrine/Mapping/PrefixedNamingStrategy.php16
-rw-r--r--src/Wallabag/CoreBundle/Entity/Config.php56
-rw-r--r--src/Wallabag/CoreBundle/Entity/Entry.php55
-rw-r--r--src/Wallabag/CoreBundle/Entity/Tag.php15
-rw-r--r--src/Wallabag/CoreBundle/Entity/User.php60
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php1
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/ConfigType.php1
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/EntryType.php1
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/ForgotPasswordType.php1
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/NewUserType.php1
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/ResetPasswordType.php1
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/RssType.php1
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/UserInformationType.php1
-rwxr-xr-xsrc/Wallabag/CoreBundle/Helper/Tools.php12
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntryRepository.php8
-rw-r--r--src/Wallabag/CoreBundle/Repository/UserRepository.php2
-rw-r--r--src/Wallabag/CoreBundle/Resources/config/routing_rest.yml4
-rw-r--r--src/Wallabag/CoreBundle/Resources/config/services.yml12
-rw-r--r--src/Wallabag/CoreBundle/Security/Authentication/Encoder/WallabagPasswordEncoder.php3
-rw-r--r--src/Wallabag/CoreBundle/Security/Authentication/Provider/WallabagAuthenticationProvider.php2
-rw-r--r--src/Wallabag/CoreBundle/Service/Extractor.php23
-rw-r--r--src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php4
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php6
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php4
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/RssControllerTest.php10
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/SecurityControllerTest.php4
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php214
-rw-r--r--src/Wallabag/CoreBundle/Tests/WallabagCoreTestCase.php (renamed from src/Wallabag/CoreBundle/Tests/WallabagTestCase.php)2
-rw-r--r--src/Wallabag/CoreBundle/Tools/Utils.php5
-rw-r--r--src/Wallabag/CoreBundle/Twig/Extension/WallabagExtension.php6
-rw-r--r--src/Wallabag/CoreBundle/WallabagCoreBundle.php9
56 files changed, 1142 insertions, 789 deletions
diff --git a/.travis.yml b/.travis.yml
index 3c97a9da..8d0cf817 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -30,16 +30,16 @@ install:
30 - composer self-update 30 - composer self-update
31 31
32# build coverage only on one build, to speed up results feedbacks 32# build coverage only on one build, to speed up results feedbacks
33before_script: 33# before_script:
34 - if [[ "$TRAVIS_PHP_VERSION" = "5.6" ]]; then PHPUNIT_FLAGS="--coverage-clover=coverage.clover"; else PHPUNIT_FLAGS=""; fi; 34 # - if [[ "$TRAVIS_PHP_VERSION" = "5.6" ]]; then PHPUNIT_FLAGS="--coverage-clover=coverage.clover"; else PHPUNIT_FLAGS=""; fi;
35 35
36script: 36script:
37 - ant prepare 37 - ant prepare
38 - phpunit --exclude-group command-doctrine $PHPUNIT_FLAGS 38 - bin/phpunit --exclude-group command-doctrine --debug $PHPUNIT_FLAGS
39 39
40after_script: 40# after_script:
41 - | 41 # - |
42 if [ $TRAVIS_PHP_VERSION = '5.6' ]; then 42 # if [ $TRAVIS_PHP_VERSION = '5.6' ]; then
43 wget https://scrutinizer-ci.com/ocular.phar 43 # wget https://scrutinizer-ci.com/ocular.phar
44 php ocular.phar code-coverage:upload --format=php-clover coverage.clover 44 # php ocular.phar code-coverage:upload --format=php-clover coverage.clover
45 fi 45 # fi
diff --git a/app/AppKernel.php b/app/AppKernel.php
index 601b52c3..9a52f349 100644
--- a/app/AppKernel.php
+++ b/app/AppKernel.php
@@ -23,7 +23,8 @@ class AppKernel extends Kernel
23 new Nelmio\CorsBundle\NelmioCorsBundle(), 23 new Nelmio\CorsBundle\NelmioCorsBundle(),
24 new Liip\ThemeBundle\LiipThemeBundle(), 24 new Liip\ThemeBundle\LiipThemeBundle(),
25 new Wallabag\CoreBundle\WallabagCoreBundle(), 25 new Wallabag\CoreBundle\WallabagCoreBundle(),
26 new Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle() 26 new Wallabag\ApiBundle\WallabagApiBundle(),
27 new Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle(),
27 ); 28 );
28 29
29 if (in_array($this->getEnvironment(), array('dev', 'test'))) { 30 if (in_array($this->getEnvironment(), array('dev', 'test'))) {
diff --git a/app/SymfonyRequirements.php b/app/SymfonyRequirements.php
index cbcf1c8e..caabe407 100644
--- a/app/SymfonyRequirements.php
+++ b/app/SymfonyRequirements.php
@@ -77,7 +77,7 @@ class Requirement
77 } 77 }
78 78
79 /** 79 /**
80 * Returns the help text for resolving the problem 80 * Returns the help text for resolving the problem.
81 * 81 *
82 * @return string The help text 82 * @return string The help text
83 */ 83 */
@@ -119,10 +119,10 @@ class PhpIniRequirement extends Requirement
119 * 119 *
120 * @param string $cfgName The configuration name used for ini_get() 120 * @param string $cfgName The configuration name used for ini_get()
121 * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, 121 * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false,
122 or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement 122 * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
123 * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. 123 * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
124 This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. 124 * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
125 Example: You require a config to be true but PHP later removes this config and defaults it to true internally. 125 * Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
126 * @param string|null $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived) 126 * @param string|null $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived)
127 * @param string|null $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived) 127 * @param string|null $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived)
128 * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) 128 * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
@@ -221,10 +221,10 @@ class RequirementCollection implements IteratorAggregate
221 * 221 *
222 * @param string $cfgName The configuration name used for ini_get() 222 * @param string $cfgName The configuration name used for ini_get()
223 * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, 223 * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false,
224 or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement 224 * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
225 * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. 225 * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
226 This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. 226 * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
227 Example: You require a config to be true but PHP later removes this config and defaults it to true internally. 227 * Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
228 * @param string $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived) 228 * @param string $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived)
229 * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived) 229 * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived)
230 * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) 230 * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
@@ -239,10 +239,10 @@ class RequirementCollection implements IteratorAggregate
239 * 239 *
240 * @param string $cfgName The configuration name used for ini_get() 240 * @param string $cfgName The configuration name used for ini_get()
241 * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, 241 * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false,
242 or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement 242 * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
243 * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. 243 * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
244 This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. 244 * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
245 Example: You require a config to be true but PHP later removes this config and defaults it to true internally. 245 * Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
246 * @param string $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived) 246 * @param string $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived)
247 * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived) 247 * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived)
248 * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) 248 * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
@@ -542,11 +542,22 @@ class SymfonyRequirements extends RequirementCollection
542 542
543 /* optional recommendations follow */ 543 /* optional recommendations follow */
544 544
545 $this->addRecommendation( 545 if (file_exists(__DIR__.'/../vendor/composer')) {
546 file_get_contents(__FILE__) === file_get_contents(__DIR__.'/../vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/skeleton/app/SymfonyRequirements.php'), 546 require_once __DIR__.'/../vendor/autoload.php';
547 'Requirements file should be up-to-date', 547
548 'Your requirements file is outdated. Run composer install and re-check your configuration.' 548 try {
549 ); 549 $r = new \ReflectionClass('Sensio\Bundle\DistributionBundle\SensioDistributionBundle');
550
551 $contents = file_get_contents(dirname($r->getFileName()).'/Resources/skeleton/app/SymfonyRequirements.php');
552 } catch (\ReflectionException $e) {
553 $contents = '';
554 }
555 $this->addRecommendation(
556 file_get_contents(__FILE__) === $contents,
557 'Requirements file should be up-to-date',
558 'Your requirements file is outdated. Run composer install and re-check your configuration.'
559 );
560 }
550 561
551 $this->addRecommendation( 562 $this->addRecommendation(
552 version_compare($installedPhpVersion, '5.3.4', '>='), 563 version_compare($installedPhpVersion, '5.3.4', '>='),
diff --git a/app/config/routing.yml b/app/config/routing.yml
index d681b39b..8710e97f 100644
--- a/app/config/routing.yml
+++ b/app/config/routing.yml
@@ -1,3 +1,7 @@
1wallabag_api:
2 resource: "@WallabagApiBundle/Resources/config/routing.yml"
3 prefix: /
4
1app: 5app:
2 resource: @WallabagCoreBundle/Controller/ 6 resource: @WallabagCoreBundle/Controller/
3 type: annotation 7 type: annotation
diff --git a/app/config/routing_rest.yml b/app/config/routing_rest.yml
index 82d9e6cc..0a64ad78 100644
--- a/app/config/routing_rest.yml
+++ b/app/config/routing_rest.yml
@@ -1,3 +1,3 @@
1Rest_Wallabag: 1Rest_Wallabag:
2 type : rest 2 type : rest
3 resource: "@WallabagCoreBundle/Resources/config/routing_rest.yml" \ No newline at end of file 3 resource: "@WallabagApiBundle/Resources/config/routing_rest.yml"
diff --git a/composer.lock b/composer.lock
index 66f4738b..c44ffee0 100644
--- a/composer.lock
+++ b/composer.lock
@@ -8,16 +8,16 @@
8 "packages": [ 8 "packages": [
9 { 9 {
10 "name": "doctrine/annotations", 10 "name": "doctrine/annotations",
11 "version": "v1.2.3", 11 "version": "v1.2.4",
12 "source": { 12 "source": {
13 "type": "git", 13 "type": "git",
14 "url": "https://github.com/doctrine/annotations.git", 14 "url": "https://github.com/doctrine/annotations.git",
15 "reference": "eeda578cbe24a170331a1cfdf78be723412df7a4" 15 "reference": "b5202eb9e83f8db52e0e58867e0a46e63be8332e"
16 }, 16 },
17 "dist": { 17 "dist": {
18 "type": "zip", 18 "type": "zip",
19 "url": "https://api.github.com/repos/doctrine/annotations/zipball/eeda578cbe24a170331a1cfdf78be723412df7a4", 19 "url": "https://api.github.com/repos/doctrine/annotations/zipball/b5202eb9e83f8db52e0e58867e0a46e63be8332e",
20 "reference": "eeda578cbe24a170331a1cfdf78be723412df7a4", 20 "reference": "b5202eb9e83f8db52e0e58867e0a46e63be8332e",
21 "shasum": "" 21 "shasum": ""
22 }, 22 },
23 "require": { 23 "require": {
@@ -72,20 +72,20 @@
72 "docblock", 72 "docblock",
73 "parser" 73 "parser"
74 ], 74 ],
75 "time": "2014-12-20 20:49:38" 75 "time": "2014-12-23 22:40:37"
76 }, 76 },
77 { 77 {
78 "name": "doctrine/cache", 78 "name": "doctrine/cache",
79 "version": "v1.4.0", 79 "version": "v1.4.1",
80 "source": { 80 "source": {
81 "type": "git", 81 "type": "git",
82 "url": "https://github.com/doctrine/cache.git", 82 "url": "https://github.com/doctrine/cache.git",
83 "reference": "2346085d2b027b233ae1d5de59b07440b9f288c8" 83 "reference": "c9eadeb743ac6199f7eec423cb9426bc518b7b03"
84 }, 84 },
85 "dist": { 85 "dist": {
86 "type": "zip", 86 "type": "zip",
87 "url": "https://api.github.com/repos/doctrine/cache/zipball/2346085d2b027b233ae1d5de59b07440b9f288c8", 87 "url": "https://api.github.com/repos/doctrine/cache/zipball/c9eadeb743ac6199f7eec423cb9426bc518b7b03",
88 "reference": "2346085d2b027b233ae1d5de59b07440b9f288c8", 88 "reference": "c9eadeb743ac6199f7eec423cb9426bc518b7b03",
89 "shasum": "" 89 "shasum": ""
90 }, 90 },
91 "require": { 91 "require": {
@@ -96,13 +96,13 @@
96 }, 96 },
97 "require-dev": { 97 "require-dev": {
98 "phpunit/phpunit": ">=3.7", 98 "phpunit/phpunit": ">=3.7",
99 "predis/predis": "~0.8", 99 "predis/predis": "~1.0",
100 "satooshi/php-coveralls": "~0.6" 100 "satooshi/php-coveralls": "~0.6"
101 }, 101 },
102 "type": "library", 102 "type": "library",
103 "extra": { 103 "extra": {
104 "branch-alias": { 104 "branch-alias": {
105 "dev-master": "1.4.x-dev" 105 "dev-master": "1.5.x-dev"
106 } 106 }
107 }, 107 },
108 "autoload": { 108 "autoload": {
@@ -142,25 +142,28 @@
142 "cache", 142 "cache",
143 "caching" 143 "caching"
144 ], 144 ],
145 "time": "2015-01-15 20:38:55" 145 "time": "2015-04-15 00:11:59"
146 }, 146 },
147 { 147 {
148 "name": "doctrine/collections", 148 "name": "doctrine/collections",
149 "version": "v1.2", 149 "version": "v1.3.0",
150 "source": { 150 "source": {
151 "type": "git", 151 "type": "git",
152 "url": "https://github.com/doctrine/collections.git", 152 "url": "https://github.com/doctrine/collections.git",
153 "reference": "b99c5c46c87126201899afe88ec490a25eedd6a2" 153 "reference": "6c1e4eef75f310ea1b3e30945e9f06e652128b8a"
154 }, 154 },
155 "dist": { 155 "dist": {
156 "type": "zip", 156 "type": "zip",
157 "url": "https://api.github.com/repos/doctrine/collections/zipball/b99c5c46c87126201899afe88ec490a25eedd6a2", 157 "url": "https://api.github.com/repos/doctrine/collections/zipball/6c1e4eef75f310ea1b3e30945e9f06e652128b8a",
158 "reference": "b99c5c46c87126201899afe88ec490a25eedd6a2", 158 "reference": "6c1e4eef75f310ea1b3e30945e9f06e652128b8a",
159 "shasum": "" 159 "shasum": ""
160 }, 160 },
161 "require": { 161 "require": {
162 "php": ">=5.3.2" 162 "php": ">=5.3.2"
163 }, 163 },
164 "require-dev": {
165 "phpunit/phpunit": "~4.0"
166 },
164 "type": "library", 167 "type": "library",
165 "extra": { 168 "extra": {
166 "branch-alias": { 169 "branch-alias": {
@@ -178,17 +181,6 @@
178 ], 181 ],
179 "authors": [ 182 "authors": [
180 { 183 {
181 "name": "Jonathan Wage",
182 "email": "jonwage@gmail.com",
183 "homepage": "http://www.jwage.com/",
184 "role": "Creator"
185 },
186 {
187 "name": "Guilherme Blanco",
188 "email": "guilhermeblanco@gmail.com",
189 "homepage": "http://www.instaclick.com"
190 },
191 {
192 "name": "Roman Borschel", 184 "name": "Roman Borschel",
193 "email": "roman@code-factory.org" 185 "email": "roman@code-factory.org"
194 }, 186 },
@@ -197,10 +189,16 @@
197 "email": "kontakt@beberlei.de" 189 "email": "kontakt@beberlei.de"
198 }, 190 },
199 { 191 {
192 "name": "Guilherme Blanco",
193 "email": "guilhermeblanco@gmail.com"
194 },
195 {
196 "name": "Jonathan Wage",
197 "email": "jonwage@gmail.com"
198 },
199 {
200 "name": "Johannes Schmitt", 200 "name": "Johannes Schmitt",
201 "email": "schmittjoh@gmail.com", 201 "email": "schmittjoh@gmail.com"
202 "homepage": "https://github.com/schmittjoh",
203 "role": "Developer of wrapped JMSSerializerBundle"
204 } 202 }
205 ], 203 ],
206 "description": "Collections Abstraction library", 204 "description": "Collections Abstraction library",
@@ -210,20 +208,20 @@
210 "collections", 208 "collections",
211 "iterator" 209 "iterator"
212 ], 210 ],
213 "time": "2014-02-03 23:07:43" 211 "time": "2015-04-14 22:21:58"
214 }, 212 },
215 { 213 {
216 "name": "doctrine/common", 214 "name": "doctrine/common",
217 "version": "v2.4.2", 215 "version": "v2.5.0",
218 "source": { 216 "source": {
219 "type": "git", 217 "type": "git",
220 "url": "https://github.com/doctrine/common.git", 218 "url": "https://github.com/doctrine/common.git",
221 "reference": "5db6ab40e4c531f14dad4ca96a394dfce5d4255b" 219 "reference": "cd8daf2501e10c63dced7b8b9b905844316ae9d3"
222 }, 220 },
223 "dist": { 221 "dist": {
224 "type": "zip", 222 "type": "zip",
225 "url": "https://api.github.com/repos/doctrine/common/zipball/5db6ab40e4c531f14dad4ca96a394dfce5d4255b", 223 "url": "https://api.github.com/repos/doctrine/common/zipball/cd8daf2501e10c63dced7b8b9b905844316ae9d3",
226 "reference": "5db6ab40e4c531f14dad4ca96a394dfce5d4255b", 224 "reference": "cd8daf2501e10c63dced7b8b9b905844316ae9d3",
227 "shasum": "" 225 "shasum": ""
228 }, 226 },
229 "require": { 227 "require": {
@@ -240,7 +238,7 @@
240 "type": "library", 238 "type": "library",
241 "extra": { 239 "extra": {
242 "branch-alias": { 240 "branch-alias": {
243 "dev-master": "2.4.x-dev" 241 "dev-master": "2.6.x-dev"
244 } 242 }
245 }, 243 },
246 "autoload": { 244 "autoload": {
@@ -254,17 +252,6 @@
254 ], 252 ],
255 "authors": [ 253 "authors": [
256 { 254 {
257 "name": "Jonathan Wage",
258 "email": "jonwage@gmail.com",
259 "homepage": "http://www.jwage.com/",
260 "role": "Creator"
261 },
262 {
263 "name": "Guilherme Blanco",
264 "email": "guilhermeblanco@gmail.com",
265 "homepage": "http://www.instaclick.com"
266 },
267 {
268 "name": "Roman Borschel", 255 "name": "Roman Borschel",
269 "email": "roman@code-factory.org" 256 "email": "roman@code-factory.org"
270 }, 257 },
@@ -273,10 +260,16 @@
273 "email": "kontakt@beberlei.de" 260 "email": "kontakt@beberlei.de"
274 }, 261 },
275 { 262 {
263 "name": "Guilherme Blanco",
264 "email": "guilhermeblanco@gmail.com"
265 },
266 {
267 "name": "Jonathan Wage",
268 "email": "jonwage@gmail.com"
269 },
270 {
276 "name": "Johannes Schmitt", 271 "name": "Johannes Schmitt",
277 "email": "schmittjoh@gmail.com", 272 "email": "schmittjoh@gmail.com"
278 "homepage": "https://github.com/schmittjoh",
279 "role": "Developer of wrapped JMSSerializerBundle"
280 } 273 }
281 ], 274 ],
282 "description": "Common Library for Doctrine projects", 275 "description": "Common Library for Doctrine projects",
@@ -288,7 +281,7 @@
288 "persistence", 281 "persistence",
289 "spl" 282 "spl"
290 ], 283 ],
291 "time": "2014-05-21 19:28:51" 284 "time": "2015-04-02 19:55:44"
292 }, 285 },
293 { 286 {
294 "name": "doctrine/dbal", 287 "name": "doctrine/dbal",
@@ -363,16 +356,16 @@
363 }, 356 },
364 { 357 {
365 "name": "doctrine/doctrine-bundle", 358 "name": "doctrine/doctrine-bundle",
366 "version": "v1.3.0", 359 "version": "v1.5.0",
367 "source": { 360 "source": {
368 "type": "git", 361 "type": "git",
369 "url": "https://github.com/doctrine/DoctrineBundle.git", 362 "url": "https://github.com/doctrine/DoctrineBundle.git",
370 "reference": "3beb3a780485ab01f86941f4892cd23ef8c39c6b" 363 "reference": "0b9e27037c4fdbad515ee5ec89842e9091a6480f"
371 }, 364 },
372 "dist": { 365 "dist": {
373 "type": "zip", 366 "type": "zip",
374 "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/3beb3a780485ab01f86941f4892cd23ef8c39c6b", 367 "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/0b9e27037c4fdbad515ee5ec89842e9091a6480f",
375 "reference": "3beb3a780485ab01f86941f4892cd23ef8c39c6b", 368 "reference": "0b9e27037c4fdbad515ee5ec89842e9091a6480f",
376 "shasum": "" 369 "shasum": ""
377 }, 370 },
378 "require": { 371 "require": {
@@ -380,18 +373,17 @@
380 "doctrine/doctrine-cache-bundle": "~1.0", 373 "doctrine/doctrine-cache-bundle": "~1.0",
381 "jdorn/sql-formatter": "~1.1", 374 "jdorn/sql-formatter": "~1.1",
382 "php": ">=5.3.2", 375 "php": ">=5.3.2",
376 "symfony/console": "~2.3",
383 "symfony/doctrine-bridge": "~2.2", 377 "symfony/doctrine-bridge": "~2.2",
384 "symfony/framework-bundle": "~2.2" 378 "symfony/framework-bundle": "~2.3"
385 }, 379 },
386 "require-dev": { 380 "require-dev": {
387 "doctrine/orm": "~2.3", 381 "doctrine/orm": "~2.3",
388 "phpunit/php-code-coverage": "~1.2", 382 "phpunit/phpunit": "~4",
389 "phpunit/phpunit": "~3.7",
390 "phpunit/phpunit-mock-objects": "~1.2",
391 "satooshi/php-coveralls": "~0.6.1", 383 "satooshi/php-coveralls": "~0.6.1",
392 "symfony/validator": "~2.2", 384 "symfony/validator": "~2.2",
393 "symfony/yaml": "~2.2", 385 "symfony/yaml": "~2.2",
394 "twig/twig": "~1" 386 "twig/twig": "~1.10"
395 }, 387 },
396 "suggest": { 388 "suggest": {
397 "doctrine/orm": "The Doctrine ORM integration is optional in the bundle.", 389 "doctrine/orm": "The Doctrine ORM integration is optional in the bundle.",
@@ -400,7 +392,7 @@
400 "type": "symfony-bundle", 392 "type": "symfony-bundle",
401 "extra": { 393 "extra": {
402 "branch-alias": { 394 "branch-alias": {
403 "dev-master": "1.3.x-dev" 395 "dev-master": "1.5.x-dev"
404 } 396 }
405 }, 397 },
406 "autoload": { 398 "autoload": {
@@ -438,7 +430,7 @@
438 "orm", 430 "orm",
439 "persistence" 431 "persistence"
440 ], 432 ],
441 "time": "2014-11-28 08:32:03" 433 "time": "2015-05-28 12:27:15"
442 }, 434 },
443 { 435 {
444 "name": "doctrine/doctrine-cache-bundle", 436 "name": "doctrine/doctrine-cache-bundle",
@@ -592,6 +584,60 @@
592 "time": "2014-12-20 21:24:13" 584 "time": "2014-12-20 21:24:13"
593 }, 585 },
594 { 586 {
587 "name": "doctrine/instantiator",
588 "version": "1.0.4",
589 "source": {
590 "type": "git",
591 "url": "https://github.com/doctrine/instantiator.git",
592 "reference": "f976e5de371104877ebc89bd8fecb0019ed9c119"
593 },
594 "dist": {
595 "type": "zip",
596 "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f976e5de371104877ebc89bd8fecb0019ed9c119",
597 "reference": "f976e5de371104877ebc89bd8fecb0019ed9c119",
598 "shasum": ""
599 },
600 "require": {
601 "php": ">=5.3,<8.0-DEV"
602 },
603 "require-dev": {
604 "athletic/athletic": "~0.1.8",
605 "ext-pdo": "*",
606 "ext-phar": "*",
607 "phpunit/phpunit": "~4.0",
608 "squizlabs/php_codesniffer": "2.0.*@ALPHA"
609 },
610 "type": "library",
611 "extra": {
612 "branch-alias": {
613 "dev-master": "1.0.x-dev"
614 }
615 },
616 "autoload": {
617 "psr-0": {
618 "Doctrine\\Instantiator\\": "src"
619 }
620 },
621 "notification-url": "https://packagist.org/downloads/",
622 "license": [
623 "MIT"
624 ],
625 "authors": [
626 {
627 "name": "Marco Pivetta",
628 "email": "ocramius@gmail.com",
629 "homepage": "http://ocramius.github.com/"
630 }
631 ],
632 "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
633 "homepage": "https://github.com/doctrine/instantiator",
634 "keywords": [
635 "constructor",
636 "instantiate"
637 ],
638 "time": "2014-10-13 12:58:55"
639 },
640 {
595 "name": "doctrine/lexer", 641 "name": "doctrine/lexer",
596 "version": "v1.0.1", 642 "version": "v1.0.1",
597 "source": { 643 "source": {
@@ -647,26 +693,30 @@
647 }, 693 },
648 { 694 {
649 "name": "doctrine/orm", 695 "name": "doctrine/orm",
650 "version": "v2.4.7", 696 "version": "v2.5.0",
651 "source": { 697 "source": {
652 "type": "git", 698 "type": "git",
653 "url": "https://github.com/doctrine/doctrine2.git", 699 "url": "https://github.com/doctrine/doctrine2.git",
654 "reference": "2bc4ff3cab2ae297bcd05f2e619d42e6a7ca9e68" 700 "reference": "aa80c7d2c55a372f5f9f825f5c66dbda53a6e3fe"
655 }, 701 },
656 "dist": { 702 "dist": {
657 "type": "zip", 703 "type": "zip",
658 "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/2bc4ff3cab2ae297bcd05f2e619d42e6a7ca9e68", 704 "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/aa80c7d2c55a372f5f9f825f5c66dbda53a6e3fe",
659 "reference": "2bc4ff3cab2ae297bcd05f2e619d42e6a7ca9e68", 705 "reference": "aa80c7d2c55a372f5f9f825f5c66dbda53a6e3fe",
660 "shasum": "" 706 "shasum": ""
661 }, 707 },
662 "require": { 708 "require": {
663 "doctrine/collections": "~1.1", 709 "doctrine/cache": "~1.4",
664 "doctrine/dbal": "~2.4", 710 "doctrine/collections": "~1.2",
711 "doctrine/common": ">=2.5-dev,<2.6-dev",
712 "doctrine/dbal": ">=2.5-dev,<2.6-dev",
713 "doctrine/instantiator": "~1.0.1",
665 "ext-pdo": "*", 714 "ext-pdo": "*",
666 "php": ">=5.3.2", 715 "php": ">=5.4",
667 "symfony/console": "~2.0" 716 "symfony/console": "~2.5"
668 }, 717 },
669 "require-dev": { 718 "require-dev": {
719 "phpunit/phpunit": "~4.0",
670 "satooshi/php-coveralls": "dev-master", 720 "satooshi/php-coveralls": "dev-master",
671 "symfony/yaml": "~2.1" 721 "symfony/yaml": "~2.1"
672 }, 722 },
@@ -680,7 +730,7 @@
680 "type": "library", 730 "type": "library",
681 "extra": { 731 "extra": {
682 "branch-alias": { 732 "branch-alias": {
683 "dev-master": "2.4.x-dev" 733 "dev-master": "2.6.x-dev"
684 } 734 }
685 }, 735 },
686 "autoload": { 736 "autoload": {
@@ -716,7 +766,7 @@
716 "database", 766 "database",
717 "orm" 767 "orm"
718 ], 768 ],
719 "time": "2014-12-16 13:45:01" 769 "time": "2015-04-02 20:40:18"
720 }, 770 },
721 { 771 {
722 "name": "ezyang/htmlpurifier", 772 "name": "ezyang/htmlpurifier",
@@ -764,50 +814,56 @@
764 }, 814 },
765 { 815 {
766 "name": "friendsofsymfony/rest-bundle", 816 "name": "friendsofsymfony/rest-bundle",
767 "version": "1.5.3", 817 "version": "1.6.0",
768 "target-dir": "FOS/RestBundle", 818 "target-dir": "FOS/RestBundle",
769 "source": { 819 "source": {
770 "type": "git", 820 "type": "git",
771 "url": "https://github.com/FriendsOfSymfony/FOSRestBundle.git", 821 "url": "https://github.com/FriendsOfSymfony/FOSRestBundle.git",
772 "reference": "fdd21c4c0cb6222ae37efc9362c6a96bd1432412" 822 "reference": "832d08199cadf1770ec43c2cba68b42b4d5e7f9f"
773 }, 823 },
774 "dist": { 824 "dist": {
775 "type": "zip", 825 "type": "zip",
776 "url": "https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/zipball/fdd21c4c0cb6222ae37efc9362c6a96bd1432412", 826 "url": "https://api.github.com/repos/FriendsOfSymfony/FOSRestBundle/zipball/832d08199cadf1770ec43c2cba68b42b4d5e7f9f",
777 "reference": "fdd21c4c0cb6222ae37efc9362c6a96bd1432412", 827 "reference": "832d08199cadf1770ec43c2cba68b42b4d5e7f9f",
778 "shasum": "" 828 "shasum": ""
779 }, 829 },
780 "require": { 830 "require": {
781 "doctrine/inflector": "~1.0", 831 "doctrine/inflector": "~1.0",
782 "php": ">=5.3.9", 832 "php": ">=5.3.9",
783 "psr/log": "~1.0", 833 "psr/log": "~1.0",
784 "symfony/framework-bundle": "~2.2", 834 "symfony/framework-bundle": "~2.3",
835 "symfony/http-kernel": "~2.3,>=2.3.24",
785 "willdurand/jsonp-callback-validator": "~1.0", 836 "willdurand/jsonp-callback-validator": "~1.0",
786 "willdurand/negotiation": "~1.2" 837 "willdurand/negotiation": "~1.2"
787 }, 838 },
788 "conflict": { 839 "conflict": {
789 "jms/serializer": "<0.12", 840 "jms/serializer": "<0.12",
790 "jms/serializer-bundle": "<0.11" 841 "jms/serializer-bundle": "<0.11",
842 "symfony/validator": ">=2.5.0,<2.5.5"
791 }, 843 },
792 "require-dev": { 844 "require-dev": {
845 "jms/serializer": "~0.13",
793 "jms/serializer-bundle": "~0.12", 846 "jms/serializer-bundle": "~0.12",
794 "sensio/framework-extra-bundle": "~2.2", 847 "phpoption/phpoption": "~1.1.0",
795 "symfony/form": "~2.2", 848 "sensio/framework-extra-bundle": "~3.0",
796 "symfony/security": "~2.2", 849 "symfony/browser-kit": "~2.3",
797 "symfony/serializer": "~2.2", 850 "symfony/dependency-injection": "~2.3",
798 "symfony/validator": "~2.2", 851 "symfony/form": "~2.3",
799 "symfony/yaml": "~2.2" 852 "symfony/security": "~2.3",
853 "symfony/serializer": "~2.3",
854 "symfony/validator": "~2.3",
855 "symfony/yaml": "~2.3"
800 }, 856 },
801 "suggest": { 857 "suggest": {
802 "jms/serializer-bundle": "Add support for advanced serialization capabilities, recommended, requires ~0.12", 858 "jms/serializer-bundle": "Add support for advanced serialization capabilities, recommended, requires ~0.12",
803 "sensio/framework-extra-bundle": "Add support for route annotations and the view response listener", 859 "sensio/framework-extra-bundle": "Add support for route annotations and the view response listener, requires ~3.0",
804 "symfony/serializer": "Add support for basic serialization capabilities and xml decoding, requires ~2.2", 860 "symfony/serializer": "Add support for basic serialization capabilities and xml decoding, requires ~2.3",
805 "symfony/validator": "Add support for validation capabilities in the ParamFetcher, requires ~2.2" 861 "symfony/validator": "Add support for validation capabilities in the ParamFetcher, requires ~2.3"
806 }, 862 },
807 "type": "symfony-bundle", 863 "type": "symfony-bundle",
808 "extra": { 864 "extra": {
809 "branch-alias": { 865 "branch-alias": {
810 "dev-master": "1.5-dev" 866 "dev-master": "1.6-dev"
811 } 867 }
812 }, 868 },
813 "autoload": { 869 "autoload": {
@@ -838,7 +894,7 @@
838 "keywords": [ 894 "keywords": [
839 "rest" 895 "rest"
840 ], 896 ],
841 "time": "2015-02-16 15:26:12" 897 "time": "2015-05-22 20:17:35"
842 }, 898 },
843 { 899 {
844 "name": "htmlawed/htmlawed", 900 "name": "htmlawed/htmlawed",
@@ -846,12 +902,12 @@
846 "source": { 902 "source": {
847 "type": "git", 903 "type": "git",
848 "url": "https://github.com/kesar/HTMLawed.git", 904 "url": "https://github.com/kesar/HTMLawed.git",
849 "reference": "9d292af5f4c288aa68f38b87f5d88c8214f5f233" 905 "reference": "f842e793614bdf3af70a62b1e70570e824dc9ab6"
850 }, 906 },
851 "dist": { 907 "dist": {
852 "type": "zip", 908 "type": "zip",
853 "url": "https://api.github.com/repos/kesar/HTMLawed/zipball/9d292af5f4c288aa68f38b87f5d88c8214f5f233", 909 "url": "https://api.github.com/repos/kesar/HTMLawed/zipball/f842e793614bdf3af70a62b1e70570e824dc9ab6",
854 "reference": "9d292af5f4c288aa68f38b87f5d88c8214f5f233", 910 "reference": "f842e793614bdf3af70a62b1e70570e824dc9ab6",
855 "shasum": "" 911 "shasum": ""
856 }, 912 },
857 "require": { 913 "require": {
@@ -868,7 +924,14 @@
868 "GPL-2.0+", 924 "GPL-2.0+",
869 "LGPL-3.0" 925 "LGPL-3.0"
870 ], 926 ],
871 "description": "htmLawed - Process text with HTML markup to make it more compliant with HTML standards and administrative policies", 927 "authors": [
928 {
929 "name": "Santosh Patnaik",
930 "homepage": "http://www.bioinformatics.org/people/index.php?user_hash=558b661f92d0ff7b",
931 "role": "Developer"
932 }
933 ],
934 "description": "htmLawed - Process text with HTML markup to make it more compliant with HTML standards and administrative policies",
872 "homepage": "http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/", 935 "homepage": "http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/",
873 "keywords": [ 936 "keywords": [
874 "HTMLtidy", 937 "HTMLtidy",
@@ -877,7 +940,7 @@
877 "strip", 940 "strip",
878 "tags" 941 "tags"
879 ], 942 ],
880 "time": "2014-01-05 13:06:52" 943 "time": "2015-04-12 19:37:20"
881 }, 944 },
882 { 945 {
883 "name": "incenteev/composer-parameter-handler", 946 "name": "incenteev/composer-parameter-handler",
@@ -1437,16 +1500,16 @@
1437 }, 1500 },
1438 { 1501 {
1439 "name": "monolog/monolog", 1502 "name": "monolog/monolog",
1440 "version": "1.13.0", 1503 "version": "1.13.1",
1441 "source": { 1504 "source": {
1442 "type": "git", 1505 "type": "git",
1443 "url": "https://github.com/Seldaek/monolog.git", 1506 "url": "https://github.com/Seldaek/monolog.git",
1444 "reference": "c41c218e239b50446fd883acb1ecfd4b770caeae" 1507 "reference": "c31a2c4e8db5da8b46c74cf275d7f109c0f249ac"
1445 }, 1508 },
1446 "dist": { 1509 "dist": {
1447 "type": "zip", 1510 "type": "zip",
1448 "url": "https://api.github.com/repos/Seldaek/monolog/zipball/c41c218e239b50446fd883acb1ecfd4b770caeae", 1511 "url": "https://api.github.com/repos/Seldaek/monolog/zipball/c31a2c4e8db5da8b46c74cf275d7f109c0f249ac",
1449 "reference": "c41c218e239b50446fd883acb1ecfd4b770caeae", 1512 "reference": "c31a2c4e8db5da8b46c74cf275d7f109c0f249ac",
1450 "shasum": "" 1513 "shasum": ""
1451 }, 1514 },
1452 "require": { 1515 "require": {
@@ -1506,21 +1569,21 @@
1506 "logging", 1569 "logging",
1507 "psr-3" 1570 "psr-3"
1508 ], 1571 ],
1509 "time": "2015-03-05 01:12:12" 1572 "time": "2015-03-09 09:58:04"
1510 }, 1573 },
1511 { 1574 {
1512 "name": "nelmio/api-doc-bundle", 1575 "name": "nelmio/api-doc-bundle",
1513 "version": "2.7.0", 1576 "version": "2.9.0",
1514 "target-dir": "Nelmio/ApiDocBundle", 1577 "target-dir": "Nelmio/ApiDocBundle",
1515 "source": { 1578 "source": {
1516 "type": "git", 1579 "type": "git",
1517 "url": "https://github.com/nelmio/NelmioApiDocBundle.git", 1580 "url": "https://github.com/nelmio/NelmioApiDocBundle.git",
1518 "reference": "3fdb2d4a819d1f71bff0c45880af705a8b124955" 1581 "reference": "de31760fd84a45fadbb4fe24db050b5e29ea70d1"
1519 }, 1582 },
1520 "dist": { 1583 "dist": {
1521 "type": "zip", 1584 "type": "zip",
1522 "url": "https://api.github.com/repos/nelmio/NelmioApiDocBundle/zipball/3fdb2d4a819d1f71bff0c45880af705a8b124955", 1585 "url": "https://api.github.com/repos/nelmio/NelmioApiDocBundle/zipball/de31760fd84a45fadbb4fe24db050b5e29ea70d1",
1523 "reference": "3fdb2d4a819d1f71bff0c45880af705a8b124955", 1586 "reference": "de31760fd84a45fadbb4fe24db050b5e29ea70d1",
1524 "shasum": "" 1587 "shasum": ""
1525 }, 1588 },
1526 "require": { 1589 "require": {
@@ -1534,16 +1597,19 @@
1534 "jms/serializer-bundle": "<0.11" 1597 "jms/serializer-bundle": "<0.11"
1535 }, 1598 },
1536 "require-dev": { 1599 "require-dev": {
1600 "dunglas/api-bundle": "dev-master",
1537 "friendsofsymfony/rest-bundle": "~1.0", 1601 "friendsofsymfony/rest-bundle": "~1.0",
1538 "jms/serializer-bundle": ">=0.11", 1602 "jms/serializer-bundle": ">=0.11",
1539 "sensio/framework-extra-bundle": "~2.1", 1603 "sensio/framework-extra-bundle": "~3.0",
1540 "symfony/browser-kit": "~2.1", 1604 "symfony/browser-kit": "~2.1",
1541 "symfony/css-selector": "~2.1", 1605 "symfony/css-selector": "~2.1",
1542 "symfony/form": "~2.1", 1606 "symfony/form": "~2.1",
1607 "symfony/serializer": "~2.7@dev",
1543 "symfony/validator": "~2.1", 1608 "symfony/validator": "~2.1",
1544 "symfony/yaml": "~2.1" 1609 "symfony/yaml": "~2.1"
1545 }, 1610 },
1546 "suggest": { 1611 "suggest": {
1612 "dunglas/api-bundle": "For making use of resources definitions of DunglasApiBundle.",
1547 "friendsofsymfony/rest-bundle": "For making use of REST information in the doc.", 1613 "friendsofsymfony/rest-bundle": "For making use of REST information in the doc.",
1548 "jms/serializer": "For making use of serializer information in the doc.", 1614 "jms/serializer": "For making use of serializer information in the doc.",
1549 "symfony/form": "For using form definitions as input.", 1615 "symfony/form": "For using form definitions as input.",
@@ -1552,7 +1618,7 @@
1552 "type": "symfony-bundle", 1618 "type": "symfony-bundle",
1553 "extra": { 1619 "extra": {
1554 "branch-alias": { 1620 "branch-alias": {
1555 "dev-master": "2.7.x-dev" 1621 "dev-master": "2.9.x-dev"
1556 } 1622 }
1557 }, 1623 },
1558 "autoload": { 1624 "autoload": {
@@ -1581,7 +1647,7 @@
1581 "documentation", 1647 "documentation",
1582 "rest" 1648 "rest"
1583 ], 1649 ],
1584 "time": "2014-07-30 09:11:08" 1650 "time": "2015-05-16 17:16:14"
1585 }, 1651 },
1586 { 1652 {
1587 "name": "nelmio/cors-bundle", 1653 "name": "nelmio/cors-bundle",
@@ -1906,17 +1972,17 @@
1906 }, 1972 },
1907 { 1973 {
1908 "name": "sensio/distribution-bundle", 1974 "name": "sensio/distribution-bundle",
1909 "version": "v3.0.18", 1975 "version": "v3.0.25",
1910 "target-dir": "Sensio/Bundle/DistributionBundle", 1976 "target-dir": "Sensio/Bundle/DistributionBundle",
1911 "source": { 1977 "source": {
1912 "type": "git", 1978 "type": "git",
1913 "url": "https://github.com/sensiolabs/SensioDistributionBundle.git", 1979 "url": "https://github.com/sensiolabs/SensioDistributionBundle.git",
1914 "reference": "ac026149ffb1d3a5c893290d2d3ca8795013de08" 1980 "reference": "01931139b0f067a4016d5d56e82c2b3086533b89"
1915 }, 1981 },
1916 "dist": { 1982 "dist": {
1917 "type": "zip", 1983 "type": "zip",
1918 "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/ac026149ffb1d3a5c893290d2d3ca8795013de08", 1984 "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/01931139b0f067a4016d5d56e82c2b3086533b89",
1919 "reference": "ac026149ffb1d3a5c893290d2d3ca8795013de08", 1985 "reference": "01931139b0f067a4016d5d56e82c2b3086533b89",
1920 "shasum": "" 1986 "shasum": ""
1921 }, 1987 },
1922 "require": { 1988 "require": {
@@ -1962,21 +2028,20 @@
1962 "configuration", 2028 "configuration",
1963 "distribution" 2029 "distribution"
1964 ], 2030 ],
1965 "time": "2015-02-27 12:59:18" 2031 "time": "2015-05-29 22:35:41"
1966 }, 2032 },
1967 { 2033 {
1968 "name": "sensio/framework-extra-bundle", 2034 "name": "sensio/framework-extra-bundle",
1969 "version": "v3.0.4", 2035 "version": "v3.0.8",
1970 "target-dir": "Sensio/Bundle/FrameworkExtraBundle",
1971 "source": { 2036 "source": {
1972 "type": "git", 2037 "type": "git",
1973 "url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git", 2038 "url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git",
1974 "reference": "b3bc3e67c8b6b68b18d727012183520d35ee762a" 2039 "reference": "a30fc18bf147bc25faf6b1d54bf55cfad4b63cba"
1975 }, 2040 },
1976 "dist": { 2041 "dist": {
1977 "type": "zip", 2042 "type": "zip",
1978 "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/b3bc3e67c8b6b68b18d727012183520d35ee762a", 2043 "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/a30fc18bf147bc25faf6b1d54bf55cfad4b63cba",
1979 "reference": "b3bc3e67c8b6b68b18d727012183520d35ee762a", 2044 "reference": "a30fc18bf147bc25faf6b1d54bf55cfad4b63cba",
1980 "shasum": "" 2045 "shasum": ""
1981 }, 2046 },
1982 "require": { 2047 "require": {
@@ -1989,6 +2054,7 @@
1989 }, 2054 },
1990 "suggest": { 2055 "suggest": {
1991 "symfony/expression-language": "", 2056 "symfony/expression-language": "",
2057 "symfony/psr-http-message-bridge": "To use the PSR-7 converters",
1992 "symfony/security-bundle": "" 2058 "symfony/security-bundle": ""
1993 }, 2059 },
1994 "type": "symfony-bundle", 2060 "type": "symfony-bundle",
@@ -1998,8 +2064,8 @@
1998 } 2064 }
1999 }, 2065 },
2000 "autoload": { 2066 "autoload": {
2001 "psr-0": { 2067 "psr-4": {
2002 "Sensio\\Bundle\\FrameworkExtraBundle": "" 2068 "Sensio\\Bundle\\FrameworkExtraBundle\\": ""
2003 } 2069 }
2004 }, 2070 },
2005 "notification-url": "https://packagist.org/downloads/", 2071 "notification-url": "https://packagist.org/downloads/",
@@ -2017,20 +2083,20 @@
2017 "annotations", 2083 "annotations",
2018 "controllers" 2084 "controllers"
2019 ], 2085 ],
2020 "time": "2014-12-02 09:52:52" 2086 "time": "2015-05-29 18:27:23"
2021 }, 2087 },
2022 { 2088 {
2023 "name": "sensiolabs/security-checker", 2089 "name": "sensiolabs/security-checker",
2024 "version": "v2.0.1", 2090 "version": "v2.0.5",
2025 "source": { 2091 "source": {
2026 "type": "git", 2092 "type": "git",
2027 "url": "https://github.com/sensiolabs/security-checker.git", 2093 "url": "https://github.com/sensiolabs/security-checker.git",
2028 "reference": "134cecf1c61256bd8e973e11376891a724543820" 2094 "reference": "2c2a71f1c77d9765c12638c4724d9ca23658a810"
2029 }, 2095 },
2030 "dist": { 2096 "dist": {
2031 "type": "zip", 2097 "type": "zip",
2032 "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/134cecf1c61256bd8e973e11376891a724543820", 2098 "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/2c2a71f1c77d9765c12638c4724d9ca23658a810",
2033 "reference": "134cecf1c61256bd8e973e11376891a724543820", 2099 "reference": "2c2a71f1c77d9765c12638c4724d9ca23658a810",
2034 "shasum": "" 2100 "shasum": ""
2035 }, 2101 },
2036 "require": { 2102 "require": {
@@ -2062,7 +2128,7 @@
2062 } 2128 }
2063 ], 2129 ],
2064 "description": "A security checker for your composer.lock", 2130 "description": "A security checker for your composer.lock",
2065 "time": "2015-01-26 16:25:19" 2131 "time": "2015-05-28 14:22:40"
2066 }, 2132 },
2067 { 2133 {
2068 "name": "simplepie/simplepie", 2134 "name": "simplepie/simplepie",
@@ -2120,16 +2186,16 @@
2120 }, 2186 },
2121 { 2187 {
2122 "name": "swiftmailer/swiftmailer", 2188 "name": "swiftmailer/swiftmailer",
2123 "version": "v5.3.1", 2189 "version": "v5.4.0",
2124 "source": { 2190 "source": {
2125 "type": "git", 2191 "type": "git",
2126 "url": "https://github.com/swiftmailer/swiftmailer.git", 2192 "url": "https://github.com/swiftmailer/swiftmailer.git",
2127 "reference": "c5f963e7f9d6f6438fda4f22d5cc2db296ec621a" 2193 "reference": "31454f258f10329ae7c48763eb898a75c39e0a9f"
2128 }, 2194 },
2129 "dist": { 2195 "dist": {
2130 "type": "zip", 2196 "type": "zip",
2131 "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/c5f963e7f9d6f6438fda4f22d5cc2db296ec621a", 2197 "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/31454f258f10329ae7c48763eb898a75c39e0a9f",
2132 "reference": "c5f963e7f9d6f6438fda4f22d5cc2db296ec621a", 2198 "reference": "31454f258f10329ae7c48763eb898a75c39e0a9f",
2133 "shasum": "" 2199 "shasum": ""
2134 }, 2200 },
2135 "require": { 2201 "require": {
@@ -2141,7 +2207,7 @@
2141 "type": "library", 2207 "type": "library",
2142 "extra": { 2208 "extra": {
2143 "branch-alias": { 2209 "branch-alias": {
2144 "dev-master": "5.3-dev" 2210 "dev-master": "5.4-dev"
2145 } 2211 }
2146 }, 2212 },
2147 "autoload": { 2213 "autoload": {
@@ -2168,7 +2234,7 @@
2168 "mail", 2234 "mail",
2169 "mailer" 2235 "mailer"
2170 ], 2236 ],
2171 "time": "2014-12-05 14:17:14" 2237 "time": "2015-03-14 06:06:39"
2172 }, 2238 },
2173 { 2239 {
2174 "name": "symfony/assetic-bundle", 2240 "name": "symfony/assetic-bundle",
@@ -2353,16 +2419,16 @@
2353 }, 2419 },
2354 { 2420 {
2355 "name": "symfony/symfony", 2421 "name": "symfony/symfony",
2356 "version": "v2.6.4", 2422 "version": "v2.6.9",
2357 "source": { 2423 "source": {
2358 "type": "git", 2424 "type": "git",
2359 "url": "https://github.com/symfony/symfony.git", 2425 "url": "https://github.com/symfony/symfony.git",
2360 "reference": "23b647f1e4eeb24a457d3c47f5f5046377d5a3bf" 2426 "reference": "b06539573ccf64dd3a62852685f052553d02c5ba"
2361 }, 2427 },
2362 "dist": { 2428 "dist": {
2363 "type": "zip", 2429 "type": "zip",
2364 "url": "https://api.github.com/repos/symfony/symfony/zipball/23b647f1e4eeb24a457d3c47f5f5046377d5a3bf", 2430 "url": "https://api.github.com/repos/symfony/symfony/zipball/b06539573ccf64dd3a62852685f052553d02c5ba",
2365 "reference": "23b647f1e4eeb24a457d3c47f5f5046377d5a3bf", 2431 "reference": "b06539573ccf64dd3a62852685f052553d02c5ba",
2366 "shasum": "" 2432 "shasum": ""
2367 }, 2433 },
2368 "require": { 2434 "require": {
@@ -2426,7 +2492,8 @@
2426 "ircmaxell/password-compat": "~1.0", 2492 "ircmaxell/password-compat": "~1.0",
2427 "monolog/monolog": "~1.11", 2493 "monolog/monolog": "~1.11",
2428 "ocramius/proxy-manager": "~0.4|~1.0", 2494 "ocramius/proxy-manager": "~0.4|~1.0",
2429 "propel/propel1": "~1.6" 2495 "propel/propel1": "~1.6",
2496 "symfony/phpunit-bridge": "~2.7"
2430 }, 2497 },
2431 "type": "library", 2498 "type": "library",
2432 "extra": { 2499 "extra": {
@@ -2452,33 +2519,33 @@
2452 ], 2519 ],
2453 "authors": [ 2520 "authors": [
2454 { 2521 {
2455 "name": "Symfony Community",
2456 "homepage": "http://symfony.com/contributors"
2457 },
2458 {
2459 "name": "Fabien Potencier", 2522 "name": "Fabien Potencier",
2460 "email": "fabien@symfony.com" 2523 "email": "fabien@symfony.com"
2524 },
2525 {
2526 "name": "Symfony Community",
2527 "homepage": "https://symfony.com/contributors"
2461 } 2528 }
2462 ], 2529 ],
2463 "description": "The Symfony PHP framework", 2530 "description": "The Symfony PHP framework",
2464 "homepage": "http://symfony.com", 2531 "homepage": "https://symfony.com",
2465 "keywords": [ 2532 "keywords": [
2466 "framework" 2533 "framework"
2467 ], 2534 ],
2468 "time": "2015-02-02 18:02:30" 2535 "time": "2015-05-29 22:55:07"
2469 }, 2536 },
2470 { 2537 {
2471 "name": "tecnick.com/tcpdf", 2538 "name": "tecnick.com/tcpdf",
2472 "version": "6.2.6", 2539 "version": "6.2.8",
2473 "source": { 2540 "source": {
2474 "type": "git", 2541 "type": "git",
2475 "url": "https://github.com/tecnickcom/TCPDF.git", 2542 "url": "https://github.com/tecnickcom/TCPDF.git",
2476 "reference": "a2e8f5b505a7a14a4ed960313c4baf699fd1f4bb" 2543 "reference": "3dee9e7f3a414875fd1d9f4f1dfc2433493a86d2"
2477 }, 2544 },
2478 "dist": { 2545 "dist": {
2479 "type": "zip", 2546 "type": "zip",
2480 "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/a2e8f5b505a7a14a4ed960313c4baf699fd1f4bb", 2547 "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/3dee9e7f3a414875fd1d9f4f1dfc2433493a86d2",
2481 "reference": "a2e8f5b505a7a14a4ed960313c4baf699fd1f4bb", 2548 "reference": "3dee9e7f3a414875fd1d9f4f1dfc2433493a86d2",
2482 "shasum": "" 2549 "shasum": ""
2483 }, 2550 },
2484 "require": { 2551 "require": {
@@ -2528,7 +2595,7 @@
2528 "pdf417", 2595 "pdf417",
2529 "qrcode" 2596 "qrcode"
2530 ], 2597 ],
2531 "time": "2015-01-28 18:51:40" 2598 "time": "2015-04-29 16:13:58"
2532 }, 2599 },
2533 { 2600 {
2534 "name": "twig/extensions", 2601 "name": "twig/extensions",
@@ -2584,20 +2651,20 @@
2584 }, 2651 },
2585 { 2652 {
2586 "name": "twig/twig", 2653 "name": "twig/twig",
2587 "version": "v1.18.0", 2654 "version": "v1.18.1",
2588 "source": { 2655 "source": {
2589 "type": "git", 2656 "type": "git",
2590 "url": "https://github.com/twigphp/Twig.git", 2657 "url": "https://github.com/twigphp/Twig.git",
2591 "reference": "4cf7464348e7f9893a93f7096a90b73722be99cf" 2658 "reference": "9f70492f44398e276d1b81c1b43adfe6751c7b7f"
2592 }, 2659 },
2593 "dist": { 2660 "dist": {
2594 "type": "zip", 2661 "type": "zip",
2595 "url": "https://api.github.com/repos/twigphp/Twig/zipball/4cf7464348e7f9893a93f7096a90b73722be99cf", 2662 "url": "https://api.github.com/repos/twigphp/Twig/zipball/9f70492f44398e276d1b81c1b43adfe6751c7b7f",
2596 "reference": "4cf7464348e7f9893a93f7096a90b73722be99cf", 2663 "reference": "9f70492f44398e276d1b81c1b43adfe6751c7b7f",
2597 "shasum": "" 2664 "shasum": ""
2598 }, 2665 },
2599 "require": { 2666 "require": {
2600 "php": ">=5.2.4" 2667 "php": ">=5.2.7"
2601 }, 2668 },
2602 "type": "library", 2669 "type": "library",
2603 "extra": { 2670 "extra": {
@@ -2637,7 +2704,7 @@
2637 "keywords": [ 2704 "keywords": [
2638 "templating" 2705 "templating"
2639 ], 2706 ],
2640 "time": "2015-01-25 17:32:08" 2707 "time": "2015-04-19 08:30:27"
2641 }, 2708 },
2642 { 2709 {
2643 "name": "umpirsky/twig-gettext-extractor", 2710 "name": "umpirsky/twig-gettext-extractor",
@@ -2713,7 +2780,7 @@
2713 "description": "Libraries from @fivefilters.", 2780 "description": "Libraries from @fivefilters.",
2714 "homepage": "https://github.com/wallabag/Fivefilters_Libraries", 2781 "homepage": "https://github.com/wallabag/Fivefilters_Libraries",
2715 "support": { 2782 "support": {
2716 "source": "https://github.com/wallabag/Fivefilters_Libraries/tree/master", 2783 "source": "https://github.com/wallabag/Fivefilters_Libraries/tree/1.0.0",
2717 "issues": "https://github.com/wallabag/Fivefilters_Libraries/issues" 2784 "issues": "https://github.com/wallabag/Fivefilters_Libraries/issues"
2718 }, 2785 },
2719 "time": "2015-01-19 20:19:28" 2786 "time": "2015-01-19 20:19:28"
@@ -2758,7 +2825,7 @@
2758 "description": "PHP Classes for dynamically generating EPub files.", 2825 "description": "PHP Classes for dynamically generating EPub files.",
2759 "homepage": "https://github.com/wallabag/PHPePub", 2826 "homepage": "https://github.com/wallabag/PHPePub",
2760 "support": { 2827 "support": {
2761 "source": "https://github.com/wallabag/PHPePub/tree/master" 2828 "source": "https://github.com/wallabag/PHPePub/tree/2.1.0"
2762 }, 2829 },
2763 "time": "2015-01-19 11:44:19" 2830 "time": "2015-01-19 11:44:19"
2764 }, 2831 },
@@ -2795,7 +2862,7 @@
2795 "description": "A simple and smart (or stupid) php5 snippets repository", 2862 "description": "A simple and smart (or stupid) php5 snippets repository",
2796 "homepage": "https://github.com/wallabag/kriss_php5", 2863 "homepage": "https://github.com/wallabag/kriss_php5",
2797 "support": { 2864 "support": {
2798 "source": "https://github.com/wallabag/kriss_php5/tree/master" 2865 "source": "https://github.com/wallabag/kriss_php5/tree/1.0.0"
2799 }, 2866 },
2800 "time": "2015-01-18 21:21:43" 2867 "time": "2015-01-18 21:21:43"
2801 }, 2868 },
@@ -2832,7 +2899,7 @@
2832 "description": "Paginate record sets, not tied in directly to a database.", 2899 "description": "Paginate record sets, not tied in directly to a database.",
2833 "homepage": "https://github.com/wallabag/pagination", 2900 "homepage": "https://github.com/wallabag/pagination",
2834 "support": { 2901 "support": {
2835 "source": "https://github.com/wallabag/pagination/tree/master" 2902 "source": "https://github.com/wallabag/pagination/tree/1.0.0"
2836 }, 2903 },
2837 "time": "2015-01-19 09:24:39" 2904 "time": "2015-01-19 09:24:39"
2838 }, 2905 },
@@ -2878,7 +2945,7 @@
2878 "sessions" 2945 "sessions"
2879 ], 2946 ],
2880 "support": { 2947 "support": {
2881 "source": "https://github.com/wallabag/PHP-Flash-Messages/tree/master" 2948 "source": "https://github.com/wallabag/PHP-Flash-Messages/tree/1.0.0"
2882 }, 2949 },
2883 "time": "2015-01-18 19:51:55" 2950 "time": "2015-01-18 19:51:55"
2884 }, 2951 },
@@ -2932,7 +2999,7 @@
2932 "html" 2999 "html"
2933 ], 3000 ],
2934 "support": { 3001 "support": {
2935 "source": "https://github.com/wallabag/php-readability/tree/master", 3002 "source": "https://github.com/wallabag/php-readability/tree/1.0.0",
2936 "issues": "https://github.com/wallabag/php-readability/issues" 3003 "issues": "https://github.com/wallabag/php-readability/issues"
2937 }, 3004 },
2938 "time": "2015-01-19 12:25:38" 3005 "time": "2015-01-19 12:25:38"
@@ -2970,29 +3037,30 @@
2970 "description": "An experimental Mobipocket file creator in PHP.", 3037 "description": "An experimental Mobipocket file creator in PHP.",
2971 "homepage": "https://github.com/wallabag/phpMobi", 3038 "homepage": "https://github.com/wallabag/phpMobi",
2972 "support": { 3039 "support": {
2973 "source": "https://github.com/wallabag/phpMobi/tree/master" 3040 "source": "https://github.com/wallabag/phpMobi/tree/1.0.0"
2974 }, 3041 },
2975 "time": "2015-01-19 12:43:17" 3042 "time": "2015-01-19 12:43:17"
2976 }, 3043 },
2977 { 3044 {
2978 "name": "willdurand/hateoas", 3045 "name": "willdurand/hateoas",
2979 "version": "v2.4.0", 3046 "version": "v2.6.0",
2980 "source": { 3047 "source": {
2981 "type": "git", 3048 "type": "git",
2982 "url": "https://github.com/willdurand/Hateoas.git", 3049 "url": "https://github.com/willdurand/Hateoas.git",
2983 "reference": "89fe19ad9ce25f15323d76ac22272282ae8a9f14" 3050 "reference": "fc0869381d6934e5d430084154584761297caa6c"
2984 }, 3051 },
2985 "dist": { 3052 "dist": {
2986 "type": "zip", 3053 "type": "zip",
2987 "url": "https://api.github.com/repos/willdurand/Hateoas/zipball/89fe19ad9ce25f15323d76ac22272282ae8a9f14", 3054 "url": "https://api.github.com/repos/willdurand/Hateoas/zipball/fc0869381d6934e5d430084154584761297caa6c",
2988 "reference": "89fe19ad9ce25f15323d76ac22272282ae8a9f14", 3055 "reference": "fc0869381d6934e5d430084154584761297caa6c",
2989 "shasum": "" 3056 "shasum": ""
2990 }, 3057 },
2991 "require": { 3058 "require": {
2992 "doctrine/annotations": "~1.0", 3059 "doctrine/annotations": "~1.0",
2993 "doctrine/common": "~2.0", 3060 "doctrine/common": "~2.0",
2994 "jms/metadata": "~1.1", 3061 "jms/metadata": "~1.1",
2995 "jms/serializer": "~0.13@dev", 3062 "jms/serializer": "~0.13",
3063 "php": ">=5.3",
2996 "symfony/expression-language": "~2.4" 3064 "symfony/expression-language": "~2.4"
2997 }, 3065 },
2998 "require-dev": { 3066 "require-dev": {
@@ -3013,7 +3081,7 @@
3013 "type": "library", 3081 "type": "library",
3014 "extra": { 3082 "extra": {
3015 "branch-alias": { 3083 "branch-alias": {
3016 "dev-master": "2.4-dev" 3084 "dev-master": "2.6-dev"
3017 } 3085 }
3018 }, 3086 },
3019 "autoload": { 3087 "autoload": {
@@ -3036,7 +3104,7 @@
3036 } 3104 }
3037 ], 3105 ],
3038 "description": "A PHP library to support implementing representations for HATEOAS REST web services", 3106 "description": "A PHP library to support implementing representations for HATEOAS REST web services",
3039 "time": "2015-02-24 15:28:33" 3107 "time": "2015-05-21 21:57:34"
3040 }, 3108 },
3041 { 3109 {
3042 "name": "willdurand/hateoas-bundle", 3110 "name": "willdurand/hateoas-bundle",
@@ -3045,12 +3113,12 @@
3045 "source": { 3113 "source": {
3046 "type": "git", 3114 "type": "git",
3047 "url": "https://github.com/willdurand/BazingaHateoasBundle.git", 3115 "url": "https://github.com/willdurand/BazingaHateoasBundle.git",
3048 "reference": "3c86e8080e8a229365a0ce91818da6fe6562376b" 3116 "reference": "a99f48ea5004a89ecf0927229d9c912fed9fa4ab"
3049 }, 3117 },
3050 "dist": { 3118 "dist": {
3051 "type": "zip", 3119 "type": "zip",
3052 "url": "https://api.github.com/repos/willdurand/BazingaHateoasBundle/zipball/3c86e8080e8a229365a0ce91818da6fe6562376b", 3120 "url": "https://api.github.com/repos/willdurand/BazingaHateoasBundle/zipball/a99f48ea5004a89ecf0927229d9c912fed9fa4ab",
3053 "reference": "3c86e8080e8a229365a0ce91818da6fe6562376b", 3121 "reference": "a99f48ea5004a89ecf0927229d9c912fed9fa4ab",
3054 "shasum": "" 3122 "shasum": ""
3055 }, 3123 },
3056 "require": { 3124 "require": {
@@ -3088,7 +3156,7 @@
3088 "HATEOAS", 3156 "HATEOAS",
3089 "rest" 3157 "rest"
3090 ], 3158 ],
3091 "time": "2015-02-19 16:27:51" 3159 "time": "2015-03-12 15:49:24"
3092 }, 3160 },
3093 { 3161 {
3094 "name": "willdurand/jsonp-callback-validator", 3162 "name": "willdurand/jsonp-callback-validator",
@@ -3183,24 +3251,27 @@
3183 "packages-dev": [ 3251 "packages-dev": [
3184 { 3252 {
3185 "name": "doctrine/data-fixtures", 3253 "name": "doctrine/data-fixtures",
3186 "version": "v1.0.0", 3254 "version": "v1.1.1",
3187 "source": { 3255 "source": {
3188 "type": "git", 3256 "type": "git",
3189 "url": "https://github.com/doctrine/data-fixtures.git", 3257 "url": "https://github.com/doctrine/data-fixtures.git",
3190 "reference": "b4a135c7db56ecc4602b54a2184368f440cac33e" 3258 "reference": "bd44f6b6e40247b6530bc8abe802e4e4d914976a"
3191 }, 3259 },
3192 "dist": { 3260 "dist": {
3193 "type": "zip", 3261 "type": "zip",
3194 "url": "https://api.github.com/repos/doctrine/data-fixtures/zipball/b4a135c7db56ecc4602b54a2184368f440cac33e", 3262 "url": "https://api.github.com/repos/doctrine/data-fixtures/zipball/bd44f6b6e40247b6530bc8abe802e4e4d914976a",
3195 "reference": "b4a135c7db56ecc4602b54a2184368f440cac33e", 3263 "reference": "bd44f6b6e40247b6530bc8abe802e4e4d914976a",
3196 "shasum": "" 3264 "shasum": ""
3197 }, 3265 },
3198 "require": { 3266 "require": {
3199 "doctrine/common": ">=2.2,<2.5-dev", 3267 "doctrine/common": "~2.2",
3200 "php": ">=5.3.2" 3268 "php": ">=5.3.2"
3201 }, 3269 },
3270 "conflict": {
3271 "doctrine/orm": "< 2.4"
3272 },
3202 "require-dev": { 3273 "require-dev": {
3203 "doctrine/orm": ">=2.2,<2.5-dev" 3274 "doctrine/orm": "~2.4"
3204 }, 3275 },
3205 "suggest": { 3276 "suggest": {
3206 "doctrine/mongodb-odm": "For loading MongoDB ODM fixtures", 3277 "doctrine/mongodb-odm": "For loading MongoDB ODM fixtures",
@@ -3210,7 +3281,7 @@
3210 "type": "library", 3281 "type": "library",
3211 "extra": { 3282 "extra": {
3212 "branch-alias": { 3283 "branch-alias": {
3213 "dev-master": "1.0.x-dev" 3284 "dev-master": "1.1.x-dev"
3214 } 3285 }
3215 }, 3286 },
3216 "autoload": { 3287 "autoload": {
@@ -3225,9 +3296,7 @@
3225 "authors": [ 3296 "authors": [
3226 { 3297 {
3227 "name": "Jonathan Wage", 3298 "name": "Jonathan Wage",
3228 "email": "jonwage@gmail.com", 3299 "email": "jonwage@gmail.com"
3229 "homepage": "http://www.jwage.com/",
3230 "role": "Creator"
3231 } 3300 }
3232 ], 3301 ],
3233 "description": "Data Fixtures for all Doctrine Object Managers", 3302 "description": "Data Fixtures for all Doctrine Object Managers",
@@ -3235,7 +3304,7 @@
3235 "keywords": [ 3304 "keywords": [
3236 "database" 3305 "database"
3237 ], 3306 ],
3238 "time": "2013-07-10 17:04:07" 3307 "time": "2015-03-30 12:14:13"
3239 }, 3308 },
3240 { 3309 {
3241 "name": "doctrine/doctrine-fixtures-bundle", 3310 "name": "doctrine/doctrine-fixtures-bundle",
@@ -3296,60 +3365,6 @@
3296 "time": "2015-01-19 02:21:37" 3365 "time": "2015-01-19 02:21:37"
3297 }, 3366 },
3298 { 3367 {
3299 "name": "doctrine/instantiator",
3300 "version": "1.0.4",
3301 "source": {
3302 "type": "git",
3303 "url": "https://github.com/doctrine/instantiator.git",
3304 "reference": "f976e5de371104877ebc89bd8fecb0019ed9c119"
3305 },
3306 "dist": {
3307 "type": "zip",
3308 "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f976e5de371104877ebc89bd8fecb0019ed9c119",
3309 "reference": "f976e5de371104877ebc89bd8fecb0019ed9c119",
3310 "shasum": ""
3311 },
3312 "require": {
3313 "php": ">=5.3,<8.0-DEV"
3314 },
3315 "require-dev": {
3316 "athletic/athletic": "~0.1.8",
3317 "ext-pdo": "*",
3318 "ext-phar": "*",
3319 "phpunit/phpunit": "~4.0",
3320 "squizlabs/php_codesniffer": "2.0.*@ALPHA"
3321 },
3322 "type": "library",
3323 "extra": {
3324 "branch-alias": {
3325 "dev-master": "1.0.x-dev"
3326 }
3327 },
3328 "autoload": {
3329 "psr-0": {
3330 "Doctrine\\Instantiator\\": "src"
3331 }
3332 },
3333 "notification-url": "https://packagist.org/downloads/",
3334 "license": [
3335 "MIT"
3336 ],
3337 "authors": [
3338 {
3339 "name": "Marco Pivetta",
3340 "email": "ocramius@gmail.com",
3341 "homepage": "http://ocramius.github.com/"
3342 }
3343 ],
3344 "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
3345 "homepage": "https://github.com/doctrine/instantiator",
3346 "keywords": [
3347 "constructor",
3348 "instantiate"
3349 ],
3350 "time": "2014-10-13 12:58:55"
3351 },
3352 {
3353 "name": "phpdocumentor/reflection-docblock", 3368 "name": "phpdocumentor/reflection-docblock",
3354 "version": "2.0.4", 3369 "version": "2.0.4",
3355 "source": { 3370 "source": {
@@ -3400,21 +3415,22 @@
3400 }, 3415 },
3401 { 3416 {
3402 "name": "phpspec/prophecy", 3417 "name": "phpspec/prophecy",
3403 "version": "v1.3.1", 3418 "version": "v1.4.1",
3404 "source": { 3419 "source": {
3405 "type": "git", 3420 "type": "git",
3406 "url": "https://github.com/phpspec/prophecy.git", 3421 "url": "https://github.com/phpspec/prophecy.git",
3407 "reference": "9ca52329bcdd1500de24427542577ebf3fc2f1c9" 3422 "reference": "3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373"
3408 }, 3423 },
3409 "dist": { 3424 "dist": {
3410 "type": "zip", 3425 "type": "zip",
3411 "url": "https://api.github.com/repos/phpspec/prophecy/zipball/9ca52329bcdd1500de24427542577ebf3fc2f1c9", 3426 "url": "https://api.github.com/repos/phpspec/prophecy/zipball/3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373",
3412 "reference": "9ca52329bcdd1500de24427542577ebf3fc2f1c9", 3427 "reference": "3132b1f44c7bf2ec4c7eb2d3cb78fdeca760d373",
3413 "shasum": "" 3428 "shasum": ""
3414 }, 3429 },
3415 "require": { 3430 "require": {
3416 "doctrine/instantiator": "~1.0,>=1.0.2", 3431 "doctrine/instantiator": "^1.0.2",
3417 "phpdocumentor/reflection-docblock": "~2.0" 3432 "phpdocumentor/reflection-docblock": "~2.0",
3433 "sebastian/comparator": "~1.1"
3418 }, 3434 },
3419 "require-dev": { 3435 "require-dev": {
3420 "phpspec/phpspec": "~2.0" 3436 "phpspec/phpspec": "~2.0"
@@ -3422,7 +3438,7 @@
3422 "type": "library", 3438 "type": "library",
3423 "extra": { 3439 "extra": {
3424 "branch-alias": { 3440 "branch-alias": {
3425 "dev-master": "1.2.x-dev" 3441 "dev-master": "1.4.x-dev"
3426 } 3442 }
3427 }, 3443 },
3428 "autoload": { 3444 "autoload": {
@@ -3446,7 +3462,7 @@
3446 } 3462 }
3447 ], 3463 ],
3448 "description": "Highly opinionated mocking framework for PHP 5.3+", 3464 "description": "Highly opinionated mocking framework for PHP 5.3+",
3449 "homepage": "http://phpspec.org", 3465 "homepage": "https://github.com/phpspec/prophecy",
3450 "keywords": [ 3466 "keywords": [
3451 "Double", 3467 "Double",
3452 "Dummy", 3468 "Dummy",
@@ -3455,20 +3471,20 @@
3455 "spy", 3471 "spy",
3456 "stub" 3472 "stub"
3457 ], 3473 ],
3458 "time": "2014-11-17 16:23:49" 3474 "time": "2015-04-27 22:15:08"
3459 }, 3475 },
3460 { 3476 {
3461 "name": "phpunit/php-code-coverage", 3477 "name": "phpunit/php-code-coverage",
3462 "version": "2.0.15", 3478 "version": "2.0.17",
3463 "source": { 3479 "source": {
3464 "type": "git", 3480 "type": "git",
3465 "url": "https://github.com/sebastianbergmann/php-code-coverage.git", 3481 "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
3466 "reference": "34cc484af1ca149188d0d9e91412191e398e0b67" 3482 "reference": "c4e8e7725e351184a76544634855b8a9c405a6e3"
3467 }, 3483 },
3468 "dist": { 3484 "dist": {
3469 "type": "zip", 3485 "type": "zip",
3470 "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/34cc484af1ca149188d0d9e91412191e398e0b67", 3486 "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c4e8e7725e351184a76544634855b8a9c405a6e3",
3471 "reference": "34cc484af1ca149188d0d9e91412191e398e0b67", 3487 "reference": "c4e8e7725e351184a76544634855b8a9c405a6e3",
3472 "shasum": "" 3488 "shasum": ""
3473 }, 3489 },
3474 "require": { 3490 "require": {
@@ -3517,35 +3533,37 @@
3517 "testing", 3533 "testing",
3518 "xunit" 3534 "xunit"
3519 ], 3535 ],
3520 "time": "2015-01-24 10:06:35" 3536 "time": "2015-05-25 05:11:59"
3521 }, 3537 },
3522 { 3538 {
3523 "name": "phpunit/php-file-iterator", 3539 "name": "phpunit/php-file-iterator",
3524 "version": "1.3.4", 3540 "version": "1.4.0",
3525 "source": { 3541 "source": {
3526 "type": "git", 3542 "type": "git",
3527 "url": "https://github.com/sebastianbergmann/php-file-iterator.git", 3543 "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
3528 "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb" 3544 "reference": "a923bb15680d0089e2316f7a4af8f437046e96bb"
3529 }, 3545 },
3530 "dist": { 3546 "dist": {
3531 "type": "zip", 3547 "type": "zip",
3532 "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb", 3548 "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a923bb15680d0089e2316f7a4af8f437046e96bb",
3533 "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb", 3549 "reference": "a923bb15680d0089e2316f7a4af8f437046e96bb",
3534 "shasum": "" 3550 "shasum": ""
3535 }, 3551 },
3536 "require": { 3552 "require": {
3537 "php": ">=5.3.3" 3553 "php": ">=5.3.3"
3538 }, 3554 },
3539 "type": "library", 3555 "type": "library",
3556 "extra": {
3557 "branch-alias": {
3558 "dev-master": "1.4.x-dev"
3559 }
3560 },
3540 "autoload": { 3561 "autoload": {
3541 "classmap": [ 3562 "classmap": [
3542 "File/" 3563 "src/"
3543 ] 3564 ]
3544 }, 3565 },
3545 "notification-url": "https://packagist.org/downloads/", 3566 "notification-url": "https://packagist.org/downloads/",
3546 "include-path": [
3547 ""
3548 ],
3549 "license": [ 3567 "license": [
3550 "BSD-3-Clause" 3568 "BSD-3-Clause"
3551 ], 3569 ],
@@ -3562,7 +3580,7 @@
3562 "filesystem", 3580 "filesystem",
3563 "iterator" 3581 "iterator"
3564 ], 3582 ],
3565 "time": "2013-10-10 15:34:57" 3583 "time": "2015-04-02 05:19:05"
3566 }, 3584 },
3567 { 3585 {
3568 "name": "phpunit/php-text-template", 3586 "name": "phpunit/php-text-template",
@@ -3654,16 +3672,16 @@
3654 }, 3672 },
3655 { 3673 {
3656 "name": "phpunit/php-token-stream", 3674 "name": "phpunit/php-token-stream",
3657 "version": "1.4.0", 3675 "version": "1.4.1",
3658 "source": { 3676 "source": {
3659 "type": "git", 3677 "type": "git",
3660 "url": "https://github.com/sebastianbergmann/php-token-stream.git", 3678 "url": "https://github.com/sebastianbergmann/php-token-stream.git",
3661 "reference": "db32c18eba00b121c145575fcbcd4d4d24e6db74" 3679 "reference": "eab81d02569310739373308137284e0158424330"
3662 }, 3680 },
3663 "dist": { 3681 "dist": {
3664 "type": "zip", 3682 "type": "zip",
3665 "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/db32c18eba00b121c145575fcbcd4d4d24e6db74", 3683 "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/eab81d02569310739373308137284e0158424330",
3666 "reference": "db32c18eba00b121c145575fcbcd4d4d24e6db74", 3684 "reference": "eab81d02569310739373308137284e0158424330",
3667 "shasum": "" 3685 "shasum": ""
3668 }, 3686 },
3669 "require": { 3687 "require": {
@@ -3699,20 +3717,20 @@
3699 "keywords": [ 3717 "keywords": [
3700 "tokenizer" 3718 "tokenizer"
3701 ], 3719 ],
3702 "time": "2015-01-17 09:51:32" 3720 "time": "2015-04-08 04:46:07"
3703 }, 3721 },
3704 { 3722 {
3705 "name": "phpunit/phpunit", 3723 "name": "phpunit/phpunit",
3706 "version": "4.5.0", 3724 "version": "4.6.9",
3707 "source": { 3725 "source": {
3708 "type": "git", 3726 "type": "git",
3709 "url": "https://github.com/sebastianbergmann/phpunit.git", 3727 "url": "https://github.com/sebastianbergmann/phpunit.git",
3710 "reference": "5b578d3865a9128b9c209b011fda6539ec06e7a5" 3728 "reference": "816d12536a7a032adc3b68737f82cfbbf98b79c1"
3711 }, 3729 },
3712 "dist": { 3730 "dist": {
3713 "type": "zip", 3731 "type": "zip",
3714 "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/5b578d3865a9128b9c209b011fda6539ec06e7a5", 3732 "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/816d12536a7a032adc3b68737f82cfbbf98b79c1",
3715 "reference": "5b578d3865a9128b9c209b011fda6539ec06e7a5", 3733 "reference": "816d12536a7a032adc3b68737f82cfbbf98b79c1",
3716 "shasum": "" 3734 "shasum": ""
3717 }, 3735 },
3718 "require": { 3736 "require": {
@@ -3722,19 +3740,19 @@
3722 "ext-reflection": "*", 3740 "ext-reflection": "*",
3723 "ext-spl": "*", 3741 "ext-spl": "*",
3724 "php": ">=5.3.3", 3742 "php": ">=5.3.3",
3725 "phpspec/prophecy": "~1.3.1", 3743 "phpspec/prophecy": "~1.3,>=1.3.1",
3726 "phpunit/php-code-coverage": "~2.0", 3744 "phpunit/php-code-coverage": "~2.0,>=2.0.11",
3727 "phpunit/php-file-iterator": "~1.3.2", 3745 "phpunit/php-file-iterator": "~1.4",
3728 "phpunit/php-text-template": "~1.2", 3746 "phpunit/php-text-template": "~1.2",
3729 "phpunit/php-timer": "~1.0.2", 3747 "phpunit/php-timer": "~1.0",
3730 "phpunit/phpunit-mock-objects": "~2.3", 3748 "phpunit/phpunit-mock-objects": "~2.3",
3731 "sebastian/comparator": "~1.1", 3749 "sebastian/comparator": "~1.1",
3732 "sebastian/diff": "~1.1", 3750 "sebastian/diff": "~1.2",
3733 "sebastian/environment": "~1.2", 3751 "sebastian/environment": "~1.2",
3734 "sebastian/exporter": "~1.2", 3752 "sebastian/exporter": "~1.2",
3735 "sebastian/global-state": "~1.0", 3753 "sebastian/global-state": "~1.0",
3736 "sebastian/version": "~1.0", 3754 "sebastian/version": "~1.0",
3737 "symfony/yaml": "~2.0" 3755 "symfony/yaml": "~2.1|~3.0"
3738 }, 3756 },
3739 "suggest": { 3757 "suggest": {
3740 "phpunit/php-invoker": "~1.1" 3758 "phpunit/php-invoker": "~1.1"
@@ -3745,7 +3763,7 @@
3745 "type": "library", 3763 "type": "library",
3746 "extra": { 3764 "extra": {
3747 "branch-alias": { 3765 "branch-alias": {
3748 "dev-master": "4.5.x-dev" 3766 "dev-master": "4.6.x-dev"
3749 } 3767 }
3750 }, 3768 },
3751 "autoload": { 3769 "autoload": {
@@ -3771,29 +3789,29 @@
3771 "testing", 3789 "testing",
3772 "xunit" 3790 "xunit"
3773 ], 3791 ],
3774 "time": "2015-02-05 15:51:19" 3792 "time": "2015-05-29 06:00:03"
3775 }, 3793 },
3776 { 3794 {
3777 "name": "phpunit/phpunit-mock-objects", 3795 "name": "phpunit/phpunit-mock-objects",
3778 "version": "2.3.0", 3796 "version": "2.3.3",
3779 "source": { 3797 "source": {
3780 "type": "git", 3798 "type": "git",
3781 "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", 3799 "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
3782 "reference": "c63d2367247365f688544f0d500af90a11a44c65" 3800 "reference": "253c005852591fd547fc18cd5b7b43a1ec82d8f7"
3783 }, 3801 },
3784 "dist": { 3802 "dist": {
3785 "type": "zip", 3803 "type": "zip",
3786 "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/c63d2367247365f688544f0d500af90a11a44c65", 3804 "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/253c005852591fd547fc18cd5b7b43a1ec82d8f7",
3787 "reference": "c63d2367247365f688544f0d500af90a11a44c65", 3805 "reference": "253c005852591fd547fc18cd5b7b43a1ec82d8f7",
3788 "shasum": "" 3806 "shasum": ""
3789 }, 3807 },
3790 "require": { 3808 "require": {
3791 "doctrine/instantiator": "~1.0,>=1.0.1", 3809 "doctrine/instantiator": "~1.0,>=1.0.2",
3792 "php": ">=5.3.3", 3810 "php": ">=5.3.3",
3793 "phpunit/php-text-template": "~1.2" 3811 "phpunit/php-text-template": "~1.2"
3794 }, 3812 },
3795 "require-dev": { 3813 "require-dev": {
3796 "phpunit/phpunit": "~4.3" 3814 "phpunit/phpunit": "~4.4"
3797 }, 3815 },
3798 "suggest": { 3816 "suggest": {
3799 "ext-soap": "*" 3817 "ext-soap": "*"
@@ -3826,7 +3844,7 @@
3826 "mock", 3844 "mock",
3827 "xunit" 3845 "xunit"
3828 ], 3846 ],
3829 "time": "2014-10-03 05:12:11" 3847 "time": "2015-05-29 05:19:18"
3830 }, 3848 },
3831 { 3849 {
3832 "name": "sebastian/comparator", 3850 "name": "sebastian/comparator",
@@ -3894,16 +3912,16 @@
3894 }, 3912 },
3895 { 3913 {
3896 "name": "sebastian/diff", 3914 "name": "sebastian/diff",
3897 "version": "1.2.0", 3915 "version": "1.3.0",
3898 "source": { 3916 "source": {
3899 "type": "git", 3917 "type": "git",
3900 "url": "https://github.com/sebastianbergmann/diff.git", 3918 "url": "https://github.com/sebastianbergmann/diff.git",
3901 "reference": "5843509fed39dee4b356a306401e9dd1a931fec7" 3919 "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3"
3902 }, 3920 },
3903 "dist": { 3921 "dist": {
3904 "type": "zip", 3922 "type": "zip",
3905 "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/5843509fed39dee4b356a306401e9dd1a931fec7", 3923 "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3",
3906 "reference": "5843509fed39dee4b356a306401e9dd1a931fec7", 3924 "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3",
3907 "shasum": "" 3925 "shasum": ""
3908 }, 3926 },
3909 "require": { 3927 "require": {
@@ -3915,7 +3933,7 @@
3915 "type": "library", 3933 "type": "library",
3916 "extra": { 3934 "extra": {
3917 "branch-alias": { 3935 "branch-alias": {
3918 "dev-master": "1.2-dev" 3936 "dev-master": "1.3-dev"
3919 } 3937 }
3920 }, 3938 },
3921 "autoload": { 3939 "autoload": {
@@ -3942,32 +3960,32 @@
3942 "keywords": [ 3960 "keywords": [
3943 "diff" 3961 "diff"
3944 ], 3962 ],
3945 "time": "2014-08-15 10:29:00" 3963 "time": "2015-02-22 15:13:53"
3946 }, 3964 },
3947 { 3965 {
3948 "name": "sebastian/environment", 3966 "name": "sebastian/environment",
3949 "version": "1.2.1", 3967 "version": "1.2.2",
3950 "source": { 3968 "source": {
3951 "type": "git", 3969 "type": "git",
3952 "url": "https://github.com/sebastianbergmann/environment.git", 3970 "url": "https://github.com/sebastianbergmann/environment.git",
3953 "reference": "6e6c71d918088c251b181ba8b3088af4ac336dd7" 3971 "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e"
3954 }, 3972 },
3955 "dist": { 3973 "dist": {
3956 "type": "zip", 3974 "type": "zip",
3957 "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e6c71d918088c251b181ba8b3088af4ac336dd7", 3975 "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5a8c7d31914337b69923db26c4221b81ff5a196e",
3958 "reference": "6e6c71d918088c251b181ba8b3088af4ac336dd7", 3976 "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e",
3959 "shasum": "" 3977 "shasum": ""
3960 }, 3978 },
3961 "require": { 3979 "require": {
3962 "php": ">=5.3.3" 3980 "php": ">=5.3.3"
3963 }, 3981 },
3964 "require-dev": { 3982 "require-dev": {
3965 "phpunit/phpunit": "~4.3" 3983 "phpunit/phpunit": "~4.4"
3966 }, 3984 },
3967 "type": "library", 3985 "type": "library",
3968 "extra": { 3986 "extra": {
3969 "branch-alias": { 3987 "branch-alias": {
3970 "dev-master": "1.2.x-dev" 3988 "dev-master": "1.3.x-dev"
3971 } 3989 }
3972 }, 3990 },
3973 "autoload": { 3991 "autoload": {
@@ -3992,7 +4010,7 @@
3992 "environment", 4010 "environment",
3993 "hhvm" 4011 "hhvm"
3994 ], 4012 ],
3995 "time": "2014-10-25 08:00:45" 4013 "time": "2015-01-01 10:01:08"
3996 }, 4014 },
3997 { 4015 {
3998 "name": "sebastian/exporter", 4016 "name": "sebastian/exporter",
@@ -4166,16 +4184,16 @@
4166 }, 4184 },
4167 { 4185 {
4168 "name": "sebastian/version", 4186 "name": "sebastian/version",
4169 "version": "1.0.4", 4187 "version": "1.0.5",
4170 "source": { 4188 "source": {
4171 "type": "git", 4189 "type": "git",
4172 "url": "https://github.com/sebastianbergmann/version.git", 4190 "url": "https://github.com/sebastianbergmann/version.git",
4173 "reference": "a77d9123f8e809db3fbdea15038c27a95da4058b" 4191 "reference": "ab931d46cd0d3204a91e1b9a40c4bc13032b58e4"
4174 }, 4192 },
4175 "dist": { 4193 "dist": {
4176 "type": "zip", 4194 "type": "zip",
4177 "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/a77d9123f8e809db3fbdea15038c27a95da4058b", 4195 "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/ab931d46cd0d3204a91e1b9a40c4bc13032b58e4",
4178 "reference": "a77d9123f8e809db3fbdea15038c27a95da4058b", 4196 "reference": "ab931d46cd0d3204a91e1b9a40c4bc13032b58e4",
4179 "shasum": "" 4197 "shasum": ""
4180 }, 4198 },
4181 "type": "library", 4199 "type": "library",
@@ -4197,21 +4215,21 @@
4197 ], 4215 ],
4198 "description": "Library that helps with managing the version number of Git-hosted PHP projects", 4216 "description": "Library that helps with managing the version number of Git-hosted PHP projects",
4199 "homepage": "https://github.com/sebastianbergmann/version", 4217 "homepage": "https://github.com/sebastianbergmann/version",
4200 "time": "2014-12-15 14:25:24" 4218 "time": "2015-02-24 06:35:25"
4201 }, 4219 },
4202 { 4220 {
4203 "name": "sensio/generator-bundle", 4221 "name": "sensio/generator-bundle",
4204 "version": "v2.5.2", 4222 "version": "v2.5.3",
4205 "target-dir": "Sensio/Bundle/GeneratorBundle", 4223 "target-dir": "Sensio/Bundle/GeneratorBundle",
4206 "source": { 4224 "source": {
4207 "type": "git", 4225 "type": "git",
4208 "url": "https://github.com/sensiolabs/SensioGeneratorBundle.git", 4226 "url": "https://github.com/sensiolabs/SensioGeneratorBundle.git",
4209 "reference": "4b09746520a826a7bf34a466ba31c7d8740fef7e" 4227 "reference": "e50108c2133ee5c9c484555faed50c17a61221d3"
4210 }, 4228 },
4211 "dist": { 4229 "dist": {
4212 "type": "zip", 4230 "type": "zip",
4213 "url": "https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/zipball/4b09746520a826a7bf34a466ba31c7d8740fef7e", 4231 "url": "https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/zipball/e50108c2133ee5c9c484555faed50c17a61221d3",
4214 "reference": "4b09746520a826a7bf34a466ba31c7d8740fef7e", 4232 "reference": "e50108c2133ee5c9c484555faed50c17a61221d3",
4215 "shasum": "" 4233 "shasum": ""
4216 }, 4234 },
4217 "require": { 4235 "require": {
@@ -4245,7 +4263,7 @@
4245 } 4263 }
4246 ], 4264 ],
4247 "description": "This bundle generates code for you", 4265 "description": "This bundle generates code for you",
4248 "time": "2015-02-11 07:21:23" 4266 "time": "2015-03-17 06:36:52"
4249 } 4267 }
4250 ], 4268 ],
4251 "aliases": [], 4269 "aliases": [],
diff --git a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
index 14f42c48..2f5923c8 100644
--- a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php
+++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
@@ -1,6 +1,6 @@
1<?php 1<?php
2 2
3namespace Wallabag\CoreBundle\Controller; 3namespace Wallabag\ApiBundle\Controller;
4 4
5use Nelmio\ApiDocBundle\Annotation\ApiDoc; 5use Nelmio\ApiDocBundle\Annotation\ApiDoc;
6use Symfony\Bundle\FrameworkBundle\Controller\Controller; 6use Symfony\Bundle\FrameworkBundle\Controller\Controller;
@@ -47,6 +47,7 @@ class WallabagRestController extends Controller
47 * {"name"="username", "dataType"="string", "required"=true, "description"="username"} 47 * {"name"="username", "dataType"="string", "required"=true, "description"="username"}
48 * } 48 * }
49 * ) 49 * )
50 *
50 * @return array 51 * @return array
51 */ 52 */
52 public function getSaltAction($username) 53 public function getSaltAction($username)
@@ -62,6 +63,7 @@ class WallabagRestController extends Controller
62 63
63 return array($user->getSalt() ?: null); 64 return array($user->getSalt() ?: null);
64 } 65 }
66
65 /** 67 /**
66 * Retrieve all entries. It could be filtered by many options. 68 * Retrieve all entries. It could be filtered by many options.
67 * 69 *
@@ -76,6 +78,7 @@ class WallabagRestController extends Controller
76 * {"name"="tags", "dataType"="string", "required"=false, "format"="api%2Crest", "description"="a list of tags url encoded. Will returns entries that matches ALL tags."}, 78 * {"name"="tags", "dataType"="string", "required"=false, "format"="api%2Crest", "description"="a list of tags url encoded. Will returns entries that matches ALL tags."},
77 * } 79 * }
78 * ) 80 * )
81 *
79 * @return Entry 82 * @return Entry
80 */ 83 */
81 public function getEntriesAction(Request $request) 84 public function getEntriesAction(Request $request)
@@ -86,17 +89,13 @@ class WallabagRestController extends Controller
86 $order = $request->query->get('order', 'desc'); 89 $order = $request->query->get('order', 'desc');
87 $page = (int) $request->query->get('page', 1); 90 $page = (int) $request->query->get('page', 1);
88 $perPage = (int) $request->query->get('perPage', 30); 91 $perPage = (int) $request->query->get('perPage', 30);
89 $tags = $request->query->get('tags', array()); 92 $tags = $request->query->get('tags', []);
90 93
91 $pager = $this 94 $pager = $this
92 ->getDoctrine() 95 ->getDoctrine()
93 ->getRepository('WallabagCoreBundle:Entry') 96 ->getRepository('WallabagCoreBundle:Entry')
94 ->findEntries($this->getUser()->getId(), $isArchived, $isStarred, $sort, $order); 97 ->findEntries($this->getUser()->getId(), $isArchived, $isStarred, $sort, $order);
95 98
96 if (0 === $pager->getNbResults()) {
97 throw $this->createNotFoundException();
98 }
99
100 $pager->setCurrentPage($page); 99 $pager->setCurrentPage($page);
101 $pager->setMaxPerPage($perPage); 100 $pager->setMaxPerPage($perPage);
102 101
@@ -108,32 +107,31 @@ class WallabagRestController extends Controller
108 107
109 $json = $this->get('serializer')->serialize($paginatedCollection, 'json'); 108 $json = $this->get('serializer')->serialize($paginatedCollection, 'json');
110 109
111 return new Response($json, 200, array('application/json')); 110 return $this->renderJsonResponse($json);
112 } 111 }
113 112
114 /** 113 /**
115 * Retrieve a single entry 114 * Retrieve a single entry.
116 * 115 *
117 * @ApiDoc( 116 * @ApiDoc(
118 * requirements={ 117 * requirements={
119 * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"} 118 * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
120 * } 119 * }
121 * ) 120 * )
121 *
122 * @return Entry 122 * @return Entry
123 */ 123 */
124 public function getEntryAction(Entry $entry) 124 public function getEntryAction(Entry $entry)
125 { 125 {
126 if ($entry->getUser()->getId() != $this->getUser()->getId()) { 126 $this->validateUserAccess($entry->getUser()->getId(), $this->getUser()->getId());
127 throw $this->createAccessDeniedException('Access forbidden. Entry user id: '.$entry->getUser()->getId().', logged user id: '.$this->getUser()->getId());
128 }
129 127
130 $json = $this->get('serializer')->serialize($entry, 'json'); 128 $json = $this->get('serializer')->serialize($entry, 'json');
131 129
132 return new Response($json, 200, array('application/json')); 130 return $this->renderJsonResponse($json);
133 } 131 }
134 132
135 /** 133 /**
136 * Create an entry 134 * Create an entry.
137 * 135 *
138 * @ApiDoc( 136 * @ApiDoc(
139 * parameters={ 137 * parameters={
@@ -142,6 +140,7 @@ class WallabagRestController extends Controller
142 * {"name"="tags", "dataType"="string", "required"=false, "format"="tag1,tag2,tag3", "description"="a comma-separated list of tags."}, 140 * {"name"="tags", "dataType"="string", "required"=false, "format"="tag1,tag2,tag3", "description"="a comma-separated list of tags."},
143 * } 141 * }
144 * ) 142 * )
143 *
145 * @return Entry 144 * @return Entry
146 */ 145 */
147 public function postEntriesAction(Request $request) 146 public function postEntriesAction(Request $request)
@@ -165,11 +164,11 @@ class WallabagRestController extends Controller
165 164
166 $json = $this->get('serializer')->serialize($entry, 'json'); 165 $json = $this->get('serializer')->serialize($entry, 'json');
167 166
168 return new Response($json, 200, array('application/json')); 167 return $this->renderJsonResponse($json);
169 } 168 }
170 169
171 /** 170 /**
172 * Change several properties of an entry 171 * Change several properties of an entry.
173 * 172 *
174 * @ApiDoc( 173 * @ApiDoc(
175 * requirements={ 174 * requirements={
@@ -182,17 +181,16 @@ class WallabagRestController extends Controller
182 * {"name"="star", "dataType"="boolean", "required"=false, "format"="true or false", "description"="starred the entry."}, 181 * {"name"="star", "dataType"="boolean", "required"=false, "format"="true or false", "description"="starred the entry."},
183 * } 182 * }
184 * ) 183 * )
184 *
185 * @return Entry 185 * @return Entry
186 */ 186 */
187 public function patchEntriesAction(Entry $entry, Request $request) 187 public function patchEntriesAction(Entry $entry, Request $request)
188 { 188 {
189 if ($entry->getUser()->getId() != $this->getUser()->getId()) { 189 $this->validateUserAccess($entry->getUser()->getId(), $this->getUser()->getId());
190 throw $this->createAccessDeniedException('Access forbidden. Entry user id: '.$entry->getUser()->getId().', logged user id: '.$this->getUser()->getId());
191 }
192 190
193 $title = $request->request->get("title"); 191 $title = $request->request->get('title');
194 $isArchived = $request->request->get("archive"); 192 $isArchived = $request->request->get('archive');
195 $isStarred = $request->request->get("star"); 193 $isStarred = $request->request->get('star');
196 194
197 if (!is_null($title)) { 195 if (!is_null($title)) {
198 $entry->setTitle($title); 196 $entry->setTitle($title);
@@ -216,24 +214,23 @@ class WallabagRestController extends Controller
216 214
217 $json = $this->get('serializer')->serialize($entry, 'json'); 215 $json = $this->get('serializer')->serialize($entry, 'json');
218 216
219 return new Response($json, 200, array('application/json')); 217 return $this->renderJsonResponse($json);
220 } 218 }
221 219
222 /** 220 /**
223 * Delete **permanently** an entry 221 * Delete **permanently** an entry.
224 * 222 *
225 * @ApiDoc( 223 * @ApiDoc(
226 * requirements={ 224 * requirements={
227 * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"} 225 * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
228 * } 226 * }
229 * ) 227 * )
228 *
230 * @return Entry 229 * @return Entry
231 */ 230 */
232 public function deleteEntriesAction(Entry $entry) 231 public function deleteEntriesAction(Entry $entry)
233 { 232 {
234 if ($entry->getUser()->getId() != $this->getUser()->getId()) { 233 $this->validateUserAccess($entry->getUser()->getId(), $this->getUser()->getId());
235 throw $this->createAccessDeniedException('Access forbidden. Entry user id: '.$entry->getUser()->getId().', logged user id: '.$this->getUser()->getId());
236 }
237 234
238 $em = $this->getDoctrine()->getManager(); 235 $em = $this->getDoctrine()->getManager();
239 $em->remove($entry); 236 $em->remove($entry);
@@ -241,11 +238,11 @@ class WallabagRestController extends Controller
241 238
242 $json = $this->get('serializer')->serialize($entry, 'json'); 239 $json = $this->get('serializer')->serialize($entry, 'json');
243 240
244 return new Response($json, 200, array('application/json')); 241 return $this->renderJsonResponse($json);
245 } 242 }
246 243
247 /** 244 /**
248 * Retrieve all tags for an entry 245 * Retrieve all tags for an entry.
249 * 246 *
250 * @ApiDoc( 247 * @ApiDoc(
251 * requirements={ 248 * requirements={
@@ -255,17 +252,15 @@ class WallabagRestController extends Controller
255 */ 252 */
256 public function getEntriesTagsAction(Entry $entry) 253 public function getEntriesTagsAction(Entry $entry)
257 { 254 {
258 if ($entry->getUser()->getId() != $this->getUser()->getId()) { 255 $this->validateUserAccess($entry->getUser()->getId(), $this->getUser()->getId());
259 throw $this->createAccessDeniedException('Access forbidden. Entry user id: '.$entry->getUser()->getId().', logged user id: '.$this->getUser()->getId());
260 }
261 256
262 $json = $this->get('serializer')->serialize($entry->getTags(), 'json'); 257 $json = $this->get('serializer')->serialize($entry->getTags(), 'json');
263 258
264 return new Response($json, 200, array('application/json')); 259 return $this->renderJsonResponse($json);
265 } 260 }
266 261
267 /** 262 /**
268 * Add one or more tags to an entry 263 * Add one or more tags to an entry.
269 * 264 *
270 * @ApiDoc( 265 * @ApiDoc(
271 * requirements={ 266 * requirements={
@@ -278,9 +273,7 @@ class WallabagRestController extends Controller
278 */ 273 */
279 public function postEntriesTagsAction(Request $request, Entry $entry) 274 public function postEntriesTagsAction(Request $request, Entry $entry)
280 { 275 {
281 if ($entry->getUser()->getId() != $this->getUser()->getId()) { 276 $this->validateUserAccess($entry->getUser()->getId(), $this->getUser()->getId());
282 throw $this->createAccessDeniedException('Access forbidden. Entry user id: '.$entry->getUser()->getId().', logged user id: '.$this->getUser()->getId());
283 }
284 277
285 $tags = $request->request->get('tags', ''); 278 $tags = $request->request->get('tags', '');
286 if (!empty($tags)) { 279 if (!empty($tags)) {
@@ -293,24 +286,22 @@ class WallabagRestController extends Controller
293 286
294 $json = $this->get('serializer')->serialize($entry, 'json'); 287 $json = $this->get('serializer')->serialize($entry, 'json');
295 288
296 return new Response($json, 200, array('application/json')); 289 return $this->renderJsonResponse($json);
297 } 290 }
298 291
299 /** 292 /**
300 * Permanently remove one tag for an entry 293 * Permanently remove one tag for an entry.
301 * 294 *
302 * @ApiDoc( 295 * @ApiDoc(
303 * requirements={ 296 * requirements={
304 * {"name"="tag", "dataType"="string", "requirement"="\w+", "description"="The tag"}, 297 * {"name"="tag", "dataType"="integer", "requirement"="\w+", "description"="The tag ID"},
305 * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"} 298 * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
306 * } 299 * }
307 * ) 300 * )
308 */ 301 */
309 public function deleteEntriesTagsAction(Entry $entry, Tag $tag) 302 public function deleteEntriesTagsAction(Entry $entry, Tag $tag)
310 { 303 {
311 if ($entry->getUser()->getId() != $this->getUser()->getId()) { 304 $this->validateUserAccess($entry->getUser()->getId(), $this->getUser()->getId());
312 throw $this->createAccessDeniedException('Access forbidden. Entry user id: '.$entry->getUser()->getId().', logged user id: '.$this->getUser()->getId());
313 }
314 305
315 $entry->removeTag($tag); 306 $entry->removeTag($tag);
316 $em = $this->getDoctrine()->getManager(); 307 $em = $this->getDoctrine()->getManager();
@@ -319,11 +310,11 @@ class WallabagRestController extends Controller
319 310
320 $json = $this->get('serializer')->serialize($entry, 'json'); 311 $json = $this->get('serializer')->serialize($entry, 'json');
321 312
322 return new Response($json, 200, array('application/json')); 313 return $this->renderJsonResponse($json);
323 } 314 }
324 315
325 /** 316 /**
326 * Retrieve all tags 317 * Retrieve all tags.
327 * 318 *
328 * @ApiDoc() 319 * @ApiDoc()
329 */ 320 */
@@ -331,23 +322,21 @@ class WallabagRestController extends Controller
331 { 322 {
332 $json = $this->get('serializer')->serialize($this->getUser()->getTags(), 'json'); 323 $json = $this->get('serializer')->serialize($this->getUser()->getTags(), 'json');
333 324
334 return new Response($json, 200, array('application/json')); 325 return $this->renderJsonResponse($json);
335 } 326 }
336 327
337 /** 328 /**
338 * Permanently remove one tag from **every** entry 329 * Permanently remove one tag from **every** entry.
339 * 330 *
340 * @ApiDoc( 331 * @ApiDoc(
341 * requirements={ 332 * requirements={
342 * {"name"="tag", "dataType"="string", "requirement"="\w+", "description"="The tag"} 333 * {"name"="tag", "dataType"="integer", "requirement"="\w+", "description"="The tag"}
343 * } 334 * }
344 * ) 335 * )
345 */ 336 */
346 public function deleteTagAction(Tag $tag) 337 public function deleteTagAction(Tag $tag)
347 { 338 {
348 if ($tag->getUser()->getId() != $this->getUser()->getId()) { 339 $this->validateUserAccess($tag->getUser()->getId(), $this->getUser()->getId());
349 throw $this->createAccessDeniedException('Access forbidden. Entry user id: '.$tag->getUser()->getId().', logged user id: '.$this->getUser()->getId());
350 }
351 340
352 $em = $this->getDoctrine()->getManager(); 341 $em = $this->getDoctrine()->getManager();
353 $em->remove($tag); 342 $em->remove($tag);
@@ -355,6 +344,33 @@ class WallabagRestController extends Controller
355 344
356 $json = $this->get('serializer')->serialize($tag, 'json'); 345 $json = $this->get('serializer')->serialize($tag, 'json');
357 346
347 return $this->renderJsonResponse($json);
348 }
349
350 /**
351 * Validate that the first id is equal to the second one.
352 * If not, throw exception. It means a user try to access information from an other user.
353 *
354 * @param int $requestUserId User id from the requested source
355 * @param int $currentUserId User id from the retrieved source
356 */
357 private function validateUserAccess($requestUserId, $currentUserId)
358 {
359 if ($requestUserId != $currentUserId) {
360 throw $this->createAccessDeniedException('Access forbidden. Entry user id: '.$requestUserId.', logged user id: '.$currentUserId);
361 }
362 }
363
364 /**
365 * Send a JSON Response.
366 * We don't use the Symfony JsonRespone, because it takes an array as parameter instead of a JSON string.
367 *
368 * @param string $json
369 *
370 * @return Response
371 */
372 private function renderJsonResponse($json)
373 {
358 return new Response($json, 200, array('application/json')); 374 return new Response($json, 200, array('application/json'));
359 } 375 }
360} 376}
diff --git a/src/Wallabag/ApiBundle/DependencyInjection/Configuration.php b/src/Wallabag/ApiBundle/DependencyInjection/Configuration.php
new file mode 100644
index 00000000..cec45412
--- /dev/null
+++ b/src/Wallabag/ApiBundle/DependencyInjection/Configuration.php
@@ -0,0 +1,29 @@
1<?php
2
3namespace Wallabag\ApiBundle\DependencyInjection;
4
5use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8/**
9 * This is the class that validates and merges configuration from your app/config files.
10 *
11 * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
12 */
13class Configuration implements ConfigurationInterface
14{
15 /**
16 * {@inheritdoc}
17 */
18 public function getConfigTreeBuilder()
19 {
20 $treeBuilder = new TreeBuilder();
21 $rootNode = $treeBuilder->root('wallabag_api');
22
23 // Here you should define the parameters that are allowed to
24 // configure your bundle. See the documentation linked above for
25 // more information on that topic.
26
27 return $treeBuilder;
28 }
29}
diff --git a/src/Wallabag/CoreBundle/DependencyInjection/Security/Factory/WsseFactory.php b/src/Wallabag/ApiBundle/DependencyInjection/Security/Factory/WsseFactory.php
index 0b5bdb40..402eb869 100644
--- a/src/Wallabag/CoreBundle/DependencyInjection/Security/Factory/WsseFactory.php
+++ b/src/Wallabag/ApiBundle/DependencyInjection/Security/Factory/WsseFactory.php
@@ -1,6 +1,6 @@
1<?php 1<?php
2 2
3namespace Wallabag\CoreBundle\DependencyInjection\Security\Factory; 3namespace Wallabag\ApiBundle\DependencyInjection\Security\Factory;
4 4
5use Symfony\Component\DependencyInjection\ContainerBuilder; 5use Symfony\Component\DependencyInjection\ContainerBuilder;
6use Symfony\Component\DependencyInjection\Reference; 6use Symfony\Component\DependencyInjection\Reference;
diff --git a/src/Wallabag/ApiBundle/DependencyInjection/WallabagApiExtension.php b/src/Wallabag/ApiBundle/DependencyInjection/WallabagApiExtension.php
new file mode 100644
index 00000000..c5cc204e
--- /dev/null
+++ b/src/Wallabag/ApiBundle/DependencyInjection/WallabagApiExtension.php
@@ -0,0 +1,25 @@
1<?php
2
3namespace Wallabag\ApiBundle\DependencyInjection;
4
5use Symfony\Component\DependencyInjection\ContainerBuilder;
6use Symfony\Component\Config\FileLocator;
7use Symfony\Component\HttpKernel\DependencyInjection\Extension;
8use Symfony\Component\DependencyInjection\Loader;
9
10class WallabagApiExtension extends Extension
11{
12 public function load(array $configs, ContainerBuilder $container)
13 {
14 $configuration = new Configuration();
15 $config = $this->processConfiguration($configuration, $configs);
16
17 $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
18 $loader->load('services.yml');
19 }
20
21 public function getAlias()
22 {
23 return 'wallabag_api';
24 }
25}
diff --git a/src/Wallabag/ApiBundle/Resources/config/routing.yml b/src/Wallabag/ApiBundle/Resources/config/routing.yml
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/src/Wallabag/ApiBundle/Resources/config/routing.yml
diff --git a/src/Wallabag/ApiBundle/Resources/config/routing_rest.yml b/src/Wallabag/ApiBundle/Resources/config/routing_rest.yml
new file mode 100644
index 00000000..5f43f971
--- /dev/null
+++ b/src/Wallabag/ApiBundle/Resources/config/routing_rest.yml
@@ -0,0 +1,4 @@
1entries:
2 type: rest
3 resource: "WallabagApiBundle:WallabagRest"
4 name_prefix: api_
diff --git a/src/Wallabag/ApiBundle/Resources/config/services.yml b/src/Wallabag/ApiBundle/Resources/config/services.yml
new file mode 100644
index 00000000..6854a444
--- /dev/null
+++ b/src/Wallabag/ApiBundle/Resources/config/services.yml
@@ -0,0 +1,12 @@
1services:
2 wsse.security.authentication.provider:
3 class: Wallabag\ApiBundle\Security\Authentication\Provider\WsseProvider
4 public: false
5 arguments: ['', '%kernel.cache_dir%/security/nonces']
6
7 wsse.security.authentication.listener:
8 class: Wallabag\ApiBundle\Security\Firewall\WsseListener
9 public: false
10 tags:
11 - { name: monolog.logger, channel: wsse }
12 arguments: ['@security.context', '@security.authentication.manager', '@logger']
diff --git a/src/Wallabag/CoreBundle/Security/Authentication/Provider/WsseProvider.php b/src/Wallabag/ApiBundle/Security/Authentication/Provider/WsseProvider.php
index 7e6a5dfb..db73ae2a 100644
--- a/src/Wallabag/CoreBundle/Security/Authentication/Provider/WsseProvider.php
+++ b/src/Wallabag/ApiBundle/Security/Authentication/Provider/WsseProvider.php
@@ -1,12 +1,13 @@
1<?php 1<?php
2namespace Wallabag\CoreBundle\Security\Authentication\Provider; 2
3namespace Wallabag\ApiBundle\Security\Authentication\Provider;
3 4
4use Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface; 5use Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface;
5use Symfony\Component\Security\Core\User\UserProviderInterface; 6use Symfony\Component\Security\Core\User\UserProviderInterface;
6use Symfony\Component\Security\Core\Exception\AuthenticationException; 7use Symfony\Component\Security\Core\Exception\AuthenticationException;
7use Symfony\Component\Security\Core\Exception\NonceExpiredException; 8use Symfony\Component\Security\Core\Exception\NonceExpiredException;
8use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; 9use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
9use Wallabag\CoreBundle\Security\Authentication\Token\WsseUserToken; 10use Wallabag\ApiBundle\Security\Authentication\Token\WsseUserToken;
10 11
11class WsseProvider implements AuthenticationProviderInterface 12class WsseProvider implements AuthenticationProviderInterface
12{ 13{
@@ -29,7 +30,7 @@ class WsseProvider implements AuthenticationProviderInterface
29 $user = $this->userProvider->loadUserByUsername($token->getUsername()); 30 $user = $this->userProvider->loadUserByUsername($token->getUsername());
30 31
31 if (!$user) { 32 if (!$user) {
32 throw new AuthenticationException("Bad credentials. Did you forgot your username?"); 33 throw new AuthenticationException('Bad credentials. Did you forgot your username?');
33 } 34 }
34 35
35 if ($user && $this->validateDigest($token->digest, $token->nonce, $token->created, $user->getPassword())) { 36 if ($user && $this->validateDigest($token->digest, $token->nonce, $token->created, $user->getPassword())) {
@@ -46,12 +47,12 @@ class WsseProvider implements AuthenticationProviderInterface
46 { 47 {
47 // Check created time is not in the future 48 // Check created time is not in the future
48 if (strtotime($created) > time()) { 49 if (strtotime($created) > time()) {
49 throw new AuthenticationException("Back to the future..."); 50 throw new AuthenticationException('Back to the future...');
50 } 51 }
51 52
52 // Expire timestamp after 5 minutes 53 // Expire timestamp after 5 minutes
53 if (time() - strtotime($created) > 300) { 54 if (time() - strtotime($created) > 300) {
54 throw new AuthenticationException("Too late for this timestamp... Watch your watch."); 55 throw new AuthenticationException('Too late for this timestamp... Watch your watch.');
55 } 56 }
56 57
57 // Validate nonce is unique within 5 minutes 58 // Validate nonce is unique within 5 minutes
@@ -65,7 +66,7 @@ class WsseProvider implements AuthenticationProviderInterface
65 $expected = base64_encode(sha1(base64_decode($nonce).$created.$secret, true)); 66 $expected = base64_encode(sha1(base64_decode($nonce).$created.$secret, true));
66 67
67 if ($digest !== $expected) { 68 if ($digest !== $expected) {
68 throw new AuthenticationException("Bad credentials ! Digest is not as expected."); 69 throw new AuthenticationException('Bad credentials ! Digest is not as expected.');
69 } 70 }
70 71
71 return $digest === $expected; 72 return $digest === $expected;
diff --git a/src/Wallabag/CoreBundle/Security/Authentication/Token/WsseUserToken.php b/src/Wallabag/ApiBundle/Security/Authentication/Token/WsseUserToken.php
index ea6fb9bf..e6d30224 100644
--- a/src/Wallabag/CoreBundle/Security/Authentication/Token/WsseUserToken.php
+++ b/src/Wallabag/ApiBundle/Security/Authentication/Token/WsseUserToken.php
@@ -1,5 +1,6 @@
1<?php 1<?php
2namespace Wallabag\CoreBundle\Security\Authentication\Token; 2
3namespace Wallabag\ApiBundle\Security\Authentication\Token;
3 4
4use Symfony\Component\Security\Core\Authentication\Token\AbstractToken; 5use Symfony\Component\Security\Core\Authentication\Token\AbstractToken;
5 6
diff --git a/src/Wallabag/CoreBundle/Security/Firewall/WsseListener.php b/src/Wallabag/ApiBundle/Security/Firewall/WsseListener.php
index 6ffdfaf0..50587837 100644
--- a/src/Wallabag/CoreBundle/Security/Firewall/WsseListener.php
+++ b/src/Wallabag/ApiBundle/Security/Firewall/WsseListener.php
@@ -1,6 +1,6 @@
1<?php 1<?php
2 2
3namespace Wallabag\CoreBundle\Security\Firewall; 3namespace Wallabag\ApiBundle\Security\Firewall;
4 4
5use Symfony\Component\HttpFoundation\Response; 5use Symfony\Component\HttpFoundation\Response;
6use Symfony\Component\HttpKernel\Event\GetResponseEvent; 6use Symfony\Component\HttpKernel\Event\GetResponseEvent;
@@ -8,7 +8,7 @@ use Symfony\Component\Security\Http\Firewall\ListenerInterface;
8use Symfony\Component\Security\Core\Exception\AuthenticationException; 8use Symfony\Component\Security\Core\Exception\AuthenticationException;
9use Symfony\Component\Security\Core\SecurityContextInterface; 9use Symfony\Component\Security\Core\SecurityContextInterface;
10use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; 10use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface;
11use Wallabag\CoreBundle\Security\Authentication\Token\WsseUserToken; 11use Wallabag\ApiBundle\Security\Authentication\Token\WsseUserToken;
12use Psr\Log\LoggerInterface; 12use Psr\Log\LoggerInterface;
13 13
14class WsseListener implements ListenerInterface 14class WsseListener implements ListenerInterface
diff --git a/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php b/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php
new file mode 100644
index 00000000..86c8de1e
--- /dev/null
+++ b/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php
@@ -0,0 +1,410 @@
1<?php
2
3namespace Wallabag\ApiBundle\Tests\Controller;
4
5use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
6
7class WallabagRestControllerTest extends WebTestCase
8{
9 protected static $salt;
10
11 /**
12 * Grab the salt once and store it to be available for all tests.
13 */
14 public static function setUpBeforeClass()
15 {
16 $client = self::createClient();
17
18 $user = $client->getContainer()
19 ->get('doctrine.orm.entity_manager')
20 ->getRepository('WallabagCoreBundle:User')
21 ->findOneByUsername('admin');
22
23 self::$salt = $user->getSalt();
24 }
25
26 /**
27 * Generate HTTP headers for authenticate user on API.
28 *
29 * @param string $username
30 * @param string $password
31 *
32 * @return array
33 */
34 private function generateHeaders($username, $password)
35 {
36 $encryptedPassword = sha1($password.$username.self::$salt);
37 $nonce = substr(md5(uniqid('nonce_', true)), 0, 16);
38
39 $now = new \DateTime('now', new \DateTimeZone('UTC'));
40 $created = (string) $now->format('Y-m-d\TH:i:s\Z');
41 $digest = base64_encode(sha1(base64_decode($nonce).$created.$encryptedPassword, true));
42
43 return array(
44 'HTTP_AUTHORIZATION' => 'Authorization profile="UsernameToken"',
45 'HTTP_x-wsse' => 'X-WSSE: UsernameToken Username="'.$username.'", PasswordDigest="'.$digest.'", Nonce="'.$nonce.'", Created="'.$created.'"',
46 );
47 }
48
49 public function testGetSalt()
50 {
51 $client = $this->createClient();
52 $client->request('GET', '/api/salts/admin.json');
53
54 $user = $client->getContainer()
55 ->get('doctrine.orm.entity_manager')
56 ->getRepository('WallabagCoreBundle:User')
57 ->findOneByUsername('admin');
58
59 $this->assertEquals(200, $client->getResponse()->getStatusCode());
60
61 $content = json_decode($client->getResponse()->getContent(), true);
62
63 $this->assertArrayHasKey(0, $content);
64 $this->assertEquals($user->getSalt(), $content[0]);
65
66 $client->request('GET', '/api/salts/notfound.json');
67 $this->assertEquals(404, $client->getResponse()->getStatusCode());
68 }
69
70 public function testWithBadHeaders()
71 {
72 $client = $this->createClient();
73
74 $entry = $client->getContainer()
75 ->get('doctrine.orm.entity_manager')
76 ->getRepository('WallabagCoreBundle:Entry')
77 ->findOneByIsArchived(false);
78
79 if (!$entry) {
80 $this->markTestSkipped('No content found in db.');
81 }
82
83 $badHeaders = array(
84 'HTTP_AUTHORIZATION' => 'Authorization profile="UsernameToken"',
85 'HTTP_x-wsse' => 'X-WSSE: UsernameToken Username="admin", PasswordDigest="Wr0ngDig3st", Nonce="n0Nc3", Created="2015-01-01T13:37:00Z"',
86 );
87
88 $client->request('GET', '/api/entries/'.$entry->getId().'.json', array(), array(), $badHeaders);
89 $this->assertEquals(403, $client->getResponse()->getStatusCode());
90 }
91
92 public function testGetOneEntry()
93 {
94 $client = $this->createClient();
95 $headers = $this->generateHeaders('admin', 'mypassword');
96
97 $entry = $client->getContainer()
98 ->get('doctrine.orm.entity_manager')
99 ->getRepository('WallabagCoreBundle:Entry')
100 ->findOneBy(array('user' => 1, 'isArchived' => false));
101
102 if (!$entry) {
103 $this->markTestSkipped('No content found in db.');
104 }
105
106 $client->request('GET', '/api/entries/'.$entry->getId().'.json', array(), array(), $headers);
107
108 $this->assertEquals(200, $client->getResponse()->getStatusCode());
109
110 $content = json_decode($client->getResponse()->getContent(), true);
111
112 $this->assertEquals($entry->getTitle(), $content['title']);
113 $this->assertEquals($entry->getUrl(), $content['url']);
114 $this->assertCount(count($entry->getTags()), $content['tags']);
115
116 $this->assertTrue(
117 $client->getResponse()->headers->contains(
118 'Content-Type',
119 'application/json'
120 )
121 );
122 }
123
124 public function testGetOneEntryWrongUser()
125 {
126 $client = $this->createClient();
127 $headers = $this->generateHeaders('admin', 'mypassword');
128
129 $entry = $client->getContainer()
130 ->get('doctrine.orm.entity_manager')
131 ->getRepository('WallabagCoreBundle:Entry')
132 ->findOneBy(array('user' => 2, 'isArchived' => false));
133
134 if (!$entry) {
135 $this->markTestSkipped('No content found in db.');
136 }
137
138 $client->request('GET', '/api/entries/'.$entry->getId().'.json', array(), array(), $headers);
139
140 $this->assertEquals(403, $client->getResponse()->getStatusCode());
141 }
142
143 public function testGetEntries()
144 {
145 $client = $this->createClient();
146 $headers = $this->generateHeaders('admin', 'mypassword');
147
148 $client->request('GET', '/api/entries', array(), array(), $headers);
149
150 $this->assertEquals(200, $client->getResponse()->getStatusCode());
151
152 $content = json_decode($client->getResponse()->getContent(), true);
153
154 $this->assertGreaterThanOrEqual(1, count($content));
155 $this->assertNotEmpty($content['_embedded']['items']);
156 $this->assertGreaterThanOrEqual(1, $content['total']);
157 $this->assertEquals(1, $content['page']);
158 $this->assertGreaterThanOrEqual(1, $content['pages']);
159
160 $this->assertTrue(
161 $client->getResponse()->headers->contains(
162 'Content-Type',
163 'application/json'
164 )
165 );
166 }
167
168 public function testGetStarredEntries()
169 {
170 $client = $this->createClient();
171 $headers = $this->generateHeaders('admin', 'mypassword');
172
173 $client->request('GET', '/api/entries', array('archive' => 1), array(), $headers);
174
175 $this->assertEquals(200, $client->getResponse()->getStatusCode());
176
177 $content = json_decode($client->getResponse()->getContent(), true);
178
179 $this->assertGreaterThanOrEqual(1, count($content));
180 $this->assertNotEmpty($content['_embedded']['items']);
181 $this->assertGreaterThanOrEqual(1, $content['total']);
182 $this->assertEquals(1, $content['page']);
183 $this->assertGreaterThanOrEqual(1, $content['pages']);
184
185 $this->assertTrue(
186 $client->getResponse()->headers->contains(
187 'Content-Type',
188 'application/json'
189 )
190 );
191 }
192
193 public function testDeleteEntry()
194 {
195 $client = $this->createClient();
196 $headers = $this->generateHeaders('admin', 'mypassword');
197
198 $entry = $client->getContainer()
199 ->get('doctrine.orm.entity_manager')
200 ->getRepository('WallabagCoreBundle:Entry')
201 ->findOneByUser(1);
202
203 if (!$entry) {
204 $this->markTestSkipped('No content found in db.');
205 }
206
207 $client->request('DELETE', '/api/entries/'.$entry->getId().'.json', array(), array(), $headers);
208
209 $this->assertEquals(200, $client->getResponse()->getStatusCode());
210
211 $content = json_decode($client->getResponse()->getContent(), true);
212
213 $this->assertEquals($entry->getTitle(), $content['title']);
214 $this->assertEquals($entry->getUrl(), $content['url']);
215
216 // We'll try to delete this entry again
217 $headers = $this->generateHeaders('admin', 'mypassword');
218
219 $client->request('DELETE', '/api/entries/'.$entry->getId().'.json', array(), array(), $headers);
220
221 $this->assertEquals(404, $client->getResponse()->getStatusCode());
222 }
223
224 public function testPostEntry()
225 {
226 $client = $this->createClient();
227 $headers = $this->generateHeaders('admin', 'mypassword');
228
229 $client->request('POST', '/api/entries.json', array(
230 'url' => 'http://www.lemonde.fr/pixels/article/2015/03/28/plongee-dans-l-univers-d-ingress-le-jeu-de-google-aux-frontieres-du-reel_4601155_4408996.html',
231 'tags' => 'google',
232 ), array(), $headers);
233
234 $this->assertEquals(200, $client->getResponse()->getStatusCode());
235
236 $content = json_decode($client->getResponse()->getContent(), true);
237
238 $this->assertGreaterThan(0, $content['id']);
239 $this->assertEquals('http://www.lemonde.fr/pixels/article/2015/03/28/plongee-dans-l-univers-d-ingress-le-jeu-de-google-aux-frontieres-du-reel_4601155_4408996.html', $content['url']);
240 $this->assertEquals(false, $content['is_archived']);
241 $this->assertEquals(false, $content['is_starred']);
242 $this->assertCount(1, $content['tags']);
243 }
244
245 public function testPatchEntry()
246 {
247 $client = $this->createClient();
248 $headers = $this->generateHeaders('admin', 'mypassword');
249
250 $entry = $client->getContainer()
251 ->get('doctrine.orm.entity_manager')
252 ->getRepository('WallabagCoreBundle:Entry')
253 ->findOneByUser(1);
254
255 if (!$entry) {
256 $this->markTestSkipped('No content found in db.');
257 }
258
259 // hydrate the tags relations
260 $nbTags = count($entry->getTags());
261
262 $client->request('PATCH', '/api/entries/'.$entry->getId().'.json', array(
263 'title' => 'New awesome title',
264 'tags' => 'new tag '.uniqid(),
265 'star' => true,
266 'archive' => false,
267 ), array(), $headers);
268
269 $this->assertEquals(200, $client->getResponse()->getStatusCode());
270
271 $content = json_decode($client->getResponse()->getContent(), true);
272
273 $this->assertEquals($entry->getId(), $content['id']);
274 $this->assertEquals($entry->getUrl(), $content['url']);
275 $this->assertEquals('New awesome title', $content['title']);
276 $this->assertGreaterThan($nbTags, count($content['tags']));
277 }
278
279 public function testGetTagsEntry()
280 {
281 $client = $this->createClient();
282 $headers = $this->generateHeaders('admin', 'mypassword');
283
284 $entry = $client->getContainer()
285 ->get('doctrine.orm.entity_manager')
286 ->getRepository('WallabagCoreBundle:Entry')
287 ->findOneWithTags(1);
288
289 $entry = $entry[0];
290
291 if (!$entry) {
292 $this->markTestSkipped('No content found in db.');
293 }
294
295 $tags = array();
296 foreach ($entry->getTags() as $tag) {
297 $tags[] = array('id' => $tag->getId(), 'label' => $tag->getLabel());
298 }
299
300 $client->request('GET', '/api/entries/'.$entry->getId().'/tags', array(), array(), $headers);
301
302 $this->assertEquals(json_encode($tags, JSON_HEX_QUOT), $client->getResponse()->getContent());
303 }
304
305 public function testPostTagsOnEntry()
306 {
307 $client = $this->createClient();
308 $headers = $this->generateHeaders('admin', 'mypassword');
309
310 $entry = $client->getContainer()
311 ->get('doctrine.orm.entity_manager')
312 ->getRepository('WallabagCoreBundle:Entry')
313 ->findOneByUser(1);
314
315 if (!$entry) {
316 $this->markTestSkipped('No content found in db.');
317 }
318
319 $nbTags = count($entry->getTags());
320
321 $newTags = 'tag1,tag2,tag3';
322
323 $client->request('POST', '/api/entries/'.$entry->getId().'/tags', array('tags' => $newTags), array(), $headers);
324
325 $this->assertEquals(200, $client->getResponse()->getStatusCode());
326
327 $content = json_decode($client->getResponse()->getContent(), true);
328
329 $this->assertArrayHasKey('tags', $content);
330 $this->assertEquals($nbTags + 3, count($content['tags']));
331
332 $entryDB = $client->getContainer()
333 ->get('doctrine.orm.entity_manager')
334 ->getRepository('WallabagCoreBundle:Entry')
335 ->find($entry->getId());
336
337 $tagsInDB = array();
338 foreach ($entryDB->getTags()->toArray() as $tag) {
339 $tagsInDB[$tag->getId()] = $tag->getLabel();
340 }
341
342 foreach (explode(',', $newTags) as $tag) {
343 $this->assertContains($tag, $tagsInDB);
344 }
345 }
346
347 public function testDeleteOneTagEntrie()
348 {
349 $client = $this->createClient();
350 $headers = $this->generateHeaders('admin', 'mypassword');
351
352 $entry = $client->getContainer()
353 ->get('doctrine.orm.entity_manager')
354 ->getRepository('WallabagCoreBundle:Entry')
355 ->findOneByUser(1);
356
357 if (!$entry) {
358 $this->markTestSkipped('No content found in db.');
359 }
360
361 // hydrate the tags relations
362 $nbTags = count($entry->getTags());
363 $tag = $entry->getTags()[0];
364
365 $client->request('DELETE', '/api/entries/'.$entry->getId().'/tags/'.$tag->getId().'.json', array(), array(), $headers);
366
367 $this->assertEquals(200, $client->getResponse()->getStatusCode());
368
369 $content = json_decode($client->getResponse()->getContent(), true);
370
371 $this->assertArrayHasKey('tags', $content);
372 $this->assertEquals($nbTags - 1, count($content['tags']));
373 }
374
375 public function testGetUserTags()
376 {
377 $client = $this->createClient();
378 $headers = $this->generateHeaders('admin', 'mypassword');
379
380 $client->request('GET', '/api/tags.json', array(), array(), $headers);
381
382 $this->assertEquals(200, $client->getResponse()->getStatusCode());
383
384 $content = json_decode($client->getResponse()->getContent(), true);
385
386 $this->assertGreaterThan(0, $content);
387 $this->assertArrayHasKey('id', $content[0]);
388 $this->assertArrayHasKey('label', $content[0]);
389
390 return end($content);
391 }
392
393 /**
394 * @depends testGetUserTags
395 */
396 public function testDeleteUserTag($tag)
397 {
398 $client = $this->createClient();
399 $headers = $this->generateHeaders('admin', 'mypassword');
400
401 $client->request('DELETE', '/api/tags/'.$tag['id'].'.json', array(), array(), $headers);
402
403 $this->assertEquals(200, $client->getResponse()->getStatusCode());
404
405 $content = json_decode($client->getResponse()->getContent(), true);
406
407 $this->assertArrayHasKey('label', $content);
408 $this->assertEquals($tag['label'], $content['label']);
409 }
410}
diff --git a/src/Wallabag/ApiBundle/WallabagApiBundle.php b/src/Wallabag/ApiBundle/WallabagApiBundle.php
new file mode 100644
index 00000000..2484f277
--- /dev/null
+++ b/src/Wallabag/ApiBundle/WallabagApiBundle.php
@@ -0,0 +1,18 @@
1<?php
2
3namespace Wallabag\ApiBundle;
4
5use Symfony\Component\HttpKernel\Bundle\Bundle;
6use Wallabag\ApiBundle\DependencyInjection\Security\Factory\WsseFactory;
7use Symfony\Component\DependencyInjection\ContainerBuilder;
8
9class WallabagApiBundle extends Bundle
10{
11 public function build(ContainerBuilder $container)
12 {
13 parent::build($container);
14
15 $extension = $container->getExtension('security');
16 $extension->addSecurityListenerFactory(new WsseFactory());
17 }
18}
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php
index 493842f7..491c67f9 100644
--- a/src/Wallabag/CoreBundle/Command/InstallCommand.php
+++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php
@@ -225,7 +225,7 @@ class InstallCommand extends ContainerAwareCommand
225 } 225 }
226 226
227 /** 227 /**
228 * Run a command 228 * Run a command.
229 * 229 *
230 * @param string $command 230 * @param string $command
231 * @param array $parameters Parameters to this command (usually 'force' => true) 231 * @param array $parameters Parameters to this command (usually 'force' => true)
@@ -266,9 +266,9 @@ class InstallCommand extends ContainerAwareCommand
266 } 266 }
267 267
268 /** 268 /**
269 * Check if the database already exists 269 * Check if the database already exists.
270 * 270 *
271 * @return boolean 271 * @return bool
272 */ 272 */
273 private function isDatabasePresent() 273 private function isDatabasePresent()
274 { 274 {
@@ -300,9 +300,9 @@ class InstallCommand extends ContainerAwareCommand
300 300
301 /** 301 /**
302 * Check if the schema is already created. 302 * Check if the schema is already created.
303 * If we found at least oen table, it means the schema exists 303 * If we found at least oen table, it means the schema exists.
304 * 304 *
305 * @return boolean 305 * @return bool
306 */ 306 */
307 private function isSchemaPresent() 307 private function isSchemaPresent()
308 { 308 {
diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php
index 898c291f..62ef3eea 100644
--- a/src/Wallabag/CoreBundle/Controller/ConfigController.php
+++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php
@@ -133,7 +133,7 @@ class ConfigController extends Controller
133 'rss' => array( 133 'rss' => array(
134 'username' => $user->getUsername(), 134 'username' => $user->getUsername(),
135 'token' => $config->getRssToken(), 135 'token' => $config->getRssToken(),
136 ) 136 ),
137 )); 137 ));
138 } 138 }
139 139
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php
index 8a8f3cd7..7fd982c9 100644
--- a/src/Wallabag/CoreBundle/Controller/EntryController.php
+++ b/src/Wallabag/CoreBundle/Controller/EntryController.php
@@ -50,7 +50,7 @@ class EntryController extends Controller
50 } 50 }
51 51
52 /** 52 /**
53 * Shows unread entries for current user 53 * Shows unread entries for current user.
54 * 54 *
55 * @Route("/unread", name="unread") 55 * @Route("/unread", name="unread")
56 * 56 *
@@ -70,7 +70,7 @@ class EntryController extends Controller
70 } 70 }
71 71
72 /** 72 /**
73 * Shows read entries for current user 73 * Shows read entries for current user.
74 * 74 *
75 * @Route("/archive", name="archive") 75 * @Route("/archive", name="archive")
76 * 76 *
@@ -90,7 +90,7 @@ class EntryController extends Controller
90 } 90 }
91 91
92 /** 92 /**
93 * Shows starred entries for current user 93 * Shows starred entries for current user.
94 * 94 *
95 * @Route("/starred", name="starred") 95 * @Route("/starred", name="starred")
96 * 96 *
@@ -110,7 +110,7 @@ class EntryController extends Controller
110 } 110 }
111 111
112 /** 112 /**
113 * Shows entry content 113 * Shows entry content.
114 * 114 *
115 * @param Entry $entry 115 * @param Entry $entry
116 * 116 *
@@ -129,7 +129,7 @@ class EntryController extends Controller
129 } 129 }
130 130
131 /** 131 /**
132 * Changes read status for an entry 132 * Changes read status for an entry.
133 * 133 *
134 * @param Request $request 134 * @param Request $request
135 * @param Entry $entry 135 * @param Entry $entry
@@ -154,7 +154,7 @@ class EntryController extends Controller
154 } 154 }
155 155
156 /** 156 /**
157 * Changes favorite status for an entry 157 * Changes favorite status for an entry.
158 * 158 *
159 * @param Request $request 159 * @param Request $request
160 * @param Entry $entry 160 * @param Entry $entry
@@ -179,7 +179,7 @@ class EntryController extends Controller
179 } 179 }
180 180
181 /** 181 /**
182 * Deletes entry 182 * Deletes entry.
183 * 183 *
184 * @param Request $request 184 * @param Request $request
185 * @param Entry $entry 185 * @param Entry $entry
@@ -205,7 +205,7 @@ class EntryController extends Controller
205 } 205 }
206 206
207 /** 207 /**
208 * Check if the logged user can manage the given entry 208 * Check if the logged user can manage the given entry.
209 * 209 *
210 * @param Entry $entry 210 * @param Entry $entry
211 */ 211 */
diff --git a/src/Wallabag/CoreBundle/Controller/RssController.php b/src/Wallabag/CoreBundle/Controller/RssController.php
index 14f1dcb2..86754e15 100644
--- a/src/Wallabag/CoreBundle/Controller/RssController.php
+++ b/src/Wallabag/CoreBundle/Controller/RssController.php
@@ -11,7 +11,7 @@ use Wallabag\CoreBundle\Entity\Entry;
11class RssController extends Controller 11class RssController extends Controller
12{ 12{
13 /** 13 /**
14 * Shows unread entries for current user 14 * Shows unread entries for current user.
15 * 15 *
16 * @Route("/{username}/{token}/unread.xml", name="unread_rss", defaults={"_format"="xml"}) 16 * @Route("/{username}/{token}/unread.xml", name="unread_rss", defaults={"_format"="xml"})
17 * @ParamConverter("user", class="WallabagCoreBundle:User", converter="username_rsstoken_converter") 17 * @ParamConverter("user", class="WallabagCoreBundle:User", converter="username_rsstoken_converter")
@@ -35,7 +35,7 @@ class RssController extends Controller
35 } 35 }
36 36
37 /** 37 /**
38 * Shows read entries for current user 38 * Shows read entries for current user.
39 * 39 *
40 * @Route("/{username}/{token}/archive.xml", name="archive_rss") 40 * @Route("/{username}/{token}/archive.xml", name="archive_rss")
41 * @ParamConverter("user", class="WallabagCoreBundle:User", converter="username_rsstoken_converter") 41 * @ParamConverter("user", class="WallabagCoreBundle:User", converter="username_rsstoken_converter")
@@ -59,7 +59,7 @@ class RssController extends Controller
59 } 59 }
60 60
61 /** 61 /**
62 * Shows starred entries for current user 62 * Shows starred entries for current user.
63 * 63 *
64 * @Route("/{username}/{token}/starred.xml", name="starred_rss") 64 * @Route("/{username}/{token}/starred.xml", name="starred_rss")
65 * @ParamConverter("user", class="WallabagCoreBundle:User", converter="username_rsstoken_converter") 65 * @ParamConverter("user", class="WallabagCoreBundle:User", converter="username_rsstoken_converter")
diff --git a/src/Wallabag/CoreBundle/Controller/SecurityController.php b/src/Wallabag/CoreBundle/Controller/SecurityController.php
index fe511db5..a61a898b 100644
--- a/src/Wallabag/CoreBundle/Controller/SecurityController.php
+++ b/src/Wallabag/CoreBundle/Controller/SecurityController.php
@@ -30,9 +30,10 @@ class SecurityController extends Controller
30 } 30 }
31 31
32 /** 32 /**
33 * Request forgot password: show form 33 * Request forgot password: show form.
34 * 34 *
35 * @Route("/forgot-password", name="forgot_password") 35 * @Route("/forgot-password", name="forgot_password")
36 *
36 * @Method({"GET", "POST"}) 37 * @Method({"GET", "POST"})
37 */ 38 */
38 public function forgotPasswordAction(Request $request) 39 public function forgotPasswordAction(Request $request)
@@ -73,9 +74,10 @@ class SecurityController extends Controller
73 } 74 }
74 75
75 /** 76 /**
76 * Tell the user to check his email provider 77 * Tell the user to check his email provider.
77 * 78 *
78 * @Route("/forgot-password/check-email", name="forgot_password_check_email") 79 * @Route("/forgot-password/check-email", name="forgot_password_check_email")
80 *
79 * @Method({"GET"}) 81 * @Method({"GET"})
80 */ 82 */
81 public function checkEmailAction(Request $request) 83 public function checkEmailAction(Request $request)
@@ -93,9 +95,10 @@ class SecurityController extends Controller
93 } 95 }
94 96
95 /** 97 /**
96 * Reset user password 98 * Reset user password.
97 * 99 *
98 * @Route("/forgot-password/{token}", name="forgot_password_reset") 100 * @Route("/forgot-password/{token}", name="forgot_password_reset")
101 *
99 * @Method({"GET", "POST"}) 102 * @Method({"GET", "POST"})
100 */ 103 */
101 public function resetAction(Request $request, $token) 104 public function resetAction(Request $request, $token)
diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php
index 54d0d6b6..547d6753 100644
--- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php
+++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadEntryData.php
@@ -39,9 +39,9 @@ class LoadEntryData extends AbstractFixture implements OrderedFixtureInterface
39 $entry3->setContent('This is my content /o/'); 39 $entry3->setContent('This is my content /o/');
40 40
41 $tag1 = new Tag($this->getReference('bob-user')); 41 $tag1 = new Tag($this->getReference('bob-user'));
42 $tag1->setLabel("foo"); 42 $tag1->setLabel('foo');
43 $tag2 = new Tag($this->getReference('bob-user')); 43 $tag2 = new Tag($this->getReference('bob-user'));
44 $tag2->setLabel("bar"); 44 $tag2->setLabel('bar');
45 45
46 $entry3->addTag($tag1); 46 $entry3->addTag($tag1);
47 $entry3->addTag($tag2); 47 $entry3->addTag($tag2);
@@ -56,9 +56,9 @@ class LoadEntryData extends AbstractFixture implements OrderedFixtureInterface
56 $entry4->setContent('This is my content /o/'); 56 $entry4->setContent('This is my content /o/');
57 57
58 $tag1 = new Tag($this->getReference('admin-user')); 58 $tag1 = new Tag($this->getReference('admin-user'));
59 $tag1->setLabel("foo"); 59 $tag1->setLabel('foo');
60 $tag2 = new Tag($this->getReference('admin-user')); 60 $tag2 = new Tag($this->getReference('admin-user'));
61 $tag2->setLabel("bar"); 61 $tag2->setLabel('bar');
62 62
63 $entry4->addTag($tag1); 63 $entry4->addTag($tag1);
64 $entry4->addTag($tag2); 64 $entry4->addTag($tag2);
diff --git a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php
index c6ecc99e..7493351b 100644
--- a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php
+++ b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php
@@ -3,15 +3,15 @@
3namespace Wallabag\CoreBundle\DependencyInjection; 3namespace Wallabag\CoreBundle\DependencyInjection;
4 4
5use Symfony\Component\DependencyInjection\ContainerBuilder; 5use Symfony\Component\DependencyInjection\ContainerBuilder;
6use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
7use Symfony\Component\HttpKernel\DependencyInjection\Extension;
8use Symfony\Component\Config\FileLocator; 6use Symfony\Component\Config\FileLocator;
7use Symfony\Component\HttpKernel\DependencyInjection\Extension;
8use Symfony\Component\DependencyInjection\Loader;
9 9
10class WallabagCoreExtension extends Extension 10class WallabagCoreExtension extends Extension
11{ 11{
12 public function load(array $configs, ContainerBuilder $container) 12 public function load(array $configs, ContainerBuilder $container)
13 { 13 {
14 $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); 14 $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
15 $loader->load('services.yml'); 15 $loader->load('services.yml');
16 } 16 }
17 17
diff --git a/src/Wallabag/CoreBundle/Doctrine/Mapping/PrefixedNamingStrategy.php b/src/Wallabag/CoreBundle/Doctrine/Mapping/PrefixedNamingStrategy.php
index 861a60ea..509348db 100644
--- a/src/Wallabag/CoreBundle/Doctrine/Mapping/PrefixedNamingStrategy.php
+++ b/src/Wallabag/CoreBundle/Doctrine/Mapping/PrefixedNamingStrategy.php
@@ -25,7 +25,7 @@ class PrefixedNamingStrategy implements NamingStrategy
25 */ 25 */
26 public function classToTableName($className) 26 public function classToTableName($className)
27 { 27 {
28 return strtolower($this->prefix . substr($className, strrpos($className, '\\') + 1)); 28 return strtolower($this->prefix.substr($className, strrpos($className, '\\') + 1));
29 } 29 }
30 30
31 /** 31 /**
@@ -49,7 +49,7 @@ class PrefixedNamingStrategy implements NamingStrategy
49 */ 49 */
50 public function joinColumnName($propertyName) 50 public function joinColumnName($propertyName)
51 { 51 {
52 return $propertyName . '_' . $this->referenceColumnName(); 52 return $propertyName.'_'.$this->referenceColumnName();
53 } 53 }
54 54
55 /** 55 /**
@@ -62,7 +62,7 @@ class PrefixedNamingStrategy implements NamingStrategy
62 // ie: not "wallabag_entry_wallabag_tag" but "wallabag_entry_tag" 62 // ie: not "wallabag_entry_wallabag_tag" but "wallabag_entry_tag"
63 $target = substr($targetEntity, strrpos($targetEntity, '\\') + 1); 63 $target = substr($targetEntity, strrpos($targetEntity, '\\') + 1);
64 64
65 return strtolower($this->classToTableName($sourceEntity) . '_' .$target); 65 return strtolower($this->classToTableName($sourceEntity).'_'.$target);
66 } 66 }
67 67
68 /** 68 /**
@@ -70,6 +70,14 @@ class PrefixedNamingStrategy implements NamingStrategy
70 */ 70 */
71 public function joinKeyColumnName($entityName, $referencedColumnName = null) 71 public function joinKeyColumnName($entityName, $referencedColumnName = null)
72 { 72 {
73 return strtolower($this->classToTableName($entityName) . '_' .($referencedColumnName ?: $this->referenceColumnName())); 73 return strtolower($this->classToTableName($entityName).'_'.($referencedColumnName ?: $this->referenceColumnName()));
74 }
75
76 /**
77 * {@inheritdoc}
78 */
79 public function embeddedFieldToColumnName($propertyName, $embeddedColumnName, $className = null, $embeddedClassName = null)
80 {
81 return $propertyName.'_'.$embeddedColumnName;
74 } 82 }
75} 83}
diff --git a/src/Wallabag/CoreBundle/Entity/Config.php b/src/Wallabag/CoreBundle/Entity/Config.php
index 62ea637e..025d94ef 100644
--- a/src/Wallabag/CoreBundle/Entity/Config.php
+++ b/src/Wallabag/CoreBundle/Entity/Config.php
@@ -6,7 +6,7 @@ use Doctrine\ORM\Mapping as ORM;
6use Symfony\Component\Validator\Constraints as Assert; 6use Symfony\Component\Validator\Constraints as Assert;
7 7
8/** 8/**
9 * Config 9 * Config.
10 * 10 *
11 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\ConfigRepository") 11 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\ConfigRepository")
12 * @ORM\Table 12 * @ORM\Table
@@ -15,7 +15,7 @@ use Symfony\Component\Validator\Constraints as Assert;
15class Config 15class Config
16{ 16{
17 /** 17 /**
18 * @var integer 18 * @var int
19 * 19 *
20 * @ORM\Column(name="id", type="integer") 20 * @ORM\Column(name="id", type="integer")
21 * @ORM\Id 21 * @ORM\Id
@@ -32,7 +32,7 @@ class Config
32 private $theme; 32 private $theme;
33 33
34 /** 34 /**
35 * @var integer 35 * @var int
36 * 36 *
37 * @Assert\NotBlank() 37 * @Assert\NotBlank()
38 * @Assert\Range( 38 * @Assert\Range(
@@ -60,7 +60,7 @@ class Config
60 private $rssToken; 60 private $rssToken;
61 61
62 /** 62 /**
63 * @var integer 63 * @var int
64 * 64 *
65 * @ORM\Column(name="rss_limit", type="integer", nullable=true) 65 * @ORM\Column(name="rss_limit", type="integer", nullable=true)
66 * @Assert\Range( 66 * @Assert\Range(
@@ -85,9 +85,9 @@ class Config
85 } 85 }
86 86
87 /** 87 /**
88 * Get id 88 * Get id.
89 * 89 *
90 * @return integer 90 * @return int
91 */ 91 */
92 public function getId() 92 public function getId()
93 { 93 {
@@ -95,9 +95,10 @@ class Config
95 } 95 }
96 96
97 /** 97 /**
98 * Set theme 98 * Set theme.
99 *
100 * @param string $theme
99 * 101 *
100 * @param string $theme
101 * @return Config 102 * @return Config
102 */ 103 */
103 public function setTheme($theme) 104 public function setTheme($theme)
@@ -108,7 +109,7 @@ class Config
108 } 109 }
109 110
110 /** 111 /**
111 * Get theme 112 * Get theme.
112 * 113 *
113 * @return string 114 * @return string
114 */ 115 */
@@ -118,9 +119,10 @@ class Config
118 } 119 }
119 120
120 /** 121 /**
121 * Set itemsPerPage 122 * Set itemsPerPage.
123 *
124 * @param int $itemsPerPage
122 * 125 *
123 * @param integer $itemsPerPage
124 * @return Config 126 * @return Config
125 */ 127 */
126 public function setItemsPerPage($itemsPerPage) 128 public function setItemsPerPage($itemsPerPage)
@@ -131,9 +133,9 @@ class Config
131 } 133 }
132 134
133 /** 135 /**
134 * Get itemsPerPage 136 * Get itemsPerPage.
135 * 137 *
136 * @return integer 138 * @return int
137 */ 139 */
138 public function getItemsPerPage() 140 public function getItemsPerPage()
139 { 141 {
@@ -141,9 +143,10 @@ class Config
141 } 143 }
142 144
143 /** 145 /**
144 * Set language 146 * Set language.
147 *
148 * @param string $language
145 * 149 *
146 * @param string $language
147 * @return Config 150 * @return Config
148 */ 151 */
149 public function setLanguage($language) 152 public function setLanguage($language)
@@ -154,7 +157,7 @@ class Config
154 } 157 }
155 158
156 /** 159 /**
157 * Get language 160 * Get language.
158 * 161 *
159 * @return string 162 * @return string
160 */ 163 */
@@ -164,9 +167,10 @@ class Config
164 } 167 }
165 168
166 /** 169 /**
167 * Set user 170 * Set user.
171 *
172 * @param \Wallabag\CoreBundle\Entity\User $user
168 * 173 *
169 * @param \Wallabag\CoreBundle\Entity\User $user
170 * @return Config 174 * @return Config
171 */ 175 */
172 public function setUser(\Wallabag\CoreBundle\Entity\User $user = null) 176 public function setUser(\Wallabag\CoreBundle\Entity\User $user = null)
@@ -177,7 +181,7 @@ class Config
177 } 181 }
178 182
179 /** 183 /**
180 * Get user 184 * Get user.
181 * 185 *
182 * @return \Wallabag\CoreBundle\Entity\User 186 * @return \Wallabag\CoreBundle\Entity\User
183 */ 187 */
@@ -187,9 +191,10 @@ class Config
187 } 191 }
188 192
189 /** 193 /**
190 * Set rssToken 194 * Set rssToken.
195 *
196 * @param string $rssToken
191 * 197 *
192 * @param string $rssToken
193 * @return Config 198 * @return Config
194 */ 199 */
195 public function setRssToken($rssToken) 200 public function setRssToken($rssToken)
@@ -200,7 +205,7 @@ class Config
200 } 205 }
201 206
202 /** 207 /**
203 * Get rssToken 208 * Get rssToken.
204 * 209 *
205 * @return string 210 * @return string
206 */ 211 */
@@ -210,9 +215,10 @@ class Config
210 } 215 }
211 216
212 /** 217 /**
213 * Set rssLimit 218 * Set rssLimit.
219 *
220 * @param string $rssLimit
214 * 221 *
215 * @param string $rssLimit
216 * @return Config 222 * @return Config
217 */ 223 */
218 public function setRssLimit($rssLimit) 224 public function setRssLimit($rssLimit)
@@ -223,7 +229,7 @@ class Config
223 } 229 }
224 230
225 /** 231 /**
226 * Get rssLimit 232 * Get rssLimit.
227 * 233 *
228 * @return string 234 * @return string
229 */ 235 */
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php
index 15af105d..b1998ab6 100644
--- a/src/Wallabag/CoreBundle/Entity/Entry.php
+++ b/src/Wallabag/CoreBundle/Entity/Entry.php
@@ -9,7 +9,7 @@ use Hateoas\Configuration\Annotation as Hateoas;
9use JMS\Serializer\Annotation\XmlRoot; 9use JMS\Serializer\Annotation\XmlRoot;
10 10
11/** 11/**
12 * Entry 12 * Entry.
13 * 13 *
14 * @XmlRoot("entry") 14 * @XmlRoot("entry")
15 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\EntryRepository") 15 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\EntryRepository")
@@ -21,7 +21,7 @@ class Entry
21{ 21{
22 /** @Serializer\XmlAttribute */ 22 /** @Serializer\XmlAttribute */
23 /** 23 /**
24 * @var integer 24 * @var int
25 * 25 *
26 * @ORM\Column(name="id", type="integer") 26 * @ORM\Column(name="id", type="integer")
27 * @ORM\Id 27 * @ORM\Id
@@ -45,14 +45,14 @@ class Entry
45 private $url; 45 private $url;
46 46
47 /** 47 /**
48 * @var boolean 48 * @var bool
49 * 49 *
50 * @ORM\Column(name="is_archived", type="boolean") 50 * @ORM\Column(name="is_archived", type="boolean")
51 */ 51 */
52 private $isArchived = false; 52 private $isArchived = false;
53 53
54 /** 54 /**
55 * @var boolean 55 * @var bool
56 * 56 *
57 * @ORM\Column(name="is_starred", type="boolean") 57 * @ORM\Column(name="is_starred", type="boolean")
58 */ 58 */
@@ -94,7 +94,7 @@ class Entry
94 private $mimetype; 94 private $mimetype;
95 95
96 /** 96 /**
97 * @var integer 97 * @var int
98 * 98 *
99 * @ORM\Column(name="reading_type", type="integer", nullable=true) 99 * @ORM\Column(name="reading_type", type="integer", nullable=true)
100 */ 100 */
@@ -108,7 +108,7 @@ class Entry
108 private $domainName; 108 private $domainName;
109 109
110 /** 110 /**
111 * @var boolean 111 * @var bool
112 * 112 *
113 * @ORM\Column(name="is_public", type="boolean", nullable=true, options={"default" = false}) 113 * @ORM\Column(name="is_public", type="boolean", nullable=true, options={"default" = false})
114 */ 114 */
@@ -135,9 +135,9 @@ class Entry
135 } 135 }
136 136
137 /** 137 /**
138 * Get id 138 * Get id.
139 * 139 *
140 * @return integer 140 * @return int
141 */ 141 */
142 public function getId() 142 public function getId()
143 { 143 {
@@ -145,9 +145,10 @@ class Entry
145 } 145 }
146 146
147 /** 147 /**
148 * Set title 148 * Set title.
149 *
150 * @param string $title
149 * 151 *
150 * @param string $title
151 * @return Entry 152 * @return Entry
152 */ 153 */
153 public function setTitle($title) 154 public function setTitle($title)
@@ -158,7 +159,7 @@ class Entry
158 } 159 }
159 160
160 /** 161 /**
161 * Get title 162 * Get title.
162 * 163 *
163 * @return string 164 * @return string
164 */ 165 */
@@ -168,9 +169,10 @@ class Entry
168 } 169 }
169 170
170 /** 171 /**
171 * Set url 172 * Set url.
173 *
174 * @param string $url
172 * 175 *
173 * @param string $url
174 * @return Entry 176 * @return Entry
175 */ 177 */
176 public function setUrl($url) 178 public function setUrl($url)
@@ -181,7 +183,7 @@ class Entry
181 } 183 }
182 184
183 /** 185 /**
184 * Get url 186 * Get url.
185 * 187 *
186 * @return string 188 * @return string
187 */ 189 */
@@ -191,9 +193,10 @@ class Entry
191 } 193 }
192 194
193 /** 195 /**
194 * Set isArchived 196 * Set isArchived.
197 *
198 * @param string $isArchived
195 * 199 *
196 * @param string $isArchived
197 * @return Entry 200 * @return Entry
198 */ 201 */
199 public function setArchived($isArchived) 202 public function setArchived($isArchived)
@@ -204,7 +207,7 @@ class Entry
204 } 207 }
205 208
206 /** 209 /**
207 * Get isArchived 210 * Get isArchived.
208 * 211 *
209 * @return string 212 * @return string
210 */ 213 */
@@ -221,9 +224,10 @@ class Entry
221 } 224 }
222 225
223 /** 226 /**
224 * Set isStarred 227 * Set isStarred.
228 *
229 * @param string $isStarred
225 * 230 *
226 * @param string $isStarred
227 * @return Entry 231 * @return Entry
228 */ 232 */
229 public function setStarred($isStarred) 233 public function setStarred($isStarred)
@@ -234,7 +238,7 @@ class Entry
234 } 238 }
235 239
236 /** 240 /**
237 * Get isStarred 241 * Get isStarred.
238 * 242 *
239 * @return string 243 * @return string
240 */ 244 */
@@ -251,9 +255,10 @@ class Entry
251 } 255 }
252 256
253 /** 257 /**
254 * Set content 258 * Set content.
259 *
260 * @param string $content
255 * 261 *
256 * @param string $content
257 * @return Entry 262 * @return Entry
258 */ 263 */
259 public function setContent($content) 264 public function setContent($content)
@@ -264,7 +269,7 @@ class Entry
264 } 269 }
265 270
266 /** 271 /**
267 * Get content 272 * Get content.
268 * 273 *
269 * @return string 274 * @return string
270 */ 275 */
@@ -375,7 +380,7 @@ class Entry
375 } 380 }
376 381
377 /** 382 /**
378 * @return boolean 383 * @return bool
379 */ 384 */
380 public function isPublic() 385 public function isPublic()
381 { 386 {
@@ -383,7 +388,7 @@ class Entry
383 } 388 }
384 389
385 /** 390 /**
386 * @param boolean $isPublic 391 * @param bool $isPublic
387 */ 392 */
388 public function setPublic($isPublic) 393 public function setPublic($isPublic)
389 { 394 {
diff --git a/src/Wallabag/CoreBundle/Entity/Tag.php b/src/Wallabag/CoreBundle/Entity/Tag.php
index 9d3c7a32..afe9e1b9 100644
--- a/src/Wallabag/CoreBundle/Entity/Tag.php
+++ b/src/Wallabag/CoreBundle/Entity/Tag.php
@@ -9,7 +9,7 @@ use JMS\Serializer\Annotation\Expose;
9use Doctrine\Common\Collections\ArrayCollection; 9use Doctrine\Common\Collections\ArrayCollection;
10 10
11/** 11/**
12 * Tag 12 * Tag.
13 * 13 *
14 * @XmlRoot("tag") 14 * @XmlRoot("tag")
15 * @ORM\Table 15 * @ORM\Table
@@ -19,7 +19,7 @@ use Doctrine\Common\Collections\ArrayCollection;
19class Tag 19class Tag
20{ 20{
21 /** 21 /**
22 * @var integer 22 * @var int
23 * 23 *
24 * @Expose 24 * @Expose
25 * @ORM\Column(name="id", type="integer") 25 * @ORM\Column(name="id", type="integer")
@@ -52,9 +52,9 @@ class Tag
52 $this->entries = new ArrayCollection(); 52 $this->entries = new ArrayCollection();
53 } 53 }
54 /** 54 /**
55 * Get id 55 * Get id.
56 * 56 *
57 * @return integer 57 * @return int
58 */ 58 */
59 public function getId() 59 public function getId()
60 { 60 {
@@ -62,9 +62,10 @@ class Tag
62 } 62 }
63 63
64 /** 64 /**
65 * Set label 65 * Set label.
66 *
67 * @param string $label
66 * 68 *
67 * @param string $label
68 * @return Tag 69 * @return Tag
69 */ 70 */
70 public function setLabel($label) 71 public function setLabel($label)
@@ -75,7 +76,7 @@ class Tag
75 } 76 }
76 77
77 /** 78 /**
78 * Get label 79 * Get label.
79 * 80 *
80 * @return string 81 * @return string
81 */ 82 */
diff --git a/src/Wallabag/CoreBundle/Entity/User.php b/src/Wallabag/CoreBundle/Entity/User.php
index ff08c8fb..00eb808a 100644
--- a/src/Wallabag/CoreBundle/Entity/User.php
+++ b/src/Wallabag/CoreBundle/Entity/User.php
@@ -12,7 +12,7 @@ use JMS\Serializer\Annotation\ExclusionPolicy;
12use JMS\Serializer\Annotation\Expose; 12use JMS\Serializer\Annotation\Expose;
13 13
14/** 14/**
15 * User 15 * User.
16 * 16 *
17 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\UserRepository") 17 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\UserRepository")
18 * @ORM\Table 18 * @ORM\Table
@@ -25,7 +25,7 @@ use JMS\Serializer\Annotation\Expose;
25class User implements AdvancedUserInterface, \Serializable 25class User implements AdvancedUserInterface, \Serializable
26{ 26{
27 /** 27 /**
28 * @var integer 28 * @var int
29 * 29 *
30 * @Expose 30 * @Expose
31 * @ORM\Column(name="id", type="integer") 31 * @ORM\Column(name="id", type="integer")
@@ -142,9 +142,9 @@ class User implements AdvancedUserInterface, \Serializable
142 } 142 }
143 143
144 /** 144 /**
145 * Get id 145 * Get id.
146 * 146 *
147 * @return integer 147 * @return int
148 */ 148 */
149 public function getId() 149 public function getId()
150 { 150 {
@@ -152,9 +152,10 @@ class User implements AdvancedUserInterface, \Serializable
152 } 152 }
153 153
154 /** 154 /**
155 * Set username 155 * Set username.
156 *
157 * @param string $username
156 * 158 *
157 * @param string $username
158 * @return User 159 * @return User
159 */ 160 */
160 public function setUsername($username) 161 public function setUsername($username)
@@ -165,7 +166,7 @@ class User implements AdvancedUserInterface, \Serializable
165 } 166 }
166 167
167 /** 168 /**
168 * Get username 169 * Get username.
169 * 170 *
170 * @return string 171 * @return string
171 */ 172 */
@@ -191,9 +192,10 @@ class User implements AdvancedUserInterface, \Serializable
191 } 192 }
192 193
193 /** 194 /**
194 * Set password 195 * Set password.
196 *
197 * @param string $password
195 * 198 *
196 * @param string $password
197 * @return User 199 * @return User
198 */ 200 */
199 public function setPassword($password) 201 public function setPassword($password)
@@ -208,7 +210,7 @@ class User implements AdvancedUserInterface, \Serializable
208 } 210 }
209 211
210 /** 212 /**
211 * Get password 213 * Get password.
212 * 214 *
213 * @return string 215 * @return string
214 */ 216 */
@@ -218,9 +220,10 @@ class User implements AdvancedUserInterface, \Serializable
218 } 220 }
219 221
220 /** 222 /**
221 * Set name 223 * Set name.
224 *
225 * @param string $name
222 * 226 *
223 * @param string $name
224 * @return User 227 * @return User
225 */ 228 */
226 public function setName($name) 229 public function setName($name)
@@ -231,7 +234,7 @@ class User implements AdvancedUserInterface, \Serializable
231 } 234 }
232 235
233 /** 236 /**
234 * Get name 237 * Get name.
235 * 238 *
236 * @return string 239 * @return string
237 */ 240 */
@@ -241,9 +244,10 @@ class User implements AdvancedUserInterface, \Serializable
241 } 244 }
242 245
243 /** 246 /**
244 * Set email 247 * Set email.
248 *
249 * @param string $email
245 * 250 *
246 * @param string $email
247 * @return User 251 * @return User
248 */ 252 */
249 public function setEmail($email) 253 public function setEmail($email)
@@ -254,7 +258,7 @@ class User implements AdvancedUserInterface, \Serializable
254 } 258 }
255 259
256 /** 260 /**
257 * Get email 261 * Get email.
258 * 262 *
259 * @return string 263 * @return string
260 */ 264 */
@@ -341,8 +345,7 @@ class User implements AdvancedUserInterface, \Serializable
341 public function unserialize($serialized) 345 public function unserialize($serialized)
342 { 346 {
343 list( 347 list(
344 $this->id, 348 $this->id) = unserialize($serialized);
345 ) = unserialize($serialized);
346 } 349 }
347 350
348 public function isEqualTo(UserInterface $user) 351 public function isEqualTo(UserInterface $user)
@@ -370,9 +373,10 @@ class User implements AdvancedUserInterface, \Serializable
370 return $this->isActive; 373 return $this->isActive;
371 } 374 }
372 /** 375 /**
373 * Set config 376 * Set config.
377 *
378 * @param \Wallabag\CoreBundle\Entity\Config $config
374 * 379 *
375 * @param \Wallabag\CoreBundle\Entity\Config $config
376 * @return User 380 * @return User
377 */ 381 */
378 public function setConfig(\Wallabag\CoreBundle\Entity\Config $config = null) 382 public function setConfig(\Wallabag\CoreBundle\Entity\Config $config = null)
@@ -383,7 +387,7 @@ class User implements AdvancedUserInterface, \Serializable
383 } 387 }
384 388
385 /** 389 /**
386 * Get config 390 * Get config.
387 * 391 *
388 * @return \Wallabag\CoreBundle\Entity\Config 392 * @return \Wallabag\CoreBundle\Entity\Config
389 */ 393 */
@@ -393,9 +397,10 @@ class User implements AdvancedUserInterface, \Serializable
393 } 397 }
394 398
395 /** 399 /**
396 * Set confirmationToken 400 * Set confirmationToken.
401 *
402 * @param string $confirmationToken
397 * 403 *
398 * @param string $confirmationToken
399 * @return User 404 * @return User
400 */ 405 */
401 public function setConfirmationToken($confirmationToken) 406 public function setConfirmationToken($confirmationToken)
@@ -406,7 +411,7 @@ class User implements AdvancedUserInterface, \Serializable
406 } 411 }
407 412
408 /** 413 /**
409 * Get confirmationToken 414 * Get confirmationToken.
410 * 415 *
411 * @return string 416 * @return string
412 */ 417 */
@@ -416,9 +421,10 @@ class User implements AdvancedUserInterface, \Serializable
416 } 421 }
417 422
418 /** 423 /**
419 * Set passwordRequestedAt 424 * Set passwordRequestedAt.
425 *
426 * @param \DateTime $passwordRequestedAt
420 * 427 *
421 * @param \DateTime $passwordRequestedAt
422 * @return User 428 * @return User
423 */ 429 */
424 public function setPasswordRequestedAt($passwordRequestedAt) 430 public function setPasswordRequestedAt($passwordRequestedAt)
@@ -429,7 +435,7 @@ class User implements AdvancedUserInterface, \Serializable
429 } 435 }
430 436
431 /** 437 /**
432 * Get passwordRequestedAt 438 * Get passwordRequestedAt.
433 * 439 *
434 * @return \DateTime 440 * @return \DateTime
435 */ 441 */
diff --git a/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php b/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php
index e141789f..b4224e3d 100644
--- a/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2
2namespace Wallabag\CoreBundle\Form\Type; 3namespace Wallabag\CoreBundle\Form\Type;
3 4
4use Symfony\Component\Form\AbstractType; 5use Symfony\Component\Form\AbstractType;
diff --git a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php
index 0fcf020a..d5890971 100644
--- a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2
2namespace Wallabag\CoreBundle\Form\Type; 3namespace Wallabag\CoreBundle\Form\Type;
3 4
4use Symfony\Component\Form\AbstractType; 5use Symfony\Component\Form\AbstractType;
diff --git a/src/Wallabag/CoreBundle/Form/Type/EntryType.php b/src/Wallabag/CoreBundle/Form/Type/EntryType.php
index 9a64def5..0532bf10 100644
--- a/src/Wallabag/CoreBundle/Form/Type/EntryType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/EntryType.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2
2namespace Wallabag\CoreBundle\Form\Type; 3namespace Wallabag\CoreBundle\Form\Type;
3 4
4use Symfony\Component\Form\AbstractType; 5use Symfony\Component\Form\AbstractType;
diff --git a/src/Wallabag/CoreBundle/Form/Type/ForgotPasswordType.php b/src/Wallabag/CoreBundle/Form/Type/ForgotPasswordType.php
index 4cc16a50..9e95eb47 100644
--- a/src/Wallabag/CoreBundle/Form/Type/ForgotPasswordType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/ForgotPasswordType.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2
2namespace Wallabag\CoreBundle\Form\Type; 3namespace Wallabag\CoreBundle\Form\Type;
3 4
4use Symfony\Component\Form\AbstractType; 5use Symfony\Component\Form\AbstractType;
diff --git a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php
index b7ebe8c2..a12fff2b 100644
--- a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2
2namespace Wallabag\CoreBundle\Form\Type; 3namespace Wallabag\CoreBundle\Form\Type;
3 4
4use Symfony\Component\Form\AbstractType; 5use Symfony\Component\Form\AbstractType;
diff --git a/src/Wallabag/CoreBundle/Form/Type/ResetPasswordType.php b/src/Wallabag/CoreBundle/Form/Type/ResetPasswordType.php
index 50ae800b..a5d683c4 100644
--- a/src/Wallabag/CoreBundle/Form/Type/ResetPasswordType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/ResetPasswordType.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2
2namespace Wallabag\CoreBundle\Form\Type; 3namespace Wallabag\CoreBundle\Form\Type;
3 4
4use Symfony\Component\Form\AbstractType; 5use Symfony\Component\Form\AbstractType;
diff --git a/src/Wallabag/CoreBundle/Form/Type/RssType.php b/src/Wallabag/CoreBundle/Form/Type/RssType.php
index a1ab990f..e14e84e1 100644
--- a/src/Wallabag/CoreBundle/Form/Type/RssType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/RssType.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2
2namespace Wallabag\CoreBundle\Form\Type; 3namespace Wallabag\CoreBundle\Form\Type;
3 4
4use Symfony\Component\Form\AbstractType; 5use Symfony\Component\Form\AbstractType;
diff --git a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php
index 3d6df510..f0367d14 100644
--- a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php
@@ -1,4 +1,5 @@
1<?php 1<?php
2
2namespace Wallabag\CoreBundle\Form\Type; 3namespace Wallabag\CoreBundle\Form\Type;
3 4
4use Symfony\Component\Form\AbstractType; 5use Symfony\Component\Form\AbstractType;
diff --git a/src/Wallabag/CoreBundle/Helper/Tools.php b/src/Wallabag/CoreBundle/Helper/Tools.php
index 0fd5f259..be29ab99 100755
--- a/src/Wallabag/CoreBundle/Helper/Tools.php
+++ b/src/Wallabag/CoreBundle/Helper/Tools.php
@@ -5,15 +5,16 @@ namespace Wallabag\CoreBundle\Helper;
5final class Tools 5final class Tools
6{ 6{
7 /** 7 /**
8 * Download a file (typically, for downloading pictures on web server) 8 * Download a file (typically, for downloading pictures on web server).
9 * 9 *
10 * @param $url 10 * @param $url
11 *
11 * @return bool|mixed|string 12 * @return bool|mixed|string
12 */ 13 */
13 public static function getFile($url) 14 public static function getFile($url)
14 { 15 {
15 $timeout = 15; 16 $timeout = 15;
16 $useragent = "Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101 Firefox/18.0"; 17 $useragent = 'Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101 Firefox/18.0';
17 18
18 if (in_array('curl', get_loaded_extensions())) { 19 if (in_array('curl', get_loaded_extensions())) {
19 # Fetch feed from URL 20 # Fetch feed from URL
@@ -32,7 +33,7 @@ final class Tools
32 33
33 # FeedBurner requires a proper USER-AGENT... 34 # FeedBurner requires a proper USER-AGENT...
34 curl_setopt($curl, CURL_HTTP_VERSION_1_1, true); 35 curl_setopt($curl, CURL_HTTP_VERSION_1_1, true);
35 curl_setopt($curl, CURLOPT_ENCODING, "gzip, deflate"); 36 curl_setopt($curl, CURLOPT_ENCODING, 'gzip, deflate');
36 curl_setopt($curl, CURLOPT_USERAGENT, $useragent); 37 curl_setopt($curl, CURLOPT_USERAGENT, $useragent);
37 38
38 $data = curl_exec($curl); 39 $data = curl_exec($curl);
@@ -45,7 +46,7 @@ final class Tools
45 array( 46 array(
46 'http' => array( 47 'http' => array(
47 'timeout' => $timeout, 48 'timeout' => $timeout,
48 'header' => "User-Agent: ".$useragent, 49 'header' => 'User-Agent: '.$useragent,
49 'follow_location' => true, 50 'follow_location' => true,
50 ), 51 ),
51 'ssl' => array( 52 'ssl' => array(
@@ -91,9 +92,10 @@ final class Tools
91 } 92 }
92 93
93 /** 94 /**
94 * Encode a URL by using a salt 95 * Encode a URL by using a salt.
95 * 96 *
96 * @param $string 97 * @param $string
98 *
97 * @return string 99 * @return string
98 */ 100 */
99 public static function encodeString($string) 101 public static function encodeString($string)
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
index a8c138a9..1335e808 100644
--- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
@@ -10,7 +10,7 @@ use Pagerfanta\Pagerfanta;
10class EntryRepository extends EntityRepository 10class EntryRepository extends EntityRepository
11{ 11{
12 /** 12 /**
13 * Retrieves unread entries for a user 13 * Retrieves unread entries for a user.
14 * 14 *
15 * @param int $userId 15 * @param int $userId
16 * @param int $firstResult 16 * @param int $firstResult
@@ -35,7 +35,7 @@ class EntryRepository extends EntityRepository
35 } 35 }
36 36
37 /** 37 /**
38 * Retrieves read entries for a user 38 * Retrieves read entries for a user.
39 * 39 *
40 * @param int $userId 40 * @param int $userId
41 * @param int $firstResult 41 * @param int $firstResult
@@ -61,7 +61,7 @@ class EntryRepository extends EntityRepository
61 } 61 }
62 62
63 /** 63 /**
64 * Retrieves starred entries for a user 64 * Retrieves starred entries for a user.
65 * 65 *
66 * @param int $userId 66 * @param int $userId
67 * @param int $firstResult 67 * @param int $firstResult
@@ -87,7 +87,7 @@ class EntryRepository extends EntityRepository
87 } 87 }
88 88
89 /** 89 /**
90 * Find Entries 90 * Find Entries.
91 * 91 *
92 * @param int $userId 92 * @param int $userId
93 * @param bool $isArchived 93 * @param bool $isArchived
diff --git a/src/Wallabag/CoreBundle/Repository/UserRepository.php b/src/Wallabag/CoreBundle/Repository/UserRepository.php
index aab3dedc..968d0b49 100644
--- a/src/Wallabag/CoreBundle/Repository/UserRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/UserRepository.php
@@ -7,7 +7,7 @@ use Doctrine\ORM\EntityRepository;
7class UserRepository extends EntityRepository 7class UserRepository extends EntityRepository
8{ 8{
9 /** 9 /**
10 * Find a user by its username and rss roken 10 * Find a user by its username and rss roken.
11 * 11 *
12 * @param string $username 12 * @param string $username
13 * @param string $rssToken 13 * @param string $rssToken
diff --git a/src/Wallabag/CoreBundle/Resources/config/routing_rest.yml b/src/Wallabag/CoreBundle/Resources/config/routing_rest.yml
deleted file mode 100644
index d3af6b72..00000000
--- a/src/Wallabag/CoreBundle/Resources/config/routing_rest.yml
+++ /dev/null
@@ -1,4 +0,0 @@
1entries:
2 type: rest
3 resource: "WallabagCoreBundle:WallabagRest"
4 name_prefix: api_
diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml
index cea6c0df..d8bd8d52 100644
--- a/src/Wallabag/CoreBundle/Resources/config/services.yml
+++ b/src/Wallabag/CoreBundle/Resources/config/services.yml
@@ -4,18 +4,6 @@ services:
4 tags: 4 tags:
5 - { name: twig.extension } 5 - { name: twig.extension }
6 6
7 wsse.security.authentication.provider:
8 class: Wallabag\CoreBundle\Security\Authentication\Provider\WsseProvider
9 public: false
10 arguments: ['', '%kernel.cache_dir%/security/nonces']
11
12 wsse.security.authentication.listener:
13 class: Wallabag\CoreBundle\Security\Firewall\WsseListener
14 public: false
15 tags:
16 - { name: monolog.logger, channel: wsse }
17 arguments: ['@security.context', '@security.authentication.manager', '@logger']
18
19 wallabag_core.helper.detect_active_theme: 7 wallabag_core.helper.detect_active_theme:
20 class: Wallabag\CoreBundle\Helper\DetectActiveTheme 8 class: Wallabag\CoreBundle\Helper\DetectActiveTheme
21 arguments: 9 arguments:
diff --git a/src/Wallabag/CoreBundle/Security/Authentication/Encoder/WallabagPasswordEncoder.php b/src/Wallabag/CoreBundle/Security/Authentication/Encoder/WallabagPasswordEncoder.php
index fcfe418b..e7c81fc0 100644
--- a/src/Wallabag/CoreBundle/Security/Authentication/Encoder/WallabagPasswordEncoder.php
+++ b/src/Wallabag/CoreBundle/Security/Authentication/Encoder/WallabagPasswordEncoder.php
@@ -7,8 +7,7 @@ use Symfony\Component\Security\Core\Exception\BadCredentialsException;
7 7
8/** 8/**
9 * This override just add en extra variable (username) to be able to salt the password 9 * This override just add en extra variable (username) to be able to salt the password
10 * the way Wallabag v1 does. It will avoid to break compatibility with Wallabag v1 10 * the way Wallabag v1 does. It will avoid to break compatibility with Wallabag v1.
11 *
12 */ 11 */
13class WallabagPasswordEncoder extends BasePasswordEncoder 12class WallabagPasswordEncoder extends BasePasswordEncoder
14{ 13{
diff --git a/src/Wallabag/CoreBundle/Security/Authentication/Provider/WallabagAuthenticationProvider.php b/src/Wallabag/CoreBundle/Security/Authentication/Provider/WallabagAuthenticationProvider.php
index 1c7c5fae..cf3cb051 100644
--- a/src/Wallabag/CoreBundle/Security/Authentication/Provider/WallabagAuthenticationProvider.php
+++ b/src/Wallabag/CoreBundle/Security/Authentication/Provider/WallabagAuthenticationProvider.php
@@ -45,7 +45,7 @@ class WallabagAuthenticationProvider extends UserAuthenticationProvider
45 throw new BadCredentialsException('The credentials were changed from another session.'); 45 throw new BadCredentialsException('The credentials were changed from another session.');
46 } 46 }
47 } else { 47 } else {
48 if ("" === ($presentedPassword = $token->getCredentials())) { 48 if ('' === ($presentedPassword = $token->getCredentials())) {
49 throw new BadCredentialsException('The presented password cannot be empty.'); 49 throw new BadCredentialsException('The presented password cannot be empty.');
50 } 50 }
51 51
diff --git a/src/Wallabag/CoreBundle/Service/Extractor.php b/src/Wallabag/CoreBundle/Service/Extractor.php
index e4ec96f6..6d43a1da 100644
--- a/src/Wallabag/CoreBundle/Service/Extractor.php
+++ b/src/Wallabag/CoreBundle/Service/Extractor.php
@@ -9,7 +9,7 @@ final class Extractor
9{ 9{
10 public static function extract($url) 10 public static function extract($url)
11 { 11 {
12 $pageContent = Extractor::getPageContent(new Url(base64_encode($url))); 12 $pageContent = self::getPageContent(new Url(base64_encode($url)));
13 $title = $pageContent['rss']['channel']['item']['title'] ?: 'Untitled'; 13 $title = $pageContent['rss']['channel']['item']['title'] ?: 'Untitled';
14 $body = $pageContent['rss']['channel']['item']['description']; 14 $body = $pageContent['rss']['channel']['item']['description'];
15 15
@@ -21,9 +21,10 @@ final class Extractor
21 } 21 }
22 22
23 /** 23 /**
24 * Get the content for a given URL (by a call to FullTextFeed) 24 * Get the content for a given URL (by a call to FullTextFeed).
25 *
26 * @param Url $url
25 * 27 *
26 * @param Url $url
27 * @return mixed 28 * @return mixed
28 */ 29 */
29 public static function getPageContent(Url $url) 30 public static function getPageContent(Url $url)
@@ -49,12 +50,12 @@ final class Extractor
49 $scope = function () { 50 $scope = function () {
50 extract(func_get_arg(1)); 51 extract(func_get_arg(1));
51 $_GET = $_REQUEST = array( 52 $_GET = $_REQUEST = array(
52 "url" => $url->getUrl(), 53 'url' => $url->getUrl(),
53 "max" => 5, 54 'max' => 5,
54 "links" => "preserve", 55 'links' => 'preserve',
55 "exc" => "", 56 'exc' => '',
56 "format" => "json", 57 'format' => 'json',
57 "submit" => "Create Feed", 58 'submit' => 'Create Feed',
58 ); 59 );
59 ob_start(); 60 ob_start();
60 require func_get_arg(0); 61 require func_get_arg(0);
@@ -67,11 +68,11 @@ final class Extractor
67 // Silence $scope function to avoid 68 // Silence $scope function to avoid
68 // issues with FTRSS when error_reporting is to high 69 // issues with FTRSS when error_reporting is to high
69 // FTRSS generates PHP warnings which break output 70 // FTRSS generates PHP warnings which break output
70 $json = @$scope(__DIR__."/../../../../vendor/wallabag/Fivefilters_Libraries/makefulltextfeed.php", array("url" => $url)); 71 $json = @$scope(__DIR__.'/../../../../vendor/wallabag/Fivefilters_Libraries/makefulltextfeed.php', array('url' => $url));
71 72
72 // Clearing and restoring context 73 // Clearing and restoring context
73 foreach ($GLOBALS as $key => $value) { 74 foreach ($GLOBALS as $key => $value) {
74 if ($key != "GLOBALS" && $key != "_SESSION") { 75 if ($key != 'GLOBALS' && $key != '_SESSION') {
75 unset($GLOBALS[$key]); 76 unset($GLOBALS[$key]);
76 } 77 }
77 } 78 }
diff --git a/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php b/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php
index f689b532..7a819953 100644
--- a/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php
@@ -2,7 +2,7 @@
2 2
3namespace Wallabag\CoreBundle\Tests\Command; 3namespace Wallabag\CoreBundle\Tests\Command;
4 4
5use Wallabag\CoreBundle\Tests\WallabagTestCase; 5use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
6use Wallabag\CoreBundle\Command\InstallCommand; 6use Wallabag\CoreBundle\Command\InstallCommand;
7use Wallabag\CoreBundle\Tests\Mock\InstallCommandMock; 7use Wallabag\CoreBundle\Tests\Mock\InstallCommandMock;
8use Symfony\Bundle\FrameworkBundle\Console\Application; 8use Symfony\Bundle\FrameworkBundle\Console\Application;
@@ -12,7 +12,7 @@ use Symfony\Component\Console\Output\NullOutput;
12use Doctrine\Bundle\DoctrineBundle\Command\DropDatabaseDoctrineCommand; 12use Doctrine\Bundle\DoctrineBundle\Command\DropDatabaseDoctrineCommand;
13use Doctrine\Bundle\DoctrineBundle\Command\CreateDatabaseDoctrineCommand; 13use Doctrine\Bundle\DoctrineBundle\Command\CreateDatabaseDoctrineCommand;
14 14
15class InstallCommandTest extends WallabagTestCase 15class InstallCommandTest extends WallabagCoreTestCase
16{ 16{
17 public static function tearDownAfterClass() 17 public static function tearDownAfterClass()
18 { 18 {
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php
index 5030bcbd..a0145780 100644
--- a/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php
@@ -2,9 +2,9 @@
2 2
3namespace Wallabag\CoreBundle\Tests\Controller; 3namespace Wallabag\CoreBundle\Tests\Controller;
4 4
5use Wallabag\CoreBundle\Tests\WallabagTestCase; 5use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
6 6
7class ConfigControllerTest extends WallabagTestCase 7class ConfigControllerTest extends WallabagCoreTestCase
8{ 8{
9 public function testLogin() 9 public function testLogin()
10 { 10 {
@@ -397,7 +397,7 @@ class ConfigControllerTest extends WallabagTestCase
397 ); 397 );
398 398
399 $this->assertEquals(200, $client->getResponse()->getStatusCode()); 399 $this->assertEquals(200, $client->getResponse()->getStatusCode());
400 $content = json_decode($client->getResponse()->getContent(), true);; 400 $content = json_decode($client->getResponse()->getContent(), true);
401 $this->assertArrayHasKey('token', $content); 401 $this->assertArrayHasKey('token', $content);
402 } 402 }
403 403
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
index 1a0d586c..8a7fdda2 100644
--- a/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php
@@ -2,10 +2,10 @@
2 2
3namespace Wallabag\CoreBundle\Tests\Controller; 3namespace Wallabag\CoreBundle\Tests\Controller;
4 4
5use Wallabag\CoreBundle\Tests\WallabagTestCase; 5use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
6use Doctrine\ORM\AbstractQuery; 6use Doctrine\ORM\AbstractQuery;
7 7
8class EntryControllerTest extends WallabagTestCase 8class EntryControllerTest extends WallabagCoreTestCase
9{ 9{
10 public function testLogin() 10 public function testLogin()
11 { 11 {
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/RssControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/RssControllerTest.php
index 8f627b4b..b7c162a7 100644
--- a/src/Wallabag/CoreBundle/Tests/Controller/RssControllerTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Controller/RssControllerTest.php
@@ -2,9 +2,9 @@
2 2
3namespace Wallabag\CoreBundle\Tests\Controller; 3namespace Wallabag\CoreBundle\Tests\Controller;
4 4
5use Wallabag\CoreBundle\Tests\WallabagTestCase; 5use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
6 6
7class RssControllerTest extends WallabagTestCase 7class RssControllerTest extends WallabagCoreTestCase
8{ 8{
9 public function validateDom($xml, $nb = null) 9 public function validateDom($xml, $nb = null)
10 { 10 {
@@ -36,13 +36,13 @@ class RssControllerTest extends WallabagTestCase
36 { 36 {
37 return array( 37 return array(
38 array( 38 array(
39 '/admin/YZIOAUZIAO/unread.xml' 39 '/admin/YZIOAUZIAO/unread.xml',
40 ), 40 ),
41 array( 41 array(
42 '/wallace/YZIOAUZIAO/starred.xml' 42 '/wallace/YZIOAUZIAO/starred.xml',
43 ), 43 ),
44 array( 44 array(
45 '/wallace/YZIOAUZIAO/archives.xml' 45 '/wallace/YZIOAUZIAO/archives.xml',
46 ), 46 ),
47 ); 47 );
48 } 48 }
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/SecurityControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/SecurityControllerTest.php
index 1dd05f89..e560ffdd 100644
--- a/src/Wallabag/CoreBundle/Tests/Controller/SecurityControllerTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Controller/SecurityControllerTest.php
@@ -2,11 +2,11 @@
2 2
3namespace Wallabag\CoreBundle\Tests\Controller; 3namespace Wallabag\CoreBundle\Tests\Controller;
4 4
5use Wallabag\CoreBundle\Tests\WallabagTestCase;
6use Symfony\Component\Filesystem\Filesystem; 5use Symfony\Component\Filesystem\Filesystem;
7use Symfony\Component\Finder\Finder; 6use Symfony\Component\Finder\Finder;
7use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
8 8
9class SecurityControllerTest extends WallabagTestCase 9class SecurityControllerTest extends WallabagCoreTestCase
10{ 10{
11 public function testLogin() 11 public function testLogin()
12 { 12 {
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php
deleted file mode 100644
index c9907065..00000000
--- a/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php
+++ /dev/null
@@ -1,214 +0,0 @@
1<?php
2
3namespace Wallabag\CoreBundle\Tests\Controller;
4
5use Wallabag\CoreBundle\Tests\WallabagTestCase;
6
7class WallabagRestControllerTest extends WallabagTestCase
8{
9 /**
10 * Generate HTTP headers for authenticate user on API
11 *
12 * @param $username
13 * @param $password
14 * @param $salt
15 *
16 * @return array
17 */
18 private function generateHeaders($username, $password, $salt)
19 {
20 $encryptedPassword = sha1($password.$username.$salt);
21 $nonce = substr(md5(uniqid('nonce_', true)), 0, 16);
22
23 $now = new \DateTime('now', new \DateTimeZone('UTC'));
24 $created = (string) $now->format('Y-m-d\TH:i:s\Z');
25 $digest = base64_encode(sha1(base64_decode($nonce).$created.$encryptedPassword, true));
26
27 return array(
28 'HTTP_AUTHORIZATION' => 'Authorization profile="UsernameToken"',
29 'HTTP_x-wsse' => 'X-WSSE: UsernameToken Username="'.$username.'", PasswordDigest="'.$digest.'", Nonce="'.$nonce.'", Created="'.$created.'"',
30 );
31 }
32
33 public function testGetSalt()
34 {
35 $client = $this->createClient();
36 $client->request('GET', '/api/salts/admin.json');
37 $this->assertEquals(200, $client->getResponse()->getStatusCode());
38 $this->assertNotEmpty(json_decode($client->getResponse()->getContent()));
39
40 $client->request('GET', '/api/salts/notfound.json');
41 $this->assertEquals(404, $client->getResponse()->getStatusCode());
42 }
43
44 public function testWithBadHeaders()
45 {
46 $client = $this->createClient();
47
48 $entry = $client->getContainer()
49 ->get('doctrine.orm.entity_manager')
50 ->getRepository('WallabagCoreBundle:Entry')
51 ->findOneByIsArchived(false);
52
53 if (!$entry) {
54 $this->markTestSkipped('No content found in db.');
55 }
56
57 $badHeaders = array(
58 'HTTP_AUTHORIZATION' => 'Authorization profile="UsernameToken"',
59 'HTTP_x-wsse' => 'X-WSSE: UsernameToken Username="admin", PasswordDigest="Wr0ngDig3st", Nonce="n0Nc3", Created="2015-01-01T13:37:00Z"',
60 );
61
62 $client->request('GET', '/api/entries/'.$entry->getId().'.json', array(), array(), $badHeaders);
63 $this->assertEquals(403, $client->getResponse()->getStatusCode());
64 }
65
66 public function testGetOneEntry()
67 {
68 $client = $this->createClient();
69 $client->request('GET', '/api/salts/admin.json');
70 $salt = json_decode($client->getResponse()->getContent());
71
72 $headers = $this->generateHeaders('admin', 'mypassword', $salt[0]);
73
74 $entry = $client->getContainer()
75 ->get('doctrine.orm.entity_manager')
76 ->getRepository('WallabagCoreBundle:Entry')
77 ->findOneByIsArchived(false);
78
79 if (!$entry) {
80 $this->markTestSkipped('No content found in db.');
81 }
82
83 $client->request('GET', '/api/entries/'.$entry->getId().'.json', array(), array(), $headers);
84 $this->assertContains($entry->getTitle(), $client->getResponse()->getContent());
85
86 $this->assertTrue(
87 $client->getResponse()->headers->contains(
88 'Content-Type',
89 'application/json'
90 )
91 );
92 }
93
94 public function testGetEntries()
95 {
96 $client = $this->createClient();
97 $client->request('GET', '/api/salts/admin.json');
98 $salt = json_decode($client->getResponse()->getContent());
99
100 $headers = $this->generateHeaders('admin', 'mypassword', $salt[0]);
101
102 $client->request('GET', '/api/entries', array(), array(), $headers);
103
104 $this->assertEquals(200, $client->getResponse()->getStatusCode());
105
106 $this->assertGreaterThanOrEqual(1, count(json_decode($client->getResponse()->getContent())));
107
108 $this->assertContains('Google', $client->getResponse()->getContent());
109
110 $this->assertTrue(
111 $client->getResponse()->headers->contains(
112 'Content-Type',
113 'application/json'
114 )
115 );
116 }
117
118 public function testDeleteEntry()
119 {
120 $client = $this->createClient();
121 $client->request('GET', '/api/salts/admin.json');
122 $salt = json_decode($client->getResponse()->getContent());
123
124 $headers = $this->generateHeaders('admin', 'mypassword', $salt[0]);
125
126 $entry = $client->getContainer()
127 ->get('doctrine.orm.entity_manager')
128 ->getRepository('WallabagCoreBundle:Entry')
129 ->findOneByUser(1);
130
131 if (!$entry) {
132 $this->markTestSkipped('No content found in db.');
133 }
134
135 $client->request('DELETE', '/api/entries/'.$entry->getId().'.json', array(), array(), $headers);
136
137 $this->assertEquals(200, $client->getResponse()->getStatusCode());
138
139 // We'll try to delete this entry again
140 $client->request('GET', '/api/salts/admin.json');
141 $salt = json_decode($client->getResponse()->getContent());
142
143 $headers = $this->generateHeaders('admin', 'mypassword', $salt[0]);
144
145 $client->request('DELETE', '/api/entries/'.$entry->getId().'.json', array(), array(), $headers);
146
147 $this->assertEquals(404, $client->getResponse()->getStatusCode());
148 }
149
150 public function testGetTagsEntry()
151 {
152 $client = $this->createClient();
153 $client->request('GET', '/api/salts/admin.json');
154 $salt = json_decode($client->getResponse()->getContent());
155 $headers = $this->generateHeaders('admin', 'mypassword', $salt[0]);
156
157 $entry = $client->getContainer()
158 ->get('doctrine.orm.entity_manager')
159 ->getRepository('WallabagCoreBundle:Entry')
160 ->findOneWithTags(1);
161
162 $entry = $entry[0];
163
164 if (!$entry) {
165 $this->markTestSkipped('No content found in db.');
166 }
167
168 $tags = array();
169 foreach ($entry->getTags() as $tag) {
170 $tags[] = array('id' => $tag->getId(), 'label' => $tag->getLabel());
171 }
172
173 $client->request('GET', '/api/entries/'.$entry->getId().'/tags', array(), array(), $headers);
174
175 $this->assertEquals(json_encode($tags, JSON_HEX_QUOT), $client->getResponse()->getContent());
176 }
177
178 public function testPostTagsOnEntry()
179 {
180 $client = $this->createClient();
181 $client->request('GET', '/api/salts/admin.json');
182 $salt = json_decode($client->getResponse()->getContent());
183 $headers = $this->generateHeaders('admin', 'mypassword', $salt[0]);
184
185 $entry = $client->getContainer()
186 ->get('doctrine.orm.entity_manager')
187 ->getRepository('WallabagCoreBundle:Entry')
188 ->findOneByUser(1);
189
190 if (!$entry) {
191 $this->markTestSkipped('No content found in db.');
192 }
193
194 $newTags = 'tag1,tag2,tag3';
195
196 $client->request('POST', '/api/entries/'.$entry->getId().'/tags', array('tags' => $newTags), array(), $headers);
197
198 $this->assertEquals(200, $client->getResponse()->getStatusCode());
199
200 $entryDB = $client->getContainer()
201 ->get('doctrine.orm.entity_manager')
202 ->getRepository('WallabagCoreBundle:Entry')
203 ->find($entry->getId());
204
205 $tagsInDB = array();
206 foreach ($entryDB->getTags()->toArray() as $tag) {
207 $tagsInDB[$tag->getId()] = $tag->getLabel();
208 }
209
210 foreach (explode(',', $newTags) as $tag) {
211 $this->assertContains($tag, $tagsInDB);
212 }
213 }
214}
diff --git a/src/Wallabag/CoreBundle/Tests/WallabagTestCase.php b/src/Wallabag/CoreBundle/Tests/WallabagCoreTestCase.php
index 22016d8e..e5096528 100644
--- a/src/Wallabag/CoreBundle/Tests/WallabagTestCase.php
+++ b/src/Wallabag/CoreBundle/Tests/WallabagCoreTestCase.php
@@ -4,7 +4,7 @@ namespace Wallabag\CoreBundle\Tests;
4 4
5use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; 5use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
6 6
7abstract class WallabagTestCase extends WebTestCase 7abstract class WallabagCoreTestCase extends WebTestCase
8{ 8{
9 private $client = null; 9 private $client = null;
10 10
diff --git a/src/Wallabag/CoreBundle/Tools/Utils.php b/src/Wallabag/CoreBundle/Tools/Utils.php
index de97c796..7e2968e7 100644
--- a/src/Wallabag/CoreBundle/Tools/Utils.php
+++ b/src/Wallabag/CoreBundle/Tools/Utils.php
@@ -5,7 +5,7 @@ namespace Wallabag\CoreBundle\Tools;
5class Utils 5class Utils
6{ 6{
7 /** 7 /**
8 * Generate a token used for RSS 8 * Generate a token used for RSS.
9 * 9 *
10 * @return string 10 * @return string
11 */ 11 */
@@ -22,6 +22,7 @@ class Utils
22 $token = substr(base64_encode(uniqid(mt_rand(), true)), 0, 20); 22 $token = substr(base64_encode(uniqid(mt_rand(), true)), 0, 20);
23 } 23 }
24 24
25 return str_replace('+', '', $token); 25 // remove character which can broken the url
26 return str_replace(array('+', '/'), '', $token);
26 } 27 }
27} 28}
diff --git a/src/Wallabag/CoreBundle/Twig/Extension/WallabagExtension.php b/src/Wallabag/CoreBundle/Twig/Extension/WallabagExtension.php
index 92406865..18388948 100644
--- a/src/Wallabag/CoreBundle/Twig/Extension/WallabagExtension.php
+++ b/src/Wallabag/CoreBundle/Twig/Extension/WallabagExtension.php
@@ -13,9 +13,10 @@ class WallabagExtension extends \Twig_Extension
13 } 13 }
14 14
15 /** 15 /**
16 * Returns the domain name for a URL 16 * Returns the domain name for a URL.
17 * 17 *
18 * @param $url 18 * @param $url
19 *
19 * @return string 20 * @return string
20 */ 21 */
21 public static function getDomainName($url) 22 public static function getDomainName($url)
@@ -24,9 +25,10 @@ class WallabagExtension extends \Twig_Extension
24 } 25 }
25 26
26 /** 27 /**
27 * For a given text, we calculate reading time for an article 28 * For a given text, we calculate reading time for an article.
28 * 29 *
29 * @param $text 30 * @param $text
31 *
30 * @return float 32 * @return float
31 */ 33 */
32 public static function getReadingTime($text) 34 public static function getReadingTime($text)
diff --git a/src/Wallabag/CoreBundle/WallabagCoreBundle.php b/src/Wallabag/CoreBundle/WallabagCoreBundle.php
index 1deab03a..f5899e39 100644
--- a/src/Wallabag/CoreBundle/WallabagCoreBundle.php
+++ b/src/Wallabag/CoreBundle/WallabagCoreBundle.php
@@ -3,16 +3,7 @@
3namespace Wallabag\CoreBundle; 3namespace Wallabag\CoreBundle;
4 4
5use Symfony\Component\HttpKernel\Bundle\Bundle; 5use Symfony\Component\HttpKernel\Bundle\Bundle;
6use Wallabag\CoreBundle\DependencyInjection\Security\Factory\WsseFactory;
7use Symfony\Component\DependencyInjection\ContainerBuilder;
8 6
9class WallabagCoreBundle extends Bundle 7class WallabagCoreBundle extends Bundle
10{ 8{
11 public function build(ContainerBuilder $container)
12 {
13 parent::build($container);
14
15 $extension = $container->getExtension('security');
16 $extension->addSecurityListenerFactory(new WsseFactory());
17 }
18} 9}