Skip to content

Commit 623a6ad

Browse files
committed
add changelog and upgrade instructions
1 parent 004dced commit 623a6ad

File tree

4 files changed

+42
-2
lines changed

4 files changed

+42
-2
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
Changelog
22
=========
33

4+
* **2014-03-29**: [Multilang] Added some options to support locale matching
5+
without separate routes per locale. See the new configuration options
6+
`match_implicit_locale` and `auto_locale_pattern`.
7+
8+
* **2014-03-29**: [PHPCR] The route provider can now load Routes from more than
9+
path in PHPCR. The configuration option `route_basepath` is renamed to
10+
`route_basepaths` and accepts a list of base paths. See the changelog of
11+
the SimpleCmsBundle as the main impact is on that side.
12+
413
* **2014-03-26**: [ORM] Applied the cleanup for the PHPCR provider to the ORM
514
provider now: If the route matched a pattern with a format extension, the
615
format extension is no longer set as route a default.

DependencyInjection/CmfRoutingExtension.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,10 +277,8 @@ public function loadSonataPhpcrAdmin($config, XmlFileLoader $loader, ContainerBu
277277
}
278278

279279
$basePath = empty($config['admin_basepath']) ? reset($config['route_basepaths']) : $config['admin_basepath'];
280-
281280
$container->setParameter($this->getAlias() . '.dynamic.persistence.phpcr.admin_basepath', $basePath);
282281

283-
284282
$loader->load('admin-phpcr.xml');
285283
}
286284

Doctrine/Phpcr/Route.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ public function getParentDocument()
142142
* Note that this will change the URL this route matches.
143143
*
144144
* @param string $name the new name
145+
*
146+
* @return self
145147
*/
146148
public function setName($name)
147149
{

UPGRADE-1.2.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
UPGRADE FROM 1.1 TO 1.2
2+
=======================
3+
4+
Renamed the configuration option `dynamic.persistence.phpcr.route_basepath` to
5+
`dynamic.persistence.phpcr.route_basepaths` and made it a list instead of a
6+
single value. `route_basepath` is supported for BC but deprecated.
7+
8+
Refactored explicit properties for `addTrailingSlash` and `addFormatPattern`
9+
into Route options. Use setOption/getOption with `add_trailing_slash` resp
10+
`add_format_pattern` to interact with the options. The getters and setters are
11+
kept for BC. If you have stored PHPCR Routes with these options activated, you
12+
need to move the data into the options:
13+
14+
```php
15+
/** @var $dm \Doctrine\ODM\PHPCR\DocumentManager */
16+
$query = $dm->createPhpcrQuery("SELECT * FROM nt:base WHERE addFormatPattern = 'true'", QueryInterface::JCR_SQL2)
17+
$routes = $dm->getDocumentsByPhpcrQuery($query);
18+
/** @var $route \Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\Route */
19+
foreach($routes as $route) {
20+
$route->setOption('add_format_pattern', true);
21+
}
22+
23+
$query = $dm->createPhpcrQuery("SELECT * FROM nt:base WHERE addTrailingSlash = 'true'", QueryInterface::JCR_SQL2)
24+
$routes = $dm->getDocumentsByPhpcrQuery($query);
25+
/** @var $route \Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\Route */
26+
foreach($routes as $route) {
27+
$route->setOption('add_trailing_slash', true);
28+
}
29+
30+
$dm->flush();
31+
```

0 commit comments

Comments
 (0)