Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Laravel 9 + switch to Laragear/WebAuthn #1469

Merged
merged 34 commits into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
59667bd
Squash
ildyria Sep 7, 2022
e3cfeb4
Merge branch 'master' into upgrade-laravel-9
ildyria Sep 27, 2022
a066720
WRTC
ildyria Sep 29, 2022
773f085
fix login via u2f
ildyria Sep 29, 2022
ae607b8
align the catch blocks
ildyria Sep 29, 2022
97cc858
remove unused import
ildyria Sep 29, 2022
d2052dc
WRTC
ildyria Sep 29, 2022
bb29f73
fix config WRTC
ildyria Sep 29, 2022
3338936
more details about Laravel stupidity
ildyria Sep 29, 2022
faf44a2
fix migrations with respect to comments
ildyria Oct 1, 2022
4cdfc8c
WRTC
ildyria Oct 4, 2022
2d90746
update StreamStatFilter
ildyria Oct 11, 2022
9f06381
fix logLevel
ildyria Oct 11, 2022
25468ab
Merge branch 'master' into upgrade-laravel-9
ildyria Oct 11, 2022
fae68b4
reverted test WRTC
ildyria Oct 11, 2022
e4e0a35
merge master
ildyria Oct 14, 2022
25db8c3
fix phpstan errors
ildyria Oct 14, 2022
3173156
reverted migrations
ildyria Oct 14, 2022
6a74bc3
reverted Storage change
ildyria Oct 14, 2022
6f0918d
remove hard link dependency
ildyria Oct 14, 2022
80d5412
Drop webauthn table when switching provider
ildyria Oct 14, 2022
3bf2eb8
delete old table and recreate it on rollback
ildyria Oct 14, 2022
ed176d5
Merge branch 'master' into upgrade-laravel-9
nagmat84 Oct 20, 2022
4398b52
Synced frontend
nagmat84 Oct 20, 2022
4b1ff0b
fix User/Notify
ildyria Oct 20, 2022
30ecdef
fix FlySystemFile WRTC
ildyria Oct 20, 2022
4d673c2
composer update
ildyria Oct 20, 2022
33bc864
simplify
ildyria Oct 20, 2022
5f4f4c0
merge master
ildyria Oct 20, 2022
b720808
Update app/Actions/Import/FromUrl.php
ildyria Oct 20, 2022
3d1ad0c
Fix comments
ildyria Oct 21, 2022
765957d
Fix comments
ildyria Oct 21, 2022
7048865
and that one
ildyria Oct 21, 2022
096500d
sync front
ildyria Oct 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Actions/Import/FromUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function do(array $urls, ?Album $album): Collection
// Silently do nothing, if `set_time_limit` is denied.
}

