Skip to content
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

laravelsail/php83-composer:latest missing PDO #653

Closed
RobertHR opened this issue Jan 12, 2024 · 3 comments
Closed

laravelsail/php83-composer:latest missing PDO #653

RobertHR opened this issue Jan 12, 2024 · 3 comments

Comments

@RobertHR
Copy link

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
@crynobone
Copy link
Member

Hey there, thanks for reporting this issue.

We'll need more info and/or code to debug this further. Can you please create a repository with the command below, commit the code that reproduces the issue as one separate commit on the main/master branch and share the repository here?

Please make sure that you have the latest version of the Laravel installer in order to run this command. Please also make sure you have both Git & the GitHub CLI tool properly set up.

laravel new bug-report --github="--public"

Do not amend and create a separate commit with your custom changes. After you've posted the repository, we'll try to reproduce the issue.

Thanks!

@crazy252
Copy link

If i pull a fresh image of laravelsail/php8x-composer there is always composer present. I checkt it with all php 8 versions.

Maybe your image is overwritten by an other image build? With docker rmi IMAGE you can delete an image. If you execute your command again, the image is pulled again.

@driesvints
Copy link
Member

Hey there,

Can you first please try one of the support channels below? If you can actually identify this as a bug, feel free to open up a new issue with a link to the original one and we'll gladly help you out.

Thanks!

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

No branches or pull requests

4 participants