Skip to content

Bundle standards #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 5, 2013
Merged

Bundle standards #52

merged 2 commits into from
Aug 5, 2013

Conversation

dantleech
Copy link
Member

Q A
Bug fix? no
New feature? no
BC breaks? yes
Deprecations? no
Tests pass? yes
Fixed tickets N/A - relates to #49
License MIT
Doc PR N/A

This addresses

  • General
  • Meta
  • Testing component integration

Adds some web tests for Sonata.

- General Bundle Standards (all)
- Meta
- Testing component integration
@@ -13,6 +13,7 @@
use Doctrine\Bundle\PHPCRBundle\Migrator\MigratorInterface;
use Doctrine\ODM\PHPCR\DocumentManager;

// dan: What does this do ??
class Page implements MigratorInterface
Copy link
Member Author

Choose a reason for hiding this comment

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

What does this do?

Copy link
Member

Choose a reason for hiding this comment

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

@dantleech
Copy link
Member Author

Added WebTests for Sonata. Had to add some dependencies and fix the Configuration class a little.

Good to merge as far as I am concerned.

@@ -38,6 +38,7 @@ public function getConfigTreeBuilder()
->fixXmlConfig('controller_by_alias', 'controllers_by_alias')
->fixXmlConfig('controller_by_class', 'controllers_by_class')
->fixXmlConfig('template_by_class', 'templates_by_class')
->addDefaultsIfNotSet()
Copy link
Member

Choose a reason for hiding this comment

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

do we want that? its a change in behaviour in case you want to disable something

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, the DI extension uses keys from $config['routing']. It crashes if these defaults are not defined - the test uses the most minimal configuration, so this hasn't been noticed before presumably.

Not sure I see why its bad, although I can certainly see a case for tidying up the DI extension, its a bit chaotic.

Copy link
Member

Choose a reason for hiding this comment

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

ok with your change then.

->add('body', 'textarea')
;
}

protected function configureSideMenu(MenuItemInterface $menu, $action, AdminInterface $childAdmin = null)
Copy link
Member Author

Choose a reason for hiding this comment

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

Removed this. Should we keep it? What is the intention of sidemenu.publish_start_end_date and the other one? /cc @lsmith77

Copy link
Member

Choose a reason for hiding this comment

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

it was a quick hack to add a preview link and also give some documentation on the logic behind the publish workflow. the later part should now be moved to the admin extension somehow. the former is something we really should figure out. we could create a form widget that just lists all the pages that are linked to the given content directly or indirectly (ie. f.e. for a block it would find what content is linked to the block and from there figure out the routes).

Copy link
Member

Choose a reason for hiding this comment

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

that would be this issue i think:
sonata-project/SonataDoctrinePhpcrAdminBundle#116

i wonder if we really should build that right into sonata, with an
optional dependeny on CmfRoutingBundle or if we could for example
provide an extension for this. but not sure if extensions can add to the
sidebar...

Copy link
Member Author

Choose a reason for hiding this comment

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

So are we alright to leave this out for now if we have that issue?

Copy link
Member

Choose a reason for hiding this comment

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

i added a link to the changes here in the sonata issue about the preview link.

i don't really understand what the publish workflow thingy was about, if it just was doing documentation. @lsmith77 can you create an issue on the corebundle if we should add something to the publish workflow admin extensions? maybe providing the label and the help text in the form would be enough?

lets merge this PR, the publish workflow things are already displaying broken, so it seems not too important to me.

Copy link
Member Author

Choose a reason for hiding this comment

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

dantleech added a commit that referenced this pull request Aug 5, 2013
@dantleech dantleech merged commit 1e28870 into master Aug 5, 2013
@dbu dbu deleted the bundle_standards branch February 19, 2014 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants