Skip to content

laravelsail/php83-composer:latest missing PDO #653

Closed
@RobertHR

Description

Sail Version

1.xis

Laravel Version

10.x

PHP Version

8.2, 8.3

Operating System

macOS

OS Version

14.x

Description

When using the small image laravelsail/php8x-composer:latest to initial install dependencies this fails due to missing mysql PDO extension.
The error is:

Error (0): Undefined constant PDO::MYSQL_ATTR_SSL_CA

This variable is in config/database.php as option for the mysql config.

This method is advertise here: https://laravel.com/docs/10.x/sail#installing-composer-dependencies-for-existing-projects but does not work now that the PDO mysql extension is missing.

Steps To Reproduce

Create a new project from scratch.
Then try to install the dependencies using:

docker run --rm \
    -u "$(id -u):$(id -g)" \
    -v "$(pwd):/var/www/html" \
    -w /var/www/html \
    laravelsail/php82-composer:latest \
    composer install --ignore-platform-reqs

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions