Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Commit

Permalink
Merge 272eec5 into f25aa59
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI committed Jun 24, 2016
2 parents f25aa59 + 272eec5 commit 437a9c2
Show file tree
Hide file tree
Showing 494 changed files with 4,508 additions and 4,737 deletions.
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.yml]
indent_size = 2

[composer.json]
indent_size = 4

[Makefile]
indent_style = tab
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!--
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.
-->

### Environment

#### Sonata packages

```bash
$ composer show sonata-project/*
# Put the result here.
```

#### Symfony packages

```bash
$ composer show symfony/*
# Put the result here.
```

#### PHP version

```bash
$ php -v
# Put the result here.
```

## Subject

<!--
Give here as many details as possible.
Next sections are for ERRORS only.
-->

## Steps to reproduce

## Expected results

## Actual results

<!--
If it's an error message or piece of code, use code block tags,
and make sure you provide the whole stack trace(s),
not just the first error message you can see.
More details here: https://github.com/sonata-project/ecommerce/blob/master/CONTRIBUTING.md#issues
-->
57 changes: 57 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!-- THE PR TEMPLATE IS NOT AN OPTION. DO NOT DELETE IT! -->

<!--
Show us you choose the right branch.
Different branches are used for different things :
- master is for everything backwards compatible, like patches, features and deprecation notices
- master is for deprecation removals and other changes that cannot be done without a BC-break
More details here: https://github.com/sonata-project/ecommerce/blob/master/CONTRIBUTING.md#the-base-branch
-->
I am targetting this branch, because…

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

Closes #
Fixes #

## Changelog

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

<!-- REMOVE EMPTY SECTIONS -->
```markdown
### Added
- Added some `Class::newMethod` to do great stuff

### Changed

### Deprecated

### Removed

### Fixed

### Security
```

## To do

<!--
If this is a work in progress, COMPLETE and ADD needed tasks.
You can add as many tasks as you want.
If some are not relevant, just REMOVE them.
-->

- [ ] Update the tests
- [ ] Update the documentation
- [ ] Add an upgrade note

## Subject

<!-- Describe your Pull Request content here -->
49 changes: 35 additions & 14 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,40 @@
<?php

