Skip to content

Commit e98f18a

Browse files
committed
add almost all cmf updates
1 parent 8dbc366 commit e98f18a

File tree

9 files changed

+182
-187
lines changed

9 files changed

+182
-187
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"symfony-cmf/routing-auto-bundle": "^2.1",
5151
"symfony-cmf/seo-bundle": "^2.1",
5252
"symfony-cmf/sonata-phpcr-admin-integration-bundle": "^1.1",
53-
"symfony-cmf/symfony-cmf": "2.1.0-RC1 as 2.1",
53+
"symfony-cmf/symfony-cmf": "^2.1",
5454
"symfony-cmf/tree-browser-bundle": "^2.1",
5555
"symfony/console": "^4.0",
5656
"symfony/debug-pack": "^1.0",

composer.lock

Lines changed: 166 additions & 162 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/packages/config.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.

config/packages/symfony_cmf.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ cmf_sonata_phpcr_admin_integration:
4040
cmf_routing:
4141
chain:
4242
routers_by_id:
43-
router.default: 20
44-
cmf_routing.dynamic_router: 100
43+
cmf_routing.dynamic_router: 20
44+
router.default: 100
4545
dynamic:
4646
route_collection_limit: 10
4747
controllers_by_type:

config/services.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ imports:
77

88
parameters:
99
locale: en
10-
locales:
11-
- en
12-
- fr
13-
- de
10+
locales: [ en, fr, de]
1411
secret: ThisTokenIsNotSoSecretChangeIt
1512
coffee.extension: \.coffee-disabled$
1613
coffee.bin: ''

phpunit.xml.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
<php>
3030
<!-- ###+ symfony/framework-bundle ### -->
3131
<env name="APP_ENV" value="test"/>
32+
<env name="SYMFONY_ENV" value="test"/>
3233
<env name="APP_SECRET" value="3780da4e3c8b2225171dc1b6ddba5599"/>
3334
<!-- env name="TRUSTED_PROXIES" value="127.0.0.1,127.0.0.2" -->
3435
<!-- env name="TRUSTED_HOSTS" value="localhost,example.com" -->

src/Document/DemoSeoContent.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,12 @@ public function setSeoMetadata($seoMetadata)
5353
{
5454
$this->seoMetadata = $seoMetadata;
5555
}
56+
57+
/**
58+
* @return string
59+
*/
60+
public function __toString(): string
61+
{
62+
return $this->id;
63+
}
5664
}

templates/base.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<a href="#" class="btn btn-default btn-xs navbar-btn dropdown-toggle" data-toggle="dropdown">Read this page in <span class="caret"></span></a>
5656
<ul class="dropdown-menu">
5757
{% if cmfMainContent is defined %}
58-
{{ locale_switcher(cmfMainContent, null, 'includes/switcher_links.html.twig') }}
58+
{# {{ locale_switcher(cmfMainContent, null, 'includes/switcher_links.html.twig') }} #}
5959
{% endif %}
6060
</ul>
6161
</div>

tests/Functional/AdminDashboardTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ public function testRedirectToDashboard()
2222

2323
$client->request('GET', '/admin');
2424

25-
$this->assertEquals(301, $client->getResponse()->getStatusCode());
25+
$this->assertEquals(302, $client->getResponse()->getStatusCode());
2626

2727
$client->followRedirect();
2828

2929
$this->assertEquals('http://localhost/en/admin/dashboard', $client->getRequest()->getUri());
3030

3131
$client->request('GET', '/admin/dashboard');
3232

33-
$this->assertEquals(301, $client->getResponse()->getStatusCode());
33+
$this->assertEquals(302, $client->getResponse()->getStatusCode());
3434

3535
$client->followRedirect();
3636

0 commit comments

Comments
 (0)