diff options
author | Joas Schilling <coding@schilljs.com> | 2022-08-17 11:59:20 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-08-17 11:59:20 +0300 |
commit | 09eb3f4ec5d74118db18b2649c0e582a84357dd3 (patch) | |
tree | f63d8ff3989e0ee88e81d0610d2ff4baca882200 | |
parent | a819743148d195de1d680bf291898a7e7185acfa (diff) |
Use vendor-bin to separate dev from production dependenciestechdebt/noid/vendor-bin
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | .github/dependabot.yml | 8 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | composer.json | 23 | ||||
-rw-r--r-- | composer.lock | 124 | ||||
-rw-r--r-- | lib/AppInfo/Application.php | 2 | ||||
-rw-r--r-- | vendor-bin/production/composer.json | 5 | ||||
-rw-r--r-- | vendor-bin/production/composer.lock | 81 |
8 files changed, 175 insertions, 74 deletions
diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a9d1f0440..89ee2f986 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,6 +8,14 @@ updates: time: "03:00" timezone: Europe/Paris open-pull-requests-limit: 10 +- package-ecosystem: composer + directory: "/vendor-bin/production" + schedule: + interval: weekly + day: saturday + time: "03:00" + timezone: Europe/Paris + open-pull-requests-limit: 10 - package-ecosystem: npm directory: "/" schedule: diff --git a/.gitignore b/.gitignore index 8a2e72a2c..6ea1a4290 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ # PHP Code Sniffer /vendor +/vendor-bin/production/vendor /.php-cs-fixer.cache # Local docs @@ -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 \ diff --git a/composer.json b/composer.json index f3e29d618..2b6a2fc20 100644 --- a/composer.json +++ b/composer.json @@ -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,22 @@ "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" + ] }, "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" - }, - "require": { - "firebase/php-jwt": "^6.2" } } diff --git a/composer.lock b/composer.lock index 524f88e16..73b602689 100644 --- a/composer.lock +++ b/composer.lock @@ -4,71 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8d44df009b16f278d27bfdc7eea1f621", - "packages": [ - { - "name": "firebase/php-jwt", - "version": "v6.3.0", - "source": { - "type": "git", - "url": "https://github.com/firebase/php-jwt.git", - "reference": "018dfc4e1da92ad8a1b90adc4893f476a3b41cb8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/018dfc4e1da92ad8a1b90adc4893f476a3b41cb8", - "reference": "018dfc4e1da92ad8a1b90adc4893f476a3b41cb8", - "shasum": "" - }, - "require": { - "php": "^7.1||^8.0" - }, - "require-dev": { - "guzzlehttp/guzzle": "^6.5||^7.4", - "phpspec/prophecy-phpunit": "^1.1", - "phpunit/phpunit": "^7.5||^9.5", - "psr/cache": "^1.0||^2.0", - "psr/http-client": "^1.0", - "psr/http-factory": "^1.0" - }, - "suggest": { - "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present" - }, - "type": "library", - "autoload": { - "psr-4": { - "Firebase\\JWT\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Neuman Vong", - "email": "neuman+pear@twilio.com", - "role": "Developer" - }, - { - "name": "Anant Narayanan", - "email": "anant@php.net", - "role": "Developer" - } - ], - "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", - "homepage": "https://github.com/firebase/php-jwt", - "keywords": [ - "jwt", - "php" - ], - "support": { - "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/v6.3.0" - }, - "time": "2022-07-15T16:48:45+00:00" - } - ], + "content-hash": "163150fdc268e1da8503ebc8833db75f", + "packages": [], "packages-dev": [ { "name": "amphp/amp", @@ -237,6 +174,63 @@ "time": "2021-03-30T17:13:30+00:00" }, { + "name": "bamarni/composer-bin-plugin", + "version": "1.8.1", + "source": { + "type": "git", + "url": "https://github.com/bamarni/composer-bin-plugin.git", + "reference": "e12e9769c8ee97d036f7f98abf66b96cf3862346" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bamarni/composer-bin-plugin/zipball/e12e9769c8ee97d036f7f98abf66b96cf3862346", + "reference": "e12e9769c8ee97d036f7f98abf66b96cf3862346", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2.0", + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "composer/composer": "^2.0", + "ext-json": "*", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^8.5 || ^9.5", + "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Bamarni\\Composer\\Bin\\BamarniBinPlugin" + }, + "autoload": { + "psr-4": { + "Bamarni\\Composer\\Bin\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "No conflicts for your bin dependencies", + "keywords": [ + "composer", + "conflict", + "dependency", + "executable", + "isolation", + "tool" + ], + "support": { + "issues": "https://github.com/bamarni/composer-bin-plugin/issues", + "source": "https://github.com/bamarni/composer-bin-plugin/tree/1.8.1" + }, + "time": "2022-08-03T19:58:11+00:00" + }, + { "name": "christophwurst/nextcloud", "version": "dev-master", "source": { diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 76aa2e1d7..5f4e1a002 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -112,7 +112,7 @@ 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'; + include_once __DIR__ . '/../../vendor-bin/production/vendor/autoload.php'; $context->registerMiddleWare(CanUseTalkMiddleware::class); $context->registerMiddleWare(InjectionMiddleware::class); diff --git a/vendor-bin/production/composer.json b/vendor-bin/production/composer.json new file mode 100644 index 000000000..b4d77e991 --- /dev/null +++ b/vendor-bin/production/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "firebase/php-jwt": "^6.3" + } +} diff --git a/vendor-bin/production/composer.lock b/vendor-bin/production/composer.lock new file mode 100644 index 000000000..10a6f52d9 --- /dev/null +++ b/vendor-bin/production/composer.lock @@ -0,0 +1,81 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "3871539446f6e0306a6de8d421df9d92", + "packages": [ + { + "name": "firebase/php-jwt", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/firebase/php-jwt.git", + "reference": "018dfc4e1da92ad8a1b90adc4893f476a3b41cb8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/018dfc4e1da92ad8a1b90adc4893f476a3b41cb8", + "reference": "018dfc4e1da92ad8a1b90adc4893f476a3b41cb8", + "shasum": "" + }, + "require": { + "php": "^7.1||^8.0" + }, + "require-dev": { + "guzzlehttp/guzzle": "^6.5||^7.4", + "phpspec/prophecy-phpunit": "^1.1", + "phpunit/phpunit": "^7.5||^9.5", + "psr/cache": "^1.0||^2.0", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0" + }, + "suggest": { + "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present" + }, + "type": "library", + "autoload": { + "psr-4": { + "Firebase\\JWT\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Neuman Vong", + "email": "neuman+pear@twilio.com", + "role": "Developer" + }, + { + "name": "Anant Narayanan", + "email": "anant@php.net", + "role": "Developer" + } + ], + "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", + "homepage": "https://github.com/firebase/php-jwt", + "keywords": [ + "jwt", + "php" + ], + "support": { + "issues": "https://github.com/firebase/php-jwt/issues", + "source": "https://github.com/firebase/php-jwt/tree/v6.3.0" + }, + "time": "2022-07-15T16:48:45+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.3.0" +} |