Skip to content

Commit

Permalink
Merge pull request #38 from phakpoom/master
Browse files Browse the repository at this point in the history
Change config prototype under parameters to variable (fixed #39)
  • Loading branch information
stefandoorn authored Feb 25, 2018
2 parents 82b521a + 0ec7051 commit 48b2329
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private function addSitemapSection(ArrayNodeDefinition $node): void
->cannotBeEmpty()
->end()
->arrayNode('parameters')
->prototype('array')->end()
->prototype('variable')->end()
->info('Add optional parameters to the route.')
->end()
->arrayNode('locales')
Expand Down
4 changes: 4 additions & 0 deletions tests/Application/app/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ imports:

- { resource: "../../../../vendor/sylius/sylius/app/config/security.yml" }

sitemap:
static_routes:
- { route: sylius_shop_order_show, parameters: { tokenValue: fooToken } }

framework:
translator: { fallbacks: ["%locale%"] }
secret: "%secret"
Expand Down
14 changes: 14 additions & 0 deletions tests/Responses/Expected/show_sitemap_all.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,18 @@
<changefreq>weekly</changefreq>
<priority>0.3</priority>
</url>
<url>
<loc>http://localhost/en_US/order/fooToken</loc>
<xhtml:link rel="alternate" hreflang="en" href="http://localhost/en_US/order/fooToken"/>
<xhtml:link rel="alternate" hreflang="nl" href="http://localhost/nl_NL/order/fooToken"/>
<changefreq>weekly</changefreq>
<priority>0.3</priority>
</url>
<url>
<loc>http://localhost/nl_NL/order/fooToken</loc>
<xhtml:link rel="alternate" hreflang="en" href="http://localhost/en_US/order/fooToken"/>
<xhtml:link rel="alternate" hreflang="nl" href="http://localhost/nl_NL/order/fooToken"/>
<changefreq>weekly</changefreq>
<priority>0.3</priority>
</url>
</urlset>
14 changes: 14 additions & 0 deletions tests/Responses/Expected/show_sitemap_all_relative.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,18 @@
<changefreq>weekly</changefreq>
<priority>0.3</priority>
</url>
<url>
<loc>/en_US/order/fooToken</loc>
<xhtml:link rel="alternate" hreflang="en" href="/en_US/order/fooToken"/>
<xhtml:link rel="alternate" hreflang="nl" href="/nl_NL/order/fooToken"/>
<changefreq>weekly</changefreq>
<priority>0.3</priority>
</url>
<url>
<loc>/nl_NL/order/fooToken</loc>
<xhtml:link rel="alternate" hreflang="en" href="/en_US/order/fooToken"/>
<xhtml:link rel="alternate" hreflang="nl" href="/nl_NL/order/fooToken"/>
<changefreq>weekly</changefreq>
<priority>0.3</priority>
</url>
</urlset>
14 changes: 14 additions & 0 deletions tests/Responses/Expected/show_sitemap_static.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,18 @@
<changefreq>weekly</changefreq>
<priority>0.3</priority>
</url>
<url>
<loc>http://localhost/en_US/order/fooToken</loc>
<xhtml:link rel="alternate" hreflang="en" href="http://localhost/en_US/order/fooToken"/>
<xhtml:link rel="alternate" hreflang="nl" href="http://localhost/nl_NL/order/fooToken"/>
<changefreq>weekly</changefreq>
<priority>0.3</priority>
</url>
<url>
<loc>http://localhost/nl_NL/order/fooToken</loc>
<xhtml:link rel="alternate" hreflang="en" href="http://localhost/en_US/order/fooToken"/>
<xhtml:link rel="alternate" hreflang="nl" href="http://localhost/nl_NL/order/fooToken"/>
<changefreq>weekly</changefreq>
<priority>0.3</priority>
</url>
</urlset>

0 comments on commit 48b2329

Please sign in to comment.