Skip to content

Commit

Permalink
feat(php): Migrate development tools to vendor-bin
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Sep 23, 2024
1 parent 02b2b68 commit 2c94c8c
Show file tree
Hide file tree
Showing 17 changed files with 7,966 additions and 3,766 deletions.
45 changes: 45 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,51 @@ updates:
- mejo-
- max-nextcloud

- package-ecosystem: composer
directory: "/vendor-bin/cs-fixer"
schedule:
interval: weekly
day: saturday
time: "03:00"
timezone: Europe/Paris
open-pull-requests-limit: 10
labels:
- 3. to review
- dependencies
reviewers:
- mejo-
- max-nextcloud

- package-ecosystem: composer
directory: "/vendor-bin/phpunit"
schedule:
interval: weekly
day: saturday
time: "03:00"
timezone: Europe/Paris
open-pull-requests-limit: 10
labels:
- 3. to review
- dependencies
reviewers:
- mejo-
- max-nextcloud

- package-ecosystem: composer
directory: "/vendor-bin/psalm"
schedule:
interval: weekly
day: saturday
time: "03:00"
timezone: Europe/Paris
open-pull-requests-limit: 10
labels:
- 3. to review
- dependencies
reviewers:
- mejo-
- max-nextcloud

- package-ecosystem: github-actions
directory: "/"
schedule:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
build/
node_modules/
vendor/
/vendor/
/vendor-bin/*/vendor

# Editor directories and files
.idea/
Expand Down
1 change: 1 addition & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
declare(strict_types=1);

require_once './vendor/autoload.php';
require_once './vendor-bin/cs-fixer/vendor/autoload.php';

use Nextcloud\CodingStandard\Config;

Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ clean:
distclean: clean
rm -rf $(BUILD_TOOLS_DIR)
rm -rf node_modules
rm -rf vendor
rm -rf vendor vendor-bin/*/vendor

# Lint
lint: lint-js lint-appinfo
Expand Down Expand Up @@ -142,6 +142,7 @@ build: node-modules build-js-production composer-install-no-dev
--exclude="$(APP_NAME)/src" \
--exclude="$(APP_NAME)/stylelint.config.js" \
--exclude="$(APP_NAME)/tests" \
--exclude="$(APP_NAME)/vendor-bin" \
--exclude="$(APP_NAME)/webpack.*" \
$(PROJECT_DIR) $(RELEASE_DIR)/
@if [ -f $(CERT_DIR)/$(APP_NAME).key ]; then \
Expand Down
2 changes: 1 addition & 1 deletion REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SPDX-FileCopyrightText = "none"
SPDX-License-Identifier = "CC0-1.0"

[[annotations]]
path = ["cypress/fixtures/**", "tests/phpunit.xml", "tests/psalm-baseline.xml", "tests/Integration/features/fixtures/**"]
path = ["cypress/fixtures/**", "tests/phpunit.xml", "tests/psalm-baseline.xml", "tests/Integration/features/fixtures/**", "vendor-bin/**"]
precedence = "aggregate"
SPDX-FileCopyrightText = "2020-2024 Nextcloud GmbH and Nextcloud contributors"
SPDX-License-Identifier = "AGPL-3.0-or-later"
Expand Down
28 changes: 20 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
"platform": {
"php": "8.0.2"
},
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"bamarni/composer-bin-plugin": true
}
},
"require": {
"php": ">=8.0.2",
Expand All @@ -17,20 +20,29 @@
},
"require-dev": {
"ext-dom": "*",
"behat/behat": "^3.14",
"bamarni/composer-bin-plugin": "^1.8",
"guzzlehttp/guzzle": "^7.8",
"nextcloud/coding-standard": "^1.2.1",
"nextcloud/ocp": "dev-stable27",
"phpunit/phpunit": "^9.6",
"psalm/phar": "^5.25",
"rector/rector": "^1.2.0"
},
"scripts": {
"lint": "find . -name \\*.php -not -path './vendor/*' -exec php -l \"{}\" \\;",
"cs:check": "php-cs-fixer fix --dry-run --diff",
"cs:fix": "php-cs-fixer fix",
"psalm": "psalm.phar",
"psalm:update-baseline": "psalm.phar --threads=1 --update-baseline --set-baseline=tests/psalm-baseline.xml",
"test:unit": "phpunit -c tests/phpunit.xml"
"psalm": "psalm --threads=$(nproc) --no-cache",
"psalm:update-baseline": "psalm --threads=$(nproc) --no-cache --update-baseline --set-baseline=tests/psalm-baseline.xml",
"test:unit": "phpunit -c tests/phpunit.xml",
"post-install-cmd": [
"[ $COMPOSER_DEV_MODE -eq 0 ] || composer bin all install --ansi"
],
"post-update-cmd": [
"[ $COMPOSER_DEV_MODE -eq 0 ] || composer bin all update --ansi"
]
},
"extra": {
"bamarni-bin": {
"bin-links": true,
"forward-command": true
}
}
}
Loading

0 comments on commit 2c94c8c

Please sign in to comment.