Skip to content

Commit 076bd9c

Browse files
FelixJacobisualkosamuelwei
authored
Pulled tools used internally by library out of main composer.json (#116)
* Updated vendors * Removed composer.lock * Removed downgrade of PHPUnit * Ignore composer.lock * Pulled tools used internally by library out of main composer.json * Updated tools constraint * Added README explaining the motivation * Removed unused depdencny to composer/composer Co-authored-by: Klaus <klaus@jsxc.org> Co-authored-by: Samuel Weirich <samuel.weirich@gmx.de>
1 parent 31c0e14 commit 076bd9c

19 files changed

Lines changed: 135 additions & 27 deletions

File tree

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ codeception.yml export-ignore
66
phpunit.xml.dist export-ignore
77
psalm.xml export-ignore
88
/tests export-ignore
9+
/tools export-ignore

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Install php dependencies
3030
run: composer install --dev --no-interaction
3131
- name: Execute tests without coverage
32-
run: vendor/bin/phpunit --testsuite="BigBlueButton unit test suite,BigBlueButton integration test suite"
32+
run: tools/phpunit --testsuite="BigBlueButton unit test suite,BigBlueButton integration test suite"
3333

3434
PHP:
3535
name: PHP ${{ matrix.php-versions }}
@@ -56,19 +56,19 @@ jobs:
5656
run: composer install --dev --no-interaction
5757
continue-on-error: ${{ matrix.experimental }}
5858
- name: Execute code style check via php-cs-fixer
59-
run: vendor/bin/php-cs-fixer fix --dry-run
59+
run: tools/php-cs-fixer fix --dry-run
6060
continue-on-error: ${{ matrix.experimental }}
6161
- name: Execute tests with coverage
6262
if: ${{ !matrix.experimental }}
6363
run: |
6464
mkdir -p build/logs
65-
vendor/bin/phpunit --coverage-clover=build/logs/coverage.xml --testsuite="BigBlueButton unit test suite,BigBlueButton integration test suite"
65+
tools/phpunit --coverage-clover=build/logs/coverage.xml --testsuite="BigBlueButton unit test suite,BigBlueButton integration test suite"
6666
- name: Execute tests without coverage
6767
if: ${{ matrix.experimental }}
68-
run: vendor/bin/phpunit --testsuite="BigBlueButton test suite"
68+
run: tools/phpunit --testsuite="BigBlueButton test suite"
6969
continue-on-error: true
7070
- name: Coveralls
7171
env:
7272
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7373
if: ${{ matrix.php-versions == '7.2' && env.COVERALLS_REPO_TOKEN != null }}
74-
run: vendor/bin/php-coveralls --coverage_clover=build/logs/coverage.xml -v
74+
run: tools/php-coveralls --coverage_clover=build/logs/coverage.xml -v

composer.json

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"role": "Developer"
3737
},
3838
{
39-
"name": "Alfonso Rodríguez",
39+
"name": "Alfonso Rodr\u00edguez",
4040
"email": "arodriguez@teltek.es",
4141
"role": "Developer"
4242
},
@@ -72,56 +72,65 @@
7272
"symfony/http-client": "To use the SymfonyHttpClientTransport."
7373
},
7474
"require-dev": {
75-
"composer/composer": "^1.10.0",
76-
"phpunit/phpunit": "^8",
77-
"friendsofphp/php-cs-fixer": "2.*",
78-
"squizlabs/php_codesniffer": "3.*",
79-
"php-coveralls/php-coveralls": "^2.4.0",
80-
"brainmaestro/composer-git-hooks": "^2.8",
81-
"vimeo/psalm": "^4.5",
8275
"psr/http-client": "^1.0",
8376
"psr/http-factory": "^1.0",
8477
"psr/http-message": "^1.0",
8578
"symfony/dotenv": "^3.4|^4.0|^5.0",
8679
"symfony/http-client-contracts": "^1.1|^2.0",
8780
"symfony/http-client": "^4.4|^5.0",
8881
"symfony/process": "^3.4|^4.0|^5.0",
89-
"nyholm/psr7": "^1.4",
90-
"fakerphp/faker": "^1.14"
82+
"nyholm/psr7": "^1.4"
9183
},
9284
"autoload": {
9385
"psr-4": {
94-
"BigBlueButton\\": ["src", "tests/integration"]
86+
"BigBlueButton\\": [
87+
"src",
88+
"tests/integration"
89+
]
9590
}
9691
},
9792
"autoload-dev": {
9893
"psr-4": {
99-
"BigBlueButton\\Tests\\Functional\\": ["tests/functional"]
94+
"BigBlueButton\\Tests\\Functional\\": [
95+
"tests/functional"
96+
]
10097
}
10198
},
10299
"scripts": {
103-
"test": "vendor/bin/phpunit --testsuite=\"BigBlueButton unit test suite\"",
104-
"test-integration": "vendor/bin/phpunit --testsuite=\"BigBlueButton integration test suite\"",
105-
"test-functional": "vendor/bin/phpunit --testsuite=\"BigBlueButton functional test suite\" --exclude-group=functional-legacy",
106-
"cs-fix": "vendor/bin/php-cs-fixer fix --allow-risky=yes",
107-
"cs-test": "vendor/bin/php-cs-fixer fix --dry-run --allow-risky=yes",
100+
"test": "tools/phpunit --testsuite=\"BigBlueButton unit test suite\"",
101+
"test-integration": "tools/phpunit --testsuite=\"BigBlueButton integration test suite\"",
102+
"test-functional": "tools/phpunit --testsuite=\"BigBlueButton functional test suite\" --exclude-group=functional-legacy",
103+
"cs-fix": "tools/php-cs-fixer fix --allow-risky=yes",
104+
"cs-test": "tools/php-cs-fixer fix --dry-run --allow-risky=yes",
108105
"psalm": "psalm --threads=1",
109106
"psalm-clear": "psalm --clear-cache && psalm --clear-global-cache",
110107
"psalm-fix": "psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType",
111-
"post-install-cmd": "vendor/bin/cghooks add --ignore-lock",
112-
"post-update-cmd": "vendor/bin/cghooks update"
108+
"post-install-cmd": "tools/composer-git-hooks add --ignore-lock",
109+
"post-update-cmd": "tools/composer-git-hooks update"
113110
},
114111
"extra": {
115112
"hooks": {
116113
"pre-commit": [
117-
"vendor/bin/php-cs-fixer fix --dry-run --allow-risky=yes"
114+
"tools/php-cs-fixer fix --dry-run --allow-risky=yes"
118115
],
119116
"pre-push": [
120-
"vendor/bin/phpunit --testsuite=\"BigBlueButton unit test suite,BigBlueButton integration test suite\"",
121-
"vendor/bin/psalm --threads=1"
117+
"tools/phpunit --testsuite=\"BigBlueButton unit test suite,BigBlueButton integration test suite\"",
118+
"tools/psalm --threads=1"
122119
],
123120
"post-merge": "composer install",
124121
"post-checkout": "composer install"
122+
},
123+
"cotor": {
124+
"brainmaestro/composer-git-hooks": "^2.8",
125+
"extensions": {
126+
"phpunit/phpunit": {
127+
"fakerphp/faker": "^1.14"
128+
}
129+
},
130+
"friendsofphp/php-cs-fixer": "^3.7",
131+
"php-coveralls/php-coveralls": "^2.4",
132+
"phpunit/phpunit": "^8",
133+
"vimeo/psalm": "^4.22"
125134
}
126135
}
127136
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/vendor/
2+
/composer.lock
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"require": {
3+
"brainmaestro/composer-git-hooks": "^2.8"
4+
}
5+
}

tools/.php-coveralls/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/vendor/
2+
/composer.lock

tools/.php-coveralls/composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"require": {
3+
"php-coveralls/php-coveralls": "^2.4.0"
4+
}
5+
}

tools/.php-cs-fixer/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/vendor/
2+
/composer.lock

tools/.php-cs-fixer/composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"require": {
3+
"friendsofphp/php-cs-fixer": "2.*"
4+
}
5+
}

tools/.phpunit/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/vendor/
2+
/composer.lock

0 commit comments

Comments
 (0)