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
Lastest nunomaduro/collision requires Laravel 8 #111
Comments
My workaround to get pest to work in L7:
|
Isn't that just for testing as it's in |
Hum? nunomaduro/collision doesn't not require laravel 8 |
That's is |
@ekandreas, that's a I guess |
Yest, pest is placed in require-dev and therefore getting the lastest update 0.2.2 that requires beta3 and laravel 8. |
So where do you want me to put pest to get this to work again? |
Never mind, just forcing pest to use beta2 solves the issue for now:
As you have "nunomaduro/collision": "^5.0.0-BETA2" with the ^-sign it will grab beta3 and force it to Laravel 8. |
It won't force to Laravel 8 🤔 Just ran through an install with a fresh Laravel 7 app. It stays on Laravel 7 because |
Ohh, yes, as long as you have ^ in the version numbering it will take the latest package and install beta3. |
But if it's only me that have this issue we can close it and hope that no one else stumbles on it as they upgrade to the latest pest package. |
Mine did install |
I still argue that beta 3 forces L8: https://github.com/nunomaduro/collision/blob/stable/composer.json |
lol, it doesn't. |
After a fresh install I found the following as was mentioned here that required dev does not generates a conflict for installation on composer, but trying to run php artisan test is throwing an error from this line https://github.com/nunomaduro/collision/blob/stable/src/Adapters/Laravel/Commands/TestCommand.php#L71 |
I'm with @adalessa here, tried a new Laravel app from scratch, then installing Livewire and finally Pest: ~> composer require phpunit/phpunit:"^9.0" --dev --update-with-dependencies
~> composer require nunomaduro/collision:"^5.0" --dev --update-with-dependencies
~> composer require pestphp/pest --dev
~> composer require pestphp/pest-plugin-laravel --dev && php artisan pest:install
~> ./vendor/bin/pest
PASS Tests\Unit\ExampleTest
✓ basic test
PASS Tests\Feature\ExampleTest
✓ basic test
Tests: 2 passed
Time: 0.15s
~> php artisan test
RuntimeException
Running Collision ^5.0 artisan test command requires Laravel ^8.0.
at vendor/nunomaduro/collision/src/Adapters/Laravel/Commands/TestCommand.php:71
67▕ }
68▕
69▕ // @phpstan-ignore-next-line
70▕ if ((int) \Illuminate\Foundation\Application::VERSION[0] < 8) {
➜ 71▕ throw new RuntimeException('Running Collision ^5.0 artisan test command requires Laravel ^8.0.');
72▕ }
73▕
74▕ $options = array_slice($_SERVER['argv'], $this->option('without-tty') ? 3 : 2);
75▕
+14 vendor frames
15 artisan:37
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) here's my {
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2.5",
"fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^1.0",
"guzzlehttp/guzzle": "^6.3",
"laravel/framework": "^7.0",
"laravel/tinker": "^2.0",
"livewire/livewire": "^1.3"
},
"require-dev": {
"facade/ignition": "^2.0",
"fzaninotto/faker": "^1.9.1",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^5.0",
"pestphp/pest": "^0.2.3",
"pestphp/pest-plugin-laravel": "^0.2.0",
"phpunit/phpunit": "^9.0"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/"
},
"classmap": [
"database/seeds",
"database/factories"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
}
} |
Yeah, using the Artisan command in Collision 5 does require Laravel 8. I've never used the test command as it just calls Pest behind the scenes. It looks like this is due to the |
Maybe we should support both dotenv versions on nunomaduro/collision. Basicly have two functions that does different jobs up to the dotenv version. Someone wants to work on this? |
@nunomaduro I'd be happy to take a look tomorrow if I have time. If anyone else wants to take this before though, I'm fine with that. 👍 |
thanks, the goal is try to support both dotenv 4 and 5 at the same time. |
This is still a problem for us. Pest requires Laravel 8. Perhaps we have to wait for September before we can accelerate Pest testing? |
Latest version 5.0.0-BETA3 of nunomaduro/collision requires Laravel 8. Perhaps it is a bit too forward right now as Laravel 8 isn't released yet?
The text was updated successfully, but these errors were encountered: