Skip to content
Open
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
119 changes: 56 additions & 63 deletions .github/workflows/backend-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,17 @@ jobs:
php:
- '8.3'
steps:
- uses: actions/checkout@v6

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: 'pdo_sqlite, gd'
tools: cs2pr
- uses: actions/checkout@v6

- uses: ramsey/composer-install@v3
with:
dependency-versions: "highest"
- uses: ibexa/gh-workflows/actions/composer-install@main
with:
gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }}
gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
satis-network-key: ${{ secrets.SATIS_NETWORK_KEY }}
satis-network-token: ${{ secrets.SATIS_NETWORK_TOKEN }}

- name: Run code style check
run: composer run-script check-cs -- --format=checkstyle | cs2pr
- name: Run code style check
run: composer run-script check-cs -- --format=checkstyle | cs2pr

tests:
name: Tests
Expand All @@ -45,31 +40,29 @@ jobs:
- '7.4'
- '8.3'
- '8.4'
doctrine-persistence:
- 'doctrine/persistence:^2.0'
- 'doctrine/persistence:^3.0'

steps:
- uses: actions/checkout@v6

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: pdo_sqlite, gd
tools: cs2pr
- uses: actions/checkout@v6

- uses: ramsey/composer-install@v3
with:
dependency-versions: "highest"
composer-options: "${{ matrix.composer_options }}"
- uses: ibexa/gh-workflows/actions/composer-install@main
with:
gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }}
gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
satis-network-key: ${{ secrets.SATIS_NETWORK_KEY }}
satis-network-token: ${{ secrets.SATIS_NETWORK_TOKEN }}
composer-options: "--with ${{ matrix.doctrine-persistence }}"

- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Run PHPStan analysis
run: composer run-script phpstan
- name: Run PHPStan analysis
run: composer run-script phpstan

- name: Run test suite
run: composer run-script --timeout=600 test
- name: Run test suite
run: composer run-script --timeout=600 test

integration-tests-postgres:
name: PostgreSQL integration tests
Expand Down Expand Up @@ -97,21 +90,21 @@ jobs:
- '7.4'
- '8.3'
- '8.4'
doctrine-persistence:
- 'doctrine/persistence:^2.0'
- 'doctrine/persistence:^3.0'

steps:
- uses: actions/checkout@v6

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: pdo_pgsql, gd
tools: cs2pr

- uses: ramsey/composer-install@v3
- uses: ibexa/gh-workflows/actions/composer-install@main
with:
dependency-versions: "highest"
gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }}
gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
satis-network-key: ${{ secrets.SATIS_NETWORK_KEY }}
satis-network-token: ${{ secrets.SATIS_NETWORK_TOKEN }}
composer-options: "--with ${{ matrix.doctrine-persistence }}"
php-extensions: 'pdo_pgsql, gd'

- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
Expand Down Expand Up @@ -159,21 +152,21 @@ jobs:
- '7.4'
- '8.3'
- '8.4'
doctrine-persistence:
- 'doctrine/persistence:^2.0'
- 'doctrine/persistence:^3.0'

steps:
- uses: actions/checkout@v6

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
- uses: ibexa/gh-workflows/actions/composer-install@main
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: pdo_pgsql, gd
tools: cs2pr

- uses: ramsey/composer-install@v3
with:
dependency-versions: "highest"
gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }}
gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
satis-network-key: ${{ secrets.SATIS_NETWORK_KEY }}
satis-network-token: ${{ secrets.SATIS_NETWORK_TOKEN }}
composer-options: "--with ${{ matrix.doctrine-persistence }}"
php-extensions: 'pdo_mysql, gd'

- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
Expand Down Expand Up @@ -217,21 +210,21 @@ jobs:
- '7.4'
- '8.3'
- '8.4'
doctrine-persistence:
- 'doctrine/persistence:^2.0'
- 'doctrine/persistence:^3.0'

steps:
- uses: actions/checkout@v6

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: pdo_mysql, gd
tools: cs2pr

- uses: ramsey/composer-install@v3
- uses: ibexa/gh-workflows/actions/composer-install@main
with:
dependency-versions: "highest"
gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }}
gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
satis-network-key: ${{ secrets.SATIS_NETWORK_KEY }}
satis-network-token: ${{ secrets.SATIS_NETWORK_TOKEN }}
composer-options: "--with ${{ matrix.doctrine-persistence }}"
php-extensions: 'pdo_mysql, gd'

- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
],
"require": {
"php": "^7.4 || ^8.0",
"doctrine/persistence": "^3",
"doctrine/persistence": "^2 || ^3",
"ibexa/core": "~4.6.x-dev",
"ibexa/core-persistence": "~4.6.x-dev",
"ibexa/polyfill-php82": "^1.0",
Expand Down
7 changes: 6 additions & 1 deletion src/bundle/Transport/ConnectionRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ public function getDefaultConnectionName(): string
return $this->registry->getDefaultConnectionName();
}

public function getConnection(?string $name = null): object
/**
* Cannot declare types to maintain compatibility with doctrine/persistence v2.
*
* @param string|null $name
*/
public function getConnection($name = null): object
{
if ($name === self::DEFAULT_IBEXA_CONNECTION) {
$name = $this->repositoryConfigurationProvider->getStorageConnectionName();
Expand Down
Loading