Skip to content

Commit 0c3a335

Browse files
authored
Merge pull request #191 from shopwareLabs/fix-github-plugin-service
Fix GitHub plugin service
2 parents 94aa22e + 8267689 commit 0c3a335

File tree

14 files changed

+411
-510
lines changed

14 files changed

+411
-510
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ config.cfg
22
*config.yaml
33
!tests/**/config.yaml
44
.phpunit.result.cache
5+
.php-cs-fixer.cache
56
vendor/
67
composer.phar
78
php_errors.log

.php-cs-fixer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
return (new Config())
2525
->registerCustomFixers(new Fixers())
2626
->setRiskyAllowed(true)
27-
->setUsingCache(false)
2827
->setRules([
2928
'@PSR12' => true,
3029
'@Symfony' => true,
@@ -43,6 +42,7 @@
4342
'no_superfluous_phpdoc_tags' => true,
4443
'no_useless_else' => true,
4544
'no_useless_return' => true,
45+
'nullable_type_declaration_for_default_null_value' => true,
4646
'operator_linebreak' => ['only_booleans' => true],
4747
'ordered_class_elements' => true,
4848
'ordered_imports' => true,

README.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,13 +194,45 @@ The SW cli tools make use of the XDG directory standard. Following directories a
194194
If you changed some of these directories via `XDG` environment variables, those directories are used instead
195195

196196
# Configuration
197-
The configuration of the script is done in `~/.config/sw-cli-tools/config.yaml`. If the file does not exist on your system, it is created after the first usage of the script.
197+
The configuration of the script is done in `~/.config/sw-cli-tools/config.yaml`.
198+
If the file does not exist on your system, it is created after the first usage of the script.
199+
200+
## Repositories
201+
In order to use commands like `plugin:zip:vcs` the tool needs to know where the source comes from.
202+
For this repositories need to be defined in the `repositories` section of the configuration file.
203+
For now the following repository types are supported:
204+
- GitHub
205+
- Stash
206+
- BitBucket
207+
- SimpleList
208+
- GitLab
209+
210+
This is how an example config could look like:
211+
212+
```yml
213+
repositories:
214+
GitLab:
215+
config:
216+
endpoint: https://gitlab.shopware.com/api/v4/
217+
repositories:
218+
Services SW5:
219+
cache: 86400
220+
url: groups/92/projects?per_page=100&private_token=your-private-token
221+
color: red
222+
GitHub:
223+
config:
224+
endpoint: https://api.github.com/search/
225+
repositories:
226+
Plugins SW5:
227+
cache: 86400
228+
url: repositories?q=org:Shopware5+topic:shopware-plugin
229+
color: blue
230+
```
198231
199232
# Building sw.phar
200233
For building the release package (`sw.phar`) [box](http://box-project.github.io/box2/) is used.
201234
A new release is build automatically for every push on the master branch by Travis CI (See `bin/deploy.sh`).
202235

203-
204236
# Coding standard
205237
Coding standard for the project is [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md).
206238
Coding standard violations may be detected using php-cs-fixer:

composer.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"ext-curl": "*",
99
"dnoegel/php-xdg-base-dir": "~0.1",
1010
"fakerphp/faker": "^1.21.0",
11-
"guzzlehttp/guzzle": "^6.5.2",
11+
"guzzlehttp/guzzle": "^7.7.0",
1212
"laravel-zero/phar-updater": "^1.1",
1313
"shopwarelabs/plugin-info": "0.1.0",
1414
"symfony/config": "~5.4",
@@ -19,11 +19,14 @@
1919
},
2020
"require-dev": {
2121
"ext-phar": "*",
22-
"friendsofphp/php-cs-fixer": "^3.14.3",
23-
"kubawerlos/php-cs-fixer-custom-fixers": "^v3.11.3",
22+
"friendsofphp/php-cs-fixer": "^3.17.0",
23+
"kubawerlos/php-cs-fixer-custom-fixers": "^v3.14.0",
2424
"phpunit/phpunit": "^9.5",
2525
"symfony/var-dumper": "~5.4"
2626
},
27+
"replace": {
28+
"symfony/polyfill-php73": "*"
29+
},
2730
"scripts": {
2831
"cs-check": "php-cs-fixer fix --dry-run -v",
2932
"cs-fix": "php-cs-fixer fix -v",

0 commit comments

Comments
 (0)