Closed andrey-helldar closed 9 months ago
@andrey-helldar just checking: if you install a new laravel project with composer create-project, then add laravel/breeze
and run artisan breeze:install --pest
, do you get the same issue?
@driesvints, checked it out. There's no problem there:
"pestphp/pest": "^2.0",
"pestphp/pest-plugin-laravel": "^2.0",
Also tried installing Pest along with Breeze - no problem:
"pestphp/pest": "^2.0",
"pestphp/pest-plugin-laravel": "^2.0",
@andrey-helldar Nuno sent in a PR for this one 👍
Thank you!
Installer Version
5.5.0
Description
PHP 8.3.2 OS: Windows 11 Pro
When the Pest test framework is selected, incorrect version values are inserted into the
composer.json
file -2.0
instead of^2.0
.composer.json
```json { "name": "laravel/laravel", "type": "project", "description": "The skeleton application for the Laravel framework.", "keywords": ["laravel", "framework"], "license": "MIT", "require": { "php": "^8.1", "guzzlehttp/guzzle": "^7.2", "laravel/framework": "^10.10", "laravel/sanctum": "^3.3", "laravel/tinker": "^2.8" }, "require-dev": { "fakerphp/faker": "^1.9.1", "laravel/pint": "^1.0", "laravel/sail": "^1.18", "mockery/mockery": "^1.4.4", "nunomaduro/collision": "^7.0", "pestphp/pest": "2.0", "pestphp/pest-plugin-laravel": "2.0", "spatie/laravel-ignition": "^2.0" }, "autoload": { "psr-4": { "App\\": "app/", "Database\\Factories\\": "database/factories/", "Database\\Seeders\\": "database/seeders/" } }, "autoload-dev": { "psr-4": { "Tests\\": "tests/" } }, "scripts": { "post-autoload-dump": [ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", "@php artisan package:discover --ansi" ], "post-update-cmd": [ "@php artisan vendor:publish --tag=laravel-assets --ansi --force" ], "post-root-package-install": [ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ], "post-create-project-cmd": [ "@php artisan key:generate --ansi" ] }, "extra": { "laravel": { "dont-discover": [] } }, "config": { "optimize-autoloader": true, "preferred-install": "dist", "sort-packages": true, "allow-plugins": { "pestphp/pest-plugin": true, "php-http/discovery": true } }, "minimum-stability": "stable", "prefer-stable": true } ```Installation log
```bash $ laravel new test _ _ | | | | | | __ _ _ __ __ ___ _____| | | | / _` | '__/ _` \ \ / / _ \ | | |___| (_| | | | (_| |\ V / __/ | |______\__,_|_| \__,_| \_/ \___|_| Would you like to install a starter kit? [No starter kit]: [none ] No starter kit [breeze ] Laravel Breeze [jetstream] Laravel Jetstream > Which testing framework do you prefer? [Pest]: [0] Pest [1] PHPUnit > 0 0 Would you like to initialize a Git repository? (yes/no) [no]: > Creating a "laravel/laravel" project at "./test" Installing laravel/laravel (v10.3.2) - Installing laravel/laravel (v10.3.2): Extracting archive Created project in d:\domains/test > @php -r "file_exists('.env') || copy('.env.example', '.env');" Loading composer repositories with package information Updating dependencies Lock file operations: 111 installs, 0 updates, 0 removals - Locking brick/math (0.11.0) - Locking carbonphp/carbon-doctrine-types (2.1.0) - Locking dflydev/dot-access-data (v3.0.2) - Locking doctrine/inflector (2.0.9) - Locking doctrine/lexer (3.0.1) - Locking dragonmantank/cron-expression (v3.3.3) - Locking egulias/email-validator (4.0.2) - Locking fakerphp/faker (v1.23.1) - Locking filp/whoops (2.15.4) - Locking fruitcake/php-cors (v1.3.0) - Locking graham-campbell/result-type (v1.1.2) - Locking guzzlehttp/guzzle (7.8.1) - Locking guzzlehttp/promises (2.0.2) - Locking guzzlehttp/psr7 (2.6.2) - Locking guzzlehttp/uri-template (v1.0.3) - Locking hamcrest/hamcrest-php (v2.0.1) - Locking laravel/framework (v10.43.0) - Locking laravel/pint (v1.13.10) - Locking laravel/prompts (v0.1.15) - Locking laravel/sail (v1.27.3) - Locking laravel/sanctum (v3.3.3) - Locking laravel/serializable-closure (v1.3.3) - Locking laravel/tinker (v2.9.0) - Locking league/commonmark (2.4.2) - Locking league/config (v1.2.0) - Locking league/flysystem (3.24.0) - Locking league/flysystem-local (3.23.1) - Locking league/mime-type-detection (1.15.0) - Locking mockery/mockery (1.6.7) - Locking monolog/monolog (3.5.0) - Locking myclabs/deep-copy (1.11.1) - Locking nesbot/carbon (2.72.3) - Locking nette/schema (v1.3.0) - Locking nette/utils (v4.0.4) - Locking nikic/php-parser (v5.0.0) - Locking nunomaduro/collision (v7.10.0) - Locking nunomaduro/termwind (v1.15.1) - Locking phar-io/manifest (2.0.3) - Locking phar-io/version (3.2.1) - Locking phpoption/phpoption (1.9.2) - Locking phpunit/php-code-coverage (10.1.11) - Locking phpunit/php-file-iterator (4.1.0) - Locking phpunit/php-invoker (4.0.0) - Locking phpunit/php-text-template (3.0.1) - Locking phpunit/php-timer (6.0.0) - Locking phpunit/phpunit (10.5.10) - Locking psr/clock (1.0.0) - Locking psr/container (2.0.2) - Locking psr/event-dispatcher (1.0.0) - Locking psr/http-client (1.0.3) - Locking psr/http-factory (1.0.2) - Locking psr/http-message (2.0) - Locking psr/log (3.0.0) - Locking psr/simple-cache (3.0.0) - Locking psy/psysh (v0.12.0) - Locking ralouphie/getallheaders (3.0.3) - Locking ramsey/collection (2.0.0) - Locking ramsey/uuid (4.7.5) - Locking sebastian/cli-parser (2.0.0) - Locking sebastian/code-unit (2.0.0) - Locking sebastian/code-unit-reverse-lookup (3.0.0) - Locking sebastian/comparator (5.0.1) - Locking sebastian/complexity (3.2.0) - Locking sebastian/diff (5.1.0) - Locking sebastian/environment (6.0.1) - Locking sebastian/exporter (5.1.1) - Locking sebastian/global-state (6.0.1) - Locking sebastian/lines-of-code (2.0.2) - Locking sebastian/object-enumerator (5.0.0) - Locking sebastian/object-reflector (3.0.0) - Locking sebastian/recursion-context (5.0.0) - Locking sebastian/type (4.0.0) - Locking sebastian/version (4.0.1) - Locking spatie/backtrace (1.5.3) - Locking spatie/flare-client-php (1.4.4) - Locking spatie/ignition (1.12.0) - Locking spatie/laravel-ignition (2.4.1) - Locking symfony/console (v6.4.3) - Locking symfony/css-selector (v7.0.3) - Locking symfony/deprecation-contracts (v3.4.0) - Locking symfony/error-handler (v6.4.3) - Locking symfony/event-dispatcher (v7.0.3) - Locking symfony/event-dispatcher-contracts (v3.4.0) - Locking symfony/finder (v6.4.0) - Locking symfony/http-foundation (v6.4.3) - Locking symfony/http-kernel (v6.4.3) - Locking symfony/mailer (v6.4.3) - Locking symfony/mime (v6.4.3) - Locking symfony/polyfill-ctype (v1.29.0) - Locking symfony/polyfill-intl-grapheme (v1.29.0) - Locking symfony/polyfill-intl-idn (v1.29.0) - Locking symfony/polyfill-intl-normalizer (v1.29.0) - Locking symfony/polyfill-mbstring (v1.29.0) - Locking symfony/polyfill-php72 (v1.29.0) - Locking symfony/polyfill-php80 (v1.29.0) - Locking symfony/polyfill-php83 (v1.29.0) - Locking symfony/polyfill-uuid (v1.29.0) - Locking symfony/process (v6.4.3) - Locking symfony/routing (v6.4.3) - Locking symfony/service-contracts (v3.4.1) - Locking symfony/string (v7.0.3) - Locking symfony/translation (v6.4.3) - Locking symfony/translation-contracts (v3.4.1) - Locking symfony/uid (v6.4.3) - Locking symfony/var-dumper (v6.4.3) - Locking symfony/yaml (v7.0.3) - Locking theseer/tokenizer (1.2.2) - Locking tijsverkoyen/css-to-inline-styles (v2.2.7) - Locking vlucas/phpdotenv (v5.6.0) - Locking voku/portable-ascii (2.0.1) - Locking webmozart/assert (1.11.0) Writing lock file Installing dependencies from lock file (including require-dev) Package operations: 111 installs, 0 updates, 0 removals - Installing doctrine/inflector (2.0.9): Extracting archive - Installing doctrine/lexer (3.0.1): Extracting archive - Installing symfony/polyfill-ctype (v1.29.0): Extracting archive - Installing webmozart/assert (1.11.0): Extracting archive - Installing dragonmantank/cron-expression (v3.3.3): Extracting archive - Installing symfony/deprecation-contracts (v3.4.0): Extracting archive - Installing psr/container (2.0.2): Extracting archive - Installing fakerphp/faker (v1.23.1): Extracting archive - Installing symfony/polyfill-php80 (v1.29.0): Extracting archive - Installing symfony/polyfill-php83 (v1.29.0): Extracting archive - Installing symfony/polyfill-mbstring (v1.29.0): Extracting archive - Installing symfony/http-foundation (v6.4.3): Extracting archive - Installing fruitcake/php-cors (v1.3.0): Extracting archive - Installing psr/http-message (2.0): Extracting archive - Installing psr/http-client (1.0.3): Extracting archive - Installing ralouphie/getallheaders (3.0.3): Extracting archive - Installing psr/http-factory (1.0.2): Extracting archive - Installing guzzlehttp/psr7 (2.6.2): Extracting archive - Installing guzzlehttp/promises (2.0.2): Extracting archive - Installing guzzlehttp/guzzle (7.8.1): Extracting archive - Installing guzzlehttp/uri-template (v1.0.3): Extracting archive - Installing laravel/pint (v1.13.10): Extracting archive - Installing symfony/polyfill-intl-normalizer (v1.29.0): Extracting archive - Installing symfony/polyfill-intl-grapheme (v1.29.0): Extracting archive - Installing symfony/string (v7.0.3): Extracting archive - Installing symfony/service-contracts (v3.4.1): Extracting archive - Installing symfony/console (v6.4.3): Extracting archive - Installing voku/portable-ascii (2.0.1): Extracting archive - Installing phpoption/phpoption (1.9.2): Extracting archive - Installing graham-campbell/result-type (v1.1.2): Extracting archive - Installing vlucas/phpdotenv (v5.6.0): Extracting archive - Installing symfony/css-selector (v7.0.3): Extracting archive - Installing tijsverkoyen/css-to-inline-styles (v2.2.7): Extracting archive - Installing symfony/var-dumper (v6.4.3): Extracting archive - Installing symfony/polyfill-uuid (v1.29.0): Extracting archive - Installing symfony/uid (v6.4.3): Extracting archive - Installing symfony/routing (v6.4.3): Extracting archive - Installing symfony/process (v6.4.3): Extracting archive - Installing symfony/polyfill-php72 (v1.29.0): Extracting archive - Installing symfony/polyfill-intl-idn (v1.29.0): Extracting archive - Installing symfony/mime (v6.4.3): Extracting archive - Installing psr/event-dispatcher (1.0.0): Extracting archive - Installing symfony/event-dispatcher-contracts (v3.4.0): Extracting archive - Installing symfony/event-dispatcher (v7.0.3): Extracting archive - Installing psr/log (3.0.0): Extracting archive - Installing egulias/email-validator (4.0.2): Extracting archive - Installing symfony/mailer (v6.4.3): Extracting archive - Installing symfony/error-handler (v6.4.3): Extracting archive - Installing symfony/http-kernel (v6.4.3): Extracting archive - Installing symfony/finder (v6.4.0): Extracting archive - Installing ramsey/collection (2.0.0): Extracting archive - Installing brick/math (0.11.0): Extracting archive - Installing ramsey/uuid (4.7.5): Extracting archive - Installing psr/simple-cache (3.0.0): Extracting archive - Installing nunomaduro/termwind (v1.15.1): Extracting archive - Installing symfony/translation-contracts (v3.4.1): Extracting archive - Installing symfony/translation (v6.4.3): Extracting archive - Installing psr/clock (1.0.0): Extracting archive - Installing carbonphp/carbon-doctrine-types (2.1.0): Extracting archive - Installing nesbot/carbon (2.72.3): Extracting archive - Installing monolog/monolog (3.5.0): Extracting archive - Installing league/mime-type-detection (1.15.0): Extracting archive - Installing league/flysystem (3.24.0): Extracting archive - Installing league/flysystem-local (3.23.1): Extracting archive - Installing nette/utils (v4.0.4): Extracting archive - Installing nette/schema (v1.3.0): Extracting archive - Installing dflydev/dot-access-data (v3.0.2): Extracting archive - Installing league/config (v1.2.0): Extracting archive - Installing league/commonmark (2.4.2): Extracting archive - Installing laravel/serializable-closure (v1.3.3): Extracting archive - Installing laravel/prompts (v0.1.15): Extracting archive - Installing laravel/framework (v10.43.0): Extracting archive - Installing symfony/yaml (v7.0.3): Extracting archive - Installing laravel/sail (v1.27.3): Extracting archive - Installing laravel/sanctum (v3.3.3): Extracting archive - Installing nikic/php-parser (v5.0.0): Extracting archive - Installing psy/psysh (v0.12.0): Extracting archive - Installing laravel/tinker (v2.9.0): Extracting archive - Installing hamcrest/hamcrest-php (v2.0.1): Extracting archive - Installing mockery/mockery (1.6.7): Extracting archive - Installing filp/whoops (2.15.4): Extracting archive - Installing nunomaduro/collision (v7.10.0): Extracting archive - Installing sebastian/version (4.0.1): Extracting archive - Installing sebastian/type (4.0.0): Extracting archive - Installing sebastian/recursion-context (5.0.0): Extracting archive - Installing sebastian/object-reflector (3.0.0): Extracting archive - Installing sebastian/object-enumerator (5.0.0): Extracting archive - Installing sebastian/global-state (6.0.1): Extracting archive - Installing sebastian/exporter (5.1.1): Extracting archive - Installing sebastian/environment (6.0.1): Extracting archive - Installing sebastian/diff (5.1.0): Extracting archive - Installing sebastian/comparator (5.0.1): Extracting archive - Installing sebastian/code-unit (2.0.0): Extracting archive - Installing sebastian/cli-parser (2.0.0): Extracting archive - Installing phpunit/php-timer (6.0.0): Extracting archive - Installing phpunit/php-text-template (3.0.1): Extracting archive - Installing phpunit/php-invoker (4.0.0): Extracting archive - Installing phpunit/php-file-iterator (4.1.0): Extracting archive - Installing theseer/tokenizer (1.2.2): Extracting archive - Installing sebastian/lines-of-code (2.0.2): Extracting archive - Installing sebastian/complexity (3.2.0): Extracting archive - Installing sebastian/code-unit-reverse-lookup (3.0.0): Extracting archive - Installing phpunit/php-code-coverage (10.1.11): Extracting archive - Installing phar-io/version (3.2.1): Extracting archive - Installing phar-io/manifest (2.0.3): Extracting archive - Installing myclabs/deep-copy (1.11.1): Extracting archive - Installing phpunit/phpunit (10.5.10): Extracting archive - Installing spatie/backtrace (1.5.3): Extracting archive - Installing spatie/flare-client-php (1.4.4): Extracting archive - Installing spatie/ignition (1.12.0): Extracting archive - Installing spatie/laravel-ignition (2.4.1): Extracting archive 49 package suggestions were added by new dependencies, use `composer suggest` to see details. Generating optimized autoload files > Illuminate\Foundation\ComposerScripts::postAutoloadDump > @php artisan package:discover --ansi INFO Discovering packages. laravel/sail .................................................................................................. DONE laravel/sanctum ............................................................................................... DONE laravel/tinker ................................................................................................ DONE nesbot/carbon ................................................................................................. DONE nunomaduro/collision .......................................................................................... DONE nunomaduro/termwind ........................................................................................... DONE spatie/laravel-ignition ....................................................................................... DONE 83 packages you are using are looking for funding. Use the `composer fund` command to find out more! > @php artisan vendor:publish --tag=laravel-assets --ansi --force INFO No publishable resources for tag [laravel-assets]. No security vulnerability advisories found. > @php artisan key:generate --ansi INFO Application key set successfully. Which database will your application use? [MySQL]: [mysql ] MySQL [mariadb] MariaDB [pgsql ] PostgreSQL [sqlite ] SQLite [sqlsrv ] SQL Server > sqlite sqlite ./composer.json has been updated The "2.0" constraint for "pestphp/pest" appears too strict and will likely not match what you want. See https://getcomposer.org/constraints The "2.0" constraint for "pestphp/pest-plugin-laravel" appears too strict and will likely not match what you want. See https://getcomposer.org/constraints ./composer.json has been updated Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - Root composer.json requires pestphp/pest 2.0 (exact version match: 2.0, 2.0.0 or 2.0.0.0), found pestphp/pest[dev-suggestion-fluent-and-method, dev-feature/to-be-enumeration, dev-develop, v0.1.0, ..., v0.3.19, v1.0.0, ..., 1.x-dev, v2.0.1, ..., 2.x-dev, 3.x-dev] but it does not match the constraint. Problem 2 - Root composer.json requires pestphp/pest-plugin-laravel 2.0 -> satisfiable by pestphp/pest-plugin-laravel[v2.0.0]. - pestphp/pest-plugin-laravel v2.0.0 requires pestphp/pest ^2.0.0 -> found pestphp/pest[v2.0.1, ..., v2.33.4] but it conflicts with your root composer.json require (2.0). INFO Application ready in [test]. You can start your local development using: ➜ cd test ➜ php artisan serve New to Laravel? Check out our bootcamp and documentation. Build something amazing! ```Steps To Reproduce
Console log:
I then open the
composer.json
file, fix the Pest versions from2.0
to^2.0
and run thecomposer update
console command. Then everything works.