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 with symfony 7 #433

Merged
merged 1 commit into from
Dec 2, 2023
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
1 change: 1 addition & 0 deletions .github/workflows/test-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- '8.0'
- '8.1'
- '8.2'
- '8.3'
db:
- mysql
- pgsql
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cli-config.php
.phpunit.cache/
.phpunit.result.cache
.php-cs-fixer.cache

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Changelog
If you use `jcr:createdBy` or `jcr:lastModifiedBy` in node types, those properties are not set if the credentials are `null`.
* Improving the performance of `deleteProperties` (#421)
* Deleting dangling binary references when a property is removed or the whole node with a binary property is deleted (#426) - See UPGRADE.md for the recommended database changes.
* Allow installation with Symfony 7.

1.x
===
Expand Down
11 changes: 5 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"ext-xml": "*",
"doctrine/dbal": "^3.0",
"phpcr/phpcr": "~2.1.5",
"phpcr/phpcr-utils": "^1.8.0",
"jackalope/jackalope": "^2.0.0-beta2",
"phpcr/phpcr-utils": "^1.8 || ^2.0",
"jackalope/jackalope": "^2.0.0-RC1",
"psr/simple-cache": "^1.0 || ^2.0 || ^3.0"
},
"provide": {
Expand All @@ -33,9 +33,9 @@
"ext-libxml": "*",
"ext-simplexml": "*",
"psr/log": "^1 || ^2 || ^3",
"phpcr/phpcr-api-tests": "2.1.22",
"phpcr/phpcr-api-tests": "2.1.25",
"phpunit/phpunit": "^9.0",
"symfony/cache": "^5.4 || ^6.2",
"symfony/cache": "^5.4 || ^6.2 || ^7.0",
"phpstan/phpstan": "1.10.x-dev"
},
"autoload": {
Expand All @@ -54,6 +54,5 @@
"allow-plugins": {
"composer/package-versions-deprecated": true
}
},
"minimum-stability": "dev"
}
}
9 changes: 3 additions & 6 deletions src/Jackalope/Tools/Console/Helper/DoctrineDbalHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,19 @@
*/
class DoctrineDbalHelper extends Helper
{
/**
* @var Connection
*/
protected $connection;
private Connection $connection;

public function __construct(Connection $connection)
{
$this->connection = $connection;
}

public function getConnection()
public function getConnection(): Connection
{
return $this->connection;
}

public function getName()
public function getName(): string
{
return 'jackalope-doctrine-dbal';
}
Expand Down
26 changes: 13 additions & 13 deletions tests/Jackalope/Transport/DoctrineDBAL/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,24 +196,24 @@ public function testOutOfRangeCharacterOccurrence($string, $isValid): void
$this->addToAssertionCount(1);
}

public function provideTestOutOfRangeCharacters(): array
public static function provideTestOutOfRangeCharacters(): array
{
return [
['This is valid too!'.$this->translateCharFromCode('\u0009'), true],
['This is valid too!'.self::translateCharFromCode('\u0009'), true],
['This is valid', true],
[$this->translateCharFromCode('\uD7FF'), true],
['This is on the edge, but valid too.'.$this->translateCharFromCode('\uFFFD'), true],
[$this->translateCharFromCode('\u10000'), true],
[$this->translateCharFromCode('\u10FFFF'), true],
[$this->translateCharFromCode('\u0001'), false],
[$this->translateCharFromCode('\u0002'), false],
[$this->translateCharFromCode('\u0003'), false],
[$this->translateCharFromCode('\u0008'), false],
[$this->translateCharFromCode('\uFFFF'), false],
[self::translateCharFromCode('\uD7FF'), true],
['This is on the edge, but valid too.'.self::translateCharFromCode('\uFFFD'), true],
[self::translateCharFromCode('\u10000'), true],
[self::translateCharFromCode('\u10FFFF'), true],
[self::translateCharFromCode('\u0001'), false],
[self::translateCharFromCode('\u0002'), false],
[self::translateCharFromCode('\u0003'), false],
[self::translateCharFromCode('\u0008'), false],
[self::translateCharFromCode('\uFFFF'), false],
];
}

private function translateCharFromCode($char)
private static function translateCharFromCode($char)
{
return json_decode('"'.$char.'"', true, 512, JSON_THROW_ON_ERROR);
}
Expand Down Expand Up @@ -421,7 +421,7 @@ public function testStoreTypes(): void
}
}

public function provideOrder(): iterable
public static function provideOrder(): iterable
{
yield 'string' => [
[
Expand Down