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

Test pdo_oci NCLOB read fix in image-php in CI #978

Merged
merged 5 commits into from
Mar 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ jobs:
name: Unit
runs-on: ubuntu-latest
container:
# Alpine support for newer pdo_oci is broken, see https://github.com/mlocati/docker-php-extension-installer/issues/523
# remove once config.m4 checks are working on Alpine
image: ghcr.io/mvorisek/image-php:${{ matrix.php }}-debian
image: ghcr.io/mvorisek/image-php:${{ matrix.php }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -227,8 +225,7 @@ jobs:
php -d opcache.enable_cli=1 vendor/bin/phpunit --exclude-group none $(if [ -n "$LOG_COVERAGE" ]; then echo --coverage-text; else echo --no-coverage; fi) -v
if [ -n "$LOG_COVERAGE" ]; then mv coverage/phpunit.cov coverage/phpunit-oracle-pdo.cov; fi

- name: "Run tests: Oracle - OCI8 (only for coverage or cron)"
if: env.LOG_COVERAGE || github.event_name == 'schedule'
- name: "Run tests: Oracle - OCI8"
env:
DB_DSN: "oci8:dbname=oracle/xe"
DB_USER: system
Expand Down
11 changes: 4 additions & 7 deletions tests/Schema/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,6 @@ private function makePseudoRandomString(bool $isBinary, int $lengthBytes): strin
*/
public function testCharacterTypeFieldLong(string $type, bool $isBinary, int $lengthBytes): void
{
// remove once long multibyte Oracle CLOB stream read support is fixed in pdo_oci ext (oci8 is NOT affected)
// https://github.com/php/php-src/pull/8018
if ($this->getDatabasePlatform() instanceof OraclePlatform
&& $this->db->connection->connection()->getNativeConnection() instanceof \PDO && $type === 'text') {
$lengthBytes = min($lengthBytes, 8190);
}

if ($lengthBytes === 0) {
$str = '';

Expand Down Expand Up @@ -247,6 +240,10 @@ public function providerCharacterTypeFieldLongData(): array
['binary', true, 255],
['text', false, 255],
['blob', true, 255],
// expected to fail with pdo_oci driver, multibyte Oracle CLOB stream read support
// is broken with long strings, oci8 driver is NOT affected,
// CI images ghcr.io/mvorisek/image-php are patched
// remove comment once https://github.com/php/php-src/pull/8018 is merged & released
['text', false, 256 * 1024],
['blob', true, 256 * 1024],
];
Expand Down