Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

Commit 81f39d7

Browse files
authored
[Config] Refactoring the config, parser and container components (#800)
1 parent 9c26c46 commit 81f39d7

File tree

875 files changed

+17386
-15757
lines changed

Some content is hidden

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

875 files changed

+17386
-15757
lines changed

.docker/php/32bit/Dockerfile

-91
This file was deleted.

.docker/php/64bit/Dockerfile .docker/php/Dockerfile

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
ARG NAMESPACE
12
ARG PHP_VERSION
23

3-
FROM php:${PHP_VERSION}-cli
4+
FROM ${NAMESPACE}:${PHP_VERSION}-cli
45

56
RUN apt-get update && \
67
apt-get install -y \
@@ -26,27 +27,11 @@ RUN apt-get update && \
2627
apt-get clean -y && \
2728
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
2829

29-
ARG INSTALL_XDEBUG
30-
ARG XDEBUG_VERSION
31-
3230
RUN pecl install -f libsodium && \
3331
pecl install redis && \
3432
pecl install pcov && \
3533
pecl install inotify
3634

37-
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
38-
pecl install "xdebug-${XDEBUG_VERSION}" \
39-
echo 'xdebug.idekey=PHPSTORM \
40-
xdebug.remote_port=9000 \
41-
xdebug.remote_enable=on \
42-
xdebug.remote_connect_back=on \
43-
xdebug.profiler_output_dir="/var/log/xdebug" \
44-
xdebug.cli_color=1 \
45-
xdebug.remote_enable=1 \
46-
xdebug.remote_autostart=1'; > /usr/local/etc/php/conf.d/xdebug.ini \
47-
docker-php-ext-enable xdebug \
48-
;fi
49-
5035
RUN docker-php-ext-configure intl && \
5136
docker-php-ext-configure zip
5237

@@ -83,12 +68,27 @@ RUN { \
8368
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
8469

8570
ENV COMPOSER_ALLOW_SUPERUSER 1
86-
ARG INSTALL_CODING_STANDARD="false"
8771

8872
RUN php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer && \
8973
composer global require phploc/phploc && \
9074
composer global require ergebnis/composer-normalize
9175

76+
ARG INSTALL_XDEBUG
77+
ARG XDEBUG_VERSION
78+
79+
RUN if [ ${INSTALL_XDEBUG} = true ]; then pecl install "xdebug-${XDEBUG_VERSION}" ;fi
80+
81+
RUN { \
82+
echo 'xdebug.idekey=PHPSTORM'; \
83+
echo 'xdebug.remote_port=9000'; \
84+
echo 'xdebug.remote_enable=on'; \
85+
echo 'xdebug.remote_connect_back=on'; \
86+
echo 'xdebug.profiler_output_dir="/var/log/xdebug"'; \
87+
echo 'xdebug.cli_color=1'; \
88+
} > /usr/local/etc/php/conf.d/php-ext-xdebug.ini
89+
90+
RUN if [ ${INSTALL_XDEBUG} = true ]; then docker-php-ext-enable xdebug ;fi
91+
9292
RUN mkdir /var/log/php && touch /var/log/php/cli-error.log && chmod 0664 /var/log/php/cli-error.log
9393

9494
WORKDIR /var/www/framework

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ trim_trailing_whitespace = true
1212
indent_style = space
1313
indent_size = 2
1414

15-
[src/Viserio/Component/Container/Tests/Fixture/Compiled/*.txt]
15+
[src/Viserio/Component/Container/Tests/Fixture/Compiled/*]
1616
trim_trailing_whitespace = false
1717
[src/Viserio/Component/Container/Tests/Fixture/Proxy/*.php]
1818
trim_trailing_whitespace = false

.github/autolabeler.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
'Bridge: Doctrine': ["src/Viserio/Bridge/Doctrine"]
2+
'Bridge: Monolog': ["src/Viserio/Bridge/Monolog"]
3+
'Bridge: Twig': ["src/Viserio/Bridge/Twig"]
4+
'Component: Bus': ["src/Viserio/Component/Bus"]
5+
'Component: Cache': ["src/Viserio/Component/Cache"]
6+
'Component: Config': ["src/Viserio/Component/Config"]
7+
'Component: Console': ["src/Viserio/Component/Console"]
8+
'Component: Container': ["src/Viserio/Component/Container"]
9+
'Component: Cookie': ["src/Viserio/Component/Cookie"]
10+
'Component: Cron': ["src/Viserio/Component/Cron"]
11+
'Component: Events': ["src/Viserio/Component/Events"]
12+
'Component: Exception': ["src/Viserio/Component/Exception"]
13+
'Component: Filesystem': ["src/Viserio/Component/Filesystem"]
14+
'Component: Finder': ["src/Viserio/Component/Finder"]
15+
'Component: Foundation': ["src/Viserio/Component/Foundation"]
16+
'Component: Http': ["src/Viserio/Component/Http"]
17+
'Component: Http Factory': ["src/Viserio/Component/HttpFactory"]
18+
'Component: Http Foundation': ["src/Viserio/Component/HttpFoundation"]
19+
'Component: Log': ["src/Viserio/Component/Log"]
20+
'Component: Mail': ["src/Viserio/Component/Mail"]
21+
'Component: Manager': ["src/Viserio/Component/Manager"]
22+
'Component: Pagination': ["src/Viserio/Component/Pagination"]
23+
'Component: Parser': ["src/Viserio/Component/Parser"]
24+
'Component: Path': ["src/Viserio/Component/Path"]
25+
'Component: Pipeline': ["src/Viserio/Component/Pipeline"]
26+
'Component: Profiler': ["src/Viserio/Component/Profiler"]
27+
'Component: Routing': ["src/Viserio/Component/Routing"]
28+
'Component: Session': ["src/Viserio/Component/Session"]
29+
'Component: Support': ["src/Viserio/Component/Support"]
30+
'Component: Translation': ["src/Viserio/Component/Translation"]
31+
'Component: Validation': ["src/Viserio/Component/Validation"]
32+
'Component: View': ["src/Viserio/Component/View"]
33+
'Component: Web Server': ["src/Viserio/Component/WebServer"]
34+
'Provider: Debug': ["src/Viserio/Provider/Debug"]
35+
'Provider: Framework': ["src/Viserio/Provider/Framework"]
36+
'Provider: Twig': ["src/Viserio/Provider/Twig"]

.github/workflows/code-coverage.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,18 @@ jobs:
1616

1717
steps:
1818
- uses: actions/checkout@v2
19+
with:
20+
fetch-depth: 2
1921

2022
- name: "Setup PHP"
21-
uses: shivammathur/setup-php@1.7.0
23+
uses: shivammathur/setup-php@1.8.2
2224
with:
2325
php-version: "7.4"
2426
extensions: mbstring, xml, ctype, iconv, zip, dom, fileinfo, intl, sodium, curl, pdo, pdo_sqlite, inotify, pcntl, posix, xdebug
2527
ini-values: pcov.directory=api, date.timezone=Europe/Berlin, opcache.enable_cli=1, serialize_precision=14
2628
coverage: none
2729
pecl: true
28-
tools: composer
30+
tools: composer, composer-prefetcher
2931

3032
- name: Install Xdebug
3133
run: sudo pecl install -f xdebug-2.9.0
@@ -45,9 +47,6 @@ jobs:
4547
- name: "List all php extensions with versions"
4648
run: php -r 'foreach (get_loaded_extensions() as $extension) echo $extension . " " . phpversion($extension) . PHP_EOL;'
4749

48-
- name: "Install Automatic Composer Prefetcher"
49-
run: composer global require --no-progress --no-scripts --no-plugins narrowspark/automatic-composer-prefetcher dev-master
50-
5150
- name: "Install locked dependencies with composer"
5251
run: $COMPOSER_UP
5352

.github/workflows/coding-standard.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,20 @@ jobs:
1616

1717
steps:
1818
- uses: actions/checkout@v2
19+
with:
20+
fetch-depth: 2
21+
1922
- name: Setup PHP
20-
uses: shivammathur/setup-php@1.7.0
23+
uses: shivammathur/setup-php@1.8.2
2124
with:
2225
php-version: 7.4
2326
extensions: mbstring, xml, ctype, iconv, zip, dom, fileinfo
24-
tools: composer
27+
tools: composer, composer-prefetcher, cs2pr
28+
29+
- name: "Install Narrowspark coding standard and Annotate a Github Pull Request"
30+
run: composer global require narrowspark/coding-standard:3.4.0 --no-interaction --no-progress --profile --no-suggest --optimize-autoloader
2531

26-
- run: composer global require narrowspark/automatic-composer-prefetcher:dev-master narrowspark/coding-standard:3.2.0 --no-interaction --no-progress --profile --no-suggest --optimize-autoloader
2732
- name: "lint php code"
2833
run: |
2934
cd $GITHUB_WORKSPACE
30-
/home/runner/.composer/vendor/bin/php-cs-fixer fix --config=$GITHUB_WORKSPACE/.php_cs -v --dry-run --stop-on-violation
35+
/home/runner/.composer/vendor/bin/php-cs-fixer fix --config=$GITHUB_WORKSPACE/.php_cs -v --dry-run --stop-on-violation --format=checkstyle | cs2pr

.github/workflows/continuous-integration-linux.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ jobs:
2626
fetch-depth: 2
2727

2828
- name: "Setup PHP"
29-
uses: shivammathur/setup-php@1.7.0
29+
uses: shivammathur/setup-php@1.8.2
3030
with:
3131
php-version: ${{ matrix.php-versions }}
3232
extensions: mbstring, xml, ctype, iconv, zip, dom, fileinfo, intl, sodium, curl, pdo, pdo_sqlite, inotify, pcntl, posix
3333
ini-values: post_max_size=256M, date.timezone=Europe/Berlin, opcache.enable_cli=1, serialize_precision=14
3434
pecl: true
3535
coverage: none
36-
tools: composer
36+
tools: composer, composer-prefetcher
3737

3838
- name: "Configure Container"
3939
env:
@@ -61,9 +61,6 @@ jobs:
6161
- name: "List all php extensions with versions"
6262
run: php -r 'foreach (get_loaded_extensions() as $extension) echo $extension . " " . phpversion($extension) . PHP_EOL;'
6363

64-
- name: "Install Automatic Composer Prefetcher"
65-
run: composer global require --no-progress --no-scripts --no-plugins narrowspark/automatic-composer-prefetcher:dev-master
66-
6764
- name: "Create local composer packages for each patched components and reference them in composer.json when cross-testing components"
6865
run: php ./build/build-packages.php HEAD^ $(find src/Viserio -mindepth 3 -type f -name composer.json -printf '%h\n' | sort)
6966

.github/workflows/continuous-integration-windows.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ jobs:
2626
fetch-depth: 2
2727

2828
- name: "Setup PHP"
29-
uses: shivammathur/setup-php@1.7.0
29+
uses: shivammathur/setup-php@1.8.2
3030
with:
3131
php-version: ${{ matrix.php-versions }}
3232
extensions: mbstring, xml, ctype, iconv, zip, dom, fileinfo, intl, sodium, curl, pdo, pdo_sqlite
3333
ini-values: post_max_size=256M, date.timezone=Europe/Berlin, opcache.enable_cli=1, serialize_precision=14
3434
pecl: true
35-
tools: composer
35+
tools: composer, composer-prefetcher
3636

3737
- name: "Configure container"
3838
env:
@@ -68,9 +68,6 @@ jobs:
6868
- name: "Check Composer version"
6969
run: composer -V
7070

71-
- name: "Install Automatic Composer Prefetcher"
72-
run: composer global require --no-progress --no-scripts --no-plugins narrowspark/automatic-composer-prefetcher:dev-master
73-
7471
- name: "Set root version to composer"
7572
shell: pwsh
7673
run: |

.github/workflows/markdown-lint.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ jobs:
1313
name: 'Markdown lint'
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v1
17-
- name: Setup node
16+
- uses: actions/checkout@v2
17+
18+
- name: "Setup node"
1819
uses: actions/setup-node@v1
1920
with:
2021
node-version: '10.16.0'

.github/workflows/php-audit.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ jobs:
2323
name: "Audit on PHP ${{ matrix.php-versions }} and ${{ matrix.operating-system }} OS"
2424
steps:
2525
- uses: actions/checkout@v2
26+
with:
27+
fetch-depth: 2
2628

2729
- name: Setup PHP
28-
uses: shivammathur/setup-php@1.7.0
30+
uses: shivammathur/setup-php@1.8.2
2931
with:
3032
php-version: ${{ matrix.php-versions }}
3133
extensions: mbstring, xml, ctype, iconv, zip, dom, fileinfo, intl, sodium, curl, pdo, pdo_sqlite, inotify, pcntl, posix
32-
tools: composer
34+
tools: composer, composer-prefetcher
3335

3436
- name: "Configure Container"
3537
env:
@@ -44,8 +46,8 @@ jobs:
4446
git config --global user.email "${EMAIL}"
4547
git config --global user.name "${NAME}"
4648
47-
- name: "Install Automatic Composer Prefetcher And Security Audit"
48-
run: composer global require --no-progress --no-scripts --no-plugins narrowspark/automatic-composer-prefetcher:dev-master narrowspark/automatic-security-audit:dev-master
49+
- name: "Install Automatic Security Audit"
50+
run: composer global require --no-progress --no-scripts --no-plugins narrowspark/automatic-security-audit:dev-master
4951

5052
- name: "Create local composer packages for each patched components and reference them in composer.json when cross-testing components"
5153
run: php ./build/build-packages.php HEAD^ $(find src/Viserio -mindepth 3 -type f -name composer.json -printf '%h\n' | sort)

.github/workflows/split.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ jobs:
1717
matrix:
1818
operating-system: [ubuntu-latest]
1919
dependencies: [
20-
"src/Viserio/Bridge/Dotenv:[email protected]:viserio/dotenv-bridge.git",
2120
"src/Viserio/Bridge/Monolog:[email protected]:viserio/monolog-bridge.git",
2221
"src/Viserio/Bridge/Phpstan:[email protected]:viserio/phpstan-bridge.git",
2322
"src/Viserio/Bridge/Twig:[email protected]:viserio/twig-bridge.git",
@@ -39,7 +38,6 @@ jobs:
3938
"src/Viserio/Component/Log:[email protected]:viserio/log.git",
4039
"src/Viserio/Component/Mail:[email protected]:viserio/mail.git",
4140
"src/Viserio/Component/Manager:[email protected]:viserio/manager.git",
42-
"src/Viserio/Component/OptionsResolver:[email protected]:viserio/options-resolver.git",
4341
"src/Viserio/Component/Pagination:[email protected]:viserio/pagination.git",
4442
"src/Viserio/Component/Parser:[email protected]:viserio/parser.git",
4543
"src/Viserio/Component/Path:[email protected]:viserio/filesystem-path.git",
@@ -54,6 +52,7 @@ jobs:
5452
"src/Viserio/Component/View:[email protected]:viserio/view.git",
5553
"src/Viserio/Component/WebServer:[email protected]:viserio/web-server.git",
5654
"src/Viserio/Provider/Debug:[email protected]:viserio/debug-provider.git",
55+
"src/Viserio/Provider/Framework:[email protected]:viserio/framework-provider.git",
5756
"src/Viserio/Provider/Twig:[email protected]:viserio/twig-provider.git",
5857
"src/Viserio/Contract:[email protected]:viserio/contract.git",
5958
"src/Viserio/Contract/Bus:[email protected]:viserio/bus-contract.git",
@@ -74,7 +73,6 @@ jobs:
7473
"src/Viserio/Contract/Log:[email protected]:viserio/log-contract.git",
7574
"src/Viserio/Contract/Mail:[email protected]:viserio/mail-contract.git",
7675
"src/Viserio/Contract/Manager:[email protected]:viserio/manager-contract.git",
77-
"src/Viserio/Contract/OptionsResolver:[email protected]:viserio/options-resolver-contract.git",
7876
"src/Viserio/Contract/Pagination:[email protected]:viserio/pagination-contract.git",
7977
"src/Viserio/Contract/Parser:[email protected]:viserio/parser-contract.git",
8078
"src/Viserio/Contract/Pipeline:[email protected]:viserio/pipeline-contract.git",
@@ -91,6 +89,8 @@ jobs:
9189
name: "Split ${{ matrix.dependencies }}"
9290
steps:
9391
- uses: actions/checkout@v2
92+
with:
93+
fetch-depth: 2
9494

9595
- name: "git-bash"
9696
uses: fnkr/[email protected]

0 commit comments

Comments
 (0)