Skip to content
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

DevKit updates for master branch #733

Merged
merged 7 commits into from
May 19, 2016
Merged
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
23 changes: 23 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
root = true

[*]
end_of_line = lf
indent_style = space
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true

[*.{yml,twig,php}]
indent_size = 4

[*.{js,json,scss,css}]
indent_size = 2

[.travis-ci.yml]
indent_size = 2

[composer.json]
indent_size = 4

[Makefile]
indent_style = tab
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!--
Before you open an issue, make sure this one does not already exists.
Please also read the "guidelines for contributing" link above before posting.
-->

<!--
If you are reporting a bug, please try to fill in the following.
Otherwise remove it.
-->

| Question | Answer
|----------------|-------------------------------
| Bundle version | composer show sonata-project/*
| Symfony version| composer show symfony/*
| php version | php --version

# Error message

```
Error message goes here
```

# Steps to reproduce

# Expected results

# Actual results
48 changes: 48 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!-- THE PR TEMPLATE IS NOT AN OPTION. DO NOT DELETE IT! -->

<!--
Specify which issues will be fixed/closed.
Remove it if this is not related.
-->

Closes #

### Changelog

<!-- MANDATORY
Fill the changelog part inside the code block.
Remove unneeded sections.
Follow this schema: http://keepachangelog.com/
-->

```markdown
### Added
- Added some `Class::newMethod` to do great stuff

### Changed

### Deprecated

### Removed

### Fixed

### Security
```

### Subject

<!-- Describe your Pull Request content here -->

### To do

<!--
Complete the tasks.
You can add as many tasks as you want.
If some are not relevant, just remove them.
-->

- [ ] My PR stuff
- [ ] Update the tests
- [ ] Update the documentation
- [ ] Add an upgrade note
39 changes: 24 additions & 15 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
<?php

$finder = Symfony\CS\Finder\DefaultFinder::create()
->in(array(__DIR__))
->exclude(array('Tests/Fixtures'))
;
/*
* DO NOT EDIT THIS FILE!
*
* It's auto-generated by sonata-project/dev-kit package.
*
* Package `sllh/php-cs-fixer-styleci-bridge` is required to get it working.
*/

require_once __DIR__.'/vendor/sllh/php-cs-fixer-styleci-bridge/autoload.php';

use SLLH\StyleCIBridge\ConfigBridge;
use Symfony\CS\Fixer\Contrib\HeaderCommentFixer;

$header = <<<EOF
This file is part of the Sonata Project package.

(c) Thomas Rabaix <thomas.rabaix@sonata-project.org>

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOF;

HeaderCommentFixer::setHeader($header);

return Symfony\CS\Config\Config::create()
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
->fixers(array(
'-unalign_double_arrow',
'-unalign_equals',
'align_double_arrow',
'newline_after_open_tag',
'ordered_use',
'long_array_syntax',
))
return ConfigBridge::create()
->setUsingCache(true)
->finder($finder)
;
22 changes: 22 additions & 0 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# DO NOT EDIT THIS FILE!
#
# It's auto-generated by sonata-project/dev-kit package.
#
# Package `sllh/php-cs-fixer-styleci-bridge` is required to get it working.

preset: symfony

enabled:
- newline_after_open_tag
- ordered_class_elements
- ordered_use
- long_array_syntax
# Comment strict rules for the moment. Should be uncomment later to see StyleCI PR results
# - strict
# - strict_param
# - php_unit_construct
# - php_unit_strict

finder:
exclude:
- 'Tests/Fixtures'
112 changes: 66 additions & 46 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,70 +1,90 @@
# DO NOT EDIT THIS FILE!
#
# It's auto-generated by sonata-project/dev-kit package.

language: php

php:
- hhvm
- '5.3'
- '5.4'
- '5.5'
- '5.6'
- '7.0'
- nightly
- hhvm

sudo: false

cache:
directories:
- $HOME/.composer/cache
- $HOME/.cache/pip
- $HOME/.composer/cache/files

env:
global:
- PATH="$HOME/.composer/vendor/bin:$PATH"
- PATH="$HOME/.local/bin:$PATH"
- SYMFONY_DEPRECATIONS_HELPER=weak
- TARGET=test

matrix:
fast_finish: true
include:
- php: 7.0
env: TARGET=cs_dry_run
- php: 7.0
- php: '7.0'
env: TARGET=docs
- php: 5.3
env: COMPOSER_FLAGS="--prefer-lowest --prefer-stable"
- php: 5.6
env: SYMFONY_VERSION=2.3.*
- php: 5.6
env: SYMFONY_VERSION=2.7.*
- php: 5.6
env: SYMFONY_VERSION=2.8.*
- php: 5.5
env: SYMFONY_VERSION=3.0.*
- php: 5.6
env: SYMFONY_VERSION=3.0.*
- php: 7.0
env: SYMFONY_VERSION=3.0.*