$finder = Symfony\CS\Finder\DefaultFinder::create()
->in(array(__DIR__))
;
/*
* 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;

$header = <<<EOF
This file is part of the Sonata Project package.
(c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
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',
))
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOF;

// PHP-CS-Fixer 1.x
if (class_exists('Symfony\CS\Fixer\Contrib\HeaderCommentFixer')) {
\Symfony\CS\Fixer\Contrib\HeaderCommentFixer::setHeader($header);
}

$config = ConfigBridge::create()
->setUsingCache(true)
->finder($finder)
;

// PHP-CS-Fixer 2.x
if (method_exists($config, 'setRules')) {
$config->setRules(array_merge($config->getRules(), array(
'header_comment' => array('header' => $header)
)));
}

return $config;
27 changes: 27 additions & 0 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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:
- combine_consecutive_unsets
- long_array_syntax
- newline_after_open_tag
- no_php4_constructor
- no_useless_else
- ordered_class_elements
- ordered_use
# 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'
# ecommerce special case:
- 'Resources/skeleton'
96 changes: 54 additions & 42 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,63 +1,75 @@
# DO NOT EDIT THIS FILE!
#
# It's auto-generated by sonata-project/dev-kit package.

branches:
only:
- master

language: php

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

sudo: false

cache:
pip: true
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
- UPSTREAM_URL=https://github.com/sonata-project/ecommerce.git
- XMLLINT_INDENT=" "

matrix:
fast_finish: true
include:
- php: 5.3
env: SYMFONY_VERSION=2.8.*
- php: 5.4
env: SYMFONY_VERSION=2.8.*
- php: 5.6
env: SYMFONY_VERSION=2.8.* CS_FIXER=run
- php: 5.3
env: SYMFONY_VERSION=2.3.* COMPOSER_FLAGS="--prefer-lowest"
- 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.*" ACL_VERSION="dev-master"
- php: 5.6
env: SYMFONY_VERSION="3.0.*" ACL_VERSION="dev-master"
- php: 7.0
env: SYMFONY_VERSION="3.0.*" ACL_VERSION="dev-master"

- php: '7.0'
env: TARGET=docs
- php: '7.0'
env: TARGET=lint
- php: '5.3'
env: COMPOSER_FLAGS="--prefer-lowest"
- php: '7.0'
env: SYMFONY=2.3.*
- 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: SYMFONY_DEPRECATIONS_HELPER=0
allow_failures:
- php: nightly
- php: hhvm
- env: SYMFONY_DEPRECATIONS_HELPER=0
- env: SYMFONY=dev-master@dev

before_install:
- git remote add upstream ${UPSTREAM_URL} && git fetch --all
- if [[ -x .travis/check_relevant_${TARGET}.sh && "$TRAVIS_PULL_REQUEST" != "false" ]]; then export RELEVANT=$(.travis/check_relevant_${TARGET}.sh); fi;
- if [[ ! -z ${RELEVANT} ]];then exit 0; fi;
- if [ -x .travis/before_install_${TARGET}.sh ]; then .travis/before_install_${TARGET}.sh; fi;

install:
- if [ -x .travis/install_${TARGET}.sh ]; then .travis/install_${TARGET}.sh; fi;

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" != "" ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi;
- if [ "$ACL_VERSION" != "" ]; then composer require "symfony/security-acl:${ACL_VERSION}" --no-update; fi;
- travis_wait composer update --prefer-dist --no-interaction $COMPOSER_FLAGS
- export PATH=$HOME/.local/bin:$PATH
- pip install -r docs/requirements.txt --user `whoami`

script:
- if [ "$CS_FIXER" = "run" ]; then make cs_dry_run ; fi;
- make test

notifications:
webhooks: https://sonata-project.org/bundles/ecommerce/master/travis
- if [ -x .travis/before_script_${TARGET}.sh ]; then .travis/before_script_${TARGET}.sh; fi;

script: make $TARGET

after_success:
- if [ -x .travis/after_success_${TARGET}.sh ]; then .travis/after_success_${TARGET}.sh; fi;
4 changes: 4 additions & 0 deletions .travis/after_success_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
set -ev

coveralls -v
17 changes: 17 additions & 0 deletions .travis/before_install_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env sh
set -ev

if [ "${TRAVIS_PHP_VERSION}" != "hhvm" ]; then
mv "$HOME/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini" /tmp
echo "memory_limit=3072M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini

if [ ${TRAVIS_PHP_VERSION} '<' '7.0' ]; then
echo "extension=mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
fi
fi

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

if [ "$SYMFONY" != "" ]; then composer require "symfony/symfony:$SYMFONY" --no-update; fi;
6 changes: 6 additions & 0 deletions .travis/before_script_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh
set -ev

if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then
mv /tmp/xdebug.ini "$HOME/.phpenv/versions/$(phpenv version-name)/etc/conf.d"
fi
6 changes: 6 additions & 0 deletions .travis/check_relevant_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -ev

RELEVANT_FILES=$(git diff --name-only HEAD upstream/${TRAVIS_BRANCH} -- '*.rst')

if [[ -z ${RELEVANT_FILES} ]]; then echo -n 'KO'; exit 0; fi;
6 changes: 6 additions & 0 deletions .travis/check_relevant_lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -ev

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;
6 changes: 6 additions & 0 deletions .travis/check_relevant_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -ev

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

if [[ -z ${RELEVANT_FILES} ]]; then echo -n 'KO'; exit 0; fi;
4 changes: 4 additions & 0 deletions .travis/install_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
set -ev

pip install -r Resources/doc/requirements.txt --user $(whoami)
6 changes: 6 additions & 0 deletions .travis/install_lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh
set -ev

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

gem install yaml-lint

0 comments on commit 437a9c2

Please sign in to comment.