Skip to content

Commit 0056dff

Browse files
committed
chore: reorder and remove unused code and fix app's config
Added more paths to php-cs-fix not path directive and corrected some infos on composer.json Signed-off-by: David Lima <antdavidlima@gmail.com>
1 parent cc0d8c1 commit 0056dff

File tree

5 files changed

+42
-29
lines changed

5 files changed

+42
-29
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
.idea
44
.vscode
55
.phpactor*
6+
67
/vendor/
78
/vendor-bin/**/vendor/
9+
810
/js/
911
node_modules/
12+
1013
/.php-cs-fixer.cache

.php-cs-fixer.dist.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,7 @@
2121
->notPath('src')
2222
->notPath('vendor')
2323
->notPath('vendor-bin')
24+
->notPath('build')
25+
->notPath('node_modules')
2426
->in(__DIR__);
2527
return $config;

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
17

28
## 1.3.6
39

composer.json

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,20 @@
11
{
2-
"name": "extract/extract",
2+
"name": "librecode/extract",
33
"description": "Allows to extract archive from the web interface",
4-
"type": "project",
5-
"license": "AGPL",
4+
"license": "AGPL-3.0-or-later",
65
"authors": [
76
{
87
"name": "Paul Lereverend"
8+
},
9+
{
10+
"name": "LibreCode Coop"
911
}
1012
],
11-
"config": {
12-
"optimize-autoloader": true,
13-
"classmap-authoritative": true,
14-
"sort-packages": true,
15-
"platform": {
16-
"php": "8.1"
17-
},
18-
"allow-plugins": {
19-
"bamarni/composer-bin-plugin": true
13+
"autoload": {
14+
"psr-4": {
15+
"OCA\\Extract\\": "lib/"
2016
}
2117
},
22-
"require-dev": {
23-
"bamarni/composer-bin-plugin": "^1.8",
24-
"nextcloud/ocp": "dev-master"
25-
},
2618
"scripts": {
2719
"bin": "echo 'bin not installed'",
2820
"lint": "find . -name \\*.php -not -path './vendor/*' -not -path './vendor-bin/*' -not -path './build/*' -not -path './tests/integration/vendor/*' -print0 | xargs -0 -n1 php -l",
@@ -39,6 +31,24 @@
3931
"composer dump-autoload"
4032
]
4133
},
34+
"require": {
35+
"bamarni/composer-bin-plugin": "^1.8",
36+
"php": "^8.1"
37+
},
38+
"require-dev": {
39+
"nextcloud/ocp": "dev-master"
40+
},
41+
"config": {
42+
"optimize-autoloader": true,
43+
"classmap-authoritative": true,
44+
"sort-packages": true,
45+
"platform": {
46+
"php": "8.1"
47+
},
48+
"allow-plugins": {
49+
"bamarni/composer-bin-plugin": true
50+
}
51+
},
4252
"extra": {
4353
"bamarni-bin": {
4454
"bin-links": true,
@@ -49,10 +59,5 @@
4959
"psr-4": {
5060
"OCP\\": "vendor/nextcloud/ocp/OCP/"
5161
}
52-
},
53-
"autoload": {
54-
"psr-4": {
55-
"OCA\\Extract\\": "lib/"
56-
}
5762
}
5863
}

lib/AppInfo/Application.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,16 @@ final class Application extends App implements IBootstrap {
3333

3434
public const APP_ID = 'extract';
3535

36-
public function __construct(array $urlParams = []) {
37-
parent::__construct(self::APP_ID, $urlParams);
36+
public function __construct() {
37+
parent::__construct(self::APP_ID);
3838
}
3939

40-
// Called later than "register".
4140
#[\Override]
42-
public function boot(IBootContext $context): void {
41+
public function register(IRegistrationContext $context): void {
42+
$context->registerEventListener(LoadAdditionalScriptsEvent::class, LoadExtractActions::class);
4343
}
4444

45-
// Called earlier than boot, so anything initialized in the
46-
// "boot()" method must not be used here.
4745
#[\Override]
48-
public function register(IRegistrationContext $context): void {
49-
$context->registerEventListener(LoadAdditionalScriptsEvent::class, LoadExtractActions::class);
46+
public function boot(IBootContext $context): void {
5047
}
5148
}

0 commit comments

Comments
 (0)