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

php 8.3 support #14

Closed
wants to merge 7 commits into from
Closed
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
9 changes: 6 additions & 3 deletions .github/workflows/extensions_finder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ jobs:
run: composer update --no-progress --no-interaction

- name: Install PHP extensions finder as dev dependency
run: composer require efabrica/php-extensions-finder --dev
run: composer require dg/php-extensions-finder --dev
Copy link
Owner

Choose a reason for hiding this comment

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

ta grudlova je lepsia? nevracala ziadny return kod svojho casu (takze test bol zeleny vzdy) preto som vyrabal tu nasu

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ta nasa nejde na php8.3


- name: PHP extensions finder
run: vendor/bin/php-extensions-finder check src tests
- name: PHP extensions finder src
run: php vendor/dg/php-extensions-finder/php-extensions-finder src

- name: PHP extensions finder tests
run: php vendor/dg/php-extensions-finder/php-extensions-finder tests
2 changes: 1 addition & 1 deletion .github/workflows/phpunit_mysql_5_7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ '7.4', '8.0', '8.1', '8.2' ]
php: [ '7.4', '8.0', '8.1', '8.2', '8.3' ]

name: PHPunit PHP ${{ matrix.php }}

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"keywords": ["PHP", "Database", "Fake data"],
"license": "MIT",
"require": {
"php": ">=7.4 <8.3",
"php": "^7.4 | ^8.0",
"ext-json": "*",
"ext-pdo": "*",
"fakerphp/faker": "^1.17",
"symfony/console": "^4.2 | ^5.0 | ^6.0",
"symfony/console": "^4.2 | ^5.0 | ^6.0 | ^7.0",
"nette/database": "^3.0"
},
"require-dev": {
Expand Down
3 changes: 2 additions & 1 deletion src/Database/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function __construct(
) {
$this->name = $name;
try {
$connection = new Connection($dsn, $user, $password, $options);
$connection = new Connection($dsn, $user, $password, $options ?? []);
$cacheStorage = new MemoryStorage();
$structure = new Structure($connection, $cacheStorage);
$database = new Explorer($connection, $structure);
Expand Down Expand Up @@ -217,6 +217,7 @@ private function getExtendedColumnSettings(array $column): array
$fullType = $column['vendor']['type'];
$pattern = '/(.*?)\((.*?)\)(.*)/';
preg_match($pattern, $fullType, $matches);
/** @var array<int, string> $matches */
$type = trim($matches[1]);
if (in_array($type, ['enum', 'set'])) {
$values = str_replace("'", '', $matches[2]);
Expand Down
Loading