- php: '5.3'
env: COMPOSER_FLAGS="--prefer-lowest"
- php: '7.0'
env: SYMFONY=2.3.*
- php: '7.0'
env: SYMFONY=2.6.*
- php: '7.0'
env: SYMFONY=2.7.*
- php: '7.0'
env: SYMFONY=2.8.*
- php: '7.0'
env: SYMFONY=dev-master@dev
- php: '7.0'
env: FOS_USER=1.3.*
- php: '7.0'
env: FOS_USER=dev-master@dev
- php: '7.0'
env: SONATA_CORE=3.*
- php: '7.0'
env: SONATA_CORE=dev-master@dev
- php: '7.0'
env: SONATA_ADMIN=3.*
- php: '7.0'
env: SONATA_ADMIN=dev-master@dev
- php: '7.0'
env: SYMFONY_DEPRECATIONS_HELPER=0
allow_failures:
- php: hhvm
- php: nightly
- env: SYMFONY_VERSION=3.0.*
- php: hhvm
- env: SYMFONY_DEPRECATIONS_HELPER=0
- env: SYMFONY=dev-master@dev
- env: FOS_USER=dev-master@dev
- env: SONATA_CORE=dev-master@dev
- env: SONATA_ADMIN=dev-master@dev

before_script:
- (phpenv config-rm xdebug.ini || exit 0)
- mkdir -p ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d && echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- composer selfupdate
- composer config -q -g github-oauth.github.com $GITHUB_OAUTH_TOKEN
- composer global require phpunit/phpunit:@stable fabpot/php-cs-fixer --no-update
- composer global update --prefer-dist --no-interaction
- |
if [ "$SYMFONY_VERSION" == "3.0.*" ]; then
composer require "symfony/http-foundation" "^3.0" --no-update
composer require "symfony/form" "^3.0" --no-update
composer require "symfony/security" "^3.0" --no-update
composer require "symfony/console" "^3.0" --no-update
fi
- if [ "$SYMFONY_VERSION" != "" ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi;
- travis_wait composer update --prefer-dist --no-interaction $COMPOSER_FLAGS
- export PATH=$HOME/.local/bin:$PATH
- pip install -r Resources/doc/requirements.txt --user `whoami`
before_install:
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then mv "$HOME/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini" /tmp; fi;
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then echo "memory_limit=3072M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;
- if [ "$TARGET" = 'test' ]; then composer self-update --stable; fi;
- if [ "$TARGET" = 'test' ]; then composer config --quiet --global github-oauth.github.com $GITHUB_OAUTH_TOKEN; fi;
- if [ "$TARGET" = 'test' ]; then sed --in-place "s/\"dev-master\":/\"dev-${TRAVIS_COMMIT}\":/" composer.json; fi;
- if [ "$TARGET" = 'test' -a "$SYMFONY" != "" ]; then composer require "symfony/symfony:$SYMFONY" --no-update; fi;
- if [ "$TARGET" = 'test' -a "$FOS_USER" != "" ]; then composer require "friendsofsymfony/user-bundle:$FOS_USER" --no-update; fi;
- if [ "$TARGET" = 'test' -a "$SONATA_CORE" != "" ]; then composer require "sonata-project/core-bundle:$SONATA_CORE" --no-update; fi;
- if [ "$TARGET" = 'test' -a "$SONATA_ADMIN" != "" ]; then composer require "sonata-project/admin-bundle:$SONATA_ADMIN" --no-update; fi;

script:
- make $TARGET
install:
- if [ "$TARGET" = 'test' ]; then mkdir "$HOME/bin"; fi;
- if [[ "$TARGET" = 'test' && "$TRAVIS_PHP_VERSION" < '5.6' ]]; then wget https://phar.phpunit.de/phpunit-old.phar --output-document="$HOME/bin/phpunit"; fi
- if [[ "$TARGET" = 'test' && ! "$TRAVIS_PHP_VERSION" < '5.6' ]]; then wget https://phar.phpunit.de/phpunit.phar --output-document="$HOME/bin/phpunit"; fi
- if [ "$TARGET" = 'test' ]; then chmod u+x "$HOME/bin/phpunit"; fi;
- if [ "$TARGET" = 'test' ]; then travis_wait 30 composer update --prefer-dist --no-interaction --prefer-stable $COMPOSER_FLAGS; fi;
- if [ "$TARGET" = 'docs' ]; then pip install -r Resources/doc/requirements.txt --user `whoami`; fi;

before_script:
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then mv /tmp/xdebug.ini "$HOME/.phpenv/versions/$(phpenv version-name)/etc/conf.d"; fi;

notifications:
webhooks: https://sonata-project.org/bundles/user/master/travis
script: make $TARGET
2 changes: 1 addition & 1 deletion Admin/Document/GroupAdmin.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* This file is part of the Sonata package.
* This file is part of the Sonata Project package.
*
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
Expand Down
2 changes: 1 addition & 1 deletion Admin/Document/UserAdmin.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* This file is part of the Sonata package.
* This file is part of the Sonata Project package.
*
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
Expand Down
2 changes: 1 addition & 1 deletion Admin/Entity/GroupAdmin.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* This file is part of the Sonata package.
* This file is part of the Sonata Project package.
*
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
Expand Down
2 changes: 1 addition & 1 deletion Admin/Entity/UserAdmin.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* This file is part of the Sonata package.
* This file is part of the Sonata Project package.
*
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
Expand Down
2 changes: 1 addition & 1 deletion Admin/Model/GroupAdmin.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* This file is part of the Sonata package.
* This file is part of the Sonata Project package.
*
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
Expand Down
Loading