Skip to content

Support doctrine/orm v3 + doctrine/dbal v4 #78

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

Closed
wants to merge 12 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Drop PHP 8.0
  • Loading branch information
W0rma committed Feb 15, 2024
commit 9d5bca804d09e914a8a7b04a754dd16a61bccbe6
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
php: [8.0, 8.1, 8.2, 8.3]
php: [8.1, 8.2, 8.3]

steps:
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
],
"homepage": "https://codeception.com/",
"require": {
"php": "^8.0",
"php": "^8.1",
"ext-json": "*",
"ext-pdo": "*",
"codeception/codeception": "^5.0.0-alpha2"
Expand Down
5 changes: 1 addition & 4 deletions src/Codeception/Module/Doctrine2.php
Original file line number Diff line number Diff line change
Expand Up @@ -401,10 +401,7 @@ public function haveFakeRepository(string $className, array $methods = []): void

$reflectedRepositoryFactory = new ReflectionClass($repositoryFactory);

// Do not call $reflectedRepositoryFactory->isReadOnly() directly because
// phpstan will complain about a non-existing method when using PHP 8.0.
// isReadOnly() is available as-of PHP 8.1.
if ($reflectedRepositoryFactory->hasMethod('isReadOnly') && $reflectedRepositoryFactory->getMethod('isReadOnly')->invoke(null)) {
if ($repositoryFactoryProperty->isReadOnly()) {
$this->debugSection(
'Warning',
'Repository can\'t be mocked, the EntityManager\'s repositoryFactory is readonly'
Expand Down