From b4f219d479db955464016294cbce14c4b7572fa6 Mon Sep 17 00:00:00 2001 From: Chad Meyers Date: Fri, 19 Oct 2018 15:42:58 -0300 Subject: [PATCH 1/4] Update controller.json namespace for 4.1 --- snippets/controller.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/snippets/controller.json b/snippets/controller.json index ce5614b..6e49ea8 100644 --- a/snippets/controller.json +++ b/snippets/controller.json @@ -2,7 +2,7 @@ "Create a new action": { "prefix": "sfaction", "body": [ - "public function ${1:name}Action(${2:Request \\$request})", + "public function ${1:name}()", "{", " ${3:return \\$this->render('${4:index}.html.twig');}", "}" @@ -15,9 +15,9 @@ "Controller Template": { "prefix": "sfcontroller", "body": [ - "namespace AppBundle\\\\Controller;\n", + "namespace App\\\\Controller;\n", "use Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\Controller;\n", - "class ${1:Name}Controller extends Controller", + "class ${1:Name}Controller extends AbstractController", "{", " ${2}", "}" From 7685d346f57f8e656b8eeac394ee32205794df24 Mon Sep 17 00:00:00 2001 From: Chad Meyers Date: Fri, 19 Oct 2018 15:47:05 -0300 Subject: [PATCH 2/4] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 67c4fdf..1cd641b 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "symfony-snippets", "displayName": "Symfony Snippets", "description": "A simple package that's provides useful snippets for the latest versions of Symfony", - "version": "0.1.1", + "version": "0.1.2", "publisher": "Cronos87", "homepage": "https://github.com/Cronos87/vsc-symfony-snippets", "bugs": { From 86d574ad3ede6002e83c23b9951155429eea3ead Mon Sep 17 00:00:00 2001 From: Chad Meyers Date: Fri, 19 Oct 2018 15:48:23 -0300 Subject: [PATCH 3/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 98dafec..cd8036c 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ A simple package that's provides useful snippets for the latest versions of Symf | ----- | ------- | ------- | | Create a new action function | sfaction | | Get a container | sfcontainer | -| Controller Template | sfcontroller | +| Controller Template | sfcontroller | 4.1+ | | Create the Entity Manager Variable | sfem | | Throw an Access Denied Exception | sfexceptionaccessdenied | | Throw a Not Found Exception | sfexceptionnotfound | From 075b7a8e5cf3d1bdd1345d8e39e8c10319385ff3 Mon Sep 17 00:00:00 2001 From: Chad Meyers Date: Fri, 19 Oct 2018 15:52:41 -0300 Subject: [PATCH 4/4] Update controller.json --- snippets/controller.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/controller.json b/snippets/controller.json index 6e49ea8..73a9d00 100644 --- a/snippets/controller.json +++ b/snippets/controller.json @@ -16,7 +16,7 @@ "prefix": "sfcontroller", "body": [ "namespace App\\\\Controller;\n", - "use Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\Controller;\n", + "use Symfony\\\\Bundle\\\\FrameworkBundle\\\\Controller\\\\AbstractController;\n", "class ${1:Name}Controller extends AbstractController", "{", " ${2}",