-
Notifications
You must be signed in to change notification settings - Fork 47
[WIP] work on menu bundle upgrade #206
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
adapter: github | ||
issue-tracker: github | ||
|
||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
language: php | ||
|
||
php: | ||
- 5.3 | ||
- 5.4 | ||
# - 5.3 | ||
# - 5.4 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i would prefer if you would not change this in your commits - we should see if there happen to be problems with different versions of php / symfony. its not hard to run the tests locally for fast feedback, just look at the .travis.yml and do the same steps. |
||
- 5.5 | ||
- hhvm | ||
# - hhvm | ||
|
||
env: | ||
- SYMFONY_VERSION=2.5.* | ||
|
||
matrix: | ||
allow_failures: | ||
- env: SYMFONY_VERSION=dev-master | ||
- php: hhvm | ||
# - php: hhvm | ||
include: | ||
- php: 5.5 | ||
env: SYMFONY_VERSION=2.3.* | ||
- php: 5.5 | ||
env: SYMFONY_VERSION=2.4.* | ||
# - php: 5.5 | ||
# env: SYMFONY_VERSION=2.3.* | ||
# - php: 5.5 | ||
# env: SYMFONY_VERSION=2.4.* | ||
- php: 5.5 | ||
env: SYMFONY_VERSION=dev-master | ||
|
||
|
@@ -29,5 +29,6 @@ before_script: | |
script: phpunit --coverage-text | ||
|
||
notifications: | ||
irc: "irc.freenode.org#symfony-cmf" | ||
email: "symfony-cmf-devs@googlegroups.com" | ||
# irc: "irc.freenode.org#symfony-cmf" | ||
# email: "symfony-cmf-devs@googlegroups.com" | ||
email: "cordoval@gmail.com" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,6 @@ class CmfMenuExtension extends Extension | |
public function load(array $configs, ContainerBuilder $container) | ||
{ | ||
$config = $this->processConfiguration(new Configuration(), $configs); | ||
$bundles = $container->getParameter('kernel.bundles'); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good catch! |
||
$loader = new XmlFileLoader( | ||
$container, | ||
|
@@ -34,7 +33,7 @@ public function load(array $configs, ContainerBuilder $container) | |
$loader->load('menu.xml'); | ||
$factory = $container->getDefinition($this->getAlias().'.factory'); | ||
$factory->replaceArgument(1, new Reference($config['content_url_generator'])); | ||
$container->setParameter($this->getAlias() . '.allow_empty_items', $config['allow_empty_items']); | ||
$container->setParameter($this->getAlias().'.allow_empty_items', $config['allow_empty_items']); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it seems psr-2 does not say anything about string concatenation but i tend to always have a space before and after. not sure what would be the right thing - but we should be consistent. |
||
|
||
$this->loadVoters($config, $loader, $container); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -169,7 +169,7 @@ public function get($name, array $options = array()) | |
throw new \InvalidArgumentException("Menu at '$name' is misconfigured (f.e. the route might be incorrect) and could therefore not be instanciated"); | ||
} | ||
|
||
$menuItem->setCurrentUri($this->request->getRequestUri()); | ||
//$menuItem->setCurrentUri($this->request->getRequestUri()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please do not commit commented out code. to work on the upgrade towards knp menu 2.0, please do a pr against #203 - if you can keep the code style cleanups separately, we could just merge those cleanups which would be nice There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the call was removed on 2.0, right? does this work as expected, meaning the menu is still highlighted at the right place? or do we need something else? i think we also have some |
||
|
||
return $menuItem; | ||
} | ||
|
@@ -225,7 +225,7 @@ protected function find($name, array $options, $throw) | |
&& 0 === strncmp($path, $this->getMenuRoot(), strlen($this->getMenuRoot())) | ||
) { | ||
// we have jackalope with a fetch depth. prefetch all menu | ||
// nodes of all menues. | ||
// nodes of all menus. | ||
$session->getNode($this->getMenuRoot(), $this->getPrefetch() + 1); | ||
} else { | ||
$session->getNode($path, $this->getPrefetch()); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,6 @@ | |
</call> | ||
</service> | ||
|
||
|
||
</services> | ||
|
||
</container> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2"> | ||
<file source-language="en" target-language="es" datatype="plaintext" original="file.ext"> | ||
<body> | ||
<trans-unit id="dashboard.cmf"> | ||
<source>dashboard.cmf</source> | ||
<target>Symfony CMF</target> | ||
</trans-unit> | ||
<trans-unit id="dashboard.label_menu"> | ||
<source>dashboard.label_menu</source> | ||
<target>Menus</target> | ||
</trans-unit> | ||
<trans-unit id="dashboard.label_menu_node"> | ||
<source>dashboard.label_menu_node</source> | ||
<target>Nodo Menu</target> | ||
</trans-unit> | ||
<trans-unit id="breadcrumb.link_menu_list"> | ||
<source>breadcrumb.link_menu_list</source> | ||
<target>Menus</target> | ||
</trans-unit> | ||
<trans-unit id="breadcrumb.link_menu_create"> | ||
<source>breadcrumb.link_menu_create</source> | ||
<target>Crear</target> | ||
</trans-unit> | ||
<trans-unit id="breadcrumb.link_menu_edit"> | ||
<source>breadcrumb.link_menu_edit</source> | ||
<target>Editar</target> | ||
</trans-unit> | ||
<trans-unit id="breadcrumb.link_menu_delete"> | ||
<source>breadcrumb.link_menu_delete</source> | ||
<target>Eliminar</target> | ||
</trans-unit> | ||
<trans-unit id="breadcrumb.link_menu_node_list"> | ||
<source>breadcrumb.link_menu_node_list</source> | ||
<target>Nodos Menu</target> | ||
</trans-unit> | ||
<trans-unit id="breadcrumb.link_menu_node_create"> | ||
<source>breadcrumb.link_menu_node_create</source> | ||
<target>Crear</target> | ||
</trans-unit> | ||
<trans-unit id="breadcrumb.link_menu_node_edit"> | ||
<source>breadcrumb.link_menu_node_edit</source> | ||
<target>Editar</target> | ||
</trans-unit> | ||
<trans-unit id="breadcrumb.link_menu_node_delete"> | ||
<source>breadcrumb.link_menu_node_delete</source> | ||
<target>Eliminar</target> | ||
</trans-unit> | ||
<trans-unit id="list.label_id"> | ||
<source>list.label_id</source> | ||
<target>Id</target> | ||
</trans-unit> | ||
<trans-unit id="list.label_name"> | ||
<source>list.label_name</source> | ||
<target>Nombre</target> | ||
</trans-unit> | ||
<trans-unit id="list.label_label"> | ||
<source>list.label_label</source> | ||
<target>Etiqueta</target> | ||
</trans-unit> | ||
<trans-unit id="list.label_uri"> | ||
<source>list.label_uri</source> | ||
<target>URI</target> | ||
</trans-unit> | ||
<trans-unit id="list.label_route"> | ||
<source>list.label_route</source> | ||
<target>Ruta</target> | ||
</trans-unit> | ||
<trans-unit id="form.group_general"> | ||
<source>form.group_general</source> | ||
<target>General</target> | ||
</trans-unit> | ||
<trans-unit id="form.group_items"> | ||
<source>form.group_items</source> | ||
<target>Items</target> | ||
</trans-unit> | ||
<trans-unit id="form.label_children"> | ||
<source>form.label_children</source> | ||
<target>Items</target> | ||
</trans-unit> | ||
<trans-unit id="form.label_parent"> | ||
<source>form.label_parent</source> | ||
<target>Padre</target> | ||
</trans-unit> | ||
<trans-unit id="form.label_name"> | ||
<source>form.label_name</source> | ||
<target>Nombre</target> | ||
</trans-unit> | ||
<trans-unit id="form.label_label"> | ||
<source>form.label_label</source> | ||
<target>Etiqueta</target> | ||
</trans-unit> | ||
<trans-unit id="form.label_uri"> | ||
<source>form.label_uri</source> | ||
<target>URI</target> | ||
</trans-unit> | ||
<trans-unit id="form.label_route"> | ||
<source>form.label_route</source> | ||
<target>Ruta</target> | ||
</trans-unit> | ||
<trans-unit id="form.label_parameters"> | ||
<source>form.label_parameters</source> | ||
<target>Parámetros de ruta</target> | ||
</trans-unit> | ||
<trans-unit id="form.label_content"> | ||
<source>form.label_content</source> | ||
<target>Contenido</target> | ||
</trans-unit> | ||
<trans-unit id="form.label_link_type"> | ||
<source>form.label_link_type</source> | ||
<target>Tipo de enlace</target> | ||
</trans-unit> | ||
<trans-unit id="form.label_weak"> | ||
<source>form.label_weak</source> | ||
<target>Asociación débil</target> | ||
</trans-unit> | ||
<trans-unit id="help.items_help"> | ||
<source>help.items_help</source> | ||
<target>Click en cada item para editar, click derecho para crear items.</target> | ||
</trans-unit> | ||
<trans-unit id="form.group_menus"> | ||
<source>form.group_menus</source> | ||
<target>Menu</target> | ||
</trans-unit> | ||
<trans-unit id="form.label_menu_nodes"> | ||
<source>form.label_menu_nodes</source> | ||
<target>Menu</target> | ||
</trans-unit> | ||
<trans-unit id="form.group_menu_options"> | ||
<source>form.group_menu_options</source> | ||
<target>Opciones de menu</target> | ||
</trans-unit> | ||
<trans-unit id="form.label_display"> | ||
<source>form.label_display</source> | ||
<target>Desplegar</target> | ||
</trans-unit> | ||
<trans-unit id="form.help_display"> | ||
<source>form.help_display</source> | ||
<target>Una entrada menu sólo es mostrada si la etiqueta no está vacía.</target> | ||
</trans-unit> | ||
<trans-unit id="form.label_display_children"> | ||
<source>form.label_display_children</source> | ||
<target>Mostrar Hijos</target> | ||
</trans-unit> | ||
<trans-unit id="form.help_display_children"> | ||
<source>form.help_display_children</source> | ||
<target>Hijos son mostrados sólo si la entrada misma es mostrada.</target> | ||
</trans-unit> | ||
<trans-unit id="form.label_attributes"> | ||
<source>form.label_attributes</source> | ||
<target>Atributos de Menu</target> | ||
</trans-unit> | ||
<trans-unit id="form.label_label_attributes"> | ||
<source>form.label_label_attributes</source> | ||
<target>Atributos de Etiqueta</target> | ||
</trans-unit> | ||
<trans-unit id="form.label_children_attributes"> | ||
<source>form.label_children_attributes</source> | ||
<target>Atributos de Hijos</target> | ||
</trans-unit> | ||
<trans-unit id="form.label_link_attributes"> | ||
<source>form.label_link_attributes</source> | ||
<target>Atributos de enlace</target> | ||
</trans-unit> | ||
</body> | ||
</file> | ||
</xliff> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are not going to use gush...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try to speak for yourself, in view of such a hostile env i am closing the PRs, maybe i will try later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sad that you closed this PR because of this one little thing. It contained lots of nice changes.
In fact, there were just 2 problems with this PR (in a PR with 20+ changes):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t think there was anything wrong with @wouterj’s comment. He part of the CMF core team and just expressed that he doesn’t want to introduce a new tool to the project. What’s wrong with that?