Skip to content

Commit 9016fd8

Browse files
committed
first commit
0 parents  commit 9016fd8

136 files changed

Lines changed: 2883 additions & 0 deletions

File tree

Some content is hidden

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

.docker/nginx/nginx.conf

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
user www-data;
2+
worker_processes auto;
3+
daemon off;
4+
pid /run/nginx.pid;
5+
6+
include /etc/nginx/modules-enabled/*.conf;
7+
8+
events {
9+
worker_connections 1024;
10+
}
11+
12+
http {
13+
include /etc/nginx/mime.types;
14+
default_type application/octet-stream;
15+
16+
server_tokens off;
17+
18+
client_max_body_size 64m;
19+
sendfile on;
20+
tcp_nodelay on;
21+
tcp_nopush on;
22+
23+
gzip_vary on;
24+
25+
access_log /var/log/nginx/access.log;
26+
error_log /var/log/nginx/error.log;
27+
28+
server {
29+
listen 80;
30+
31+
root /app/tests/Application/public;
32+
index index.php;
33+
34+
location / {
35+
try_files $uri /index.php$is_args$args;
36+
}
37+
38+
location ~ \.php$ {
39+
include fastcgi_params;
40+
41+
fastcgi_pass unix:/var/run/php8-fpm.sock;
42+
fastcgi_split_path_info ^(.+\.php)(/.*)$;
43+
44+
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
45+
fastcgi_param DOCUMENT_ROOT $realpath_root;
46+
}
47+
}
48+
}

.docker/php/php.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[PHP]
2+
memory_limit=512M
3+
4+
[date]
5+
date.timezone=${PHP_DATE_TIMEZONE}

.editorconfig

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
[*]
8+
# Change these settings to your own preference
9+
indent_style = space
10+
indent_size = 4
11+
12+
# We recommend you to keep these unchanged
13+
end_of_line = lf
14+
charset = utf-8
15+
trim_trailing_whitespace = true
16+
insert_final_newline = true
17+
18+
[*.feature]
19+
indent_style = space
20+
indent_size = 4
21+
22+
[*.js]
23+
indent_style = space
24+
indent_size = 2
25+
26+
[*.json]
27+
indent_style = space
28+
indent_size = 2
29+
30+
[*.md]
31+
indent_style = space
32+
indent_size = 4
33+
trim_trailing_whitespace = false
34+
35+
[*.neon]
36+
indent_style = space
37+
indent_size = 4
38+
39+
[*.php]
40+
indent_style = space
41+
indent_size = 4
42+
43+
[*.sh]
44+
indent_style = space
45+
indent_size = 4
46+
47+
[*.{yaml,yml}]
48+
indent_style = space
49+
indent_size = 4
50+
trim_trailing_whitespace = false
51+
52+
[.babelrc]
53+
indent_style = space
54+
indent_size = 2
55+
56+
[.gitmodules]
57+
indent_style = tab
58+
indent_size = 4
59+
60+
[.php_cs{,.dist}]
61+
indent_style = space
62+
indent_size = 4
63+
64+
[composer.json]
65+
indent_style = space
66+
indent_size = 4
67+
68+
[package.json]
69+
indent_style = space
70+
indent_size = 2
71+
72+
[phpspec.yml{,.dist}]
73+
indent_style = space
74+
indent_size = 4
75+
76+
[phpstan.neon]
77+
indent_style = space
78+
indent_size = 4
79+
80+
[phpunit.xml{,.dist}]
81+
indent_style = space
82+
indent_size = 4

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @Sylius/core-team

.github/dependabot.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: composer
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "10:00"
8+
open-pull-requests-limit: 10
9+
ignore:
10+
- dependency-name: vimeo/psalm
11+
versions:
12+
- 4.5.0
13+
- 4.5.1
14+
- 4.5.2
15+
- 4.6.0
16+
- 4.6.1
17+
- 4.6.2
18+
- 4.6.3
19+
- 4.7.0
20+
- 4.7.1
21+
- dependency-name: phpstan/phpstan
22+
versions:
23+
- 0.12.70
24+
- 0.12.71
25+
- 0.12.73
26+
- 0.12.75
27+
- 0.12.76
28+
- 0.12.77
29+
- 0.12.78
30+
- 0.12.80
31+
- 0.12.81
32+
- 0.12.83
33+
- 0.12.84
34+
- dependency-name: sylius-labs/coding-standard
35+
versions:
36+
- 4.0.2
37+
- dependency-name: phpstan/phpstan-doctrine
38+
versions:
39+
- 0.12.32
40+
- dependency-name: phpstan/phpstan-webmozart-assert
41+
versions:
42+
- 0.12.10
43+
- 0.12.11

.github/workflows/build.yml

Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- 'dependabot/**'
7+
pull_request: ~
8+
release:
9+
types: [created]
10+
schedule:
11+
-
12+
cron: "0 1 * * 6" # Run at 1am every Saturday
13+
workflow_dispatch: ~
14+
15+
jobs:
16+
tests:
17+
runs-on: ubuntu-latest
18+
19+
name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}"
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
php: ["8.1", "8.2", "8.3"]
25+
symfony: ["^5.4", "^6.4"]
26+
node: ["20.x"]
27+
mysql: ["8.0"]
28+
29+
env:
30+
APP_ENV: test
31+
DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}"
32+
33+
steps:
34+
-
35+
uses: actions/checkout@v3
36+
37+
-
38+
name: Setup PHP
39+
uses: shivammathur/setup-php@v2
40+
with:
41+
php-version: "${{ matrix.php }}"
42+
extensions: intl
43+
tools: flex,symfony
44+
coverage: none
45+
46+
-
47+
name: Setup Node
48+
uses: actions/setup-node@v4
49+
with:
50+
node-version: "${{ matrix.node }}"
51+
52+
-
53+
name: Shutdown default MySQL
54+
run: sudo service mysql stop
55+
56+
-
57+
name: Setup MySQL
58+
uses: mirromutth/mysql-action@v1.1
59+
with:
60+
mysql version: "${{ matrix.mysql }}"
61+
mysql root password: "root"
62+
63+
-
64+
name: Output PHP version for Symfony CLI
65+
run: php -v | head -n 1 | awk '{ print $2 }' > .php-version
66+
67+
-
68+
name: Install certificates
69+
run: symfony server:ca:install
70+
71+
-
72+
name: Run Chrome Headless
73+
run: google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1 > /dev/null 2>&1 &
74+
75+
-
76+
name: Run webserver
77+
run: (cd tests/Application && symfony server:start --port=8080 --dir=public --daemon)
78+
79+
-
80+
name: Get Composer cache directory
81+
id: composer-cache
82+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
83+
84+
-
85+
name: Cache Composer
86+
uses: actions/cache@v4
87+
with:
88+
path: ${{ steps.composer-cache.outputs.dir }}
89+
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json **/composer.lock') }}
90+
restore-keys: |
91+
${{ runner.os }}-php-${{ matrix.php }}-composer-
92+
93+
-
94+
name: Configure global composer
95+
run: |
96+
composer global config --no-plugins allow-plugins.symfony/flex true
97+
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^2.2.2"
98+
99+
-
100+
name: Restrict Symfony version
101+
if: matrix.symfony != ''
102+
run: |
103+
composer config extra.symfony.require "${{ matrix.symfony }}"
104+
105+
-
106+
name: Restrict Sylius version
107+
if: matrix.sylius != ''
108+
run: composer require "sylius/sylius:${{ matrix.sylius }}" --no-update --no-scripts --no-interaction
109+
110+
-
111+
name: Install PHP dependencies
112+
run: composer install --no-interaction
113+
env:
114+
SYMFONY_REQUIRE: ${{ matrix.symfony }}
115+
116+
-
117+
name: Get Yarn cache directory
118+
id: yarn-cache
119+
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
120+
121+
-
122+
name: Cache Yarn
123+
uses: actions/cache@v4
124+
with:
125+
path: ${{ steps.yarn-cache.outputs.dir }}
126+
key: ${{ runner.os }}-node-${{ matrix.node }}-yarn-${{ hashFiles('**/package.json **/yarn.lock') }}
127+
restore-keys: |
128+
${{ runner.os }}-node-${{ matrix.node }}-yarn-
129+
130+
-
131+
name: Install JS dependencies
132+
run: (cd tests/Application && yarn install)
133+
134+
-
135+
name: Prepare test application database
136+
run: |
137+
(cd tests/Application && bin/console doctrine:database:create -vvv)
138+
(cd tests/Application && bin/console doctrine:schema:create -vvv)
139+
140+
-
141+
name: Prepare test application assets
142+
run: |
143+
(cd tests/Application && bin/console assets:install public -vvv)
144+
(cd tests/Application && yarn build:prod)
145+
146+
-
147+
name: Prepare test application cache
148+
run: (cd tests/Application && bin/console cache:warmup -vvv)
149+
150+
-
151+
name: Load fixtures in test application
152+
run: (cd tests/Application && bin/console sylius:fixtures:load -n)
153+
154+
-
155+
name: Validate composer.json
156+
run: composer validate --ansi --strict
157+
158+
-
159+
name: Validate database schema
160+
run: (cd tests/Application && bin/console doctrine:schema:validate)
161+
162+
-
163+
name: Run PHPStan
164+
run: vendor/bin/phpstan analyse -c phpstan.neon -l max src/
165+
166+
-
167+
name: Run PHPSpec
168+
run: vendor/bin/phpspec run --ansi -f progress --no-interaction
169+
170+
-
171+
name: Run PHPUnit
172+
run: vendor/bin/phpunit --colors=always
173+
174+
-
175+
name: Run Behat
176+
run: vendor/bin/behat --colors --strict -vvv --no-interaction -f progress || vendor/bin/behat --colors --strict -vvv --no-interaction -f progress --rerun
177+
178+
-
179+
name: Upload Behat logs
180+
uses: actions/upload-artifact@v3
181+
if: failure()
182+
with:
183+
name: Behat logs
184+
path: etc/build/
185+
if-no-files-found: ignore

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/vendor/
2+
/node_modules/
3+
/composer.lock
4+
5+
/etc/build/*
6+
!/etc/build/.gitignore
7+
8+
/tests/Application/yarn.lock
9+
10+
/.phpunit.result.cache
11+
/behat.yml
12+
/phpspec.yml
13+
/phpunit.xml
14+
.phpunit.result.cache
15+
16+
# Symfony CLI https://symfony.com/doc/current/setup/symfony_server.html#different-php-settings-per-project
17+
/.php-version
18+
/php.ini

CONFLICTS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# CONFLICTS
2+
3+
This document explains why certain conflicts were added to `composer.json` and
4+
references related issues.
5+
6+
- `symfony/framework-bundle:6.2.8`:
7+
8+
This version is missing the service alias `validator.expression`
9+
which causes ValidatorException exception to be thrown when using `Expression` constraint.

0 commit comments

Comments
 (0)