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

Doctrine\DBAL\Driver\PDO\SQLSrv\Statement::bindParam is deprecated #6285

Open
m4n50n opened this issue Jan 30, 2024 · 3 comments
Open

Doctrine\DBAL\Driver\PDO\SQLSrv\Statement::bindParam is deprecated #6285

m4n50n opened this issue Jan 30, 2024 · 3 comments

Comments

@m4n50n
Copy link

m4n50n commented Jan 30, 2024

Bug Report

Q A
Version 3.8.0

Summary

User Deprecated: Doctrine\DBAL\Driver\PDO\SQLSrv\Statement::bindParam is deprecated. Use bindValue() instead. (Statement.php:48 called by Statement.php:107, #5563, package doctrine/dbal)

I have Symfony 6.4, doctrine/doctrine-bundle 2.11, doctrine/orm 2.17 and doctrine/dbal 3.8.0 but I keep getting this message.

Current behaviour

I keep seeing that in Statement.php bindParam keeps being called from bindValue.

public function bindValue($param, $value, $type = ParameterType::STRING): bool
    {
        if (func_num_args() < 3) {
            Deprecation::trigger(
                'doctrine/dbal',
                'https://github.com/doctrine/dbal/pull/5558',
                'Not passing $type to Statement::bindValue() is deprecated.'
                    . ' Pass the type corresponding to the parameter being bound.',
            );
        }

        return $this->bindParam($param, $value, $type);
    }

How can i solve this?

Thanks.

@calliostro
Copy link

This also applies for the OCI8 driver.

@m4n50n
Copy link
Author

m4n50n commented Feb 29, 2024

Hello! any news?

@derrabus
Copy link
Member

Nobody has picked up your bug yet. Feel free to work on it if you like.

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

3 participants