Use vendor-bin to separate dev from production dependencies

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2022-08-17 10:59:20 +02:00
parent f31a3b819e
commit c142394f0e
No known key found for this signature in database
GPG key ID: 74434EFE0D2E2205
13 changed files with 6190 additions and 4568 deletions

View file

@ -8,6 +8,30 @@ updates:
time: "03:00"
timezone: Europe/Paris
open-pull-requests-limit: 10
- package-ecosystem: composer
directory: "/vendor-bin/csfixer"
schedule:
interval: weekly
day: saturday
time: "03:00"
timezone: Europe/Paris
open-pull-requests-limit: 10
- package-ecosystem: composer
directory: "/vendor-bin/phpunit"
schedule:
interval: weekly
day: saturday
time: "03:00"
timezone: Europe/Paris
open-pull-requests-limit: 10
- package-ecosystem: composer
directory: "/vendor-bin/psalm"
schedule:
interval: weekly
day: saturday
time: "03:00"
timezone: Europe/Paris
open-pull-requests-limit: 10
- package-ecosystem: npm
directory: "/"
schedule:

View file

@ -75,8 +75,8 @@ jobs:
# php -S localhost:8080 &
- name: PHPUnit
working-directory: apps/${{ env.APP_NAME }}/tests/php
run: ../../vendor/phpunit/phpunit/phpunit -c phpunit.xml
working-directory: apps/${{ env.APP_NAME }}
run: composer run test
# - name: PHPUnit integration
# working-directory: apps/${{ env.APP_NAME }}
@ -150,8 +150,8 @@ jobs:
# php -S localhost:8080 &
- name: PHPUnit
working-directory: apps/${{ env.APP_NAME }}/tests/php
run: ../../vendor/phpunit/phpunit/phpunit -c phpunit.xml
working-directory: apps/${{ env.APP_NAME }}
run: composer run test
# - name: PHPUnit integration
# working-directory: apps/${{ env.APP_NAME }}
@ -222,8 +222,8 @@ jobs:
# php -S localhost:8080 &
- name: PHPUnit
working-directory: apps/${{ env.APP_NAME }}/tests/php
run: ../../vendor/phpunit/phpunit/phpunit -c phpunit.xml
working-directory: apps/${{ env.APP_NAME }}
run: composer run test
# - name: PHPUnit integration
# working-directory: apps/${{ env.APP_NAME }}
@ -287,8 +287,8 @@ jobs:
# php -S localhost:8080 &
- name: PHPUnit
working-directory: apps/${{ env.APP_NAME }}/tests/php
run: ../../vendor/phpunit/phpunit/phpunit -c phpunit.xml
working-directory: apps/${{ env.APP_NAME }}
run: composer run test
# - name: PHPUnit integration
# working-directory: apps/${{ env.APP_NAME }}

3
.gitignore vendored
View file

@ -4,6 +4,9 @@
# PHP Code Sniffer
/vendor
/vendor-bin/csfixer/vendor
/vendor-bin/phpunit/vendor
/vendor-bin/psalm/vendor
/.php-cs-fixer.cache
# Local docs

View file

@ -13,7 +13,7 @@ version+=master
all: dev-setup build-production
dev-setup: clean-dev composer-install-production npm-init
dev-setup: clean-dev composer-install-dev npm-init
release: appstore create-tag
@ -99,6 +99,9 @@ appstore:
--exclude=.tx \
--exclude=tests \
--exclude=tsconfig.json \
--exclude=vendor \
--exclude=vendor-bin/production/composer.json \
--exclude=vendor-bin/production/composer.lock \
--exclude=webpack.js \
$(project_dir)/ $(sign_dir)/$(app_name)
@if [ -f $(cert_dir)/$(app_name).key ]; then \

View file

@ -10,13 +10,16 @@
}
},
"config": {
"allow-plugins": {
"bamarni/composer-bin-plugin": true
},
"autoloader-suffix": "Talk",
"optimize-autoloader": true,
"classmap-authoritative": true,
"sort-packages": true,
"optimize-autoloader": true,
"platform": {
"php": "7.4"
}
},
"sort-packages": true
},
"scripts": {
"cs:check": "php-cs-fixer fix --dry-run --diff",
@ -25,16 +28,23 @@
"psalm": "psalm --threads=1",
"psalm:update-baseline": "psalm --threads=1 --update-baseline --set-baseline=tests/psalm-baseline.xml",
"psalm:clear": "psalm --clear-cache && psalm --clear-global-cache",
"psalm:fix": "psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType"
"psalm:fix": "psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType",
"post-install-cmd": [
"@composer bin all install --ansi",
"composer dump-autoload"
],
"post-update-cmd": [
"@composer bin all update --ansi",
"composer dump-autoload"
],
"test": "cd tests/php/ && phpunit -c phpunit.xml"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8",
"christophwurst/nextcloud": "dev-master",
"nextcloud/coding-standard": "^1.0",
"phpunit/phpunit": "^9.5",
"roave/security-advisories": "dev-latest",
"vimeo/psalm": "^4.22"
"roave/security-advisories": "dev-latest"
},
"require": {
"firebase/php-jwt": "^6.2"
"firebase/php-jwt": "^6.3"
}
}

4581
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -111,9 +111,6 @@ class Application extends App implements IBootstrap {
}
public function register(IRegistrationContext $context): void {
// Register the composer autoloader for packages shipped by this app
include_once __DIR__ . '/../../vendor/autoload.php';
$context->registerMiddleWare(CanUseTalkMiddleware::class);
$context->registerMiddleWare(InjectionMiddleware::class);
$context->registerCapability(Capabilities::class);

View file

@ -0,0 +1,12 @@
{
"config": {
"platform": {
"php": "7.4"
},
"sort-packages": true
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.10",
"nextcloud/coding-standard": "^1.0"
}
}

2172
vendor-bin/csfixer/composer.lock generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,11 @@
{
"config": {
"platform": {
"php": "7.4"
},
"sort-packages": true
},
"require-dev": {
"phpunit/phpunit": "^9.5"
}
}

1748
vendor-bin/phpunit/composer.lock generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,11 @@
{
"config": {
"platform": {
"php": "7.4"
},
"sort-packages": true
},
"require-dev": {
"vimeo/psalm": "^4.26.0"
}
}

2144
vendor-bin/psalm/composer.lock generated Normal file

File diff suppressed because it is too large Load diff