Skip to content

Commit

Permalink
Bump the production-dependencies group with 7 updates (#3021)
Browse files Browse the repository at this point in the history
* Bump the production-dependencies group with 7 updates

Bumps the production-dependencies group with 7 updates:

| Package | From | To |
| --- | --- | --- |
| [dedoc/scramble](https://github.com/dedoc/scramble) | `0.12.6` | `0.12.9` |
| [laragear/webauthn](https://github.com/Laragear/WebAuthn) | `3.1.1` | `4.0.0` |
| [laravel/framework](https://github.com/laravel/framework) | `11.41.3` | `11.42.1` |
| [laravel/socialite](https://github.com/laravel/socialite) | `5.17.1` | `5.18.0` |
| [spatie/laravel-data](https://github.com/spatie/laravel-data) | `4.13.0` | `4.13.1` |
| [spatie/laravel-feed](https://github.com/spatie/laravel-feed) | `4.4.0` | `4.4.1` |
| [spatie/laravel-typescript-transformer](https://github.com/spatie/laravel-typescript-transformer) | `2.5.0` | `2.5.1` |


Updates `dedoc/scramble` from 0.12.6 to 0.12.9
- [Release notes](https://github.com/dedoc/scramble/releases)
- [Commits](dedoc/scramble@v0.12.6...v0.12.9)

Updates `laragear/webauthn` from 3.1.1 to 4.0.0
- [Release notes](https://github.com/Laragear/WebAuthn/releases)
- [Commits](Laragear/WebAuthn@v3.1.1...v4.0.0)

Updates `laravel/framework` from 11.41.3 to 11.42.1
- [Release notes](https://github.com/laravel/framework/releases)
- [Changelog](https://github.com/laravel/framework/blob/11.x/CHANGELOG.md)
- [Commits](laravel/framework@v11.41.3...v11.42.1)

Updates `laravel/socialite` from 5.17.1 to 5.18.0
- [Release notes](https://github.com/laravel/socialite/releases)
- [Changelog](https://github.com/laravel/socialite/blob/5.x/CHANGELOG.md)
- [Commits](laravel/socialite@v5.17.1...v5.18.0)

Updates `spatie/laravel-data` from 4.13.0 to 4.13.1
- [Release notes](https://github.com/spatie/laravel-data/releases)
- [Changelog](https://github.com/spatie/laravel-data/blob/main/CHANGELOG.md)
- [Commits](spatie/laravel-data@4.13.0...4.13.1)

Updates `spatie/laravel-feed` from 4.4.0 to 4.4.1
- [Release notes](https://github.com/spatie/laravel-feed/releases)
- [Changelog](https://github.com/spatie/laravel-feed/blob/main/CHANGELOG.md)
- [Commits](spatie/laravel-feed@4.4.0...4.4.1)

Updates `spatie/laravel-typescript-transformer` from 2.5.0 to 2.5.1
- [Release notes](https://github.com/spatie/laravel-typescript-transformer/releases)
- [Changelog](https://github.com/spatie/laravel-typescript-transformer/blob/main/CHANGELOG.md)
- [Commits](spatie/laravel-typescript-transformer@2.5.0...2.5.1)

---
updated-dependencies:
- dependency-name: dedoc/scramble
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
- dependency-name: laragear/webauthn
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: production-dependencies
- dependency-name: laravel/framework
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
- dependency-name: laravel/socialite
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
- dependency-name: spatie/laravel-data
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
- dependency-name: spatie/laravel-feed
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
- dependency-name: spatie/laravel-typescript-transformer
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix phpstan complaints

* fix tests

* more fix

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ildyria <[email protected]>
  • Loading branch information
dependabot[bot] and ildyria authored Feb 18, 2025
1 parent a0686a2 commit 5c0d23a
Show file tree
Hide file tree
Showing 9 changed files with 152 additions and 135 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/WebAuthn/WebAuthnLoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function retrieveByCredentials(array $credentials): User|null
{
/** @var User|null $user */
$user = User::whereHas('webAuthnCredentials',
fn ($query) => $query->whereKey($credentials['id'])->whereEnabled()
fn ($query) => $query->where('id', '=', $credentials['id'])->whereNull('disabled_at')
)->first();

return $user;
Expand Down
10 changes: 10 additions & 0 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
use Laragear\WebAuthn\Contracts\WebAuthnAuthenticatable;
use Laragear\WebAuthn\Models\WebAuthnCredential;
use Laragear\WebAuthn\WebAuthnAuthentication;
use Laragear\WebAuthn\WebAuthnData;
use function Safe\mb_convert_encoding;

/**
Expand Down Expand Up @@ -242,4 +243,13 @@ public function delete(): bool

return $this->parentDelete();
}

/**
* Returns displayable data to be used to create WebAuthn Credentials.
* The default function use email and name, however in Lyche the email is optional.
*/
public function webAuthnData(): WebAuthnData
{
return WebAuthnData::make($this->email ?? ($this->name . '#' . request()->httpHost()), $this->name);
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"geocoder-php/cache-provider": "^4.3",
"geocoder-php/nominatim-provider": "^5.5",
"graham-campbell/markdown": "^15.0",
"laragear/webauthn": "^3.1",
"laragear/webauthn": "^4.0",
"laravel/framework": "^11.0",
"laravel/socialite": "^5.11",
"league/flysystem-aws-s3-v3": "^3.22",
Expand Down
262 changes: 130 additions & 132 deletions composer.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public function up(): void

DB::beginTransaction();

/** @var array<int,object{id:int,size:string}> */
$photos = DB::table(self::TABLE_NAME)
->select([self::ID_COL_NAME, self::OLD_COL_NAME])
->lazyById();
Expand Down Expand Up @@ -72,6 +73,7 @@ public function down(): void

DB::beginTransaction();

/** @var array<int,object{id:int,filesize:int}> */
$photos = DB::table(self::TABLE_NAME)
->select([self::ID_COL_NAME, self::NEW_COL_NAME])
->lazyById();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public function up(): void
});

DB::beginTransaction();
/** @var array<int,object{id:int}> */
$photos = DB::table(self::PHOTOS_TABLE_NAME)->select([
self::ID_COL_NAME,
self::SMALL_COL_NAME,
Expand Down Expand Up @@ -101,6 +102,7 @@ public function down(): void
});

DB::beginTransaction();
/** @var array<int,object{id:int}> */
$photos = DB::table(self::PHOTOS_TABLE_NAME)->select([
self::ID_COL_NAME,
self::SMALL_WIDTH_COL_NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public function up(): void
});

DB::beginTransaction();
/** @var array<int,object{id:int,created_at:string|null,taken_at:string|null,taken_at_orig_tz:string|null,updated_at:string|null}> */
$photos = DB::table(self::PHOTOS_TABLE_NAME)->select([
self::ID_COL_NAME,
self::PHOTO_CREATED_AT_COL_NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ protected function upgradeORMSystemTimesByTable(string $tableName): void
});
$needsConversion = $this->needsConversion();
DB::beginTransaction();
/** @var array<int,object{id:int,created_at_tmp:string|null,updated_at_tmp:string|null}> */
$entities = DB::table($tableName)->select([
self::ID_COL_NAME,
self::CREATED_AT_COL_NAME . '_tmp',
Expand Down Expand Up @@ -239,6 +240,7 @@ protected function downgradeORMSystemTimesByTable(string $tableName): void
});
$needsConversion = $this->needsConversion();
DB::beginTransaction();
/** @var array<int,object{id:int,created_at_tmp:string|null,updated_at_tmp:string|null}> */
$entities = DB::table($tableName)->select([
self::ID_COL_NAME,
self::CREATED_AT_COL_NAME . '_tmp',
Expand Down Expand Up @@ -288,6 +290,7 @@ protected function upgradePhotos(): void
});
$needsConversion = $this->needsConversion();
DB::beginTransaction();
/** @var array<int,object{id:int,takestamp:string|null}> */
$photos = DB::table(self::PHOTOS_TABLE_NAME)->select([
self::ID_COL_NAME,
self::PHOTO_TAKESTAMP_COL_NAME,
Expand Down Expand Up @@ -328,6 +331,7 @@ protected function downgradePhotos(): void
});
$needsConversion = $this->needsConversion();
DB::beginTransaction();
/** @var array<int,object{id:int,taken_at:string|null,taken_at_orig_tz:string|null}> */
$photos = DB::table(self::PHOTOS_TABLE_NAME)->select([
self::ID_COL_NAME,
self::PHOTO_TAKEN_AT_COL_NAME,
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature_v1/WebAuthTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function testWebAuthnRegisterOptions(): void
$response->assertJson([
'rp' => ['name' => 'Lychee'],
'authenticatorSelection' => ['userVerification' => 'discouraged'],
'user' => ['name' => null, 'displayName' => 'admin'],
'user' => ['name' => 'admin#localhost', 'displayName' => 'admin'],
'pubKeyCredParams' => [['type' => 'public-key', 'alg' => -7], ['type' => 'public-key', 'alg' => -257]],
'attestation' => 'none',
'excludeCredentials' => [],
Expand Down

0 comments on commit 5c0d23a

Please sign in to comment.