Skip to content

Commit bde070d

Browse files
authored
cleanup: remove psalm (#995)
* remove psalm * composer update * remove Makefile changes
1 parent a90eb6a commit bde070d

18 files changed

Lines changed: 715 additions & 2884 deletions

.github/workflows/composer.test.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ jobs:
4848
4949
- name: PHPUnit
5050
run: docker compose exec -e APP_ENV=testing -T api vendor/bin/phpunit
51-
- name: Psalm
52-
run: docker compose exec -T api vendor/bin/psalm
5351
- name: Linting
5452
run: docker compose exec api vendor/bin/pint --test -v
5553

app/EventPageUpdate.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ class EventPageUpdate extends Model {
3737
'namespace',
3838
];
3939

40-
/**
41-
* @psalm-return \Illuminate\Database\Eloquent\Relations\BelongsTo<Wiki>
42-
*/
4340
public function wiki(): \Illuminate\Database\Eloquent\Relations\BelongsTo {
4441
return $this->belongsTo(Wiki::class);
4542
}

app/Http/Controllers/Auth/RegisterController.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ public function register(Request $request) {
4646

4747
event(new Registered($user));
4848

49-
/**
50-
* @psalm-suppress UndefinedInterfaceMethod
51-
*/
5249
Auth::guard()->login($user);
5350

5451
// HTTP Response

app/Http/Controllers/WikiSettingController.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
class WikiSettingController extends Controller {
1111
/**
1212
* @return (SettingWikibaseManifestEquivEntities|string)[][]
13-
*
14-
* @psalm-return array{wgDefaultSkin: array{0: 'required', 1: 'string', 2: 'in:vector,modern,timeless'}, wwExtEnableConfirmAccount: array{0: 'required', 1: 'boolean'}, wwExtEnableWikibaseLexeme: array{0: 'required', 1: 'boolean'}, wwWikibaseStringLengthString: array{0: 'required', 1: 'integer', 2: 'between:400,2500'}, wwWikibaseStringLengthMonolingualText: array{0: 'required', 1: 'integer', 2: 'between:400,2500'}, wwWikibaseStringLengthMultilang: array{0: 'required', 1: 'integer', 2: 'between:250,2500'}, wikibaseFedPropsEnable: array{0: 'required', 1: 'boolean'}, wikibaseManifestEquivEntities: array{0: 'required', 1: 'json', 2: SettingWikibaseManifestEquivEntities}, wwUseQuestyCaptcha: array{0: 'required, 1: 'boolean}, wwCaptchaQuestions: array:{0: 'required', 1: 'json', 2: SettingCaptchaQuestions}}
1513
*/
1614
private function getSettingValidations(): array {
1715
// FIXME: this list is evil and should be kept in sync with the model in Wiki.php?! (mostly)

app/Jobs/DeleteWikiDbJob.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,6 @@ public function handle(DatabaseManager $manager) {
104104
$replacedCount = 0;
105105
$tableWithoutPrefix = str_replace($wikiDB->prefix . '_', '', $table, $replacedCount);
106106
if ($replacedCount !== 1) {
107-
/**
108-
* @psalm-suppress InvalidCast
109-
*/
110107
throw new \RuntimeException("Did not find prefix '{$wikiDB->prefix}' in tablename '{$table}' ");
111108
}
112109
$pdo->exec(sprintf('RENAME TABLE %s.%s TO %s.%s', $wikiDB->name, $table, $deletedDatabaseName, $tableWithoutPrefix));

app/QsBatch.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ class QsBatch extends Model {
4646
'pending_since' => 'datetime',
4747
];
4848

49-
/**
50-
* @psalm-return \Illuminate\Database\Eloquent\Relations\BelongsTo<Wiki>
51-
*/
5249
public function wiki(): \Illuminate\Database\Eloquent\Relations\BelongsTo {
5350
return $this->belongsTo(Wiki::class);
5451
}

app/QueryserviceNamespace.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ class QueryserviceNamespace extends Model {
4242
'backend',
4343
];
4444

45-
/**
46-
* @psalm-return \Illuminate\Database\Eloquent\Relations\BelongsTo<Wiki>
47-
*/
4845
public function wiki(): \Illuminate\Database\Eloquent\Relations\BelongsTo {
4946
return $this->belongsTo(Wiki::class);
5047
}

app/Rules/SettingCaptchaQuestions.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ public function passes($attribute, $value) {
2323
if (!is_string($question)) {
2424
return false;
2525
}
26-
/**
27-
* @psalm-suppress NoValue
28-
*/
2926
if (strlen($question) > 200) {
3027
return false;
3128
}

app/User.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,6 @@ public function sendPasswordResetNotification($token) {
9191
$this->notify(new ResetPasswordNotification($token));
9292
}
9393

94-
/**
95-
* @psalm-return \Illuminate\Database\Eloquent\Relations\BelongsToMany<Wiki>
96-
*/
9794
public function managesWikis(): \Illuminate\Database\Eloquent\Relations\BelongsToMany {
9895
return $this->belongsToMany(Wiki::class, 'wiki_managers');
9996
}

app/UserVerificationToken.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ class UserVerificationToken extends Model {
3636
'token',
3737
];
3838

39-
/**
40-
* @psalm-return \Illuminate\Database\Eloquent\Relations\BelongsTo<User>
41-
*/
4239
public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo {
4340
return $this->belongsTo(User::class);
4441
}

0 commit comments

Comments
 (0)