// If the component parameter is specified, this function returns a string (or int in case of PHP_URL_PORT )
// If the component parameter is specified, this function returns a string (or int in case of PHP_URL_PORT)
/** @var string $path */
$path = parse_url($url, PHP_URL_PATH);
$extension = '.' . pathinfo($path, PATHINFO_EXTENSION);
Expand Down
2 changes: 1 addition & 1 deletion app/Casts/MustNotSetCast.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
class MustNotSetCast implements CastsInboundAttributes
{
/** @var string|null the name of an alternative attribute */
/** @var string|null -- the name of an alternative attribute */
private ?string $alternative;

/**
Expand Down
2 changes: 1 addition & 1 deletion app/Exceptions/SessionExpiredException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class SessionExpiredException extends LycheeBaseException
{
/** @var int proprietary Laravel HTTP status code to indicate session expiration */
/** @var int -- proprietary Laravel HTTP status code to indicate session expiration */
public const HTTP_PAGE_EXPIRED = 419;

public const DEFAULT_MESSAGE = 'Session expired';
Expand Down
2 changes: 1 addition & 1 deletion app/Image/DownloadedFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class DownloadedFile extends TemporaryLocalFile
public function __construct(string $url)
{
try {
/** @var string $path : because we provide directly PHP_URL_PATH */
/** @var string $path -- because we provide directly PHP_URL_PATH */
$path = parse_url($url, PHP_URL_PATH);
$basename = pathinfo($path, PATHINFO_FILENAME);
$extension = '.' . pathinfo($path, PATHINFO_EXTENSION);
Expand Down
7 changes: 0 additions & 7 deletions app/Image/FlysystemFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@

/**
* Class FlysystemFile.
*
* This class is based on legacy Flysystem v1 which ships with Laravel 8.
* Laravel 9 will migrate to Flysystem v3 which provides a different and
* more consistent API.
*
* For v1, this documentation is relevant:
* https://flysystem.thephpleague.com/v1/docs/usage/filesystem-api/
*/
class FlysystemFile extends MediaFile
{
Expand Down
2 changes: 1 addition & 1 deletion app/Image/SizeVariantDefaultFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class SizeVariantDefaultFactory extends SizeVariantFactory
public const THUMBNAIL_DIM = 200;
public const THUMBNAIL2X_DIM = 400;

/** @var ImageHandlerInterface the image handler (gd, imagick, ...) which is used to generate image files */
/** @var ImageHandlerInterface -- the image handler (gd, imagick, ...) which is used to generate image files */
protected ImageHandlerInterface $referenceImage;
protected ?Photo $photo = null;
protected ?SizeVariantNamingStrategy $namingStrategy = null;
Expand Down
4 changes: 2 additions & 2 deletions app/Image/StreamStatFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ class StreamStatFilter extends \php_user_filter
{
public const REGISTERED_NAME = 'stream-stat-filter';

/** @var string the used hashing algorithm; value must be supported by PHP, see {@link hash_algos()} */
/** @var string -- the used hashing algorithm; value must be supported by PHP, see {@link hash_algos()} */
public const HASH_ALGO_NAME = 'sha1';

/** @var \HashContext|null the hash context for progressive hashing */
/** @var \HashContext|null -- the hash context for progressive hashing */
protected ?\HashContext $hashContext = null;

/**
Expand Down
2 changes: 1 addition & 1 deletion app/Models/Extensions/SizeVariants.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
class SizeVariants extends DTO
{
/** @var Photo the parent object this object is tied to */
/** @var Photo -- the parent object this object is tied to */
private Photo $photo;

private ?SizeVariant $original = null;
Expand Down
14 changes: 7 additions & 7 deletions tests/Feature/Base/SharingTestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class SharingTestBase extends PhotoTestBase
public const USER_PWD_2 = 'User Password 2';
public const USER_PWD_3 = 'User Password 3';

/** @var array[] defines the expected JSON result for each sample image such that we can avoid repeating this again and again during the tests */
/** @var array[] -- defines the expected JSON result for each sample image such that we can avoid repeating this again and again during the tests */
public const EXPECTED_PHOTO_JSON = [
TestCase::SAMPLE_FILE_NIGHT_IMAGE => [
'id' => null,
Expand Down Expand Up @@ -120,22 +120,22 @@ class SharingTestBase extends PhotoTestBase
protected UsersUnitTest $users_tests;
protected RootAlbumUnitTest $root_album_tests;

/** @var string the previously configured column for album sorting */
/** @var string -- the previously configured column for album sorting */
private string $albumsSortingCol;

/** @var string the previously configured order for album sorting */
/** @var string -- the previously configured order for album sorting */
private string $albumsSortingOrder;

/** @var string the previously configured column for photo sorting */
/** @var string -- the previously configured column for photo sorting */
private string $photosSortingCol;

/** @var string the previously configured order for photo sorting */
/** @var string -- the previously configured order for photo sorting */
private string $photosSortingOrder;

/** @var bool the previously configured public visibility for "Recent" */
/** @var bool -- the previously configured public visibility for "Recent" */
private bool $isRecentAlbumPublic;

/** @var bool the previously configured public visibility for "Starred" */
/** @var bool -- the previously configured public visibility for "Starred" */
private bool $isStarredAlbumPublic;

public function setUp(): void
Expand Down
16 changes: 8 additions & 8 deletions tests/Feature/SharingTestScenariosAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,28 +57,28 @@
*/
abstract class SharingTestScenariosAbstract extends SharingTestBase
{
/** @var bool the previously configured visibility for public photos */
/** @var bool -- the previously configured visibility for public photos */
nagmat84 marked this conversation as resolved.
Show resolved Hide resolved
protected bool $arePublicPhotosHidden;

/** @var string|null the ID of the current album 1 (if applicable by the test) */
/** @var string|null -- the ID of the current album 1 (if applicable by the test) */
protected ?string $albumID1;

/** @var string|null the ID of the current album 2 (if applicable by the test) */
/** @var string|null -- the ID of the current album 2 (if applicable by the test) */
protected ?string $albumID2;

/** @var string|null the ID of the current album 3 (if applicable by the test) */
/** @var string|null -- the ID of the current album 3 (if applicable by the test) */
protected ?string $albumID3;

/** @var string|null the ID of the current photo 1 (if applicable by the test) */
/** @var string|null -- the ID of the current photo 1 (if applicable by the test) */
protected ?string $photoID1;

/** @var string|null the ID of the current photo 2 (if applicable by the test) */
/** @var string|null -- the ID of the current photo 2 (if applicable by the test) */
protected ?string $photoID2;

/** @var string|null the ID of the current photo 3 (if applicable by the test) */
/** @var string|null -- the ID of the current photo 3 (if applicable by the test) */
protected ?string $photoID3;

/** @var int|null the ID of the current user (if applicable by the test) */
/** @var int|null -- the ID of the current user (if applicable by the test) */
protected ?int $userID;

public function setUp(): void
Expand Down