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

Improve config options #1366

Merged
merged 24 commits into from
Sep 9, 2022
Merged

Improve config options #1366

merged 24 commits into from
Sep 9, 2022

Conversation

qwerty287
Copy link
Contributor

⚠️ might be breaking

  • Reduce options by removing/determining automatically
    • removed logs config completely because it's only used for SQL logs
    • other removals are mostly unused options
    • removed options that might result in wrong config without real warnings
  • add some new env options (like HASHING_ALGORITHM)

@qwerty287 qwerty287 requested review from ildyria, nagmat84 and kamil4 June 11, 2022 17:47
@codecov
Copy link

codecov bot commented Jun 11, 2022

Codecov Report

Merging #1366 (3b26ba0) into master (bb98373) will decrease coverage by 0.87%.
The diff coverage is n/a.

.env.example Outdated Show resolved Hide resolved
composer.json Outdated Show resolved Hide resolved
config/database.php Show resolved Hide resolved
config/database.php Outdated Show resolved Hide resolved
config/database.php Show resolved Hide resolved
config/cache.php Show resolved Hide resolved
config/debugbar.php Outdated Show resolved Hide resolved
config/filesystems.php Show resolved Hide resolved
config/mail.php Show resolved Hide resolved
config/session.php Show resolved Hide resolved
@d7415
Copy link
Contributor

d7415 commented Jun 11, 2022

Somewhat off-topic, but I've just seen that composer.json still has "name": "lycheeorg/lychee-laravel"...

Copy link
Collaborator

@nagmat84 nagmat84 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

During the review I was wondering why Lychee provides two files .env.example and .env.homestead. Does anybody know why? What is the purpose of the latter?

.gitignore Outdated Show resolved Hide resolved
composer.json Outdated Show resolved Hide resolved
config/app.php Outdated Show resolved Hide resolved
config/mail.php Outdated Show resolved Hide resolved
config/session.php Outdated Show resolved Hide resolved
kamil4 added a commit that referenced this pull request Jun 29, 2022
@qwerty287 qwerty287 requested review from nagmat84 and d7415 July 18, 2022 13:29
@qwerty287
Copy link
Contributor Author

@LycheeOrg/reviewers This PR should be reviewed because it contains some new config options that are already listed in the docs. Could you please re-review it?

@qwerty287
Copy link
Contributor Author

@nagmat84 I added the session store option back. You still need to approve because you requested changes :)

composer.json Outdated
@@ -1,10 +1,20 @@
{
"name": "lycheeorg/lychee-laravel",
"name": "lycheeorg/lychee",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just something which came to my mind again. The Github URL is LycheeOrg/Lychee with three capital letters. I don't know if this is relevant for anything at all or in case "something" interprets this entry, that "something" does so in a case-sensitive manner.

Anyway, I just re-remembered that we are astonishingly inconsistent about our capitalization: not only here, but also in the frontend, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we ignore it or should I update it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would go for lychee-org/lychee because our other packages on packagist.org are under that common name

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fairly common for package names etc to be lower case while the project itself has capitalisation. By no means universal, but common. Especially with package managers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"name": "lycheeorg/lychee",
"name": "lychee-org/lychee",

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, @ildyria was. That's another inconsistency we have and when I spotted it, it had been to late.

I guess we all agree that it would be awesome to use the same spelling of "Lychee Org" everywhere, i.e. here on Github and on Packagist. I don't know if it is possible to rename our packages and create some kind of "redirection" on Packagist from the old name to the new name such that we don't break any dependencies.

Copy link
Member

@ildyria ildyria Sep 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    "require": {
        "php": "^8.0",
        "ext-bcmath": "*",
        "ext-ctype": "*",
        "ext-exif": "*",
        "ext-fileinfo": "*",
        "ext-gd": "*",
        "ext-json": "*",
        "ext-mbstring": "*",
        "ext-openssl": "*",
        "ext-pdo": "*",
        "ext-tokenizer": "*",
        "ext-xml": "*",
        "bepsvpt/secure-headers": "^7.1",
        "darkghosthunter/larapass": "dev-LycheeSpecial",
        "doctrine/dbal": "^3.1",
        "fideloper/proxy": "^4.3",
        "geocoder-php/cache-provider": "^4.3",
        "geocoder-php/nominatim-provider": "^5.5",
        "laravel/framework": "^8.83.14",
        "livewire/livewire": "^2.7",
        "lychee-org/nestedset": "^6",
        "lychee-org/php-exif": "^0.7.11",
        "maennchen/zipstream-php": "^2.1",
        "php-ffmpeg/php-ffmpeg": "^1.0",
        "php-http/guzzle7-adapter": "^1.0",
        "php-http/message": "^1.12",
        "spatie/guzzle-rate-limiter-middleware": "^2.0",
        "spatie/laravel-feed": "^4.0",
        "spatie/laravel-image-optimizer": "^1.6.2",
        "symfony/cache": "^v6.0.0",
        "whichbrowser/parser": "^2.0"
    },
    "require-dev": {
        "ext-imagick": "*",
        "ext-posix": "*",
        "ext-zip": "*",
        "barryvdh/laravel-debugbar": "^3.6",
        "barryvdh/laravel-ide-helper": "^2.10",
        "filp/whoops": "^2.5",
        "friendsofphp/php-cs-fixer": "^3.3",
        "itsgoingd/clockwork": "^5.0",
        "laravel/homestead": "^v13.2.1",
        "lychee-org/phpstan-lychee": "dev-master",
        "mockery/mockery": "^1.5",
        "nunomaduro/collision": "^5.0",
        "nunomaduro/larastan": "^1.0",
        "php-parallel-lint/php-parallel-lint": "^1.3",
        "phpunit/phpunit": "^9"
    },

camelCase does not seem standard there.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we take example on https://github.com/FriendsOfPHP it should be "lycheeorg"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just curious :). I'm slightly in favour of lycheeorg but it's not a major issue for me.

FWIW, we're lycheeorg on Docker Hub. That one was probably me.

Copy link
Contributor

@d7415 d7415 Sep 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found in a SO post: composer/packagist#47

Which raises the question of why it was working in the first place.

Answer: Because the packages we publish are in lychee-org form https://github.com/LycheeOrg/laravel-nestedset/blob/v6/composer.json#L2

So I'd use lychee-org for now until/unless we want to change properly.

@qwerty287 qwerty287 added this to the 4.6.1 milestone Sep 6, 2022
@ildyria
Copy link
Member

ildyria commented Sep 8, 2022

@qwerty287 There have been some changes with Laravel 9.
I would suggest to see if you could rebase this PR on top of #1469 to avoid doing the work twice. :|

Or we can merge this now and see what is conflicting with #1469 :)

@qwerty287
Copy link
Contributor Author

qwerty287 commented Sep 8, 2022

I'd merge this first and then look at #1469. I can see what I can do regarding conflicts there, but I'd merge this first.

@nagmat84
Copy link
Collaborator

nagmat84 commented Sep 8, 2022

I guess we are good to merge this one?

@qwerty287
Copy link
Contributor Author

From my side yes :)

@qwerty287 qwerty287 merged commit 0f1fab9 into master Sep 9, 2022
@ildyria ildyria deleted the rework-configs branch September 9, 2022 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants