From d15ef148b6e8b69496b8530fb926a4a4da5b9a8c Mon Sep 17 00:00:00 2001 From: Jayes Date: Fri, 1 Jan 2016 08:23:14 -0500 Subject: [PATCH 1/9] Update composer.json Upgrade the jms/serializer bundle dependency --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 25e3097..0ed4533 100644 --- a/composer.json +++ b/composer.json @@ -38,7 +38,7 @@ "friendsofsymfony/user-bundle": "*", "sonata-project/media-bundle": "~2.3", "sonata-project/doctrine-orm-admin-bundle": "^2.3", - "jms/serializer-bundle": "~0.13", + "jms/serializer-bundle": "~1.1", "knplabs/knp-paginator-bundle": "*", "doctrine/doctrine-fixtures-bundle": "*", "stof/doctrine-extensions-bundle": "~1.1@dev", From f18d10f3fdab11e7682d64b52a37647392fdd418 Mon Sep 17 00:00:00 2001 From: Jayes Date: Wed, 13 Jan 2016 08:34:43 -0500 Subject: [PATCH 2/9] Update general.js Add toolbar option to view source code --- Resources/public/js/general.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Resources/public/js/general.js b/Resources/public/js/general.js index 3113d73..46aaefb 100644 --- a/Resources/public/js/general.js +++ b/Resources/public/js/general.js @@ -6,10 +6,11 @@ $(document).ready(function(){ plugins: [ "advlist autolink link lists charmap print preview hr anchor pagebreak", "searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking", - "table contextmenu directionality emoticons paste textcolor" + "table contextmenu directionality emoticons paste textcolor", + "code" ], toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect", - toolbar2: "| link unlink anchor | forecolor backcolor | print preview code ", + toolbar2: "| link unlink anchor | forecolor backcolor | print preview code | code", image_advtab: true, relative_urls: false, remove_script_host: false @@ -390,4 +391,4 @@ function initNprogress() window.location = data.redirect; } }); -} \ No newline at end of file +} From 50c9ef4f3b347354125bd013f29e7561d98b93c9 Mon Sep 17 00:00:00 2001 From: Jayes Date: Wed, 13 Jan 2016 08:39:02 -0500 Subject: [PATCH 3/9] Update general.js I added code twice by accident to the toolbar. It was needed on plugins --- Resources/public/js/general.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/public/js/general.js b/Resources/public/js/general.js index 46aaefb..d6f7535 100644 --- a/Resources/public/js/general.js +++ b/Resources/public/js/general.js @@ -10,7 +10,7 @@ $(document).ready(function(){ "code" ], toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect", - toolbar2: "| link unlink anchor | forecolor backcolor | print preview code | code", + toolbar2: "| link unlink anchor | forecolor backcolor | print preview code ", image_advtab: true, relative_urls: false, remove_script_host: false From 8a08dce949d6ca15f33d093e1a0fa0df5c353097 Mon Sep 17 00:00:00 2001 From: Jayes Date: Sun, 17 Jan 2016 07:50:16 -0500 Subject: [PATCH 4/9] Update ArticleType.php The username field in FOSUserBundle does not have an index. The username_canonical field does. --- Forms/ArticleType.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Forms/ArticleType.php b/Forms/ArticleType.php index 9a73b8e..e643d78 100644 --- a/Forms/ArticleType.php +++ b/Forms/ArticleType.php @@ -115,7 +115,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'query_builder' => function (EntityRepository $er) { return $er->createQueryBuilder('a') ->where('a.roles like :type') - ->orderBy('a.username', 'ASC') + ->orderBy('a.username_canonical', 'ASC') ->setParameter('type', '%ROLE_BLOG_USER%'); }, @@ -208,4 +208,4 @@ public function setDefaultOptions(OptionsResolverInterface $resolver) } -} \ No newline at end of file +} From 8e7a49e34331135fb56f70299ad064e57dcc405b Mon Sep 17 00:00:00 2001 From: Jayes Date: Sun, 17 Jan 2016 07:54:13 -0500 Subject: [PATCH 5/9] Update AbstractConverter.php The username field does not have an index in FOSUserBundle. The username canonical field does. --- Converter/AbstractConverter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Converter/AbstractConverter.php b/Converter/AbstractConverter.php index 14d1aa0..c2ada60 100644 --- a/Converter/AbstractConverter.php +++ b/Converter/AbstractConverter.php @@ -45,7 +45,7 @@ public function apply(Request $request, ParamConverter $configuration) } elseif($username) { - $searchArray = array('username' => $username); + $searchArray = array('username_canonical' => $username); } elseif($id) { @@ -92,4 +92,4 @@ public function supports(ParamConverter $configuration) } } -} \ No newline at end of file +} From 5424ada3cba612644a5fb4ed00386d60301e709f Mon Sep 17 00:00:00 2001 From: Jayes Date: Sun, 17 Jan 2016 07:55:59 -0500 Subject: [PATCH 6/9] Update AbstractConverter.php fixed field reference --- Converter/AbstractConverter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Converter/AbstractConverter.php b/Converter/AbstractConverter.php index c2ada60..7a30e52 100644 --- a/Converter/AbstractConverter.php +++ b/Converter/AbstractConverter.php @@ -45,7 +45,7 @@ public function apply(Request $request, ParamConverter $configuration) } elseif($username) { - $searchArray = array('username_canonical' => $username); + $searchArray = array('usernameCanonical' => $username); } elseif($id) { From 983526a9b6e308a7c18e7afcf48520495b2a05da Mon Sep 17 00:00:00 2001 From: Jayes Date: Sun, 17 Jan 2016 07:56:25 -0500 Subject: [PATCH 7/9] Update ArticleType.php fixed field reference --- Forms/ArticleType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Forms/ArticleType.php b/Forms/ArticleType.php index e643d78..3af2d4e 100644 --- a/Forms/ArticleType.php +++ b/Forms/ArticleType.php @@ -115,7 +115,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) 'query_builder' => function (EntityRepository $er) { return $er->createQueryBuilder('a') ->where('a.roles like :type') - ->orderBy('a.username_canonical', 'ASC') + ->orderBy('a.usernameCanonical', 'ASC') ->setParameter('type', '%ROLE_BLOG_USER%'); }, From 03d3112f5b8f7d397aad6b6f9bd20cdb1161e406 Mon Sep 17 00:00:00 2001 From: Oguzhan Uysal Date: Fri, 29 Jan 2016 10:40:23 +0100 Subject: [PATCH 8/9] [BUGFIX][PHP7] thrown TypeError not catched PHP7 introduced the Error (throwable) class, which acts like Exceptions but it doesn't have any relation with the Exception base class. try-catch blocks which only catch exceptions needs to be updated to work with this new base class --- Security/Authorization/Voter/ArticleVoter.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Security/Authorization/Voter/ArticleVoter.php b/Security/Authorization/Voter/ArticleVoter.php index b29f997..e55c782 100644 --- a/Security/Authorization/Voter/ArticleVoter.php +++ b/Security/Authorization/Voter/ArticleVoter.php @@ -49,6 +49,10 @@ public function supportsClass($class) { return false; } + catch(\Error $e) + { + return false; + } } From 3f99075a8df1d3d0645d92373e67ce63d04a9148 Mon Sep 17 00:00:00 2001 From: Jaz Date: Sat, 28 May 2016 15:58:44 -0400 Subject: [PATCH 9/9] Update composer.json Move project forward with sonata 3.x compatibility --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 0ed4533..973919b 100644 --- a/composer.json +++ b/composer.json @@ -36,8 +36,8 @@ "sensio/framework-extra-bundle": "~3.0,>=3.0.2", "incenteev/composer-parameter-handler": "~2.0", "friendsofsymfony/user-bundle": "*", - "sonata-project/media-bundle": "~2.3", - "sonata-project/doctrine-orm-admin-bundle": "^2.3", + "sonata-project/media-bundle": "3.*", + "sonata-project/doctrine-orm-admin-bundle": "3.*", "jms/serializer-bundle": "~1.1", "knplabs/knp-paginator-bundle": "*", "doctrine/doctrine-fixtures-bundle": "*",