Skip to content

PHP_URL_SCHEME doesn't support underscores #453

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

Merged
merged 2 commits into from
Jun 12, 2018

Conversation

coudenysj
Copy link
Contributor

@coudenysj
Copy link
Contributor Author

Is it ok if I replace it with a regex check?

@makasim
Copy link
Member

makasim commented Jun 1, 2018

Is it ok if I replace it with a regex check?

what exactly?

@makasim
Copy link
Member

makasim commented Jun 4, 2018

@coudenysj ping

@coudenysj
Copy link
Contributor Author

The following line (parse_url) doesn't support underscores:

$schema = parse_url($dsn, PHP_URL_SCHEME);

So only a subset of this list is actually supported:

$supported = [
'db2' => true,
'ibm_db2' => true,
'mssql' => true,
'pdo_sqlsrv' => true,
'mysql' => true,
'mysql2' => true,
'pdo_mysql' => true,
'pgsql' => true,
'postgres' => true,
'postgresql' => true,
'pdo_pgsql' => true,
'sqlite' => true,
'sqlite3' => true,
'pdo_sqlite' => true,
];

@makasim
Copy link
Member

makasim commented Jun 4, 2018

I don't mind changing it. A PR is very welcome.

@coudenysj
Copy link
Contributor Author

Here you go.

@coudenysj
Copy link
Contributor Author

Could you re-run the checks? I didn't change anything to the MongoDB testCouldBeConstructedWithCustomConfiguration.

@makasim
Copy link
Member

makasim commented Jun 5, 2018

@coudenysj Mongodb failed test is not related to your changes. I am aware of it.

@makasim makasim merged commit 11a2199 into php-enqueue:master Jun 12, 2018
ASKozienko pushed a commit that referenced this pull request Nov 2, 2018
PHP_URL_SCHEME doesn't support underscores
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants