Skip to content

Commit 70338ef

Browse files
authored
Added meta files (#46)
* Added meta files * typo
1 parent 5b309d9 commit 70338ef

10 files changed

+113
-18
lines changed

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.gitattributes

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.editorconfig export-ignore
2+
.gitattributes export-ignore
3+
/.github/ export-ignore
4+
.gitignore export-ignore
5+
/.php_cs export-ignore
6+
/.scrutinizer.yml export-ignore
7+
/.styleci.yml export-ignore
8+
/.travis.yml export-ignore
9+
/behat.yml.dist export-ignore
10+
/features/ export-ignore
11+
/phpspec.ci.yml export-ignore
12+
/phpspec.yml.dist export-ignore
13+
/phpunit.xml.dist export-ignore
14+
/spec/ export-ignore
15+
/Tests/ export-ignore

.gitignore

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
build
2-
phpunit.xml
3-
composer.lock
4-
vendor
1+
/behat.yml
2+
/build/
3+
/composer.lock
4+
/phpspec.yml
5+
/phpunit.xml
6+
/vendor/

.php_cs

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
/*
4+
* In order to make it work, fabpot/php-cs-fixer and sllh/php-cs-fixer-styleci-bridge must be installed globally
5+
* with composer.
6+
*
7+
* @link https://github.com/Soullivaneuh/php-cs-fixer-styleci-bridge
8+
* @link https://github.com/FriendsOfPHP/PHP-CS-Fixer
9+
*/
10+
11+
use SLLH\StyleCIBridge\ConfigBridge;
12+
13+
return ConfigBridge::create();

.scrutinizer.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
filter:
2+
excluded_paths: [vendor/*, tests/*]
3+
checks:
4+
php:
5+
code_rating: true
6+
duplication: true
7+
tools:
8+
external_code_coverage: true

.styleci.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
preset: symfony
2+
3+
finder:
4+
exclude:
5+
- "Resources"
6+
- "vendor"
7+
8+
enabled:
9+
- short_array_syntax
10+
11+
disabled:
12+
- phpdoc_annotation_without_dot # This is still buggy: https://github.com/symfony/symfony/pull/19198

.travis.yml

+28-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,39 @@
11
language: php
22

3+
cache:
4+
directories:
5+
- $HOME/.composer/cache
6+
branches:
7+
except:
8+
- /^analysis-.*$/
9+
310
php:
4-
- 5.5
511
- 5.6
612
- 7.0
13+
- 7.1
714
- hhvm
15+
env:
16+
global:
17+
- TEST_COMMAND="composer test"
18+
matrix:
19+
- SYMFONY_VERSION=3.1.*
20+
- SYMFONY_VERSION=3.0.*
21+
- SYMFONY_VERSION=2.8.*
22+
- SYMFONY_VERSION=2.7.*
823

9-
before_install:
10-
- composer self-update
24+
matrix:
25+
fast_finish: true
26+
include:
27+
- php: 5.6
28+
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci" SYMFONY_VERSION=2.7.*
1129

1230
install:
13-
- composer update
31+
- composer require symfony/symfony:${SYMFONY_VERSION} --no-update
32+
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction
1433

1534
script:
16-
- phpunit
35+
- $TEST_COMMAND
36+
37+
after_success:
38+
- if [[ $COVERAGE = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
39+
- if [[ $COVERAGE = true ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml; fi

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Happyr Translation Bundle
22

3+
[![Latest Version](https://img.shields.io/github/release/Happyr/TranslationBundle.svg?style=flat-square)](https://github.com/Happyr/TranslationBundle/releases)
4+
[![Build Status](https://img.shields.io/travis/Happyr/TranslationBundle.svg?style=flat-square)](https://travis-ci.org/Happyr/TranslationBundle)
5+
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/Happyr/TranslationBundle.svg?style=flat-square)](https://scrutinizer-ci.com/g/Happyr/TranslationBundle)
6+
[![Quality Score](https://img.shields.io/scrutinizer/g/Happyr/TranslationBundle.svg?style=flat-square)](https://scrutinizer-ci.com/g/Happyr/TranslationBundle)
7+
[![Total Downloads](https://img.shields.io/packagist/dt/happyr/translation-bundle.svg?style=flat-square)](https://packagist.org/packages/happyr/translation-bundle)
8+
39
This bundle helps you to integrate with a third party translation service. The bundle has been focused to integrate to
410
the [Loco](https://localise.biz) service. If you want to know how Happyr work with this bundle you should check out
511
[this blog post](http://developer.happyr.com/how-happyr-work-with-symfony-translations).

composer.json

+11-4
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,22 @@
88
"authors": [
99
{
1010
"name": "Tobias Nyholm",
11-
"email": "tobias@happyr.com"
11+
"email": "tobias.nyholm@gmail.com"
1212
}
1313
],
1414
"require": {
15-
"php": ">=5.5.9",
16-
"symfony/symfony":"~2.7|~3.0",
17-
"sensio/framework-extra-bundle": "~2.7|~3.0",
15+
"php": "^5.5.9 || ^7.0",
16+
"symfony/framework-bundle": "^2.7 || ^3.0",
17+
"sensio/framework-extra-bundle": "^2.7 || ^3.0",
1818
"php-http/httplug": "^1.0",
1919
"php-http/plugins": "^1.0",
2020
"php-http/client-implementation": "^1.0",
2121
"psr/log": "^1.0"
2222
},
2323
"require-dev": {
24+
"phpunit/phpunit": "^4.5 || ^5.4",
25+
"matthiasnoback/symfony-dependency-injection-test": "^1.0",
26+
"symfony/symfony": "^2.3 || ^3.0",
2427
"php-http/guzzle6-adapter": "~1.0",
2528
"php-http/httplug-bundle": "~1.0"
2629
},
@@ -37,6 +40,10 @@
3740
"psr-4": {
3841
"Happyr\\TranslationBundle\\tests\\": "tests/"
3942
}
43+
},
44+
"scripts": {
45+
"test": "vendor/bin/phpunit",
46+
"test-ci": "vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml"
4047
}
4148
}
4249

phpunit.xml.dist

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@
1515

1616
<formatter type="clover" usefile="false"/>
1717
<testsuites>
18-
<testsuite name="Happyr Test Suite">
19-
<directory>./tests</directory>
18+
<testsuite name="Functional tests">
19+
<directory>./tests/Functional</directory>
20+
</testsuite>
21+
<testsuite name="Unit tests">
22+
<directory>./tests/Unit</directory>
2023
</testsuite>
2124
</testsuites>
2225

@@ -29,7 +32,4 @@
2932
</exclude>
3033
</whitelist>
3134
</filter>
32-
33-
<logging>
34-
</logging>
3535
</phpunit>

0 commit comments

Comments
 (0)