Skip to content

Commit cf3ee29

Browse files
committed
Merge branch '4.6'
# Conflicts: # composer.json
2 parents 180c7e2 + c2e0397 commit cf3ee29

File tree

61 files changed

+2540
-135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+2540
-135
lines changed

.editorconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
root = true
2+
3+
[*.yaml]
4+
indent_size = 4
5+
insert_final_newline = true

.github/workflows/ci.yaml

Lines changed: 238 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,243 @@
11
name: CI
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
- '[0-9]+.[0-9]+'
8-
pull_request: ~
4+
push:
5+
branches:
6+
- main
7+
- '[0-9]+.[0-9]+'
8+
pull_request: ~
99

1010
jobs:
11-
cs-fix:
12-
if: github.event.repository.name != 'bundle-template-internal'
13-
name: Run code style check
14-
runs-on: "ubuntu-22.04"
15-
strategy:
16-
matrix:
17-
php:
18-
- '8.0'
19-
steps:
20-
- uses: actions/checkout@v3
21-
22-
- name: Setup PHP Action
23-
uses: shivammathur/setup-php@v2
24-
with:
25-
php-version: ${{ matrix.php }}
26-
coverage: none
27-
extensions: 'pdo_sqlite, gd'
28-
tools: cs2pr
29-
30-
# Only for packages that are private - uncomment if needed
31-
# - name: Add composer keys for private packagist
32-
# run: |
33-
# composer config http-basic.updates.ibexa.co $SATIS_NETWORK_KEY $SATIS_NETWORK_TOKEN
34-
# composer config github-oauth.github.com $TRAVIS_GITHUB_TOKEN
35-
# env:
36-
# SATIS_NETWORK_KEY: ${{ secrets.SATIS_NETWORK_KEY }}
37-
# SATIS_NETWORK_TOKEN: ${{ secrets.SATIS_NETWORK_TOKEN }}
38-
# TRAVIS_GITHUB_TOKEN: ${{ secrets.TRAVIS_GITHUB_TOKEN }}
39-
40-
- uses: ramsey/composer-install@v2
41-
with:
42-
dependency-versions: "highest"
43-
44-
- name: Run code style check
45-
run: composer run-script check-cs -- --format=checkstyle | cs2pr
46-
47-
tests:
48-
if: github.event.repository.name != 'bundle-template-internal'
49-
name: Tests
50-
runs-on: "ubuntu-22.04"
51-
timeout-minutes: 10
52-
53-
strategy:
54-
fail-fast: false
55-
matrix:
56-
php:
57-
- '7.4'
58-
- '8.0'
59-
- '8.1'
60-
- '8.2'
61-
62-
steps:
63-
- uses: actions/checkout@v3
64-
65-
- name: Setup PHP Action
66-
uses: shivammathur/setup-php@v2
67-
with:
68-
php-version: ${{ matrix.php }}
69-
coverage: none
70-
extensions: pdo_sqlite, gd
71-
tools: cs2pr
72-
73-
# Only for packages that are private - uncomment if needed
74-
# - name: Add composer keys for private packagist
75-
# run: |
76-
# composer config http-basic.updates.ibexa.co $SATIS_NETWORK_KEY $SATIS_NETWORK_TOKEN
77-
# composer config github-oauth.github.com $TRAVIS_GITHUB_TOKEN
78-
# env:
79-
# SATIS_NETWORK_KEY: ${{ secrets.SATIS_NETWORK_KEY }}
80-
# SATIS_NETWORK_TOKEN: ${{ secrets.SATIS_NETWORK_TOKEN }}
81-
# TRAVIS_GITHUB_TOKEN: ${{ secrets.TRAVIS_GITHUB_TOKEN }}
82-
83-
- uses: ramsey/composer-install@v2
84-
with:
85-
dependency-versions: "highest"
86-
composer-options: "${{ matrix.composer_options }}"
87-
88-
- name: Setup problem matchers for PHPUnit
89-
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
90-
91-
- name: Run PHPStan analysis
92-
run: composer run-script phpstan
93-
94-
- name: Run test suite
95-
run: composer run-script --timeout=600 test
11+
cs-fix:
12+
name: Run code style check
13+
runs-on: "ubuntu-24.04"
14+
strategy:
15+
matrix:
16+
php:
17+
- '8.3'
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Setup PHP Action
22+
uses: shivammathur/setup-php@v2
23+
with:
24+
php-version: ${{ matrix.php }}
25+
coverage: none
26+
extensions: 'pdo_sqlite, gd'
27+
tools: cs2pr
28+
29+
- uses: ramsey/composer-install@v3
30+
with:
31+
dependency-versions: "highest"
32+
33+
- name: Run code style check
34+
run: composer run-script check-cs -- --format=checkstyle | cs2pr
35+
36+
tests:
37+
name: Tests
38+
runs-on: "ubuntu-24.04"
39+
timeout-minutes: 10
40+
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
php:
45+
- '7.4'
46+
- '8.0'
47+
- '8.4'
48+
49+
steps:
50+
- uses: actions/checkout@v4
51+
52+
- name: Setup PHP Action
53+
uses: shivammathur/setup-php@v2
54+
with:
55+
php-version: ${{ matrix.php }}
56+
coverage: none
57+
extensions: pdo_sqlite, gd
58+
tools: cs2pr
59+
60+
- uses: ramsey/composer-install@v3
61+
with:
62+
dependency-versions: "highest"
63+
composer-options: "${{ matrix.composer_options }}"
64+
65+
- name: Setup problem matchers for PHPUnit
66+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
67+
68+
- name: Run PHPStan analysis
69+
run: composer run-script phpstan
70+
71+
- name: Run test suite
72+
run: composer run-script --timeout=600 test
73+
74+
integration-tests-postgres:
75+
name: PostgreSQL integration tests
76+
needs: tests
77+
services:
78+
postgres:
79+
image: postgres:10
80+
ports:
81+
- 5432
82+
env:
83+
POSTGRES_PASSWORD: postgres
84+
POSTGRES_DB: testdb
85+
options: >-
86+
--health-cmd pg_isready
87+
--health-interval 10s
88+
--health-timeout 5s
89+
--health-retries 5
90+
--tmpfs /var/lib/postgresql/data
91+
runs-on: "ubuntu-24.04"
92+
timeout-minutes: 5
93+
94+
strategy:
95+
matrix:
96+
php:
97+
- '7.4'
98+
- '8.0'
99+
- '8.4'
100+
101+
steps:
102+
- uses: actions/checkout@v4
103+
104+
- name: Setup PHP Action
105+
uses: shivammathur/setup-php@v2
106+
with:
107+
php-version: ${{ matrix.php }}
108+
coverage: none
109+
extensions: pdo_pgsql, gd
110+
tools: cs2pr
111+
112+
- uses: ramsey/composer-install@v3
113+
with:
114+
dependency-versions: "highest"
115+
116+
- name: Setup problem matchers for PHPUnit
117+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
118+
119+
- name: Run integration test suite on Postgres
120+
run: composer run-script --timeout=600 test-integration
121+
env:
122+
SEARCH_ENGINE: legacy
123+
DATABASE_URL: "pgsql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/testdb?server_version=10"
124+
125+
integration-tests-mysql-redis:
126+
name: Redis + MySQL integration tests
127+
needs: tests
128+
services:
129+
redis:
130+
image: redis:5
131+
options: >-
132+
--health-cmd "redis-cli ping"
133+
--health-interval 10s
134+
--health-timeout 5s
135+
--health-retries 5
136+
ports:
137+
- 6379
138+
mysql:
139+
image: ghcr.io/ibexa/core/mysql
140+
ports:
141+
- 3306/tcp
142+
env:
143+
MYSQL_RANDOM_ROOT_PASSWORD: true
144+
MYSQL_USER: mysql
145+
MYSQL_PASSWORD: mysql
146+
MYSQL_DATABASE: testdb
147+
options: >-
148+
--health-cmd="mysqladmin ping"
149+
--health-interval=10s
150+
--health-timeout=5s
151+
--health-retries=5
152+
--tmpfs=/var/lib/mysql
153+
runs-on: "ubuntu-24.04"
154+
timeout-minutes: 5
155+
156+
strategy:
157+
matrix:
158+
php:
159+
- '7.4'
160+
- '8.0'
161+
- '8.4'
162+
163+
steps:
164+
- uses: actions/checkout@v4
165+
166+
- name: Setup PHP Action
167+
uses: shivammathur/setup-php@v2
168+
with:
169+
php-version: ${{ matrix.php }}
170+
coverage: none
171+
extensions: pdo_pgsql, gd
172+
tools: cs2pr
173+
174+
- uses: ramsey/composer-install@v3
175+
with:
176+
dependency-versions: "highest"
177+
178+
- name: Setup problem matchers for PHPUnit
179+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
180+
181+
- name: Run integration test suite on MySQL
182+
run: composer run-script --timeout=600 test-integration
183+
env:
184+
SEARCH_ENGINE: legacy
185+
DATABASE_URL: "mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports[3306] }}/testdb"
186+
KERNEL_CLASS: 'Ibexa\Tests\Integration\Messenger\RedisTestKernel'
187+
TEST_IBEXA_MESSENGER_TRANSPORT_DSN: "redis://localhost:${{ job.services.redis.ports[6379] }}/ibexa_messages?delete_after_ack=0&read_timeout=5"
188+
TEST_IBEXA_MESSENGER_LOCK_DSN: "redis://localhost:${{ job.services.redis.ports[6379] }}/"
189+
190+
integration-tests-mysql:
191+
name: MySQL integration tests
192+
needs: tests
193+
194+
services:
195+
mysql:
196+
image: ghcr.io/ibexa/core/mysql
197+
ports:
198+
- 3306/tcp
199+
env:
200+
MYSQL_RANDOM_ROOT_PASSWORD: true
201+
MYSQL_USER: mysql
202+
MYSQL_PASSWORD: mysql
203+
MYSQL_DATABASE: testdb
204+
options: >-
205+
--health-cmd="mysqladmin ping"
206+
--health-interval=10s
207+
--health-timeout=5s
208+
--health-retries=5
209+
--tmpfs=/var/lib/mysql
210+
runs-on: "ubuntu-24.04"
211+
timeout-minutes: 5
212+
213+
strategy:
214+
fail-fast: false
215+
matrix:
216+
php:
217+
- '7.4'
218+
- '8.0'
219+
- '8.4'
220+
221+
steps:
222+
- uses: actions/checkout@v4
223+
224+
- name: Setup PHP Action
225+
uses: shivammathur/setup-php@v2
226+
with:
227+
php-version: ${{ matrix.php }}
228+
coverage: none
229+
extensions: pdo_mysql, gd
230+
tools: cs2pr
231+
232+
- uses: ramsey/composer-install@v3
233+
with:
234+
dependency-versions: "highest"
235+
236+
- name: Setup problem matchers for PHPUnit
237+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
238+
239+
- name: Run integration test suite vs MySQL
240+
run: composer run-script --timeout=600 test-integration
241+
env:
242+
SEARCH_ENGINE: legacy
243+
DATABASE_URL: "mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports[3306] }}/testdb"

