Skip to content

Commit fb48001

Browse files
staabmxHeaven
andauthored
Loadable classes not recognized since 2.1.34 release (#4891)
Co-authored-by: Márk Magyar <magyarheaven@gmail.com>
1 parent a2af4ec commit fb48001

8 files changed

Lines changed: 581 additions & 3 deletions

File tree

.github/workflows/e2e-tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,10 @@ jobs:
410410
- script: |
411411
cd e2e/bug13425
412412
timeout 15 ../bashunit -a exit_code "1" "../../bin/phpstan analyze src/ plugins/"
413+
- script: |
414+
cd e2e/bug-14036
415+
composer install
416+
../../bin/phpstan analyze
413417
414418
steps:
415419
- name: "Checkout"

e2e/bug-14036/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/vendor

e2e/bug-14036/bootstrap-types.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Atk4\Data\Bootstrap;
6+
7+
use Doctrine\DBAL\Platforms\SqlitePlatform;
8+
9+
// force SQLitePlatform class load as in DBAL 3.x it is named with a different case
10+
// remove once DBAL 3.x support is dropped
11+
try {
12+
new SqlitePlatform(); // @phpstan-ignore class.notFound
13+
} catch (\Error $e) {
14+
}

e2e/bug-14036/composer.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "atk4/data",
3+
"description": "Agile Data - Database access abstraction framework",
4+
"license": "MIT",
5+
"type": "library",
6+
"homepage": "https://github.com/atk4/data",
7+
"require": {
8+
"php": ">=7.4 <8.5",
9+
"doctrine/dbal": "~3.5.1 || ~3.6.0 || ~3.7.0 || ~3.8.0 || ~3.9.0 || ~3.10.0 || ~4.0.0 || ~4.1.0 || ~4.2.0 || ~4.3.0 || ~4.4.0"
10+
},
11+
"require-dev": {
12+
"phpstan/extension-installer": "^1.1",
13+
"phpstan/phpstan": "^2.0",
14+
"phpstan/phpstan-deprecation-rules": "^2.0",
15+
"phpstan/phpstan-strict-rules": "^2.0"
16+
},
17+
"prefer-stable": true,
18+
"autoload": {
19+
"psr-4": {
20+
"Atk4\\Data\\": "src/"
21+
},
22+
"files": [
23+
"bootstrap-types.php"
24+
]
25+
},
26+
"config": {
27+
"allow-plugins": {
28+
"phpstan/extension-installer": true
29+
},
30+
"sort-packages": true
31+
}
32+
}

0 commit comments

Comments
 (0)