Skip to content

Release 2.0.0: PHP ^8.2, portphp ^2.0, DBAL 3/4#9

Merged
slashrsm merged 2 commits into
portphp:masterfrom
slashrsm:release/2.0.0
Jul 22, 2026
Merged

Release 2.0.0: PHP ^8.2, portphp ^2.0, DBAL 3/4#9
slashrsm merged 2 commits into
portphp:masterfrom
slashrsm:release/2.0.0

Conversation

@slashrsm

Copy link
Copy Markdown
Contributor

Summary

Major modernization of the DBAL reader.

Breaking

  • php: ^8.2
  • portphp/portphp: ^2.0
  • doctrine/dbal: ^3.0 || ^4.0 (DBAL 2 dropped)
  • DbalReader rewritten for Result API
  • DbalReaderFactory no longer implements file-based ReaderFactory

Other

  • GitHub Actions + PHPUnit 9
  • Dependabot, UPGRADE-2.0.md

Please do not merge until approved.

Breaking major: drop PHP < 8.2, portphp 1.x, and doctrine/dbal 2.x.
Rewrite DbalReader for the Result API; modern PHPUnit + GHA.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Modernizes the Port DBAL adapter for a 2.0.0 release by raising minimum PHP/dependency versions, updating the DbalReader implementation to Doctrine DBAL 3/4’s Result API, and refreshing project tooling/docs accordingly.

Changes:

  • Bumped requirements to PHP ^8.2, portphp/portphp ^2.0, and doctrine/dbal ^3.0 || ^4.0.
  • Rewrote DbalReader to use executeQuery() / Result::fetchAssociative() and updated tests to PHPUnit 9 style.
  • Removed legacy Travis/Scrutinizer/PhpSpec artifacts and added (currently empty) GitHub Actions / Dependabot config stubs plus upgrade notes.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
UPGRADE-2.0.md Adds an upgrade guide summarizing breaking changes and tooling moves for 2.0.
tests/Reader/DbalReaderTest.php Removes the legacy PHPUnit-era DBAL reader tests.
tests/DbalReaderTest.php Adds a PHPUnit 9+ test suite for the rewritten reader.
src/DbalReaderFactory.php Drops ReaderFactory implementation and modernizes typing/constructor.
src/DbalReader.php Ports reader internals from Statement to DBAL 3/4 Result API with strict typing.
spec/DbalReaderFactorySpec.php Removes PhpSpec coverage for the factory.
README.md Updates badges/requirements and removes deprecated service references.
phpunit.xml.dist Updates PHPUnit configuration for PHPUnit 9 schema and stricter output settings.
phpspec.yml.dist Removes PhpSpec configuration (PhpSpec is no longer used).
composer.json Updates runtime/dev requirements and support links for the 2.0 line.
.travis.yml Removes Travis CI configuration.
.scrutinizer.yml Removes Scrutinizer configuration.
.github/workflows/test.yml Adds a GitHub Actions workflow file (currently empty).
.github/dependabot.yml Adds a Dependabot config file (currently empty).
.gitattributes Updates export-ignore list to reflect removed CI/PhpSpec files.
Comments suppressed due to low confidence (2)

.github/dependabot.yml:2

  • This Dependabot config file is empty, so dependency updates won’t be created. Add a minimal v2 config for Composer and GitHub Actions.
    .github/workflows/test.yml:2
  • This workflow file is empty, so GitHub Actions CI won’t run and the README badge points to a non-functional workflow. Add a basic CI workflow to run PHPUnit on supported PHP versions (and ideally both DBAL 3 and 4).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/DbalReader.php Outdated
Comment on lines +16 to +18
private ?array $data = null;

private ?Result $result = null;
- Allow array|false|null for iterator end marker (PHP 8.2+)
- Restore non-empty GitHub Actions workflow and Dependabot YAML

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.

Comment thread src/DbalReader.php
Comment on lines +90 to +94
public function rewind(): void
{
if (null === $this->stmt) {
$this->stmt = $this->prepare($this->sql, $this->params);
}
if (0 !== $this->key) {
$this->stmt->execute();
$this->data = $this->stmt->fetch(\PDO::FETCH_ASSOC);
$this->key = 0;
}
$this->result = $this->connection->executeQuery($this->sql, $this->params);
$this->data = $this->result->fetchAssociative();
$this->key = 0;
Comment thread src/DbalReader.php
Comment on lines +46 to 50
public function setSql(string $sql, array $params = []): void
{
$this->sql = (string) $sql;

$this->sql = $sql;
$this->setSqlParameters($params);
}
Comment thread src/DbalReaderFactory.php
Comment on lines +12 to 15
public function __construct(
private Connection $connection
) {
}
Comment thread tests/DbalReaderTest.php
$this->assertSame($first, $second);
}

private function getConnection()
@slashrsm
slashrsm requested a review from Copilot July 22, 2026 13:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@slashrsm
slashrsm requested a review from Copilot July 22, 2026 13:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@slashrsm
slashrsm requested a review from Copilot July 22, 2026 13:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@slashrsm
slashrsm merged commit 4a31947 into portphp:master Jul 22, 2026
5 of 6 checks passed
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