aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--app/DoctrineMigrations/Version20190510141130.php24
-rw-r--r--composer.json2
-rw-r--r--composer.lock115
-rw-r--r--src/Wallabag/CoreBundle/Controller/FeedController.php2
-rw-r--r--src/Wallabag/CoreBundle/Twig/WallabagExtension.php23
-rw-r--r--src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php17
-rw-r--r--tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php4
-rw-r--r--tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php4
8 files changed, 104 insertions, 87 deletions
diff --git a/app/DoctrineMigrations/Version20190510141130.php b/app/DoctrineMigrations/Version20190510141130.php
index 524aa452..3c504e8a 100644
--- a/app/DoctrineMigrations/Version20190510141130.php
+++ b/app/DoctrineMigrations/Version20190510141130.php
@@ -24,7 +24,7 @@ final class Version20190510141130 extends WallabagMigration
24 $this->addSql('DROP INDEX UNIQ_368A42095F37A13B'); 24 $this->addSql('DROP INDEX UNIQ_368A42095F37A13B');
25 $this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('oauth2_access_tokens', true) . ' AS SELECT id, client_id, user_id, token, expires_at, scope FROM ' . $this->getTable('oauth2_access_tokens', true)); 25 $this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('oauth2_access_tokens', true) . ' AS SELECT id, client_id, user_id, token, expires_at, scope FROM ' . $this->getTable('oauth2_access_tokens', true));
26 $this->addSql('DROP TABLE ' . $this->getTable('oauth2_access_tokens', true)); 26 $this->addSql('DROP TABLE ' . $this->getTable('oauth2_access_tokens', true));
27 $this->addSql('CREATE TABLE ' . $this->getTable('oauth2_access_tokens', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, client_id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, expires_at INTEGER DEFAULT NULL, token VARCHAR(191) NOT NULL, scope VARCHAR(191) NULL, CONSTRAINT FK_368A420919EB6921 FOREIGN KEY (client_id) REFERENCES ' . $this->getTable('oauth2_clients', true) . ' (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)'); 27 $this->addSql('CREATE TABLE ' . $this->getTable('oauth2_access_tokens', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, client_id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, expires_at INTEGER DEFAULT NULL, token VARCHAR(191) NOT NULL, scope VARCHAR(191) NULL, CONSTRAINT FK_368A420919EB6921 FOREIGN KEY (client_id) REFERENCES ' . $this->getTable('oauth2_clients', true) . ' (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES "' . $this->getTable('oauth2_clients', true) . '" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)');
28 $this->addSql('INSERT INTO ' . $this->getTable('oauth2_access_tokens', true) . ' (id, client_id, user_id, token, expires_at, scope) SELECT id, client_id, user_id, token, expires_at, scope FROM __temp__' . $this->getTable('oauth2_access_tokens', true)); 28 $this->addSql('INSERT INTO ' . $this->getTable('oauth2_access_tokens', true) . ' (id, client_id, user_id, token, expires_at, scope) SELECT id, client_id, user_id, token, expires_at, scope FROM __temp__' . $this->getTable('oauth2_access_tokens', true));
29 $this->addSql('DROP TABLE __temp__' . $this->getTable('oauth2_access_tokens', true)); 29 $this->addSql('DROP TABLE __temp__' . $this->getTable('oauth2_access_tokens', true));
30 $this->addSql('CREATE INDEX IDX_368A4209A76ED395 ON ' . $this->getTable('oauth2_access_tokens', true) . ' (user_id)'); 30 $this->addSql('CREATE INDEX IDX_368A4209A76ED395 ON ' . $this->getTable('oauth2_access_tokens', true) . ' (user_id)');
@@ -33,7 +33,7 @@ final class Version20190510141130 extends WallabagMigration
33 $this->addSql('DROP INDEX IDX_635D765EA76ED395'); 33 $this->addSql('DROP INDEX IDX_635D765EA76ED395');
34 $this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('oauth2_clients', true) . ' AS SELECT id, user_id, random_id, secret, redirect_uris, allowed_grant_types, name FROM ' . $this->getTable('oauth2_clients', true)); 34 $this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('oauth2_clients', true) . ' AS SELECT id, user_id, random_id, secret, redirect_uris, allowed_grant_types, name FROM ' . $this->getTable('oauth2_clients', true));
35 $this->addSql('DROP TABLE ' . $this->getTable('oauth2_clients', true)); 35 $this->addSql('DROP TABLE ' . $this->getTable('oauth2_clients', true));
36 $this->addSql('CREATE TABLE ' . $this->getTable('oauth2_clients', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, random_id VARCHAR(255) NOT NULL COLLATE BINARY, secret VARCHAR(255) NOT NULL COLLATE BINARY, name CLOB NOT NULL COLLATE BINARY, redirect_uris CLOB NOT NULL, allowed_grant_types CLOB NOT NULL, CONSTRAINT FK_635D765EA76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE)'); 36 $this->addSql('CREATE TABLE ' . $this->getTable('oauth2_clients', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, random_id VARCHAR(255) NOT NULL COLLATE BINARY, secret VARCHAR(255) NOT NULL COLLATE BINARY, name CLOB NOT NULL COLLATE BINARY, redirect_uris CLOB NOT NULL, allowed_grant_types CLOB NOT NULL, CONSTRAINT FK_635D765EA76ED395 FOREIGN KEY (user_id) REFERENCES "' . $this->getTable('oauth2_clients', true) . '" (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
37 $this->addSql('INSERT INTO ' . $this->getTable('oauth2_clients', true) . ' (id, user_id, random_id, secret, redirect_uris, allowed_grant_types, name) SELECT id, user_id, random_id, secret, redirect_uris, allowed_grant_types, name FROM __temp__' . $this->getTable('oauth2_clients', true)); 37 $this->addSql('INSERT INTO ' . $this->getTable('oauth2_clients', true) . ' (id, user_id, random_id, secret, redirect_uris, allowed_grant_types, name) SELECT id, user_id, random_id, secret, redirect_uris, allowed_grant_types, name FROM __temp__' . $this->getTable('oauth2_clients', true));
38 $this->addSql('DROP TABLE __temp__' . $this->getTable('oauth2_clients', true)); 38 $this->addSql('DROP TABLE __temp__' . $this->getTable('oauth2_clients', true));
39 $this->addSql('CREATE INDEX IDX_635D765EA76ED395 ON ' . $this->getTable('oauth2_clients', true) . ' (user_id)'); 39 $this->addSql('CREATE INDEX IDX_635D765EA76ED395 ON ' . $this->getTable('oauth2_clients', true) . ' (user_id)');
@@ -43,7 +43,7 @@ final class Version20190510141130 extends WallabagMigration
43 $this->addSql('DROP INDEX UNIQ_20C9FB245F37A13B'); 43 $this->addSql('DROP INDEX UNIQ_20C9FB245F37A13B');
44 $this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('oauth2_refresh_tokens', true) . ' AS SELECT id, client_id, user_id, token, expires_at, scope FROM ' . $this->getTable('oauth2_refresh_tokens', true)); 44 $this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('oauth2_refresh_tokens', true) . ' AS SELECT id, client_id, user_id, token, expires_at, scope FROM ' . $this->getTable('oauth2_refresh_tokens', true));
45 $this->addSql('DROP TABLE ' . $this->getTable('oauth2_refresh_tokens', true)); 45 $this->addSql('DROP TABLE ' . $this->getTable('oauth2_refresh_tokens', true));
46 $this->addSql('CREATE TABLE ' . $this->getTable('oauth2_refresh_tokens', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, client_id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, expires_at INTEGER DEFAULT NULL, token VARCHAR(191) NOT NULL, scope VARCHAR(191) NULL, CONSTRAINT FK_20C9FB2419EB6921 FOREIGN KEY (client_id) REFERENCES ' . $this->getTable('oauth2_clients', true) . ' (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)'); 46 $this->addSql('CREATE TABLE ' . $this->getTable('oauth2_refresh_tokens', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, client_id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, expires_at INTEGER DEFAULT NULL, token VARCHAR(191) NOT NULL, scope VARCHAR(191) NULL, CONSTRAINT FK_20C9FB2419EB6921 FOREIGN KEY (client_id) REFERENCES ' . $this->getTable('oauth2_clients', true) . ' (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES "' . $this->getTable('oauth2_clients', true) . '" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)');
47 $this->addSql('INSERT INTO ' . $this->getTable('oauth2_refresh_tokens', true) . ' (id, client_id, user_id, token, expires_at, scope) SELECT id, client_id, user_id, token, expires_at, scope FROM __temp__' . $this->getTable('oauth2_refresh_tokens', true)); 47 $this->addSql('INSERT INTO ' . $this->getTable('oauth2_refresh_tokens', true) . ' (id, client_id, user_id, token, expires_at, scope) SELECT id, client_id, user_id, token, expires_at, scope FROM __temp__' . $this->getTable('oauth2_refresh_tokens', true));
48 $this->addSql('DROP TABLE __temp__' . $this->getTable('oauth2_refresh_tokens', true)); 48 $this->addSql('DROP TABLE __temp__' . $this->getTable('oauth2_refresh_tokens', true));
49 $this->addSql('CREATE INDEX IDX_20C9FB24A76ED395 ON ' . $this->getTable('oauth2_refresh_tokens', true) . ' (user_id)'); 49 $this->addSql('CREATE INDEX IDX_20C9FB24A76ED395 ON ' . $this->getTable('oauth2_refresh_tokens', true) . ' (user_id)');
@@ -54,7 +54,7 @@ final class Version20190510141130 extends WallabagMigration
54 $this->addSql('DROP INDEX UNIQ_EE52E3FA5F37A13B'); 54 $this->addSql('DROP INDEX UNIQ_EE52E3FA5F37A13B');
55 $this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('oauth2_auth_codes', true) . ' AS SELECT id, client_id, user_id, token, redirect_uri, expires_at, scope FROM ' . $this->getTable('oauth2_auth_codes', true)); 55 $this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('oauth2_auth_codes', true) . ' AS SELECT id, client_id, user_id, token, redirect_uri, expires_at, scope FROM ' . $this->getTable('oauth2_auth_codes', true));
56 $this->addSql('DROP TABLE ' . $this->getTable('oauth2_auth_codes', true)); 56 $this->addSql('DROP TABLE ' . $this->getTable('oauth2_auth_codes', true));
57 $this->addSql('CREATE TABLE ' . $this->getTable('oauth2_auth_codes', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, client_id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, redirect_uri CLOB NOT NULL COLLATE BINARY, expires_at INTEGER DEFAULT NULL, token VARCHAR(191) NOT NULL, scope VARCHAR(191) NULL, CONSTRAINT FK_EE52E3FA19EB6921 FOREIGN KEY (client_id) REFERENCES ' . $this->getTable('oauth2_clients', true) . ' (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)'); 57 $this->addSql('CREATE TABLE ' . $this->getTable('oauth2_auth_codes', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, client_id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, redirect_uri CLOB NOT NULL COLLATE BINARY, expires_at INTEGER DEFAULT NULL, token VARCHAR(191) NOT NULL, scope VARCHAR(191) NULL, CONSTRAINT FK_EE52E3FA19EB6921 FOREIGN KEY (client_id) REFERENCES ' . $this->getTable('oauth2_clients', true) . ' (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES "' . $this->getTable('oauth2_clients', true) . '" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)');
58 $this->addSql('INSERT INTO ' . $this->getTable('oauth2_auth_codes', true) . ' (id, client_id, user_id, token, redirect_uri, expires_at, scope) SELECT id, client_id, user_id, token, redirect_uri, expires_at, scope FROM __temp__' . $this->getTable('oauth2_auth_codes', true)); 58 $this->addSql('INSERT INTO ' . $this->getTable('oauth2_auth_codes', true) . ' (id, client_id, user_id, token, redirect_uri, expires_at, scope) SELECT id, client_id, user_id, token, redirect_uri, expires_at, scope FROM __temp__' . $this->getTable('oauth2_auth_codes', true));
59 $this->addSql('DROP TABLE __temp__' . $this->getTable('oauth2_auth_codes', true)); 59 $this->addSql('DROP TABLE __temp__' . $this->getTable('oauth2_auth_codes', true));
60 $this->addSql('CREATE INDEX IDX_EE52E3FAA76ED395 ON ' . $this->getTable('oauth2_auth_codes', true) . ' (user_id)'); 60 $this->addSql('CREATE INDEX IDX_EE52E3FAA76ED395 ON ' . $this->getTable('oauth2_auth_codes', true) . ' (user_id)');
@@ -62,29 +62,29 @@ final class Version20190510141130 extends WallabagMigration
62 break; 62 break;
63 case 'mysql': 63 case 'mysql':
64 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' DROP FOREIGN KEY FK_368A4209A76ED395'); 64 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' DROP FOREIGN KEY FK_368A4209A76ED395');
65 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES `wallabag_user` (id) ON DELETE CASCADE'); 65 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE');
66 66
67 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_clients') . ' DROP FOREIGN KEY IDX_user_oauth_client'); 67 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_clients') . ' DROP FOREIGN KEY IDX_user_oauth_client');
68 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_clients') . ' ADD CONSTRAINT FK_635D765EA76ED395 FOREIGN KEY (user_id) REFERENCES `wallabag_user` (id)'); 68 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_clients') . ' ADD CONSTRAINT FK_635D765EA76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id)');
69 69
70 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' DROP FOREIGN KEY FK_20C9FB24A76ED395'); 70 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' DROP FOREIGN KEY FK_20C9FB24A76ED395');
71 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' ADD CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES `wallabag_user` (id) ON DELETE CASCADE'); 71 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' ADD CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE');
72 72
73 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' DROP FOREIGN KEY FK_EE52E3FAA76ED395'); 73 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' DROP FOREIGN KEY FK_EE52E3FAA76ED395');
74 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' ADD CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES `wallabag_user` (id) ON DELETE CASCADE'); 74 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' ADD CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE');
75 break; 75 break;
76 case 'postgresql': 76 case 'postgresql':
77 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' DROP CONSTRAINT FK_368A4209A76ED395'); 77 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' DROP CONSTRAINT FK_368A4209A76ED395');
78 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); 78 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
79 79
80 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_clients') . ' DROP CONSTRAINT idx_user_oauth_client'); 80 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_clients') . ' DROP CONSTRAINT idx_user_oauth_client');
81 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_clients') . ' ADD CONSTRAINT FK_635D765EA76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); 81 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_clients') . ' ADD CONSTRAINT FK_635D765EA76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
82 82
83 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' DROP CONSTRAINT FK_20C9FB24A76ED395'); 83 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' DROP CONSTRAINT FK_20C9FB24A76ED395');
84 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' ADD CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); 84 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' ADD CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
85 85
86 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' DROP CONSTRAINT FK_EE52E3FAA76ED395'); 86 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' DROP CONSTRAINT FK_EE52E3FAA76ED395');
87 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' ADD CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); 87 $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' ADD CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
88 break; 88 break;
89 } 89 }
90 } 90 }
diff --git a/composer.json b/composer.json
index 44ac3474..46dc409b 100644
--- a/composer.json
+++ b/composer.json
@@ -78,7 +78,7 @@
78 "guzzlehttp/guzzle": "^5.3.1", 78 "guzzlehttp/guzzle": "^5.3.1",
79 "doctrine/doctrine-migrations-bundle": "^1.3", 79 "doctrine/doctrine-migrations-bundle": "^1.3",
80 "craue/config-bundle": "dev-utf8mb4", 80 "craue/config-bundle": "dev-utf8mb4",
81 "mnapoli/piwik-twig-extension": "^1.0", 81 "mnapoli/piwik-twig-extension": "^2.0",
82 "ocramius/proxy-manager": "^2.1.1", 82 "ocramius/proxy-manager": "^2.1.1",
83 "white-october/pagerfanta-bundle": "^1.1", 83 "white-october/pagerfanta-bundle": "^1.1",
84 "php-amqplib/rabbitmq-bundle": "^1.14", 84 "php-amqplib/rabbitmq-bundle": "^1.14",
diff --git a/composer.lock b/composer.lock
index 16d00d71..8ff8fba8 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
4 "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 4 "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5 "This file is @generated automatically" 5 "This file is @generated automatically"
6 ], 6 ],
7 "content-hash": "7e872d70c69629db503d9b8ed18e0f40", 7 "content-hash": "7b43c6d21bc5016660c4e95aa0fdbc12",
8 "packages": [ 8 "packages": [
9 { 9 {
10 "name": "bdunogier/guzzle-site-authenticator", 10 "name": "bdunogier/guzzle-site-authenticator",
@@ -3669,16 +3669,16 @@
3669 }, 3669 },
3670 { 3670 {
3671 "name": "j0k3r/graby-site-config", 3671 "name": "j0k3r/graby-site-config",
3672 "version": "1.0.84", 3672 "version": "1.0.85",
3673 "source": { 3673 "source": {
3674 "type": "git", 3674 "type": "git",
3675 "url": "https://github.com/j0k3r/graby-site-config.git", 3675 "url": "https://github.com/j0k3r/graby-site-config.git",
3676 "reference": "37ae71639d3844d022ea402a1f87af7e28d12cac" 3676 "reference": "64e6092f583ecc55db0b9e8e33162a4fca2f6659"
3677 }, 3677 },
3678 "dist": { 3678 "dist": {
3679 "type": "zip", 3679 "type": "zip",
3680 "url": "https://api.github.com/repos/j0k3r/graby-site-config/zipball/37ae71639d3844d022ea402a1f87af7e28d12cac", 3680 "url": "https://api.github.com/repos/j0k3r/graby-site-config/zipball/64e6092f583ecc55db0b9e8e33162a4fca2f6659",
3681 "reference": "37ae71639d3844d022ea402a1f87af7e28d12cac", 3681 "reference": "64e6092f583ecc55db0b9e8e33162a4fca2f6659",
3682 "shasum": "" 3682 "shasum": ""
3683 }, 3683 },
3684 "require": { 3684 "require": {
@@ -3705,7 +3705,7 @@
3705 } 3705 }
3706 ], 3706 ],
3707 "description": "Graby site config files", 3707 "description": "Graby site config files",
3708 "time": "2019-05-23T07:28:03+00:00" 3708 "time": "2019-06-07T20:24:21+00:00"
3709 }, 3709 },
3710 { 3710 {
3711 "name": "j0k3r/httplug-ssrf-plugin", 3711 "name": "j0k3r/httplug-ssrf-plugin",
@@ -4783,24 +4783,25 @@
4783 }, 4783 },
4784 { 4784 {
4785 "name": "mnapoli/piwik-twig-extension", 4785 "name": "mnapoli/piwik-twig-extension",
4786 "version": "1.0.0", 4786 "version": "2.0.0",
4787 "source": { 4787 "source": {
4788 "type": "git", 4788 "type": "git",
4789 "url": "https://github.com/mnapoli/PiwikTwigExtension.git", 4789 "url": "https://github.com/mnapoli/PiwikTwigExtension.git",
4790 "reference": "5171ab7221830a9d377add03dd60dbe6bd7b331f" 4790 "reference": "95cafbaca13e436b1939fe0e70079f6db893fd51"
4791 }, 4791 },
4792 "dist": { 4792 "dist": {
4793 "type": "zip", 4793 "type": "zip",
4794 "url": "https://api.github.com/repos/mnapoli/PiwikTwigExtension/zipball/5171ab7221830a9d377add03dd60dbe6bd7b331f", 4794 "url": "https://api.github.com/repos/mnapoli/PiwikTwigExtension/zipball/95cafbaca13e436b1939fe0e70079f6db893fd51",
4795 "reference": "5171ab7221830a9d377add03dd60dbe6bd7b331f", 4795 "reference": "95cafbaca13e436b1939fe0e70079f6db893fd51",
4796 "shasum": "" 4796 "shasum": ""
4797 }, 4797 },
4798 "require": { 4798 "require": {
4799 "php": ">=5.4", 4799 "php": ">=7.0",
4800 "twig/twig": "~1.10" 4800 "twig/twig": "~2.10"
4801 }, 4801 },
4802 "require-dev": { 4802 "require-dev": {
4803 "phpunit/phpunit": "~4.0" 4803 "php-coveralls/php-coveralls": "^2.0",
4804 "symfony/phpunit-bridge": "^4.2"
4804 }, 4805 },
4805 "type": "library", 4806 "type": "library",
4806 "autoload": { 4807 "autoload": {
@@ -4812,7 +4813,7 @@
4812 "license": [ 4813 "license": [
4813 "MIT" 4814 "MIT"
4814 ], 4815 ],
4815 "time": "2014-09-16T06:51:19+00:00" 4816 "time": "2019-06-21T10:24:22+00:00"
4816 }, 4817 },
4817 { 4818 {
4818 "name": "monolog/monolog", 4819 "name": "monolog/monolog",
@@ -7277,16 +7278,16 @@
7277 }, 7278 },
7278 { 7279 {
7279 "name": "sentry/sentry", 7280 "name": "sentry/sentry",
7280 "version": "2.1.0", 7281 "version": "2.1.1",
7281 "source": { 7282 "source": {
7282 "type": "git", 7283 "type": "git",
7283 "url": "https://github.com/getsentry/sentry-php.git", 7284 "url": "https://github.com/getsentry/sentry-php.git",
7284 "reference": "1f1704806820c16dcefcbf2e80b920024fda2234" 7285 "reference": "8e27e6c5fcf6f01fc2e5235dd14cc0b2b347d793"
7285 }, 7286 },
7286 "dist": { 7287 "dist": {
7287 "type": "zip", 7288 "type": "zip",
7288 "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/1f1704806820c16dcefcbf2e80b920024fda2234", 7289 "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/8e27e6c5fcf6f01fc2e5235dd14cc0b2b347d793",
7289 "reference": "1f1704806820c16dcefcbf2e80b920024fda2234", 7290 "reference": "8e27e6c5fcf6f01fc2e5235dd14cc0b2b347d793",
7290 "shasum": "" 7291 "shasum": ""
7291 }, 7292 },
7292 "require": { 7293 "require": {
@@ -7352,7 +7353,7 @@
7352 "logging", 7353 "logging",
7353 "sentry" 7354 "sentry"
7354 ], 7355 ],
7355 "time": "2019-05-22T07:44:47+00:00" 7356 "time": "2019-06-13T11:27:23+00:00"
7356 }, 7357 },
7357 { 7358 {
7358 "name": "sentry/sentry-symfony", 7359 "name": "sentry/sentry-symfony",
@@ -7791,16 +7792,16 @@
7791 }, 7792 },
7792 { 7793 {
7793 "name": "symfony/http-client-contracts", 7794 "name": "symfony/http-client-contracts",
7794 "version": "v1.1.3", 7795 "version": "v1.1.5",
7795 "source": { 7796 "source": {
7796 "type": "git", 7797 "type": "git",
7797 "url": "https://github.com/symfony/http-client-contracts.git", 7798 "url": "https://github.com/symfony/http-client-contracts.git",
7798 "reference": "05201f91d4f03c58f7324d019bdd791c8e8e418b" 7799 "reference": "e1924aea9c70ae3e69fff05afa3cb8ce541bf3bb"
7799 }, 7800 },
7800 "dist": { 7801 "dist": {
7801 "type": "zip", 7802 "type": "zip",
7802 "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/05201f91d4f03c58f7324d019bdd791c8e8e418b", 7803 "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/e1924aea9c70ae3e69fff05afa3cb8ce541bf3bb",
7803 "reference": "05201f91d4f03c58f7324d019bdd791c8e8e418b", 7804 "reference": "e1924aea9c70ae3e69fff05afa3cb8ce541bf3bb",
7804 "shasum": "" 7805 "shasum": ""
7805 }, 7806 },
7806 "require": { 7807 "require": {
@@ -7844,7 +7845,7 @@
7844 "interoperability", 7845 "interoperability",
7845 "standards" 7846 "standards"
7846 ], 7847 ],
7847 "time": "2019-06-05T13:28:50+00:00" 7848 "time": "2019-06-17T17:43:54+00:00"
7848 }, 7849 },
7849 { 7850 {
7850 "name": "symfony/mime", 7851 "name": "symfony/mime",
@@ -7907,30 +7908,30 @@
7907 }, 7908 },
7908 { 7909 {
7909 "name": "symfony/monolog-bundle", 7910 "name": "symfony/monolog-bundle",
7910 "version": "v3.3.1", 7911 "version": "v3.4.0",
7911 "source": { 7912 "source": {
7912 "type": "git", 7913 "type": "git",
7913 "url": "https://github.com/symfony/monolog-bundle.git", 7914 "url": "https://github.com/symfony/monolog-bundle.git",
7914 "reference": "572e143afc03419a75ab002c80a2fd99299195ff" 7915 "reference": "7fbecb371c1c614642c93c6b2cbcdf723ae8809d"
7915 }, 7916 },
7916 "dist": { 7917 "dist": {
7917 "type": "zip", 7918 "type": "zip",
7918 "url": "https://api.github.com/repos/symfony/monolog-bundle/zipball/572e143afc03419a75ab002c80a2fd99299195ff", 7919 "url": "https://api.github.com/repos/symfony/monolog-bundle/zipball/7fbecb371c1c614642c93c6b2cbcdf723ae8809d",
7919 "reference": "572e143afc03419a75ab002c80a2fd99299195ff", 7920 "reference": "7fbecb371c1c614642c93c6b2cbcdf723ae8809d",
7920 "shasum": "" 7921 "shasum": ""
7921 }, 7922 },
7922 "require": { 7923 "require": {
7923 "monolog/monolog": "~1.22", 7924 "monolog/monolog": "~1.22",
7924 "php": ">=5.6", 7925 "php": ">=5.6",
7925 "symfony/config": "~2.7|~3.3|~4.0", 7926 "symfony/config": "~3.4|~4.0",
7926 "symfony/dependency-injection": "~2.7|~3.4.10|^4.0.10", 7927 "symfony/dependency-injection": "~3.4.10|^4.0.10",
7927 "symfony/http-kernel": "~2.7|~3.3|~4.0", 7928 "symfony/http-kernel": "~3.4|~4.0",
7928 "symfony/monolog-bridge": "~2.7|~3.3|~4.0" 7929 "symfony/monolog-bridge": "~3.4|~4.0"
7929 }, 7930 },
7930 "require-dev": { 7931 "require-dev": {
7931 "symfony/console": "~2.7|~3.3|~4.0", 7932 "symfony/console": "~3.4|~4.0",
7932 "symfony/phpunit-bridge": "^3.3|^4.0", 7933 "symfony/phpunit-bridge": "^3.4.19|^4.0",
7933 "symfony/yaml": "~2.7|~3.3|~4.0" 7934 "symfony/yaml": "~3.4|~4.0"
7934 }, 7935 },
7935 "type": "symfony-bundle", 7936 "type": "symfony-bundle",
7936 "extra": { 7937 "extra": {
@@ -7966,7 +7967,7 @@
7966 "log", 7967 "log",
7967 "logging" 7968 "logging"
7968 ], 7969 ],
7969 "time": "2018-11-04T09:58:13+00:00" 7970 "time": "2019-06-20T12:18:19+00:00"
7970 }, 7971 },
7971 { 7972 {
7972 "name": "symfony/polyfill-apcu", 7973 "name": "symfony/polyfill-apcu",
@@ -8069,7 +8070,7 @@
8069 }, 8070 },
8070 { 8071 {
8071 "name": "Gert de Pagter", 8072 "name": "Gert de Pagter",
8072 "email": "BackEndTea@gmail.com" 8073 "email": "backendtea@gmail.com"
8073 } 8074 }
8074 ], 8075 ],
8075 "description": "Symfony polyfill for ctype functions", 8076 "description": "Symfony polyfill for ctype functions",
@@ -8602,16 +8603,16 @@
8602 }, 8603 },
8603 { 8604 {
8604 "name": "symfony/swiftmailer-bundle", 8605 "name": "symfony/swiftmailer-bundle",
8605 "version": "v3.2.6", 8606 "version": "v3.2.8",
8606 "source": { 8607 "source": {
8607 "type": "git", 8608 "type": "git",
8608 "url": "https://github.com/symfony/swiftmailer-bundle.git", 8609 "url": "https://github.com/symfony/swiftmailer-bundle.git",
8609 "reference": "7a83160b50a2479d37eb74ba71577380b9afe4f5" 8610 "reference": "cb125b3648f132fb8070b55393f20cb310907d3b"
8610 }, 8611 },
8611 "dist": { 8612 "dist": {
8612 "type": "zip", 8613 "type": "zip",
8613 "url": "https://api.github.com/repos/symfony/swiftmailer-bundle/zipball/7a83160b50a2479d37eb74ba71577380b9afe4f5", 8614 "url": "https://api.github.com/repos/symfony/swiftmailer-bundle/zipball/cb125b3648f132fb8070b55393f20cb310907d3b",
8614 "reference": "7a83160b50a2479d37eb74ba71577380b9afe4f5", 8615 "reference": "cb125b3648f132fb8070b55393f20cb310907d3b",
8615 "shasum": "" 8616 "shasum": ""
8616 }, 8617 },
8617 "require": { 8618 "require": {
@@ -8621,6 +8622,9 @@
8621 "symfony/dependency-injection": "~2.7|~3.3|~4.0", 8622 "symfony/dependency-injection": "~2.7|~3.3|~4.0",
8622 "symfony/http-kernel": "~2.7|~3.3|~4.0" 8623 "symfony/http-kernel": "~2.7|~3.3|~4.0"
8623 }, 8624 },
8625 "conflict": {
8626 "twig/twig": "<1.41|<2.10"
8627 },
8624 "require-dev": { 8628 "require-dev": {
8625 "symfony/console": "~2.7|~3.3|~4.0", 8629 "symfony/console": "~2.7|~3.3|~4.0",
8626 "symfony/framework-bundle": "~2.7|~3.3|~4.0", 8630 "symfony/framework-bundle": "~2.7|~3.3|~4.0",
@@ -8660,7 +8664,7 @@
8660 ], 8664 ],
8661 "description": "Symfony SwiftmailerBundle", 8665 "description": "Symfony SwiftmailerBundle",
8662 "homepage": "http://symfony.com", 8666 "homepage": "http://symfony.com",
8663 "time": "2019-04-18T15:52:54+00:00" 8667 "time": "2019-06-18T15:27:04+00:00"
8664 }, 8668 },
8665 { 8669 {
8666 "name": "symfony/symfony", 8670 "name": "symfony/symfony",
@@ -8920,21 +8924,22 @@
8920 }, 8924 },
8921 { 8925 {
8922 "name": "twig/twig", 8926 "name": "twig/twig",
8923 "version": "v1.42.2", 8927 "version": "v2.11.3",
8924 "source": { 8928 "source": {
8925 "type": "git", 8929 "type": "git",
8926 "url": "https://github.com/twigphp/Twig.git", 8930 "url": "https://github.com/twigphp/Twig.git",
8927 "reference": "21707d6ebd05476854805e4f91b836531941bcd4" 8931 "reference": "699ed2342557c88789a15402de5eb834dedd6792"
8928 }, 8932 },
8929 "dist": { 8933 "dist": {
8930 "type": "zip", 8934 "type": "zip",
8931 "url": "https://api.github.com/repos/twigphp/Twig/zipball/21707d6ebd05476854805e4f91b836531941bcd4", 8935 "url": "https://api.github.com/repos/twigphp/Twig/zipball/699ed2342557c88789a15402de5eb834dedd6792",
8932 "reference": "21707d6ebd05476854805e4f91b836531941bcd4", 8936 "reference": "699ed2342557c88789a15402de5eb834dedd6792",
8933 "shasum": "" 8937 "shasum": ""
8934 }, 8938 },
8935 "require": { 8939 "require": {
8936 "php": ">=5.4.0", 8940 "php": "^7.0",
8937 "symfony/polyfill-ctype": "^1.8" 8941 "symfony/polyfill-ctype": "^1.8",
8942 "symfony/polyfill-mbstring": "^1.3"
8938 }, 8943 },
8939 "require-dev": { 8944 "require-dev": {
8940 "psr/container": "^1.0", 8945 "psr/container": "^1.0",
@@ -8944,7 +8949,7 @@
8944 "type": "library", 8949 "type": "library",
8945 "extra": { 8950 "extra": {
8946 "branch-alias": { 8951 "branch-alias": {
8947 "dev-master": "1.42-dev" 8952 "dev-master": "2.11-dev"
8948 } 8953 }
8949 }, 8954 },
8950 "autoload": { 8955 "autoload": {
@@ -8982,7 +8987,7 @@
8982 "keywords": [ 8987 "keywords": [
8983 "templating" 8988 "templating"
8984 ], 8989 ],
8985 "time": "2019-06-18T15:35:16+00:00" 8990 "time": "2019-06-18T15:37:11+00:00"
8986 }, 8991 },
8987 { 8992 {
8988 "name": "wallabag/php-mobi", 8993 "name": "wallabag/php-mobi",
@@ -10654,16 +10659,16 @@
10654 }, 10659 },
10655 { 10660 {
10656 "name": "phpstan/phpdoc-parser", 10661 "name": "phpstan/phpdoc-parser",
10657 "version": "0.3.4", 10662 "version": "0.3.5",
10658 "source": { 10663 "source": {
10659 "type": "git", 10664 "type": "git",
10660 "url": "https://github.com/phpstan/phpdoc-parser.git", 10665 "url": "https://github.com/phpstan/phpdoc-parser.git",
10661 "reference": "ab518a5fc8f1d90f58bd2c5552ba915e2c477b66" 10666 "reference": "8c4ef2aefd9788238897b678a985e1d5c8df6db4"
10662 }, 10667 },
10663 "dist": { 10668 "dist": {
10664 "type": "zip", 10669 "type": "zip",
10665 "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/ab518a5fc8f1d90f58bd2c5552ba915e2c477b66", 10670 "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/8c4ef2aefd9788238897b678a985e1d5c8df6db4",
10666 "reference": "ab518a5fc8f1d90f58bd2c5552ba915e2c477b66", 10671 "reference": "8c4ef2aefd9788238897b678a985e1d5c8df6db4",
10667 "shasum": "" 10672 "shasum": ""
10668 }, 10673 },
10669 "require": { 10674 "require": {
@@ -10697,7 +10702,7 @@
10697 "MIT" 10702 "MIT"
10698 ], 10703 ],
10699 "description": "PHPDoc parser with support for nullable, intersection and generic types", 10704 "description": "PHPDoc parser with support for nullable, intersection and generic types",
10700 "time": "2019-05-28T11:40:00+00:00" 10705 "time": "2019-06-07T19:13:52+00:00"
10701 }, 10706 },
10702 { 10707 {
10703 "name": "phpstan/phpstan", 10708 "name": "phpstan/phpstan",
diff --git a/src/Wallabag/CoreBundle/Controller/FeedController.php b/src/Wallabag/CoreBundle/Controller/FeedController.php
index 8d422a90..9f671735 100644
--- a/src/Wallabag/CoreBundle/Controller/FeedController.php
+++ b/src/Wallabag/CoreBundle/Controller/FeedController.php
@@ -176,7 +176,7 @@ class FeedController extends Controller
176 $pagerAdapter = new DoctrineORMAdapter($qb->getQuery(), true, false); 176 $pagerAdapter = new DoctrineORMAdapter($qb->getQuery(), true, false);
177 $entries = new Pagerfanta($pagerAdapter); 177 $entries = new Pagerfanta($pagerAdapter);
178 178
179 $perPage = $user->getConfig()->getFeedLimit() ?: $this->getParameter('wallabag_core.Feed_limit'); 179 $perPage = $user->getConfig()->getFeedLimit() ?: $this->getParameter('wallabag_core.feed_limit');
180 $entries->setMaxPerPage($perPage); 180 $entries->setMaxPerPage($perPage);
181 181
182 $url = $this->generateUrl( 182 $url = $this->generateUrl(
diff --git a/src/Wallabag/CoreBundle/Twig/WallabagExtension.php b/src/Wallabag/CoreBundle/Twig/WallabagExtension.php
index 536185d4..02f17f50 100644
--- a/src/Wallabag/CoreBundle/Twig/WallabagExtension.php
+++ b/src/Wallabag/CoreBundle/Twig/WallabagExtension.php
@@ -4,10 +4,14 @@ namespace Wallabag\CoreBundle\Twig;
4 4
5use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; 5use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
6use Symfony\Component\Translation\TranslatorInterface; 6use Symfony\Component\Translation\TranslatorInterface;
7use Twig\Extension\AbstractExtension;
8use Twig\Extension\GlobalsInterface;
9use Twig\TwigFilter;
10use Twig\TwigFunction;
7use Wallabag\CoreBundle\Repository\EntryRepository; 11use Wallabag\CoreBundle\Repository\EntryRepository;
8use Wallabag\CoreBundle\Repository\TagRepository; 12use Wallabag\CoreBundle\Repository\TagRepository;
9 13
10class WallabagExtension extends \Twig_Extension implements \Twig_Extension_GlobalsInterface 14class WallabagExtension extends AbstractExtension implements GlobalsInterface
11{ 15{
12 private $tokenStorage; 16 private $tokenStorage;
13 private $entryRepository; 17 private $entryRepository;
@@ -24,21 +28,26 @@ class WallabagExtension extends \Twig_Extension implements \Twig_Extension_Globa
24 $this->translator = $translator; 28 $this->translator = $translator;
25 } 29 }
26 30
31 public function getGlobals()
32 {
33 return [];
34 }
35
27 public function getFilters() 36 public function getFilters()
28 { 37 {
29 return [ 38 return [
30 new \Twig_SimpleFilter('removeWww', [$this, 'removeWww']), 39 new TwigFilter('removeWww', [$this, 'removeWww']),
31 new \Twig_SimpleFilter('removeScheme', [$this, 'removeScheme']), 40 new TwigFilter('removeScheme', [$this, 'removeScheme']),
32 new \Twig_SimpleFilter('removeSchemeAndWww', [$this, 'removeSchemeAndWww']), 41 new TwigFilter('removeSchemeAndWww', [$this, 'removeSchemeAndWww']),
33 ]; 42 ];
34 } 43 }
35 44
36 public function getFunctions() 45 public function getFunctions()
37 { 46 {
38 return [ 47 return [
39 new \Twig_SimpleFunction('count_entries', [$this, 'countEntries']), 48 new TwigFunction('count_entries', [$this, 'countEntries']),
40 new \Twig_SimpleFunction('count_tags', [$this, 'countTags']), 49 new TwigFunction('count_tags', [$this, 'countTags']),
41 new \Twig_SimpleFunction('display_stats', [$this, 'displayStats']), 50 new TwigFunction('display_stats', [$this, 'displayStats']),
42 ]; 51 ];
43 } 52 }
44 53
diff --git a/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php b/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php
index 2797efde..b25ba685 100644
--- a/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php
+++ b/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php
@@ -4,6 +4,7 @@ namespace Wallabag\UserBundle\Mailer;
4 4
5use Scheb\TwoFactorBundle\Mailer\AuthCodeMailerInterface; 5use Scheb\TwoFactorBundle\Mailer\AuthCodeMailerInterface;
6use Scheb\TwoFactorBundle\Model\Email\TwoFactorInterface; 6use Scheb\TwoFactorBundle\Model\Email\TwoFactorInterface;
7use Twig\Environment;
7 8
8/** 9/**
9 * Custom mailer for TwoFactorBundle email. 10 * Custom mailer for TwoFactorBundle email.
@@ -21,7 +22,7 @@ class AuthCodeMailer implements AuthCodeMailerInterface
21 /** 22 /**
22 * Twig to render the html's email. 23 * Twig to render the html's email.
23 * 24 *
24 * @var \Twig_Environment 25 * @var Environment
25 */ 26 */
26 private $twig; 27 private $twig;
27 28
@@ -56,14 +57,14 @@ class AuthCodeMailer implements AuthCodeMailerInterface
56 /** 57 /**
57 * Initialize the auth code mailer with the SwiftMailer object. 58 * Initialize the auth code mailer with the SwiftMailer object.
58 * 59 *
59 * @param \Swift_Mailer $mailer 60 * @param \Swift_Mailer $mailer
60 * @param \Twig_Environment $twig 61 * @param Environment $twig
61 * @param string $senderEmail 62 * @param string $senderEmail
62 * @param string $senderName 63 * @param string $senderName
63 * @param string $supportUrl wallabag support url 64 * @param string $supportUrl wallabag support url
64 * @param string $wallabagUrl wallabag instance url 65 * @param string $wallabagUrl wallabag instance url
65 */ 66 */
66 public function __construct(\Swift_Mailer $mailer, \Twig_Environment $twig, $senderEmail, $senderName, $supportUrl, $wallabagUrl) 67 public function __construct(\Swift_Mailer $mailer, Environment $twig, $senderEmail, $senderName, $supportUrl, $wallabagUrl)
67 { 68 {
68 $this->mailer = $mailer; 69 $this->mailer = $mailer;
69 $this->twig = $twig; 70 $this->twig = $twig;
diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
index e9c12c49..8fd49778 100644
--- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
+++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
@@ -13,7 +13,7 @@ class EntryControllerTest extends WallabagCoreTestCase
13{ 13{
14 const AN_URL_CONTAINING_AN_ARTICLE_WITH_IMAGE = 'https://www.lemonde.fr/judo/article/2017/11/11/judo-la-decima-de-teddy-riner_5213605_1556020.html'; 14 const AN_URL_CONTAINING_AN_ARTICLE_WITH_IMAGE = 'https://www.lemonde.fr/judo/article/2017/11/11/judo-la-decima-de-teddy-riner_5213605_1556020.html';
15 public $downloadImagesEnabled = false; 15 public $downloadImagesEnabled = false;
16 public $url = 'https://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'; 16 public $url = 'https://www.lemonde.fr/pixels/article/2019/06/18/ce-qu-il-faut-savoir-sur-le-libra-la-cryptomonnaie-de-facebook_5477887_4408996.html';
17 17
18 /** 18 /**
19 * @after 19 * @after
@@ -164,7 +164,7 @@ class EntryControllerTest extends WallabagCoreTestCase
164 164
165 $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content); 165 $this->assertInstanceOf('Wallabag\CoreBundle\Entity\Entry', $content);
166 $this->assertSame($this->url, $content->getUrl()); 166 $this->assertSame($this->url, $content->getUrl());
167 $this->assertContains('Google', $content->getTitle()); 167 $this->assertContains('la cryptomonnaie de Facebook', $content->getTitle());
168 $this->assertSame('fr', $content->getLanguage()); 168 $this->assertSame('fr', $content->getLanguage());
169 $this->assertArrayHasKey('x-frame-options', $content->getHeaders()); 169 $this->assertArrayHasKey('x-frame-options', $content->getHeaders());
170 $client->getContainer()->get('craue_config')->set('store_article_headers', 0); 170 $client->getContainer()->get('craue_config')->set('store_article_headers', 0);
diff --git a/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php b/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php
index 1713c10c..4f93a92c 100644
--- a/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php
+++ b/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php
@@ -3,6 +3,8 @@
3namespace Tests\Wallabag\UserBundle\Mailer; 3namespace Tests\Wallabag\UserBundle\Mailer;
4 4
5use PHPUnit\Framework\TestCase; 5use PHPUnit\Framework\TestCase;
6use Twig\Environment;
7use Twig\Loader\ArrayLoader;
6use Wallabag\UserBundle\Entity\User; 8use Wallabag\UserBundle\Entity\User;
7use Wallabag\UserBundle\Mailer\AuthCodeMailer; 9use Wallabag\UserBundle\Mailer\AuthCodeMailer;
8 10
@@ -27,7 +29,7 @@ class AuthCodeMailerTest extends TestCase
27{% block body_text %}text body {{ support_url }}{% endblock %} 29{% block body_text %}text body {{ support_url }}{% endblock %}
28TWIG; 30TWIG;
29 31
30 $this->twig = new \Twig_Environment(new \Twig_Loader_Array(['WallabagUserBundle:TwoFactor:email_auth_code.html.twig' => $twigTemplate])); 32 $this->twig = new Environment(new ArrayLoader(['WallabagUserBundle:TwoFactor:email_auth_code.html.twig' => $twigTemplate]));
31 } 33 }
32 34
33 public function testSendEmail() 35 public function testSendEmail()