Skip to content

Commit

Permalink
Prepared files for release 0.1.0 (#19)
Browse files Browse the repository at this point in the history
* added config for ci tools

* restructured doc

* added js dist path to excluded directories

* added env variable to fasten non coverage tests
  • Loading branch information
wachterjohannes authored and alexander-schranz committed Feb 21, 2017
1 parent fadeb0a commit d1b1eb9
Show file tree
Hide file tree
Showing 5 changed files with 129 additions and 3 deletions.
24 changes: 24 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
filter:
excluded_paths: [Tests/*, Resources/public/dist/*]

checks:
php:
code_rating: true
remove_extra_empty_lines: true
remove_php_closing_tag: true
remove_trailing_whitespace: true
fix_use_statements:
remove_unused: true
preserve_multiple: false
preserve_blanklines: true
order_alphabetically: true
fix_php_opening_tag: true
fix_linefeed: true
fix_line_ending: true
fix_identation_4spaces: true
fix_doc_comments: true

tools:
external_code_coverage:
timeout: 600
runs: 1
2 changes: 2 additions & 0 deletions .styleci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ disabled:
- phpdoc_indent
- phpdoc_to_comment
- blankline_after_open_tag
- function_declaration
- single_line_class_definition
14 changes: 12 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,26 @@ cache:
matrix:
include:
- php: 5.5
# env:
# - COMPOSER_FLAGS="--prefer-lowest --prefer-dist --no-interaction"
- php: 7.0
env:
# - COMPOSER_FLAGS="--prefer-dist --no-interaction"
- CODE_COVERAGE="--coverage-clover=coverage.clover"

before_install:
- composer self-update

install:
- travis_retry composer install --no-interaction
- if [[ -z $CODE_COVERAGE ]]; then phpenv config-rm xdebug.ini ; fi
- travis_retry composer update $COMPOSER_FLAGS
- composer info -i
- ./Tests/app/console doctrine:database:create
- ./Tests/app/console doctrine:schema:update --force

script:
- ./vendor/bin/phpunit
- ./vendor/bin/phpunit $CODE_COVERAGE

after_script:
- if [[ -n $CODE_COVERAGE ]]; then wget https://scrutinizer-ci.com/ocular.phar ; fi
- if [[ -n $CODE_COVERAGE ]]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover ; fi
46 changes: 45 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,51 @@
# SuluCommentBundle

[![Build Status](https://travis-ci.org/sulu/SuluCommentBundle.svg)](https://travis-ci.org/sulu/SuluCommentBundle)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/sulu/SuluCommentBundle/badges/quality-score.png)](https://scrutinizer-ci.com/g/sulu/SuluCommentBundle/)
[![Code Coverage](https://scrutinizer-ci.com/g/sulu/SuluCommentBundle/badges/coverage.png)](https://scrutinizer-ci.com/g/sulu/SuluCommentBundle/)
[![StyleCI](https://styleci.io/repos/25727590/shield)](https://styleci.io/repos/25727590)
[![Build Status](https://travis-ci.org/sulu/SuluCommentBundle.svg?branch=master)](https://travis-ci.org/sulu/SuluCommentBundle)

The SuluCommentBundle adds support for adding comments to different types of entities (pages, articles, custom) in Sulu.

**Included features:**

* Website renderer
* Sulu-Admin integration to delete and update comments

## Status

This repository will become version 1.0 of SuluCommentBundle. It is under **heavy development** and currently its APIs
and code are not stable yet (pre 1.0).

## Requirements

* Composer
* PHP `^5.5 || ^7.0`
* Sulu `^1.3`

For detailed requirements see [composer.json](https://github.com/sulu/SuluCommentBundle/blob/master/composer.json).

## Documentation

The the Documentation is stored in the
[Resources/doc/](https://github.com/sulu/SuluCommentBundle/blob/master/Resources/doc) folder.

## Installation

All the installation instructions are located in the
[Documentation](https://github.com/sulu/SuluCommentBundle/blob/master/Resources/doc/installation.md).

## License

This bundle is under the MIT license. See the complete license [in the bundle](LICENSE)

## Reporting an issue or a feature request

Issues and feature requests are tracked in the [Github issue tracker](https://github.com/Sulu/SuluCommentBundle/issues).

When reporting a bug, it may be a good idea to reproduce it in a basic project built using the
[Sulu Minimal Edition](https://github.com/sulu/sulu-minimal) to allow developers of the bundle to reproduce the issue
by simply cloning it and following some steps.

## Installation

Expand Down
46 changes: 46 additions & 0 deletions Resources/doc/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Installation

Install bundle over composer:

```bash
composer require sulu/comment-bundle
```

Configure the routing:

```yml
sulu_comment_api:
type: rest
resource: "@SuluCommentBundle/Resources/config/routing_api.xml"
prefix: /admin/api

sulu_comment:
resource: "@SuluCommentBundle/Resources/config/routing.xml"
prefix: /admin/comments
```
Add bundle to AbstractKernel:
```php
new Sulu\Bundle\CommentBundle\SuluCommentBundle(),
```

Possible bundle configuration:

```yml
sulu_comment:
default_templates:
comments: 'SuluCommentBundle:WebsiteComment:comments.html.twig'
comment: 'SuluCommentBundle:WebsiteComment:comment.html.twig'
types:
templates:
comments: 'SuluCommentBundle:WebsiteComment:comments.html.twig'
comment: 'SuluCommentBundle:WebsiteComment:comment.html.twig'
objects:
comment:
model: Sulu\Bundle\CommentBundle\Entity\Comment
repository: Sulu\Bundle\CommentBundle\Entity\CommentRepository
thread:
model: Sulu\Bundle\CommentBundle\Entity\Thread
repository: Sulu\Bundle\CommentBundle\Entity\ThreadRepository
```

0 comments on commit d1b1eb9

Please sign in to comment.