Skip to content

Commit e30a494

Browse files
committed
Merge remote-tracking branch 'origin/master' into additional-iconv-transliteration-tests
2 parents 32ae3c7 + 3883b82 commit e30a494

File tree

820 files changed

+60892
-27509
lines changed

Some content is hidden

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

820 files changed

+60892
-27509
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
; This file is for unifying the coding style for different editors and IDEs.
2+
; More information at https://editorconfig.org
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 4
8+
end_of_line = lf
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
[*.bat]
13+
end_of_line = crlf

.gitattributes

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Define the line ending behavior of the different file extensions
2+
# Set the default behavior, in case people don't have core.autocrlf set.
3+
* text text=auto eol=lf
4+
5+
# Declare files that will always have CRLF line endings on checkout.
6+
*.bat eol=crlf
7+
8+
# Denote all files that are truly binary and should not be modified.
9+
*.png binary
10+
*.jpg binary
11+
*.gif binary
12+
*.jpeg binary
13+
*.zip binary
14+
*.phar binary
15+
*.ttf binary
16+
*.woff binary
17+
*.eot binary
18+
*.ico binary
19+
*.mo binary
20+
*.pdf binary
21+
*.xcf binary
22+
*.eps binary
23+
*.psd binary
24+
*.doc binary
25+
26+
# Remove files for archives generated using `git archive`
27+
phpstan.neon export-ignore
28+
phpstan-baseline.neon export-ignore linguist-generated=true
29+
.travis.yml export-ignore
30+
.editorconfig export-ignore
31+
.gitattributes export-ignore
32+
.gitignore export-ignore
33+
.license export-ignore
34+
phpunit.xml.dist export-ignore
35+
pom.xml.dist export-ignore

