aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ApiBundle/Entity
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-10-08 00:02:22 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-10-08 00:05:41 +0200
commitee32248f43baef7e995c9e420cd00a137e626cf0 (patch)
treee8119e417887b3132bc7c448a7591943c90dcab2 /src/Wallabag/ApiBundle/Entity
parentb0da721a5238ece3056ae7af760e9455f7af3e11 (diff)
downloadwallabag-ee32248f43baef7e995c9e420cd00a137e626cf0.tar.gz
wallabag-ee32248f43baef7e995c9e420cd00a137e626cf0.tar.zst
wallabag-ee32248f43baef7e995c9e420cd00a137e626cf0.zip
Ensure access_token are removed
When we remove the client, we should ensure that access_token are also removed. To ensure that, I created a test that generated an access_token. So when we remove the client, this association should be cascaded and shouldn’t generate an error. Also I moved some Api related stuff to the ApiBundle (like the developer controler and ClientType form)
Diffstat (limited to 'src/Wallabag/ApiBundle/Entity')
-rw-r--r--src/Wallabag/ApiBundle/Entity/Client.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Wallabag/ApiBundle/Entity/Client.php b/src/Wallabag/ApiBundle/Entity/Client.php
index 92b2f762..f7898ac8 100644
--- a/src/Wallabag/ApiBundle/Entity/Client.php
+++ b/src/Wallabag/ApiBundle/Entity/Client.php
@@ -30,6 +30,11 @@ class Client extends BaseClient
30 */ 30 */
31 protected $refreshTokens; 31 protected $refreshTokens;
32 32
33 /**
34 * @ORM\OneToMany(targetEntity="AccessToken", mappedBy="client", cascade={"remove"})
35 */
36 protected $accessTokens;
37
33 public function __construct() 38 public function __construct()
34 { 39 {
35 parent::__construct(); 40 parent::__construct();