Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gush.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
adapter: github
issue-tracker: github

Copy link
Member

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...

Copy link
Contributor Author

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

Copy link
Member

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):

  • Some lost comments, which are quite normal since it's a WIP PR
  • You introduced a new tool. When introducing a new tool to a big open source project, you can be sure there will be a discussion with some hard opinions.

Copy link

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?

21 changes: 11 additions & 10 deletions .travis.yml
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
Copy link
Member

Choose a reason for hiding this comment

The 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

Expand All @@ -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"
3 changes: 2 additions & 1 deletion Admin/Extension/MenuOptionsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public function configureFormFields(FormMapper $formMapper)
'options' => $child_options,
)
)
->end();
->end()
;
}
}
1 change: 0 additions & 1 deletion Admin/MenuNodeAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

use Sonata\AdminBundle\Form\FormMapper;
use Sonata\DoctrinePHPCRAdminBundle\Admin\Admin;
use Symfony\Cmf\Bundle\MenuBundle\Model\Menu;
use Knp\Menu\ItemInterface as MenuItemInterface;
use Doctrine\Common\Util\ClassUtils;

Expand Down
3 changes: 1 addition & 2 deletions DependencyInjection/CmfMenuExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!

$loader = new XmlFileLoader(
$container,
Expand All @@ -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']);
Copy link
Member

Choose a reason for hiding this comment

The 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);

Expand Down
3 changes: 1 addition & 2 deletions Model/MenuNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use Symfony\Cmf\Bundle\CoreBundle\Translatable\TranslatableInterface;
use Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishTimePeriodInterface;
use Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow\PublishableInterface;
use Symfony\Cmf\Bundle\MenuBundle\Model\MenuOptionsInterface;

/**
* This is the standard CMF MenuNode implementation
Expand Down Expand Up @@ -239,7 +238,7 @@ public function getLinkType()
* @see getLinkType
* @see ContentAwareFactory::$validLinkTypes
*
* Valid link types are defined in ContenentAwareFactory
* Valid link types are defined in ContentAwareFactory
*
* @param $linkType string - one of uri, route or content
*/
Expand Down
4 changes: 1 addition & 3 deletions Model/MenuOptionsInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*
* @author Mojtaba Koosej <mkoosej@gmail.com>
*/

interface MenuOptionsInterface extends NodeInterface
{
/**
Expand Down Expand Up @@ -106,7 +105,7 @@ function getChildrenAttributes();
/**
* Set the children attributes
*
* @param array $attributes
* @param array $childrenAttributes
*
* @return Page The current Page instance
*/
Expand All @@ -127,5 +126,4 @@ function getLabelAttributes();
* @return Page The current Page instance
*/
function setLabelAttributes($labelAttributes);

}
4 changes: 2 additions & 2 deletions Provider/PhpcrMenuProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Copy link
Member

Choose a reason for hiding this comment

The 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

Copy link
Member

Choose a reason for hiding this comment

The 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 current logik in the models or somewhere, do we need to do anything there?


return $menuItem;
}
Expand Down Expand Up @@ -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());
Expand Down
1 change: 0 additions & 1 deletion Resources/config/menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
</call>
</service>


</services>

</container>
167 changes: 167 additions & 0 deletions Resources/translations/CmfMenuBundle.es.xliff
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>
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"symfony/framework-bundle": "~2.3",
"doctrine/phpcr-bundle": ">=1.1.0,<1.3-dev",
"doctrine/phpcr-odm": ">=1.1.0,<1.3-dev",
"knplabs/knp-menu-bundle": "1.1.*",
"knplabs/knp-menu-bundle": "~2.0.0",
"symfony-cmf/core-bundle": ">=1.1.0,<1.3-dev"
},
"require-dev": {
Expand All @@ -38,7 +38,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "1.2-dev"
"dev-master": "2.0-dev"
}
}
}