Skip to content

Upgrade doctrine/dbal to version 3 if using php8 #354

Open
@ven7ura

Description

Users can't migrate using laravel sail and php8.

Expected Behavior

Using commands sail art migrate should resolve without issues.

Current Behavior

Trying to migrate this error shows up:
Declaration of Doctrine\DBAL\Driver\PDOConnection::query() must be compatible with PDO::query(string $query, ?int $fetchMode = null, mixed ...$fetchModeArgs)

#doctrine/dbal#4042

If I try to install version 3:
composer require doctrine/dbal:3.0.0

./composer.json has been updated
Running composer update doctrine/dbal
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - getcandy/candy-api is locked to version 0.11.3 and an update of this package was not requested.
    - getcandy/candy-api 0.11.3 requires doctrine/dbal 2.9.2 -> found doctrine/dbal[v2.9.2] but it conflicts with your root composer.json require (3.0.0).

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Possible Solution

Update dependencies of doctrine/dbal

Steps to Reproduce

  1. New laravel project
  2. Install laravel sanctum and passport
  3. Install this package
  4. Do sail art migrate

Context (Environment)

win10 wsl2 Ubuntu 20.04

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions