Skip to content

Deprecate "service" connection parameter #7042

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 1 commit into from
Jul 20, 2025

Conversation

morozov
Copy link
Member

@morozov morozov commented Jul 18, 2025

Q A
Type bug/improvement

Even though the current behavior is explicitly documented, it looks nonsensical to me. If I specify the servicename parameter in connection configuration but don't add service = true, instead of being interpreted as SERVICE_NAME, servicename will be interpreted as SID:

echo EasyConnectString::fromConnectionParameters([
    'host' => 'localhost',
    'port' => 1521,
    'servicename' => 'BILLING',
]);

// (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SID=BILLING)))

Technically, the addition of || isset($params['servicename']) might be considered a BC break (servicename which was previously interpreted as SID will be interpreted as SERVICE_NAME), but I'd consider it a bug fix. If the user expects that the connection will use SID, they can use dbname.

In the short future, I want to deprecate the usage of dbname for Oracle connections in favor of introducing an explicit sid parameter. The "database" term is too vague in the context of Oracle.

@morozov morozov force-pushed the oracle-service-name branch from 33b174b to e776434 Compare July 18, 2025 00:57
@morozov morozov requested review from greg0ire and derrabus July 18, 2025 19:14
@morozov morozov merged commit 79e1b9d into doctrine:4.4.x Jul 20, 2025
87 checks passed
@morozov morozov deleted the oracle-service-name branch July 20, 2025 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants