Skip to content

Commit

Permalink
composer setup and fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Anupam Kumar <[email protected]>
  • Loading branch information
kyteinsky committed Mar 14, 2024
1 parent c8abd6e commit d12bd02
Show file tree
Hide file tree
Showing 26 changed files with 2,594 additions and 173 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
node_modules
.php-cs-fixer.cache
.phpunit.result.cache

vendor/
21 changes: 21 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

declare(strict_types=1);
// SPDX-FileCopyrightText: Sami Finnilä <[email protected]>
// SPDX-License-Identifier: AGPL-3.0-or-later

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

use Nextcloud\CodingStandard\Config;

$config = new Config();
$config
->getFinder()
->ignoreVCSIgnored(true)
->notPath('build')
->notPath('l10n')
->notPath('src')
->notPath('vendor')
->in(__DIR__);
return $config;
58 changes: 58 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"name": "nextcloud/integration_slack",
"authors": [
{
"name": "Anupam Kumar",
"email": "[email protected]"
}
],
"require": {
"php": "^8.0 || ^8.1 || ^8.2 || ^8.3",
"bamarni/composer-bin-plugin": "^1.8"
},
"scripts": {
"lint": "find . -name \\*.php -not -path './vendor*' -print0 | xargs -0 -n1 php -l",
"cs:check": "php-cs-fixer fix --dry-run --diff",
"cs:fix": "php-cs-fixer fix",
"psalm": "psalm.phar --no-cache",
"test": "phpunit -c tests/phpunit.xml --no-coverage",
"post-install-cmd": [
"@composer bin all install --ansi",
"composer dump-autoload"
],
"post-update-cmd": [
"@composer bin all update --ansi",
"composer dump-autoload"
]
},
"config": {
"optimize-autoloader": true,
"classmap-authoritative": true,
"platform": {
"php": "8.0"
},
"allow-plugins": {
"bamarni/composer-bin-plugin": true
}
},
"require-dev": {
"nextcloud/ocp": "dev-master"
},
"extra": {
"bamarni-bin": {
"bin-links": true,
"target-directory": "vendor-bin",
"forward-command": true
}
},
"autoload": {
"psr-4": {
"OCA\\Slack\\": "lib/"
}
},
"autoload-dev": {
"psr-4": {
"OCP\\": "vendor/nextcloud/ocp/OCP"
}
}
}
Loading

0 comments on commit d12bd02

Please sign in to comment.