.github/workflows/pr-check.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22
name: PR check
33
on:
44
pull_request:
5-
types:
5+
types:
66
- opened
77
- synchronize
88
- reopened
99
- edited
1010

1111
jobs:
1212
test-base-branch:
13-
if: github.event.repository.name != 'bundle-template-internal'
1413
uses: ibexa/gh-workflows/.github/workflows/pr-check.yml@main

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/.php-cs-fixer.cache
2+
/.phpunit.result.cache
3+
/composer.lock
4+
/node_modules/
5+
/vendor
6+
/yarn.lock
7+
/var

.php-cs-fixer.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
/**
4+
* @copyright Copyright (C) Ibexa AS. All rights reserved.
5+
* @license For full copyright and license information view LICENSE file distributed with this source code.
6+
*/
7+
declare(strict_types=1);
8+
9+
use Ibexa\CodeStyle\PhpCsFixer\InternalConfigFactory;
10+
11+
return InternalConfigFactory::build()->setFinder(
12+
PhpCsFixer\Finder::create()
13+
->in(__DIR__ . '/src')
14+
->in(__DIR__ . '/tests')
15+
->files()->name('*.php')
16+
);

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# messenger
1+
# Ibexa DXP Messenger
22

33
This package is part of [Ibexa DXP](https://ibexa.co).
44

0 commit comments

Comments
 (0)