diff --git a/.doctor-rst.yaml b/.doctor-rst.yaml
index bf037f27716..c7a17edd06c 100644
--- a/.doctor-rst.yaml
+++ b/.doctor-rst.yaml
@@ -2,8 +2,8 @@ rules:
american_english: ~
argument_variable_must_match_type:
arguments:
- - { type: 'ContainerBuilder', name: 'containerBuilder' }
- - { type: 'ContainerConfigurator', name: 'containerConfigurator' }
+ - { type: 'ContainerBuilder', name: 'container' }
+ - { type: 'ContainerConfigurator', name: 'container' }
avoid_repetetive_words: ~
blank_line_after_anchor: ~
blank_line_after_directive: ~
@@ -12,10 +12,16 @@ rules:
correct_code_block_directive_based_on_the_content: ~
deprecated_directive_should_have_version: ~
ensure_bash_prompt_before_composer_command: ~
+ ensure_correct_format_for_phpfunction: ~
ensure_exactly_one_space_before_directive_type: ~
ensure_exactly_one_space_between_link_definition_and_link: ~
+ ensure_explicit_nullable_types: ~
+ ensure_github_directive_start_with_prefix:
+ prefix: 'Symfony'
+ ensure_link_bottom: ~
ensure_link_definition_contains_valid_url: ~
ensure_order_of_code_blocks_in_configuration_block: ~
+ ensure_php_reference_syntax: ~
extend_abstract_controller: ~
extension_xlf_instead_of_xliff: ~
forbidden_directives:
@@ -27,23 +33,29 @@ rules:
max: 2
max_colons: ~
no_app_console: ~
+ no_attribute_redundant_parenthesis: ~
no_blank_line_after_filepath_in_php_code_block: ~
no_blank_line_after_filepath_in_twig_code_block: ~
no_blank_line_after_filepath_in_xml_code_block: ~
no_blank_line_after_filepath_in_yaml_code_block: ~
no_brackets_in_method_directive: ~
+ no_broken_ref_directive: ~
no_composer_req: ~
no_directive_after_shorthand: ~
+ no_duplicate_use_statements: ~
no_explicit_use_of_code_block_php: ~
+ no_footnotes: ~
no_inheritdoc: ~
no_merge_conflict: ~
no_namespace_after_use_statements: ~
no_php_open_tag_in_code_block_php_directive: ~
no_space_before_self_xml_closing_tag: ~
+ non_static_phpunit_assertions: ~
only_backslashes_in_namespace_in_php_code_block: ~
only_backslashes_in_use_statements_in_php_code_block: ~
ordered_use_statements: ~
php_prefix_before_bin_console: ~
+ remove_trailing_whitespace: ~
replace_code_block_types: ~
replacement: ~
short_array_syntax: ~
@@ -60,7 +72,6 @@ rules:
valid_use_statements: ~
versionadded_directive_should_have_version: ~
yaml_instead_of_yml_suffix: ~
- yarn_dev_option_at_the_end: ~
# master
versionadded_directive_major_version:
@@ -75,19 +86,21 @@ rules:
deprecated_directive_min_version:
min_version: '5.0'
+exclude_rule_for_file:
+ - path: configuration/multiple_kernels.rst
+ rule_name: replacement
+
# do not report as violation
whitelist:
regex:
- '/FOSUserBundle(.*)\.yml/'
- '/(.*)\.orm\.yml/' # currently DoctrineBundle only supports .yml
- - /docker-compose\.yml/
lines:
- 'in config files, so the old ``app/config/config_dev.yml`` goes to'
- '#. The most important config file is ``app/config/services.yml``, which now is'
- 'The bin/console Command'
- '.. _`LDAP injection`: http://projects.webappsec.org/w/page/13246947/LDAP%20Injection'
- '.. versionadded:: 1.9.0' # Encore
- - '.. versionadded:: 1.11' # Messenger (Middleware / DoctrineBundle)
- '.. versionadded:: 1.18' # Flex in setup/upgrade_minor.rst
- '.. versionadded:: 1.0.0' # Encore
- '.. versionadded:: 5.1' # Private Services
@@ -97,6 +110,7 @@ whitelist:
- '.. versionadded:: 0.2' # MercureBundle
- '.. versionadded:: 3.6' # MonologBundle
- '.. versionadded:: 3.8' # MonologBundle
- - '// bin/console'
+ - '.. versionadded:: 3.5' # Monolog
+ - '.. versionadded:: 3.0' # Doctrine ORM
- '.. _`a feature to test applications using Mercure`: https://github.com/symfony/panther#creating-isolated-browsers-to-test-apps-using-mercure-or-websocket'
- '.. End to End Tests (E2E)'
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 17cec7af7c3..f32043e4523 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -4,6 +4,6 @@ If your pull request fixes a BUG, use the oldest maintained branch that contains
the bug (see https://symfony.com/releases for the list of maintained branches).
If your pull request documents a NEW FEATURE, use the same Symfony branch where
-the feature was introduced (and `6.x` for features of unreleased versions).
+the feature was introduced (and `7.x` for features of unreleased versions).
-->
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 835cf386072..4d67a5c084c 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -21,7 +21,7 @@ jobs:
steps:
- name: "Checkout"
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: "Set-up PHP"
uses: shivammathur/setup-php@v2
@@ -57,7 +57,7 @@ jobs:
steps:
- name: "Checkout"
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: "Create cache dir"
run: mkdir .cache
@@ -73,71 +73,74 @@ jobs:
key: ${{ runner.os }}-doctor-rst-${{ steps.extract_base_branch.outputs.branch }}
- name: "Run DOCtor-RST"
- uses: docker://oskarstark/doctor-rst:1.44.1
+ uses: docker://oskarstark/doctor-rst:1.63.0
with:
args: --short --error-format=github --cache-file=/github/workspace/.cache/doctor-rst.cache
symfony-code-block-checker:
name: Code Blocks
- runs-on: Ubuntu-20.04
+
+ runs-on: ubuntu-latest
+
continue-on-error: true
+
steps:
- - name: Checkout code
- uses: actions/checkout@v3
- with:
- path: 'docs'
-
- - name: Set-up PHP
- uses: shivammathur/setup-php@v2
- with:
- php-version: 8.1
- coverage: none
-
- - name: Fetch branch from where the PR started
- working-directory: docs
- run: git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
-
- - name: Find modified files
- id: find-files
- working-directory: docs
- run: echo "files=$(git diff --name-only origin/${{ github.base_ref }} HEAD | grep ".rst" | tr '\n' ' ')" >> $GITHUB_OUTPUT
-
- - name: Get composer cache directory
- id: composercache
- working-directory: docs/_build
- run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
-
- - name: Cache dependencies
- if: ${{ steps.find-files.outputs.files }}
- uses: actions/cache@v3
- with:
- path: ${{ steps.composercache.outputs.dir }}
- key: ${{ runner.os }}-composer-codeBlocks-${{ hashFiles('_checker/composer.lock', '_sf_app/composer.lock') }}
- restore-keys: ${{ runner.os }}-composer-codeBlocks-
-
- - name: Install dependencies
- if: ${{ steps.find-files.outputs.files }}
- run: composer create-project symfony-tools/code-block-checker:@dev _checker
-
- - name: Install test application
- if: ${{ steps.find-files.outputs.files }}
- run: |
- git clone -b ${{ github.base_ref }} --depth 5 --single-branch https://github.com/symfony-tools/symfony-application.git _sf_app
- cd _sf_app
- composer update
-
- - name: Generate baseline
- if: ${{ steps.find-files.outputs.files }}
- working-directory: docs
- run: |
- CURRENT=$(git rev-parse HEAD)
- git checkout -m ${{ github.base_ref }}
- ../_checker/code-block-checker.php verify:docs `pwd` ${{ steps.find-files.outputs.files }} --generate-baseline=baseline.json --symfony-application=`realpath ../_sf_app`
- git checkout -m $CURRENT
- cat baseline.json
-
- - name: Verify examples
- if: ${{ steps.find-files.outputs.files }}
- working-directory: docs
- run: |
- ../_checker/code-block-checker.php verify:docs `pwd` ${{ steps.find-files.outputs.files }} --baseline=baseline.json --output-format=github --symfony-application=`realpath ../_sf_app`
+ - name: Checkout code
+ uses: actions/checkout@v4
+ with:
+ path: 'docs'
+
+ - name: Set-up PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: 8.1
+ coverage: none
+
+ - name: Fetch branch from where the PR started
+ working-directory: docs
+ run: git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
+
+ - name: Find modified files
+ id: find-files
+ working-directory: docs
+ run: echo "files=$(git diff --name-only origin/${{ github.base_ref }} HEAD | grep ".rst" | tr '\n' ' ')" >> $GITHUB_OUTPUT
+
+ - name: Get composer cache directory
+ id: composercache
+ working-directory: docs/_build
+ run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
+
+ - name: Cache dependencies
+ if: ${{ steps.find-files.outputs.files }}
+ uses: actions/cache@v3
+ with:
+ path: ${{ steps.composercache.outputs.dir }}
+ key: ${{ runner.os }}-composer-codeBlocks-${{ hashFiles('_checker/composer.lock', '_sf_app/composer.lock') }}
+ restore-keys: ${{ runner.os }}-composer-codeBlocks-
+
+ - name: Install dependencies
+ if: ${{ steps.find-files.outputs.files }}
+ run: composer create-project symfony-tools/code-block-checker:@dev _checker
+
+ - name: Install test application
+ if: ${{ steps.find-files.outputs.files }}
+ run: |
+ git clone -b ${{ github.base_ref }} --depth 5 --single-branch https://github.com/symfony-tools/symfony-application.git _sf_app
+ cd _sf_app
+ composer update
+
+ - name: Generate baseline
+ if: ${{ steps.find-files.outputs.files }}
+ working-directory: docs
+ run: |
+ CURRENT=$(git rev-parse HEAD)
+ git checkout -m ${{ github.base_ref }}
+ ../_checker/code-block-checker.php verify:docs `pwd` ${{ steps.find-files.outputs.files }} --generate-baseline=baseline.json --symfony-application=`realpath ../_sf_app`
+ git checkout -m $CURRENT
+ cat baseline.json
+
+ - name: Verify examples
+ if: ${{ steps.find-files.outputs.files }}
+ working-directory: docs
+ run: |
+ ../_checker/code-block-checker.php verify:docs `pwd` ${{ steps.find-files.outputs.files }} --baseline=baseline.json --output-format=github --symfony-application=`realpath ../_sf_app`
diff --git a/README.markdown b/README.md
similarity index 87%
rename from README.markdown
rename to README.md
index 8424f980f7e..ed323a8ee83 100644
--- a/README.markdown
+++ b/README.md
@@ -26,8 +26,9 @@ Contributing
We love contributors! For more information on how you can contribute, please read
the [Symfony Docs Contributing Guide](https://symfony.com/doc/current/contributing/documentation/overview.html).
-**Important**: use `5.4` branch as the base of your pull requests, unless you are
-documenting a feature that was introduced *after* Symfony 5.4 (e.g. in Symfony 6.2).
+> [!IMPORTANT]
+> Use `5.4` branch as the base of your pull requests, unless you are documenting a
+> feature that was introduced *after* Symfony 5.4 (e.g. in Symfony 7.1).
Build Documentation Locally
---------------------------
diff --git a/_build/build.php b/_build/build.php
index 897fd8dac20..be2fb062a77 100755
--- a/_build/build.php
+++ b/_build/build.php
@@ -52,7 +52,14 @@
foreach (new RegexIterator($iterator, '/^.+\.html$/i', RegexIterator::GET_MATCH) as $match) {
$htmlFilePath = array_shift($match);
$htmlContents = file_get_contents($htmlFilePath);
- file_put_contents($htmlFilePath, str_replace('
', '', $htmlContents));
+
+ $htmlRelativeFilePath = str_replace($outputDir.'/', '', $htmlFilePath);
+ $subdirLevel = substr_count($htmlRelativeFilePath, '/');
+ $baseHref = str_repeat('../', $subdirLevel);
+
+ $htmlContents = str_replace('', '', $htmlContents);
+ $htmlContents = str_replace('
=8.1",
"symfony/console": "^6.2",
"symfony/process": "^6.2",
- "symfony-tools/docs-builder": "^0.20"
+ "symfony-tools/docs-builder": "^0.21"
}
}
diff --git a/_build/composer.lock b/_build/composer.lock
index d45dc483946..89a4e7da3c6 100644
--- a/_build/composer.lock
+++ b/_build/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "1c3437f0f5d5b44eb1a339dd720bbc38",
+ "content-hash": "8a771cef10c68c570bff7875e4bdece3",
"packages": [
{
"name": "doctrine/deprecations",
@@ -466,16 +466,16 @@
},
{
"name": "symfony-tools/docs-builder",
- "version": "v0.20.2",
+ "version": "v0.21.0",
"source": {
"type": "git",
"url": "https://github.com/symfony-tools/docs-builder.git",
- "reference": "6486fd734bb151a05f592b06ac1569c62d338a08"
+ "reference": "7ab92db15e9be7d6af51b86db87c7e41a14ba18b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony-tools/docs-builder/zipball/6486fd734bb151a05f592b06ac1569c62d338a08",
- "reference": "6486fd734bb151a05f592b06ac1569c62d338a08",
+ "url": "https://api.github.com/repos/symfony-tools/docs-builder/zipball/7ab92db15e9be7d6af51b86db87c7e41a14ba18b",
+ "reference": "7ab92db15e9be7d6af51b86db87c7e41a14ba18b",
"shasum": ""
},
"require": {
@@ -514,9 +514,9 @@
"description": "The build system for Symfony's documentation",
"support": {
"issues": "https://github.com/symfony-tools/docs-builder/issues",
- "source": "https://github.com/symfony-tools/docs-builder/tree/v0.20.2"
+ "source": "https://github.com/symfony-tools/docs-builder/tree/v0.21.0"
},
- "time": "2023-04-04T06:17:34+00:00"
+ "time": "2023-07-11T15:21:07+00:00"
},
{
"name": "symfony/console",
diff --git a/_images/components/serializer/serializer_workflow.svg b/_images/components/serializer/serializer_workflow.svg
index f3906506878..b6e9c254778 100644
--- a/_images/components/serializer/serializer_workflow.svg
+++ b/_images/components/serializer/serializer_workflow.svg
@@ -1 +1,283 @@
-
+
+
diff --git a/_images/contributing/docs-github-edit-page.png b/_images/contributing/docs-github-edit-page.png
index 9ea6c15421a..b739497f70f 100644
Binary files a/_images/contributing/docs-github-edit-page.png and b/_images/contributing/docs-github-edit-page.png differ
diff --git a/_images/doctrine/mapping_relations.png b/_images/doctrine/mapping_relations.png
deleted file mode 100644
index a679f9cb317..00000000000
Binary files a/_images/doctrine/mapping_relations.png and /dev/null differ
diff --git a/_images/doctrine/mapping_relations.svg b/_images/doctrine/mapping_relations.svg
new file mode 100644
index 00000000000..7dc8979cb1a
--- /dev/null
+++ b/_images/doctrine/mapping_relations.svg
@@ -0,0 +1,602 @@
+
+
diff --git a/_images/doctrine/mapping_relations_proxy.png b/_images/doctrine/mapping_relations_proxy.png
deleted file mode 100644
index 935153291d4..00000000000
Binary files a/_images/doctrine/mapping_relations_proxy.png and /dev/null differ
diff --git a/_images/doctrine/mapping_relations_proxy.svg b/_images/doctrine/mapping_relations_proxy.svg
new file mode 100644
index 00000000000..634d1b0add2
--- /dev/null
+++ b/_images/doctrine/mapping_relations_proxy.svg
@@ -0,0 +1,926 @@
+
+
diff --git a/_images/doctrine/mapping_single_entity.png b/_images/doctrine/mapping_single_entity.png
deleted file mode 100644
index 6f88c6cacfa..00000000000
Binary files a/_images/doctrine/mapping_single_entity.png and /dev/null differ
diff --git a/_images/doctrine/mapping_single_entity.svg b/_images/doctrine/mapping_single_entity.svg
new file mode 100644
index 00000000000..5d517c85fb1
--- /dev/null
+++ b/_images/doctrine/mapping_single_entity.svg
@@ -0,0 +1,469 @@
+
+
diff --git a/_images/form/data-transformer-types.png b/_images/form/data-transformer-types.png
deleted file mode 100644
index 950acd39ea7..00000000000
Binary files a/_images/form/data-transformer-types.png and /dev/null differ
diff --git a/_images/form/data-transformer-types.svg b/_images/form/data-transformer-types.svg
new file mode 100644
index 00000000000..9393b224f89
--- /dev/null
+++ b/_images/form/data-transformer-types.svg
@@ -0,0 +1,178 @@
+
+
diff --git a/_images/form/form_prepopulation_workflow.svg b/_images/form/form_prepopulation_workflow.svg
index 1db13f94c72..c908f5c5a76 100644
--- a/_images/form/form_prepopulation_workflow.svg
+++ b/_images/form/form_prepopulation_workflow.svg
@@ -1,54 +1,253 @@
-