.github/workflows/ci.yml

Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
pull_request:
8+
workflow_dispatch:
9+
10+
jobs:
11+
testsuite:
12+
name: "Test Suite"
13+
runs-on: ubuntu-22.04
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
php-version: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
18+
db-type: [ sqlite, mysql, pgsql, agnostic ]
19+
symfony-version: [ '5-min', '5-max', '6-min', '6-max', '7-min', '7-max']
20+
exclude:
21+
- symfony-version: '6-min'
22+
php-version: '7.4'
23+
- symfony-version: '6-max'
24+
php-version: '7.4'
25+
- symfony-version: '6-min'
26+
php-version: '8.0'
27+
- symfony-version: '6-max'
28+
php-version: '8.0'
29+
- symfony-version: '7-min'
30+
php-version: '7.4'
31+
- symfony-version: '7-max'
32+
php-version: '7.4'
33+
- symfony-version: '7-min'
34+
php-version: '8.0'
35+
- symfony-version: '7-max'
36+
php-version: '8.0'
37+
- symfony-version: '7-min'
38+
php-version: '8.1'
39+
- symfony-version: '7-max'
40+
php-version: '8.1'
41+
env:
42+
DB_NAME: 'propel_tests'
43+
DB_USER: 'propel'
44+
DB_PW: 'propel'
45+
steps:
46+
- name: Install PostgreSQL latest
47+
if: matrix.db-type == 'pgsql' && matrix.php-version != '7.4'
48+
uses: CasperWA/postgresql-action@v1.2
49+
with:
50+
postgresql db: $DB_NAME
51+
postgresql user: $DB_USER
52+
postgresql password: $DB_PW
53+
54+
- name: Install PostgreSQL 16
55+
if: matrix.db-type == 'pgsql' && matrix.php-version == '7.4' && matrix.symfony-version == '5-max'
56+
uses: CasperWA/postgresql-action@v1.2
57+
with:
58+
postgresql version: 16
59+
postgresql db: $DB_NAME
60+
postgresql user: $DB_USER
61+
postgresql password: $DB_PW
62+
63+
- name: Install PostgreSQL min
64+
if: matrix.db-type == 'pgsql' && matrix.php-version == '7.4' && matrix.symfony-version == '5-min'
65+
uses: CasperWA/postgresql-action@v1.2
66+
with:
67+
postgresql version: 9
68+
postgresql db: $DB_NAME
69+
postgresql user: $DB_USER
70+
postgresql password: $DB_PW
71+
72+
- name: Install MySQL latest
73+
if: matrix.db-type == 'mysql' && matrix.php-version != '7.4'
74+
uses: mirromutth/mysql-action@v1.1
75+
with:
76+
mysql root password: $DB_PW
77+
78+
- name: Install MariaDb min
79+
if: matrix.db-type == 'mysql' && matrix.php-version == '7.4'
80+
uses: getong/mariadb-action@v1.1
81+
with:
82+
mariadb version: '10.2'
83+
mysql root password: $DB_PW
84+
85+
- name: Setup PHP, with composer and extensions
86+
uses: shivammathur/setup-php@v2
87+
with:
88+
php-version: ${{ matrix.php-version }}
89+
extensions: json, libxml, pdo, pdo_mysql, pdo_sqlite, pdo_pgsql, sqlite3
90+
coverage: pcov
91+
92+
- name: Checkout
93+
uses: actions/checkout@v2
94+
95+
- name: Composer get cache directory
96+
id: composer-cache
97+
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
98+
99+
- name: Composer cache dependencies
100+
uses: actions/cache@v4
101+
with:
102+
path: ${{ steps.composer-cache.outputs.dir }}
103+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
104+
restore-keys: ${{ runner.os }}-composer-
105+
106+
- name: Move specific composer.json (Symfony version ${{ matrix.symfony-version }})
107+
run: mv tests/composer/composer-symfony${{ matrix.symfony-version }}.json composer.json
108+
109+
- name: Composer install (Symfony version ${{ matrix.symfony-version }})
110+
run: composer install --no-progress --prefer-dist --optimize-autoloader
111+
112+
- name: Wait for MySQL server to load
113+
if: matrix.db-type == 'mysql'
114+
run: |
115+
bash -c "
116+
for i in {1..10}; do
117+
mysqladmin -h 127.0.0.1 -u root status >/dev/null 2>&1 && exit 0 || sleep 6
118+
echo 'trying again'
119+
done;
120+
echo 'could not establish connection after 10 tries'
121+
exit 1
122+
"
123+
env:
124+
MYSQL_PWD: ${{ env.DB_PW }}
125+
126+
- name: Create MySQL Propel user
127+
if: matrix.db-type == 'mysql'
128+
run: |
129+
mysql -h 127.0.0.1 -u root -e "
130+
CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PW';
131+
CREATE USER '$DB_USER'@'%' IDENTIFIED BY '$DB_PW';
132+
GRANT ALL PRIVILEGES ON *.* TO '$DB_USER'@'localhost';
133+
GRANT ALL PRIVILEGES ON *.* TO '$DB_USER'@'%';
134+
FLUSH PRIVILEGES;
135+
"
136+
env:
137+
MYSQL_PWD: ${{ env.DB_PW }}
138+
139+
- name: Setup database for test suite
140+
if: matrix.db-type != 'agnostic'
141+
run: tests/bin/setup.${{ matrix.db-type }}.sh
142+
143+
- name: Run tests
144+
shell: 'script -q -e -c "bash {0}"'
145+
run: |
146+
if [[ ${{ matrix.php-version }} == '7.4' && ${{ matrix.symfony-version }} == '5-max' ]]; then
147+
export CODECOVERAGE=1 && vendor/bin/phpunit -c tests/${{ matrix.db-type }}.phpunit.xml --verbose --coverage-clover=tests/coverage.xml
148+
else
149+
vendor/bin/phpunit -c tests/${{ matrix.db-type }}.phpunit.xml
150+
fi
151+
env:
152+
SYMFONY_VERSION: ${{ matrix.symfony-version }}
153+
154+
- name: Code Coverage Report
155+
if: success() && matrix.php-version == '7.4' && matrix.symfony-version == '5-max'
156+
uses: codecov/codecov-action@v1
157+
with:
158+
flags: ${{ matrix.php-version }}, ${{ matrix.db-type }}, ${{ matrix.symfony-version }}
159+
file: tests/coverage.xml
160+
161+
code-style-and-static-analysis:
162+
runs-on: ubuntu-22.04
163+
steps:
164+
- name: Setup PHP
165+
id: setup-php
166+
uses: shivammathur/setup-php@v2
167+
with:
168+
php-version: '8.1'
169+
extensions: json, libxml, pdo, pdo_mysql, pdo_sqlite, pdo_pgsql, sqlite3
170+
coverage: pcov
171+
172+
- uses: actions/checkout@v2
173+
174+
- name: Composer get cache directory
175+
id: composer-cache
176+
run: |
177+
echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
178+
179+
- name: Composer cache
180+
uses: actions/cache@v4
181+
with:
182+
path: ${{ steps.composer-cache.outputs.dir }}
183+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
184+
restore-keys: |
185+
${{ runner.os }}-composer-
186+
187+
- name: Composer validate
188+
run: composer validate
189+
190+
- name: Composer install
191+
run: composer install --prefer-dist --no-interaction
192+
193+
- name: PHPStan
194+
env:
195+
PHPSTAN: 1
196+
run: composer stan
197+
198+
- name: Psalm
199+
run: composer psalm -- --php-version=${{ steps.setup-php.outputs.php-version }}
200+
201+
- name: Code Style
202+
run: composer cs-check

.gitignore

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1+
.DS_Store
2+
.idea/
13
vendor/
24
composer.phar
35
/composer.lock
46
autoload.php
57
phpunit.xml
8+
.phpunit.result.cache
69
pom.xml
710
php-cs-fixer.phar
811

912
generated-classes/
13+
generated-conf/
14+
generated-sql/
1015

1116
tests/Fixtures/namespaced/build/
1217
tests/Fixtures/nestedset/build/
@@ -15,8 +20,7 @@ tests/Fixtures/schemas/build/
1520
tests/Fixtures/bookstore/build/
1621
tests/Fixtures/bookstore/propel.yaml
1722

18-
tests/Fixtures/bookstore-packaged/build/
19-
tests/Fixtures/bookstore-packaged/propel.yaml
23+
tests/Fixtures/bookstore-packaged/
2024

2125
tests/Fixtures/namespaced/propel.yaml
2226

@@ -40,3 +44,4 @@ tests/Fixtures/fixtures_built
4044
tests/graphviztest/
4145
tests/migrationdiff/
4246
tests/reversecommand/
47+
tests/test.sq3

.license

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/**
2+
* MIT License. This file is part of the Propel package.
3+
* For the full copyright and license information, please view the LICENSE
4+
* file that was distributed with this source code.
5+
*/

0 commit comments

Comments
 (0)