-
Notifications
You must be signed in to change notification settings - Fork 72
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
Use orchestra/testbench-core
as testbench
should only be used for Package development
#359
Conversation
thank you, @crynobone ! I'll take a look into it soon, but firstly would like to understand why orchestra packages are not in dev requirements. It will take some time, but I'll do my best, thanks |
It is being used directly via the following class: psalm-plugin-laravel/src/Providers/ApplicationProvider.php Lines 11 to 23 in edc45c0
So changing to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some questions regarding these changes in dependencies, can you please take a look?
composer.json
Outdated
@@ -24,7 +25,7 @@ | |||
"illuminate/support": "^9.48 || ^10.0", | |||
"illuminate/view": "^9.48 || ^10.0", | |||
"nikic/php-parser": "^4.13", | |||
"orchestra/testbench": "^7.19 || ^8.0", | |||
"orchestra/testbench-core": "^7.35 || ^8.15", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^7.35 || ^8.15"
Do these versions contain for required functionality, or are they just to enforce new versions?
Note, this plugin built to support old versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both versions contain conflict restrictions (using composer.json) to ensure Testbench Core 7 will only be used with Laravel 9 and Testbench Core 8 only used with Laravel 10.
composer.json
Outdated
@@ -14,6 +14,7 @@ | |||
"php": "^8.0.2", | |||
"ext-simplexml": "*", | |||
"barryvdh/laravel-ide-helper": "^2.13", | |||
"fakerphp/faker": "^1.21", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find places where we use Faker on this package. Do you know them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use Faker\Generator as Faker; |
@@ -34,6 +35,7 @@ | |||
"codeception/module-cli": "^2.0", | |||
"codeception/module-filesystem": "^3.0", | |||
"codeception/module-phpbrowser": "^3.0", | |||
"laravel/framework": "^9.48 || ^10.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this package is made to support both Laravel and Lumen. I'm not sure that require Laravel is a good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only require-dev deps. Previously was provided in require
via orchestra/testbench
.
So this actually improves support for Lumen.
Great, thank you, @crynobone |
In package development,
orchestra/testbench
should be added explicitly which then requiresorchestra/workbench
,orchestra/canvas
etc which isn't useful for this package usage when used in Laravel project.