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 3.x branch #766

Merged
merged 2 commits into from
Jun 8, 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
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ php:
sudo: false

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

Expand All @@ -30,6 +31,7 @@ env:
- SYMFONY_DEPRECATIONS_HELPER=weak
- TARGET=test
- UPSTREAM_URL=https://github.com/sonata-project/SonataUserBundle.git
- XMLLINT_INDENT=" "

matrix:
fast_finish: true
Expand Down
1 change: 0 additions & 1 deletion .travis/before_install_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ fi

# To be removed when following PR will be merged: https://github.com/travis-ci/travis-build/pull/718
composer self-update --stable
composer config --quiet --global github-oauth.github.com $GITHUB_OAUTH_TOKEN
sed --in-place "s/\"dev-master\":/\"dev-${TRAVIS_COMMIT}\":/" composer.json

if [ "$SYMFONY" != "" ]; then composer require "symfony/symfony:$SYMFONY" --no-update; fi;
Expand Down
2 changes: 1 addition & 1 deletion .travis/check_relevant_lint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -ev

RELEVANT_FILES=$(git diff --name-only HEAD upstream/${TRAVIS_BRANCH} -- *.{json})
RELEVANT_FILES=$(git diff --name-only HEAD upstream/${TRAVIS_BRANCH} -- '*.json' '*.yml' '*.xml' '*.xliff')

if [[ -z ${RELEVANT_FILES} ]]; then echo -n 'KO'; exit 0; fi;
2 changes: 2 additions & 0 deletions .travis/install_lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
set -ev

composer global require sllh/composer-lint:@stable --prefer-dist --no-interaction

gem install yaml-lint
9 changes: 7 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ Thanks for your interest in Sonata projects!
First, check if you are up to date: is your version still supported, and are
you using the latest patch version?

If you are not sure this is a bug, consider posting your question on [Stack
Overflow](http://stackoverflow.com), using one of the sonata tags.
GitHub Issues is for **issues**, as opposed to question on how to use Sonata.
If you are not sure this is a bug, or simply want to ask such a question,
please post your question on [Stack Overflow](http://stackoverflow.com/questions/tagged/sonata),
using the `sonata` tags.

If you happen to find a bug, we kindly request you report it. However,
before submitting it, please check the [project documentation available
online](https://sonata-project.org/bundles/).
Expand Down Expand Up @@ -88,8 +91,10 @@ Some rules have to be respected about the test:
* `@codeCoverageIgnoreStart`
* `@codeCoverageIgnoreEnd`
* All test methods should be prefixed by `test`. Example: `public function testItReturnsNull()`.
* All test method names must be in camel case format.
* As opposed, the `@test` annotation is prohibited.
* Most of the time, the test class should have the same name as the targeted class, suffixed by `Test`.
* The `@expectedException*` annotations are prohibited. Use `PHPUnit_Framework_TestCase::setExpectedException()`.

### Writing a Pull Request

Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ all:

lint:
composer validate
find . -name '*.yml' -not -path './vendor/*' -not -path './Resources/public/vendor/*' | xargs yaml-lint
find . \( -name '*.xml' -or -name '*.xliff' \) \
-not -path './vendor/*' -not -path './Resources/public/vendor/*' -type f \
-exec xmllint --encode UTF-8 --output '{}' --format '{}' \;
git diff --exit-code

test:
phpunit -c phpunit.xml.dist --coverage-clover build/logs/clover.xml
Expand Down