-
Notifications
You must be signed in to change notification settings - Fork 31
Introduced Style CI #61
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
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 @@ | ||
| preset: symfony |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,34 +1,48 @@ | ||
| language: php | ||
|
|
||
| php: | ||
| - 5.3 | ||
| - 5.4 | ||
| - 5.5 | ||
| - 5.3 | ||
| - 5.4 | ||
| - 5.5 | ||
| - 5.6 | ||
| - 7.0 | ||
| - hhvm | ||
|
|
||
| sudo: false | ||
|
|
||
| cache: | ||
| directories: | ||
| - $HOME/.composer/cache | ||
|
|
||
| env: | ||
| - SYMFONY_VERSION=2.5.* | ||
| - SYMFONY_VERSION=2.7.* SYMFONY_DEPRECATIONS_HELPER=weak | ||
|
|
||
| matrix: | ||
| allow_failures: | ||
| - env: SYMFONY_VERSION=dev-master | ||
| include: | ||
| - php: 5.5 | ||
| env: SYMFONY_VERSION=2.3.* | ||
| - php: 5.5 | ||
| env: SYMFONY_VERSION=2.4.* | ||
| - php: 5.5 | ||
| env: SYMFONY_VERSION=dev-master | ||
|
|
||
|
|
||
| - php: 5.3 | ||
| env: SYMFONY_VERSION=2.3.* COMPOSER_FLAGS="--prefer-lowest" | ||
| - php: 5.6 | ||
| env: SYMFONY_VERSION=2.3.* SYMFONY_DEPRECATIONS_HELPER=weak | ||
| - php: 5.6 | ||
| env: SYMFONY_VERSION=2.8.* | ||
| - php: 5.6 | ||
| env: SYMFONY_VERSION=3.0.* | ||
| allow_failures: | ||
| - env: SYMFONY_VERSION=2.8.* | ||
| - env: SYMFONY_VERSION=3.0.* | ||
| fast_finish: true | ||
|
|
||
| before_script: | ||
| before_install: | ||
| - sh -c 'if [ "${TRAVIS_PHP_VERSION}" != "hhvm" ]; then echo "memory_limit = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;' | ||
| - composer self-update | ||
| - echo 'memory_limit = -1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini | ||
| - composer require symfony/symfony:${SYMFONY_VERSION} --prefer-source | ||
| - composer require symfony/symfony:${SYMFONY_VERSION} --no-update | ||
| - composer update $COMPOSER_FLAGS --prefer-dist | ||
| - vendor/symfony-cmf/testing/bin/travis/phpcr_odm_doctrine_dbal.sh | ||
|
|
||
| before_script: vendor/symfony-cmf/testing/bin/travis/phpcr_odm_doctrine_dbal.sh | ||
|
|
||
| script: phpunit --coverage-text | ||
|
|
||
| notifications: | ||
| irc: "irc.freenode.org#symfony-cmf" | ||
| email: "[email protected]" | ||
| email: "[email protected]" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,25 +3,22 @@ | |
| /* | ||
| * This file is part of the Symfony CMF package. | ||
| * | ||
| * (c) 2011-2014 Symfony CMF | ||
| * (c) 2011-2015 Symfony CMF | ||
| * | ||
| * For the full copyright and license information, please view the LICENSE | ||
| * file that was distributed with this source code. | ||
| */ | ||
|
|
||
|
|
||
| namespace Symfony\Cmf\Bundle\BlogBundle\Admin; | ||
|
|
||
| use Sonata\AdminBundle\Datagrid\ListMapper; | ||
| use Sonata\AdminBundle\Datagrid\DatagridMapper; | ||
| use Sonata\AdminBundle\Validator\ErrorElement; | ||
| use Sonata\AdminBundle\Form\FormMapper; | ||
| use Sonata\DoctrinePHPCRAdminBundle\Admin\Admin; | ||
| use Symfony\Cmf\Bundle\BlogBundle\Form\PostType; | ||
| use Symfony\Cmf\Bundle\BlogBundle\Routing\BlogRouteManager; | ||
|
|
||
| /** | ||
| * Blog Admin | ||
| * Blog Admin. | ||
| * | ||
| * @author Daniel Leech <[email protected]> | ||
| */ | ||
|
|
@@ -34,9 +31,9 @@ protected function configureFormFields(FormMapper $mapper) | |
| { | ||
| $mapper->add('name', 'text'); | ||
| $mapper->add('parent', 'doctrine_phpcr_odm_tree', array( | ||
| 'root_node' => $this->blogRoot, | ||
| 'choice_list' => array(), | ||
| 'select_root_node' => true) | ||
| 'root_node' => $this->blogRoot, | ||
| 'choice_list' => array(), | ||
| 'select_root_node' => true, ) | ||
| ); | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,25 +3,23 @@ | |
| /* | ||
| * This file is part of the Symfony CMF package. | ||
| * | ||
| * (c) 2011-2014 Symfony CMF | ||
| * (c) 2011-2015 Symfony CMF | ||
| * | ||
| * For the full copyright and license information, please view the LICENSE | ||
| * file that was distributed with this source code. | ||
| */ | ||
|
|
||
|
|
||
| namespace Symfony\Cmf\Bundle\BlogBundle\Admin; | ||
|
|
||
| use Sonata\AdminBundle\Datagrid\ListMapper; | ||
| use Sonata\AdminBundle\Datagrid\DatagridMapper; | ||
| use Sonata\AdminBundle\Validator\ErrorElement; | ||
| use Sonata\AdminBundle\Form\FormMapper; | ||
| use Sonata\DoctrinePHPCRAdminBundle\Admin\Admin; | ||
| use Symfony\Cmf\Bundle\BlogBundle\Form\PostType; | ||
| use Symfony\Cmf\Bundle\BlogBundle\Form\DataTransformer\CsvToArrayTransformer; | ||
|
|
||
| /** | ||
| * Post Admin | ||
| * Post Admin. | ||
| * | ||
| * @author Daniel Leech <[email protected]> | ||
| */ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,30 +3,28 @@ | |
| /* | ||
| * This file is part of the Symfony CMF package. | ||
| * | ||
| * (c) 2011-2014 Symfony CMF | ||
| * (c) 2011-2015 Symfony CMF | ||
| * | ||
| * For the full copyright and license information, please view the LICENSE | ||
| * file that was distributed with this source code. | ||
| */ | ||
|
|
||
|
|
||
| namespace Symfony\Cmf\Bundle\BlogBundle\Block; | ||
|
|
||
| use Symfony\Component\HttpFoundation\Response; | ||
| use Sonata\BlockBundle\Model\BlockInterface; | ||
| use Sonata\AdminBundle\Form\FormMapper; | ||
| use Sonata\AdminBundle\Validator\ErrorElement; | ||
| use Sonata\BlockBundle\Block\BaseBlockService; | ||
| use Doctrine\ODM\PHPCR\DocumentManager; | ||
| use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface; | ||
| use Symfony\Cmf\Bundle\BlogBundle\Repository\TagRepository; | ||
|
|
||
| /** | ||
| * Tag Cloud block service | ||
| * Tag Cloud block service. | ||
| * | ||
| * @author Daniel Leech <[email protected]> | ||
| */ | ||
| class TagCloudBlockService extends BaseBlockService | ||
| class TagCloudBlock extends BaseBlockService | ||
|
Member
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. erm, we should check if we need to fix the file name or the class name. not sure how this ever could work.
Member
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 think this entire class is pretty broken as
Member
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. so lets delete the class? or leave this alone and try to wrap up #59? or just deprecate and stop this bundle completely to focus on things we actually maintain? |
||
| { | ||
| protected $repo; | ||
|
|
||
|
|
@@ -39,7 +37,7 @@ public function __construct($name, EngineInterface $templating, TagRepository $r | |
| public function getDefaultSettings() | ||
| { | ||
| return array( | ||
| 'path' => 'cmf_blog_post_index' | ||
| 'path' => 'cmf_blog_post_index', | ||
| ); | ||
| } | ||
|
|
||
|
|
@@ -54,9 +52,10 @@ public function validateBlock(ErrorElement $errorElement, BlockInterface $block) | |
| public function execute(BlockInterface $block, Response $response = null) | ||
| { | ||
| $wTags = $this->repo->getWeightedTags(); | ||
|
|
||
| return $this->renderResponse('CmfBlogBundle:Block:tagCloud.html.twig', array( | ||
| 'block' => $block, | ||
| 'wTags' => $wTags | ||
| 'wTags' => $wTags, | ||
| )); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,13 +3,12 @@ | |
| /* | ||
| * This file is part of the Symfony CMF package. | ||
| * | ||
| * (c) 2011-2014 Symfony CMF | ||
| * (c) 2011-2015 Symfony CMF | ||
| * | ||
| * For the full copyright and license information, please view the LICENSE | ||
| * file that was distributed with this source code. | ||
| */ | ||
|
|
||
|
|
||
| namespace Symfony\Cmf\Bundle\BlogBundle\Controller; | ||
|
|
||
| use Doctrine\ODM\PHPCR\DocumentManager; | ||
|
|
@@ -23,7 +22,7 @@ | |
| use FOS\RestBundle\View\View; | ||
|
|
||
| /** | ||
| * Blog Controller | ||
| * Blog Controller. | ||
| * | ||
| * @author Daniel Leech <[email protected]> | ||
| */ | ||
|
|
@@ -56,7 +55,6 @@ class BlogController | |
| */ | ||
| private $publishWorkflowPermission = PublishWorkflowChecker::VIEW_ATTRIBUTE; | ||
|
|
||
|
|
||
| public function __construct( | ||
| EngineInterface $templating, | ||
| ViewHandlerInterface $viewHandler = null, | ||
|
|
@@ -85,6 +83,7 @@ protected function renderResponse($contentTemplate, $params) | |
| if ($this->viewHandler) { | ||
| $view = new View($params); | ||
| $view->setTemplate($contentTemplate); | ||
|
|
||
| return $this->viewHandler->handle($view); | ||
| } | ||
|
|
||
|
|
@@ -102,11 +101,10 @@ public function viewPostAction(Post $contentDocument, $contentTemplate = null) | |
|
|
||
| if (true !== $this->securityContext->isGranted($this->publishWorkflowPermission, $post)) { | ||
| throw new NotFoundHttpException(sprintf( | ||
| 'Post "%s" is not published' | ||
| , $post->getTitle())); | ||
| 'Post "%s" is not published', $post->getTitle())); | ||
| } | ||
|
|
||
| $contentTemplate = $contentTemplate ? : 'CmfBlogBundle:Blog:view_post.html.twig'; | ||
| $contentTemplate = $contentTemplate ?: 'CmfBlogBundle:Blog:view_post.html.twig'; | ||
|
|
||
| return $this->renderResponse($contentTemplate, array( | ||
| 'post' => $post, | ||
|
|
@@ -138,7 +136,7 @@ public function listAction(Request $request, $contentDocument, $contentTemplate | |
| return $this->renderResponse($contentTemplate, array( | ||
| 'blog' => $blog, | ||
| 'posts' => $posts, | ||
| 'tag' => $tag | ||
| 'tag' => $tag, | ||
| )); | ||
| } | ||
| } | ||
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.
this is weird. the parenthesis should be on the next line