@@ -67,7 +67,7 @@ public function registerBundles()
6767The easiest way is to add one anonymous service for each shortcode in your services definition:
6868
6969``` xml
70- <service parent =" Webfactory\ShortcodeBundle\Handler\EmbeddedShortcodeHandler.esi" >
70+ <service id = " webfactory.shortcode.your-shortcode-name " parent =" Webfactory\ShortcodeBundle\Handler\EmbeddedShortcodeHandler.esi" >
7171 <argument index =" 1" >reference-to-your-replacement-controller</argument >
7272 <tag name =" webfactory.shortcode" shortcode =" your-shortcode-name" />
7373</service >
@@ -106,7 +106,7 @@ Then, write a service definition like this:
106106
107107 <!-- ... -->
108108
109- <service parent =" Webfactory\ShortcodeBundle\Handler\EmbeddedShortcodeHandler.esi" >
109+ <service id = " webfactory.shortcode.image " parent =" Webfactory\ShortcodeBundle\Handler\EmbeddedShortcodeHandler.esi" >
110110 <argument index =" 1" >app.controller.embedded_image:showAction</argument >
111111 <tag name =" webfactory.shortcode" shortcode =" image" />
112112 </service >
@@ -192,7 +192,7 @@ considering the environment. Maybe you want to restrict access in your security
192192
193193``` yaml
194194# src/routing.yml
195- shortcode -guide :
195+ _shortcode -guide :
196196 prefix : /shortcodes
197197 resource : " @WebfactoryShortcodeBundle/Resources/config/guide-routing.xml"
198198` ` `
@@ -207,7 +207,7 @@ Finally, enrich your shortcode tags with description and example attributes for
207207 <!-- import guide.xml -->
208208
209209 <services>
210- <service parent="Webfactory\ShortcodeBundle\Handler\EmbeddedShortcodeHandler.esi">
210+ <service id="webfactory.shortcode.image" parent="Webfactory\ShortcodeBundle\Handler\EmbeddedShortcodeHandler.esi">
211211 <argument index="1">app.controller.embedded_image:showAction</argument>
212212 <tag
213213 name="webfactory.shortcode"
@@ -244,13 +244,13 @@ use Webfactory\ShortcodeBundle\Tests\Functional\ShortcodeTest;
244244
245245final class ImageTest extends ShortcodeTest
246246{
247- protected function getShortcodeToTest()
247+ protected function getShortcodeToTest(): string
248248 {
249249 return 'image';
250250 }
251251
252252 /** @test */
253- public function teaser_gets_rendered()
253+ public function teaser_gets_rendered(): void
254254 {
255255 // without $customParameters, crawlRenderedExample() will crawl a page rendering the example configured in the
256256 // shortcode tag, in this case "image url=https://upload.wikimedia.org/wikipedia/en/f/f7/RickRoll.png"
@@ -261,7 +261,7 @@ final class ImageTest extends ShortcodeTest
261261 }
262262
263263 /** @test */
264- public function teaser_to_nonexisting_page_gives_error()
264+ public function teaser_to_nonexisting_page_gives_error(): void
265265 {
266266 // both crawlRenderedExample() and assertHttpStatusCodeWhenCrawlingRenderedExample() accept a $customParameters
267267 // argument that will replace the parameters provided in the configuration of the shortcode tag.
@@ -289,7 +289,7 @@ definition of your shortcode:
289289<?xml version =" 1.0" ?>
290290<container xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xmlns =" http://symfony.com/schema/dic/services" xsi : schemaLocation =" http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd" >
291291 <services >
292- <service parent =" Webfactory\ShortcodeBundle\Handler\EmbeddedShortcodeHandler.esi" >
292+ <service id = " webfactory.shortcode.your-shortcode-name " parent =" Webfactory\ShortcodeBundle\Handler\EmbeddedShortcodeHandler.esi" >
293293 <argument index =" 1" >app.controller.embedded_image:showAction</argument >
294294 <tag name =" webfactory.shortcode" ... />
295295 ...
0 commit comments