Merge branch 'symfony:main' into patch-1

This commit is contained in:
Tac Tacelosky
2024-11-17 04:58:56 -05:00
committed by GitHub
718 changed files with 11130 additions and 457 deletions
+4
View File
@@ -5,6 +5,10 @@ root = true
[*]
end_of_line = LF
[*.{yml,yaml}]
indent_style = space
indent_size = 4
[*.json]
indent_style = space
indent_size = 4
+1 -1
View File
@@ -1,7 +1,7 @@
| Q | A
| ------------- | ---
| License | MIT
| Doc issue/PR | symfony/symfony-docs#...
| Doc issue/PR | symfony/symfony-docs#...
<!--
Please, carefully read the README before submitting a pull request.
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,19 @@
name: Cleanup Flex testing endpoint
on:
workflow_call:
jobs:
flex-cleanup:
name: Cleanup Flex testing endpoint
runs-on: Ubuntu-20.04
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Cleanup Flex testing endpoint
run: |
git push origin :flex/pull-${{ github.event.number }} || true
@@ -0,0 +1,46 @@
name: Update Flex Archives
on:
workflow_call:
inputs:
branch:
default: main
required: false
type: string
jobs:
flex-update-archived:
name: Update Flex Archives
runs-on: Ubuntu-20.04
steps:
-
name: Checkout
uses: actions/checkout@v3
id: checkout
with:
fetch-depth: 0
-
name: Install tools
run: |
git config --global user.email ""
git config --global user.name "github-action[bot]"
cd .github
wget -q -O recipes-checker.zip https://codeload.github.com/symfony-tools/recipes-checker/zip/refs/heads/main
unzip recipes-checker.zip
cd recipes-checker-main
composer install --ansi --no-dev
-
name: Update Flex Archives
run: |
git switch ${{ inputs.branch }}
mkdir .github/archived
php .github/recipes-checker-main/run generate:archived-recipes . ${{ inputs.branch }} .github/archived
git switch flex/main
cp -a .github/archived .
git add archived/
git commit -m 'Update Flex archives' || true
git push origin -f flex/main
@@ -0,0 +1,55 @@
name: Update Flex endpoint
on:
workflow_call:
inputs:
branch:
default: main
required: false
type: string
contrib:
required: false
type: boolean
versions_json:
required: false
type: string
jobs:
flex-update:
name: Update Flex endpoint
runs-on: Ubuntu-20.04
steps:
-
name: Checkout
uses: actions/checkout@v3
id: checkout
with:
fetch-depth: 0
-
name: Install tools
run: |
git config --global user.email ""
git config --global user.name "github-action[bot]"
cd .github
wget -q -O recipes-checker.zip https://codeload.github.com/symfony-tools/recipes-checker/zip/refs/heads/main
unzip recipes-checker.zip
cd recipes-checker-main
composer install --ansi --no-dev
-
name: Update Flex endpoint
run: |
mkdir .github/flex-endpoint
git ls-tree HEAD */*/* | php .github/recipes-checker-main/run generate:flex-endpoint ${{ github.repository }} ${{ inputs.branch }} flex/main .github/flex-endpoint ${{ inputs.versions_json }} ${{ inputs.contrib && '--contrib' || '' }}
git switch flex/main
git rm -q *.json
mv .github/flex-endpoint/*.json .
git add *.json
cp -a .github/flex-endpoint/archived .
git add archived/
php .github/recipes-checker-main/run generate:recipes-readme index.json ${{ inputs.contrib && '--contrib' || '' }} > RECIPES.md
git add RECIPES.md
git commit -m 'Update Flex endpoint' || true
git push origin -f flex/main
+290
View File
@@ -0,0 +1,290 @@
name: Q&A
on:
workflow_call:
inputs:
branch:
default: main
required: false
type: string
contrib:
required: false
type: boolean
find_yaml:
required: false
type: string
secrets:
token:
required: true
jobs:
run-checks:
name: Run checks
runs-on: Ubuntu-20.04
steps:
-
name: Checkout
uses: actions/checkout@v3
id: checkout
with:
fetch-depth: 0
ref: 'refs/pull/${{ github.event.number }}/merge'
-
name: Install tools
run: |
git config --global user.email ""
git config --global user.name "github-action[bot]"
cd .github
wget -q -O recipes-checker.zip https://codeload.github.com/symfony-tools/recipes-checker/zip/refs/heads/main
unzip recipes-checker.zip
cd recipes-checker-main
composer install --ansi --no-dev
-
name: Check manifest.json files
if: "always() && steps.checkout.outcome == 'success'"
run: |
.github/recipes-checker-main/run lint:manifests ${{ inputs.contrib && '--contrib' || '' }}
-
name: Remove non-patched packages
if: "always() && steps.checkout.outcome == 'success'"
run: |
.github/recipes-checker-main/run list-unpatched-packages $GITHUB_EVENT_PATH ${{ secrets.token }} | xargs -r -n10 rm -rf
-
name: Generate Flex testing endpoint
if: "always() && steps.checkout.outcome == 'success' && github.base_ref == inputs.branch"
run: |
mkdir .github/flex-endpoint
git ls-tree HEAD */*/* | php .github/recipes-checker-main/run generate:flex-endpoint ${{ github.repository }} ${{ inputs.branch }} flex/pull-${{ github.event.number }} .github/flex-endpoint ${{ inputs.contrib && '--contrib' || '' }}
git stash
git switch -c pr
git switch --orphan flex/pull-${{ github.event.number }}
git reset --hard -q
mv .github/flex-endpoint/*.json .
git add *.json
git commit -m 'Create Flex endpoint' || true
git push origin -f flex/pull-${{ github.event.number }}
git switch pr
git stash pop -q
-
name: Enable Automerge
if: "always() && steps.checkout.outcome == 'success'"
run: gh pr merge --auto --squash ${{ github.event.number }}
env:
GITHUB_TOKEN: ${{ secrets.token }}
-
name: Compute diff between recipe versions
if: "always() && steps.checkout.outcome == 'success'"
run: |
find * -mindepth 1 -maxdepth 1 -type d | sort \
| .github/recipes-checker-main/run diff-recipe-versions 'https://raw.githubusercontent.com/${{ github.repository }}/flex/pull-${{ github.event.number }}/index.json' \
> .github/diff-recipe-versions.md
-
name: Post diff between recipe versions
if: "always() && steps.checkout.outcome == 'success'"
uses: marocchino/sticky-pull-request-comment@v2
with:
path: .github/diff-recipe-versions.md
-
name: No symlinks
if: "always() && steps.checkout.outcome == 'success'"
run: |
SYMLINKS=$(find * -type l)
if [[ "" != "$SYMLINKS" ]]; then echo -e "::error::Symlinks are not allowed\nFound $SYMLINKS\n"; exit 1; fi
-
name: No .yml, use .yaml
if: "always() && steps.checkout.outcome == 'success'"
run: |
YMLS=$(find * -name '*.yml' ${{ inputs.find_yaml }})
if [[ "" != "$YMLS" ]]; then echo -e "::error::*.yml files should renamed to *.yaml\nFound $YMLS\n"; exit 1; fi
-
name: No .gitkeep, use .gitignore
if: "always() && steps.checkout.outcome == 'success'"
run: |
GITKEEPS=$(find * -name .gitkeep)
if [[ "" != "$GITKEEPS" ]]; then echo -e "::error::.gitkeep files should be renamed to .gitignore\nFound $GITKEEPS\n"; exit 1; fi
-
name: 4 spaces indentation
if: "always() && steps.checkout.outcome == 'success'"
run: |
ERRORS=$(find * -name '*.yaml' -or -name '*.json' \
| xargs -n1 grep -P -H -n -v '^(( )*[^ \t]|$)' \
| cut -d: -f1-2 \
| sed 's/\(.*\):\([0-9]*\)$/\\n::error file=\1,line=\2::Indendation must be a multiple of 4 spaces/' || true)
if [[ "" != "$ERRORS" ]]; then echo -e "$ERRORS\n"; exit 1; fi
-
name: Text files end with a newline
if: "always() && steps.checkout.outcome == 'success'"
run: |
ERRORS=$(find * -name '*.yaml' -or -name '*.yml' -or -name '*.txt' -or -name '*.md' -or -name '*.markdown' \
-or -name '*.json' -or -name '*.rst' -or -name '*.php' -or -name '*.js' -or -name '*.css' -or -name '*.twig' \
| xargs -n1 -P0 bash -c '[ -n "$(tail -c1 "$0")" ] && echo ::error file="$0",line=$((1 + `wc -l "$0" | cut -d" " -f1`))::Should end with a newline' || true)
if [[ "" != "$ERRORS" ]]; then echo -e "$ERRORS\n"; exit 1; fi
-
name: Use https when referencing symfony.com
if: "always() && steps.checkout.outcome == 'success'"
run: |
ERRORS=$(grep -H -n 'http://.*symfony\.com' * -r \
| cut -d: -f1-2 \
| sed 's/\(.*\):\([0-9]*\)$/\\n::error file=\1,line=\2::Use https when referencing symfony.com/' || true)
if [[ "" != "$ERRORS" ]]; then echo -e "$ERRORS\n"; exit 1; fi
-
name: manifest.json is found
if: "always() && steps.checkout.outcome == 'success'"
run: |
MISSING=$(find * -mindepth 2 -maxdepth 2 -type d '!' -exec test -f '{}/manifest.json' ';' -print)
if [[ "" != "$MISSING" ]]; then echo -e "::error::Recipes must define a \"manifest.json\" file\nFile not found in $MISSING\n"; exit 1; fi
-
name: JSON files are valid
if: "always() && steps.checkout.outcome == 'success'"
run: |
ERRORS=$(find * -name '*.json' | xargs -n1 -P0 bash -c 'ERR=$(cd / && python -mjson.tool '$(pwd)'/"$0" 2>&1 1> /dev/null) || echo \\n::error file="$0",line=`echo "${ERR#*: line }" | cut -d" " -f 1`::${ERR%%: line *}')
if [[ "" != "$ERRORS" ]]; then echo -e "$ERRORS\n"; exit 1; fi
-
name: YAML files are valid
if: "always() && steps.checkout.outcome == 'success'"
run: |
find * -name '*.yaml' -or -name '*.yml' | .github/recipes-checker-main/run lint:yaml
-
name: Packages exist on packagist.org
if: "always() && steps.checkout.outcome == 'success'"
run: |
.github/recipes-checker-main/run lint:packages
-
name: Contribution is under MIT and has no merge commits
if: "always() && steps.checkout.outcome == 'success'"
run: |
.github/recipes-checker-main/run lint:pull-request --license=MIT $GITHUB_EVENT_PATH ${{ secrets.token }}
-
name: Parameters should be defined via the "container" configurator
if: "always() && steps.checkout.outcome == 'success'"
run: |
ERRORS=$(find */*/*/config/packages/ -name '*.yaml' -or -name '*.yml' \
| xargs -n1 grep -P -H -n '^parameters:' \
| cut -d: -f1-2 \
| sed 's/\(.*\):\([0-9]*\)$/\\n::error file=\1,line=\2::"parameters" should be defined via the "container" configurator instead/' || true)
if [[ "" != "$ERRORS" ]]; then echo -e "$ERRORS\n"; exit 1; fi
-
name: Underscore notation under config/
if: "always() && steps.checkout.outcome == 'success'"
run: |
ERRORS=$(find */*/*/config -type f \
| grep -v -P '[^/]+/[^/]+/[^/]+/config/[0-9a-z_./]+$' \
| xargs -n1 -I{} echo "::error file={}::Underscore notation is required for file and directory names under config/" || true)
if [[ "" != "$ERRORS" ]]; then echo -e "$ERRORS\n"; exit 1; fi
-
name: Yaml nulls should not be "~"
if: "always() && steps.checkout.outcome == 'success'"
run: |
ERRORS=$(find * -name '*.yaml' -or -name '*.yml' \
| xargs -n1 grep -F -H -n ': ~'\
| cut -d: -f1-2 \
| sed 's/\(.*\):\([0-9]*\)$/\\n::error file=\1,line=\2::"~" should be replaced with "null"/' || true)
if [[ "" != "$ERRORS" ]]; then echo -e "$ERRORS\n"; exit 1; fi
-
name: Symfony commands should not be wrapped in a Makefile
if: "always() && steps.checkout.outcome == 'success'"
run: |
ERRORS=$(find * -name Makefile \
| xargs -n1 grep -P -H -n 'bin/console|\$\(CONSOLE\)' \
| cut -d: -f1-2 \
| sed 's/\(.*\):\([0-9]*\)$/\\n::error file=\1,line=\2::Symfony commands should not be wrapped in a Makefile/' || true)
if [[ "" != "$ERRORS" ]]; then echo -e "$ERRORS\n"; exit 1; fi
create-project:
needs: run-checks
name: Run updated recipes
runs-on: Ubuntu-20.04
steps:
-
name: Export configuration
continue-on-error: true
id: config
run: |
PACKAGES=$(curl -s https://raw.githubusercontent.com/${{ github.repository }}/flex/pull-${{ github.event.number }}/index.json | jq -r '.recipes | to_entries | map(.key+":^"+.value[-1]) | join(" ")')
echo PACKAGES=$PACKAGES >> $GITHUB_ENV
[[ "" != "$PACKAGES" ]]
-
name: Setup PHP 7.4
if: "always() && steps.config.outcome == 'success'"
uses: shivammathur/setup-php@v2
with:
coverage: "none"
php-version: "7.4"
-
name: Create-project with skeleton ^5
if: "always() && steps.config.outcome == 'success'"
run: |
set -x
php -v
composer create-project --ansi "symfony/skeleton:^5" v5
cd v5
composer config extra.symfony.allow-contrib ${{ inputs.contrib && 'true' || 'false' }}
composer config minimum-stability dev
export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/${{ github.repository }}/flex/pull-${{ github.event.number }}/index.json
composer require -W --ansi $PACKAGES
EXIT_CODE=$?
if [[ EXIT_CODE -eq 2 ]]; then
echo -e "\n#\n#\n# You can ignore this error if your package does not support Symfony 5\n#\n#\n#\n"
fi
exit $EXIT_CODE
-
name: Setup PHP 8.1
if: "always() && steps.config.outcome == 'success'"
uses: shivammathur/setup-php@v2
with:
coverage: "none"
php-version: "8.1"
-
name: Create-project with skeleton ^6
if: "always() && steps.config.outcome == 'success'"
run: |
set -x
php -v
composer create-project --ansi "symfony/skeleton:^6" v6
cd v6
composer config extra.symfony.allow-contrib ${{ inputs.contrib && 'true' || 'false' }}
composer config minimum-stability dev
export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/${{ github.repository }}/flex/pull-${{ github.event.number }}/index.json
composer require -W --ansi $PACKAGES
+13
View File
@@ -0,0 +1,13 @@
name: Cleanup Flex testing endpoint
on:
pull_request_target:
types: [ closed ]
defaults:
run:
shell: bash
jobs:
call-flex-cleanup:
uses: symfony/recipes/.github/workflows/callable-flex-cleanup.yml@main
@@ -0,0 +1,7 @@
name: Update Flex Archives
on: [workflow_dispatch]
jobs:
call-flex-update:
uses: symfony/recipes/.github/workflows/callable-flex-update-archived.yml@main
+16
View File
@@ -0,0 +1,16 @@
name: Update Flex endpoint
on:
push:
branches:
- main
defaults:
run:
shell: bash
jobs:
call-flex-update:
uses: symfony/recipes/.github/workflows/callable-flex-update.yml@main
with:
versions_json: .github/versions.json
+14
View File
@@ -0,0 +1,14 @@
name: Q&A
on:
pull_request_target:
defaults:
run:
shell: bash
jobs:
call-qa:
uses: symfony/recipes/.github/workflows/callable-qa.yml@main
secrets:
token: ${{ secrets.BOT_TOKEN }}
-28
View File
@@ -1,28 +0,0 @@
language: php
sudo: false
cache:
directories:
- $HOME/.composer/cache/files
matrix:
fast_finish: true
include:
- php: 7.4snapshot
env: SKELETON_VERSION="^3.4"
- php: 7.4snapshot
env: SKELETON_VERSION="^4.4"
- php: 7.4snapshot
env: SKELETON_VERSION="^5.0"
before_install:
- phpenv config-rm xdebug.ini || true
- export SYMFONY_ENDPOINT=https://symfony.sh/r/github.com/symfony/recipes/${TRAVIS_PULL_REQUEST}
- export PACKAGES=$(curl -s $SYMFONY_ENDPOINT | sed -En 's/.*composer req "([^"]+)".*/\1/p')
install:
- composer create-project "symfony/skeleton:${SKELETON_VERSION}" flex
- cd flex
script:
- composer req $(echo $PACKAGES)
+1 -1
View File
@@ -1,4 +1,4 @@
Copyright (c) 2017 Fabien Potencier
Copyright (c) 2017-present Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+70 -3
View File
@@ -7,6 +7,8 @@ Symfony recipes allow the automation of Composer packages configuration via the
This repository contains "official" recipes for Composer packages endorsed by
the Symfony Core Team. For contributed recipes, see the `contrib repository`_.
See `RECIPES.md`_ for a full list of recipes that live in this repository.
Creating Recipes
----------------
@@ -47,6 +49,22 @@ options and configurators.
When creating a recipe, don't create bundle config files under
``config/packages/`` when no options are set.
Updating Recipes
----------------
When a recipe needs to be updated, we try to minimize the impact for the
current versions. Creating a new project with a set of dependencies should
always use the same recipes to avoid differences between the generated code and
the existing documentation, blog posts, videos for these versions.
As a rule of thumb, consider the same principles as semantic versioning:
* Only change an existing recipe for a version in case of a bug (typos,
mis-configuration, ...);
* If the change is about a new best practice or a different way of doing
something, do it for the next version of the dependency.
Options
-------
@@ -77,7 +95,7 @@ Symfony is smart enough to reverse those tasks when uninstalling and
unconfiguring the dependencies.
There are several types of tasks, which are called **configurators**:
``copy-from-recipe``, ``copy-from-package``, ``bundles``, ``env``,
``copy-from-recipe``, ``copy-from-package``, ``bundles``, ``env``, ``container``
``composer-scripts``, ``gitignore``, and ``post-install-output``.
``bundles`` Configurator
@@ -132,6 +150,13 @@ Copies files or directories from the Composer package contents to the Symfony
application. It's defined as an associative array where the key is the original
file/directory and the value is the target file/directory.
.. caution::
Copying files from the package should be avoided, except for some very
specific use cases. Copying PHP files under the project's ``src/``
directory is almost always a bad idea; consider adding a command in your
bundle that is able to generate such PHP files instead.
This example copies the ``bin/check.php`` script of the package into the binary
directory of the application:
@@ -152,7 +177,7 @@ Recipes must use these placeholders instead of hardcoding the paths to be truly
reusable. The placeholder values can be overridden in the ``extra`` section of
your ``composer.json`` file (where you can define your own placeholders too):
.. code-block:: json
.. code-block:: jsonc
// composer.json
{
@@ -184,9 +209,12 @@ files and directories:
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/",
"src/": "%SRC_DIR%/"
}
Avoid storing PHP files that should land under the ``src/`` directory; consider
adding a command in your bundle that is able to generate such PHP files
instead.
``env`` Configurator
~~~~~~~~~~~~~~~~~~~~
@@ -284,6 +312,44 @@ colors`_ are supported too:
* <fg=blue>Read</> the documentation at <comment>https://symfony.com/doc</>
``add-lines`` Configurator
~~~~~~~~~~~~~~~~~~~~~~~~~~
If no other configurators can meet your needs, the ``add-lines`` configurator
can add entire lines to files, either at the top, bottom or after a target:
.. code-block:: json
"add-lines": [
{
"file": "webpack.config.js",
"content": "\nenables the Symfony UX Stimulus bridge (used in assets/bootstrap.js)\n .enableStimulusBridge('./assets/controllers.json')",
"position": "after_target",
"target": ".splitEntryChunks()"
},
{
"file": "assets/app.js",
"content": "import './bootstrap.js';",
"position": "top",
"warn_if_missing": true
},
{
"file": "assets/translator.js",
"content": "export * from '../var/translations';",
"position": "bottom",
"requires": "symfony/webpack-encore-bundle"
}
]
Each item needs ``file``, ``content`` and ``position``, which can be
``top``, ``bottom`` or ``after_target``. If ``after_target`` is used, a
``target`` must also be specified, which is a string that will be searched for
in the file.
If ``warn_if_missing`` is set to ``true``, a warning will be shown to the
user if the ``file`` or ``target`` isn't found. If ``requires`` is set, the
rule will only be applied if the given package is installed.
Validation
----------
@@ -351,3 +417,4 @@ one used by ``symfony/framework-bundle``:
.. _`Symfony Flex`: https://github.com/symfony/flex
.. _`contrib repository`: https://github.com/symfony/recipes-contrib
.. _`Symfony Console styles and colors`: https://symfony.com/doc/current/console/coloring.html
.. _`RECIPES.md`: https://github.com/symfony/recipes/blob/flex/main/RECIPES.md
+2 -2
View File
@@ -1,8 +1,8 @@
{
"aliases": ["api-admin", "api-platform-admin", "react-admin"],
"copy-from-recipe": {
"assets/": "assets/",
"config/": "%CONFIG_DIR%/",
"templates/": "templates/"
},
"aliases": ["api-admin", "api-platform-admin", "react-admin"]
}
}
+1 -5
View File
@@ -1,9 +1,5 @@
<bg=blue;fg=white> </>
<bg=blue;fg=white> To finish the install </>
<bg=blue;fg=white> </>
* Your admin is almost ready:
1. Install the JavaScript dependencies by running <comment>yarn add @api-platform/admin @babel/preset-react</comment>
1. Install the JavaScript dependencies by running <comment>npm add @api-platform/admin @babel/preset-react</comment>
2. Edit <comment>webpack.config.js</comment> and <info>uncomment</info> the following lines:
Encore
+4 -6
View File
@@ -1,12 +1,10 @@
<bg=blue;fg=white> </>
<bg=blue;fg=white> What's next? </>
<bg=blue;fg=white> </>
* Your API is almost ready:
1. Create your first API resource in <info>src/Entity</info>;
1. Create your first API resource in <info>src/ApiResource</info>;
2. Go to <info>/api</info> to browse your API
* Using MakerBundle? Try <info>php bin/console make:entity --api-resource</info>
* To enable the GraphQL support, run <comment>composer require webonyx/graphql-php</>,
then browse <info>/api/graphql</info>.
* <fg=blue>Read</> the documentation at <comment>https://api-platform.com/docs</>
* <fg=blue>Read</> the documentation at <comment>https://api-platform.com/docs/</>
-1
View File
@@ -1 +0,0 @@
../../2.1/config/routes
@@ -0,0 +1,4 @@
api_platform:
resource: .
type: api_platform
prefix: /api
-1
View File
@@ -1 +0,0 @@
../2.1/manifest.json
+9
View File
@@ -0,0 +1,9 @@
{
"bundles": {
"ApiPlatform\\Core\\Bridge\\Symfony\\Bundle\\ApiPlatformBundle": ["all"]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/",
"src/": "%SRC_DIR%/"
}
}
-1
View File
@@ -1 +0,0 @@
../2.1/post-install.txt
+10
View File
@@ -0,0 +1,10 @@
* Your API is almost ready:
1. Create your first API resource in <info>src/ApiResource</info>;
2. Go to <info>/api</info> to browse your API
* Using MakerBundle? Try <info>php bin/console make:entity --api-resource</info>
* To enable the GraphQL support, run <comment>composer require webonyx/graphql-php</>,
then browse <info>/api/graphql</info>.
* <fg=blue>Read</> the documentation at <comment>https://api-platform.com/docs/</>
-1
View File
@@ -1 +0,0 @@
../2.1/src
@@ -0,0 +1,4 @@
api_platform:
resource: .
type: api_platform
prefix: /api
+9
View File
@@ -0,0 +1,9 @@
{
"bundles": {
"ApiPlatform\\Symfony\\Bundle\\ApiPlatformBundle": ["all"]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/",
"src/": "%SRC_DIR%/"
}
}
+10
View File
@@ -0,0 +1,10 @@
* Your API is almost ready:
1. Create your first API resource in <info>src/ApiResource</info>;
2. Go to <info>/api</info> to browse your API
* Using MakerBundle? Try <info>php bin/console make:entity --api-resource</info>
* To enable the GraphQL support, run <comment>composer require webonyx/graphql-php</>,
then browse <info>/api/graphql</info>.
* <fg=blue>Read</> the documentation at <comment>https://api-platform.com/docs/</>
@@ -0,0 +1,10 @@
api_platform:
title: Hello API Platform
version: 1.0.0
# Good defaults for REST APIs
defaults:
stateless: true
cache_headers:
vary: ['Content-Type', 'Authorization', 'Origin']
extra_properties:
standard_put: true
@@ -0,0 +1,4 @@
api_platform:
resource: .
type: api_platform
prefix: /api
+9
View File
@@ -0,0 +1,9 @@
{
"bundles": {
"ApiPlatform\\Symfony\\Bundle\\ApiPlatformBundle": ["all"]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/",
"src/": "%SRC_DIR%/"
}
}
+10
View File
@@ -0,0 +1,10 @@
* Your API is almost ready:
1. Create your first API resource in <info>src/ApiResource</info>;
2. Go to <info>/api</info> to browse your API
* Using MakerBundle? Try <info>php bin/console make:entity --api-resource</info>
* To enable the GraphQL support, run <comment>composer require webonyx/graphql-php</>,
then browse <info>/api/graphql</info>.
* <fg=blue>Read</> the documentation at <comment>https://api-platform.com/docs/</>
@@ -0,0 +1,18 @@
api_platform:
title: Hello API Platform
version: 1.0.0
formats:
jsonld: ['application/ld+json']
docs_formats:
jsonld: ['application/ld+json']
jsonopenapi: ['application/vnd.openapi+json']
html: ['text/html']
defaults:
stateless: true
cache_headers:
vary: ['Content-Type', 'Authorization', 'Origin']
extra_properties:
standard_put: true
rfc_7807_compliant_errors: true
event_listeners_backward_compatibility_layer: false
keep_legacy_inflector: false
@@ -0,0 +1,4 @@
api_platform:
resource: .
type: api_platform
prefix: /api
+9
View File
@@ -0,0 +1,9 @@
{
"bundles": {
"ApiPlatform\\Symfony\\Bundle\\ApiPlatformBundle": ["all"]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/",
"src/": "%SRC_DIR%/"
}
}
+10
View File
@@ -0,0 +1,10 @@
* Your API is almost ready:
1. Create your first API resource in <info>src/ApiResource</info>;
2. Go to <info>/api</info> to browse your API
* Using MakerBundle? Try <info>php bin/console make:entity --api-resource</info>
* To enable the GraphQL support, run <comment>composer require webonyx/graphql-php</>,
then browse <info>/api/graphql</info>.
* <fg=blue>Read</> the documentation at <comment>https://api-platform.com/docs/</>
@@ -0,0 +1,18 @@
api_platform:
title: Hello API Platform
version: 1.0.0
formats:
jsonld: ['application/ld+json']
docs_formats:
jsonld: ['application/ld+json']
jsonopenapi: ['application/vnd.openapi+json']
html: ['text/html']
defaults:
stateless: true
cache_headers:
vary: ['Content-Type', 'Authorization', 'Origin']
extra_properties:
standard_put: true
rfc_7807_compliant_errors: true
keep_legacy_inflector: false
use_symfony_listeners: true
@@ -0,0 +1,4 @@
api_platform:
resource: .
type: api_platform
prefix: /api
+9
View File
@@ -0,0 +1,9 @@
{
"bundles": {
"ApiPlatform\\Symfony\\Bundle\\ApiPlatformBundle": ["all"]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/",
"src/": "%SRC_DIR%/"
}
}
+10
View File
@@ -0,0 +1,10 @@
* Your API is almost ready:
1. Create your first API resource in <info>src/ApiResource</info>;
2. Go to <info>/api</info> to browse your API
* Using MakerBundle? Try <info>php bin/console make:entity --api-resource</info>
* To enable the GraphQL support, run <comment>composer require webonyx/graphql-php</>,
then browse <info>/api/graphql</info>.
* <fg=blue>Read</> the documentation at <comment>https://api-platform.com/docs/</>
@@ -0,0 +1,7 @@
api_platform:
title: Hello API Platform
version: 1.0.0
defaults:
stateless: true
cache_headers:
vary: ['Content-Type', 'Authorization', 'Origin']
@@ -0,0 +1,4 @@
api_platform:
resource: .
type: api_platform
prefix: /api
+9
View File
@@ -0,0 +1,9 @@
{
"bundles": {
"ApiPlatform\\Symfony\\Bundle\\ApiPlatformBundle": ["all"]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/",
"src/": "%SRC_DIR%/"
}
}
+10
View File
@@ -0,0 +1,10 @@
* Your API is almost ready:
1. Create your first API resource in <info>src/ApiResource</info>;
2. Go to <info>/api</info> to browse your API
* Using MakerBundle? Try <info>php bin/console make:entity --api-resource</info>
* To enable the GraphQL support, run <comment>composer require webonyx/graphql-php</>,
then browse <info>/api/graphql</info>.
* <fg=blue>Read</> the documentation at <comment>https://api-platform.com/docs/</>
@@ -0,0 +1,18 @@
api_platform:
title: Hello API Platform
version: 1.0.0
formats:
jsonld: ['application/ld+json']
docs_formats:
jsonld: ['application/ld+json']
jsonopenapi: ['application/vnd.openapi+json']
html: ['text/html']
defaults:
stateless: true
cache_headers:
vary: ['Content-Type', 'Authorization', 'Origin']
extra_properties:
standard_put: true
rfc_7807_compliant_errors: true
keep_legacy_inflector: false
use_symfony_listeners: true
@@ -0,0 +1,4 @@
api_platform:
resource: .
type: api_platform
prefix: /api
+9
View File
@@ -0,0 +1,9 @@
{
"bundles": {
"ApiPlatform\\Symfony\\Bundle\\ApiPlatformBundle": ["all"]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/",
"src/": "%SRC_DIR%/"
}
}
+10
View File
@@ -0,0 +1,10 @@
* Your API is almost ready:
1. Create your first API resource in <info>src/ApiResource</info>;
2. Go to <info>/api</info> to browse your API
* Using MakerBundle? Try <info>php bin/console make:entity --api-resource</info>
* To enable the GraphQL support, run <comment>composer require webonyx/graphql-php</>,
then browse <info>/api/graphql</info>.
* <fg=blue>Read</> the documentation at <comment>https://api-platform.com/docs/</>
@@ -0,0 +1,7 @@
api_platform:
title: Hello API Platform
version: 1.0.0
defaults:
stateless: true
cache_headers:
vary: ['Content-Type', 'Authorization', 'Origin']
@@ -0,0 +1,4 @@
api_platform:
resource: .
type: api_platform
prefix: /api
+9
View File
@@ -0,0 +1,9 @@
{
"bundles": {
"ApiPlatform\\Symfony\\Bundle\\ApiPlatformBundle": ["all"]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/",
"src/": "%SRC_DIR%/"
}
}
+10
View File
@@ -0,0 +1,10 @@
* Your API is almost ready:
1. Create your first API resource in <info>src/ApiResource</info>;
2. Go to <info>/api</info> to browse your API
* Using MakerBundle? Try <info>php bin/console make:entity --api-resource</info>
* To enable the GraphQL support, run <comment>composer require api-platform/graphql</>,
then browse <info>/api/graphql</info>.
* <fg=blue>Read</> the documentation at <comment>https://api-platform.com/docs/</>
@@ -1,12 +0,0 @@
default:
suites:
default:
contexts:
- FeatureContext:
kernel: '@kernel'
extensions:
Behat\Symfony2Extension:
kernel:
bootstrap: features/bootstrap/bootstrap.php
class: App\Kernel
@@ -1 +0,0 @@
../../../../symfony/framework-bundle/3.3/config/bootstrap.php
@@ -1,48 +0,0 @@
<?php
use Behat\Behat\Context\Context;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelInterface;
/**
* This context class contains the definitions of the steps used by the demo
* feature file. Learn how to get started with Behat and BDD on Behat's website.
*
* @see http://behat.org/en/latest/quick_start.html
*/
class FeatureContext implements Context
{
/**
* @var KernelInterface
*/
private $kernel;
/**
* @var Response|null
*/
private $response;
public function __construct(KernelInterface $kernel)
{
$this->kernel = $kernel;
}
/**
* @When a demo scenario sends a request to :path
*/
public function aDemoScenarioSendsARequestTo(string $path)
{
$this->response = $this->kernel->handle(Request::create($path, 'GET'));
}
/**
* @Then the response should be received
*/
public function theResponseShouldBeReceived()
{
if ($this->response === null) {
throw new \RuntimeException('No response received');
}
}
}
@@ -1,4 +0,0 @@
<?php
putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = 'test');
require dirname(__DIR__, 2).'/config/bootstrap.php';
@@ -1,12 +0,0 @@
# This file contains a user story for demonstration only.
# Learn how to get started with Behat and BDD on Behat's website:
# http://behat.org/en/latest/quick_start.html
Feature:
In order to prove that the Behat Symfony extension is correctly installed
As a user
I want to have a demo scenario
Scenario: It receives a response from Symfony's kernel
When a demo scenario sends a request to "/"
Then the response should be received
@@ -1,9 +0,0 @@
{
"copy-from-recipe": {
"behat.yml.dist": "behat.yml.dist",
"config/": "%CONFIG_DIR%/",
"features/": "features/"
},
"aliases": ["behat"],
"gitignore": ["behat.yml"]
}
@@ -1,2 +0,0 @@
<bg=blue;fg=white> Next for Behat/SymfonyExtension </>
Run <comment>vendor/bin/behat</> to run the demo tests.
@@ -0,0 +1,7 @@
scenarios: |
#!blackfire-player
scenario
name "Test homepage"
visit url('/')
expect status_code() == 200
@@ -0,0 +1,24 @@
{
"copy-from-recipe": {
".blackfire.yaml": ".blackfire.yaml"
},
"env": {
"#1": "Get your SERVER credentials at https://blackfire.io/my/settings/credentials",
"#2": "BLACKFIRE_SERVER_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"#3": "BLACKFIRE_SERVER_TOKEN=yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"
},
"docker-compose": {
"docker-compose.override.yml": {
"services": [
"blackfire:",
" image: blackfire/blackfire:2",
" # uncomment to store Blackfire credentials in a local .env.local file",
" #env_file: .env.local",
" environment:",
" BLACKFIRE_LOG_LEVEL: 4",
" ports: [\"8307\"]"
]
}
},
"aliases": ["blackfire"]
}
@@ -0,0 +1,7 @@
* Blackfire Agent has been configured in your <comment>docker-compose.override.yaml</> file
* Configure your Blackfire <comment>SERVER</> credentials in <info>.env.local</> (get them at https://blackfire.io/my/settings/credentials)
* Install the <comment>PHP probe</>: https://blackfire.io/docs/up-and-running/installation
* <fg=blue>Read</> the documentation at <comment>https://blackfire.io/docs</>
@@ -1,3 +1,7 @@
controllers:
resource: ../../src/Controller/
type: annotation
kernel:
resource: ../../src/Kernel.php
type: annotation
+5
View File
@@ -0,0 +1,5 @@
{
"conflict": {
"symfony/routing": "<6.0"
}
}
@@ -4,12 +4,15 @@ doctrine:
# IMPORTANT: You MUST configure your server version,
# either here or in the DATABASE_URL env var (see .env file)
#server_version: '5.7'
#server_version: '16'
# only needed for MySQL
charset: utf8mb4
default_table_options:
collate: utf8mb4_unicode_ci
# backtrace queries in profiler (increases memory usage per request)
#profiling_collect_backtrace: '%kernel.debug%'
orm:
auto_generate_proxy_classes: true
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
@@ -1 +0,0 @@
../1.6/manifest.json
@@ -0,0 +1,45 @@
{
"bundles": {
"Doctrine\\Bundle\\DoctrineBundle\\DoctrineBundle": ["all"]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/",
"src/": "%SRC_DIR%/"
},
"env": {
"#1": "Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url",
"#2": "IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml",
"#3": "",
"#4": "DATABASE_URL=\"sqlite:///%kernel.project_dir%/var/data.db\"",
"#5": "DATABASE_URL=\"mysql://app:!ChangeMe!@127.0.0.1:3306/db_name?serverVersion=8\"",
"DATABASE_URL": "postgresql://app:!ChangeMe!@127.0.0.1:5432/db_name?serverVersion=16&charset=utf8"
},
"dockerfile": [
"RUN install-php-extensions pdo_pgsql"
],
"docker-compose": {
"docker-compose.yml": {
"services": [
"database:",
" image: postgres:${POSTGRES_VERSION:-16}-alpine",
" environment:",
" POSTGRES_DB: ${POSTGRES_DB:-app}",
" # You should definitely change the password in production",
" POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-!ChangeMe!}",
" POSTGRES_USER: ${POSTGRES_USER:-app}",
" volumes:",
" - database_data:/var/lib/postgresql/data:rw",
" # You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!",
" # - ./docker/db/data:/var/lib/postgresql/data:rw"
],
"volumes": ["database_data:"]
},
"docker-compose.override.yml": {
"services": [
"database:",
" ports:",
" - \"5432\""
]
}
}
}
@@ -1 +0,0 @@
../1.6/post-install.txt
@@ -0,0 +1,4 @@
* Modify your DATABASE_URL config in <fg=green>.env</>
* Configure the <fg=green>driver</> (postgresql) and
<fg=green>server_version</> (16) in <fg=green>config/packages/doctrine.yaml</>
-1
View File
@@ -1 +0,0 @@
../1.6/src
@@ -4,7 +4,7 @@ doctrine:
# IMPORTANT: You MUST configure your server version,
# either here or in the DATABASE_URL env var (see .env file)
#server_version: '5.7'
#server_version: '16'
# only needed for MySQL
charset: utf8mb4
+33 -4
View File
@@ -8,9 +8,38 @@
},
"env": {
"#1": "Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url",
"#2": "For an SQLite database, use: \"sqlite:///%kernel.project_dir%/var/data.db\"",
"#3": "For a PostgreSQL database, use: \"postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=11&charset=utf8\"",
"#4": "IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml",
"DATABASE_URL": "mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7"
"#2": "IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml",
"#3": "",
"#4": "DATABASE_URL=\"sqlite:///%kernel.project_dir%/var/data.db\"",
"#5": "DATABASE_URL=\"mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8\"",
"DATABASE_URL": "postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8"
},
"dockerfile": [
"RUN install-php-extensions pdo_pgsql"
],
"docker-compose": {
"docker-compose.yml": {
"services": [
"database:",
" image: postgres:${POSTGRES_VERSION:-16}-alpine",
" environment:",
" POSTGRES_DB: ${POSTGRES_DB:-app}",
" # You should definitely change the password in production",
" POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-!ChangeMe!}",
" POSTGRES_USER: ${POSTGRES_USER:-app}",
" volumes:",
" - database_data:/var/lib/postgresql/data:rw",
" # You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!",
" # - ./docker/db/data:/var/lib/postgresql/data:rw"
],
"volumes": ["database_data:"]
},
"docker-compose.override.yml": {
"services": [
"database:",
" ports:",
" - \"5432\""
]
}
}
}
@@ -1,8 +1,4 @@
<bg=blue;fg=white> </>
<bg=blue;fg=white> Database Configuration </>
<bg=blue;fg=white> </>
* Modify your DATABASE_URL config in <fg=green>.env</>
* Configure the <fg=green>driver</> (mysql) and
<fg=green>server_version</> (5.7) in <fg=green>config/packages/doctrine.yaml</>
* Configure the <fg=green>driver</> (postgresql) and
<fg=green>server_version</> (16) in <fg=green>config/packages/doctrine.yaml</>
@@ -4,7 +4,8 @@ doctrine:
# IMPORTANT: You MUST configure your server version,
# either here or in the DATABASE_URL env var (see .env file)
#server_version: '5.7'
#server_version: '16'
use_savepoints: true
orm:
auto_generate_proxy_classes: true
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
@@ -1 +0,0 @@
../../../../1.12/config/packages/prod/doctrine.yaml
@@ -0,0 +1,20 @@
doctrine:
orm:
auto_generate_proxy_classes: false
metadata_cache_driver:
type: pool
pool: doctrine.system_cache_pool
query_cache_driver:
type: pool
pool: doctrine.system_cache_pool
result_cache_driver:
type: pool
pool: doctrine.result_cache_pool
framework:
cache:
pools:
doctrine.result_cache_pool:
adapter: cache.app
doctrine.system_cache_pool:
adapter: cache.system
@@ -1 +0,0 @@
../1.6/manifest.json
@@ -0,0 +1,45 @@
{
"bundles": {
"Doctrine\\Bundle\\DoctrineBundle\\DoctrineBundle": ["all"]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/",
"src/": "%SRC_DIR%/"
},
"env": {
"#1": "Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url",
"#2": "IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml",
"#3": "",
"#4": "DATABASE_URL=\"sqlite:///%kernel.project_dir%/var/data.db\"",
"#5": "DATABASE_URL=\"mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8\"",
"DATABASE_URL": "postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8"
},
"dockerfile": [
"RUN install-php-extensions pdo_pgsql"
],
"docker-compose": {
"docker-compose.yml": {
"services": [
"database:",
" image: postgres:${POSTGRES_VERSION:-16}-alpine",
" environment:",
" POSTGRES_DB: ${POSTGRES_DB:-app}",
" # You should definitely change the password in production",
" POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-!ChangeMe!}",
" POSTGRES_USER: ${POSTGRES_USER:-app}",
" volumes:",
" - database_data:/var/lib/postgresql/data:rw",
" # You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!",
" # - ./docker/db/data:/var/lib/postgresql/data:rw"
],
"volumes": ["database_data:"]
},
"docker-compose.override.yml": {
"services": [
"database:",
" ports:",
" - \"5432\""
]
}
}
}
@@ -1 +0,0 @@
../1.6/post-install.txt
@@ -0,0 +1,4 @@
* Modify your DATABASE_URL config in <fg=green>.env</>
* Configure the <fg=green>driver</> (postgresql) and
<fg=green>server_version</> (16) in <fg=green>config/packages/doctrine.yaml</>
-1
View File
@@ -1 +0,0 @@
../1.6/src
@@ -0,0 +1,50 @@
doctrine:
dbal:
url: '%env(resolve:DATABASE_URL)%'
# IMPORTANT: You MUST configure your server version,
# either here or in the DATABASE_URL env var (see .env file)
#server_version: '16'
profiling_collect_backtrace: '%kernel.debug%'
use_savepoints: true
orm:
auto_generate_proxy_classes: true
enable_lazy_ghost_objects: true
report_fields_where_declared: true
validate_xml_mapping: true
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
auto_mapping: true
mappings:
App:
type: attribute
is_bundle: false
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App
when@test:
doctrine:
dbal:
# "TEST_TOKEN" is typically set by ParaTest
dbname_suffix: '_test%env(default::TEST_TOKEN)%'
when@prod:
doctrine:
orm:
auto_generate_proxy_classes: false
proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
query_cache_driver:
type: pool
pool: doctrine.system_cache_pool
result_cache_driver:
type: pool
pool: doctrine.result_cache_pool
framework:
cache:
pools:
doctrine.result_cache_pool:
adapter: cache.app
doctrine.system_cache_pool:
adapter: cache.system
@@ -0,0 +1,51 @@
{
"bundles": {
"Doctrine\\Bundle\\DoctrineBundle\\DoctrineBundle": ["all"]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/",
"src/": "%SRC_DIR%/"
},
"env": {
"#1": "Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url",
"#2": "IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml",
"#3": "",
"#4": "DATABASE_URL=\"sqlite:///%kernel.project_dir%/var/data.db\"",
"#5": "DATABASE_URL=\"mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8.0.32&charset=utf8mb4\"",
"#6": "DATABASE_URL=\"mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4\"",
"DATABASE_URL": "postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8"
},
"dockerfile": [
"RUN install-php-extensions pdo_pgsql"
],
"docker-compose": {
"docker-compose.yml": {
"services": [
"database:",
" image: postgres:${POSTGRES_VERSION:-16}-alpine",
" environment:",
" POSTGRES_DB: ${POSTGRES_DB:-app}",
" # You should definitely change the password in production",
" POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-!ChangeMe!}",
" POSTGRES_USER: ${POSTGRES_USER:-app}",
" volumes:",
" - database_data:/var/lib/postgresql/data:rw",
" # You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!",
" # - ./docker/db/data:/var/lib/postgresql/data:rw"
],
"volumes": ["database_data:"]
},
"docker-compose.override.yml": {
"services": [
"database:",
" ports:",
" - \"5432\""
]
}
},
"conflict": {
"doctrine/orm": "<2.14",
"symfony/dependency-injection": "<6.2",
"symfony/framework-bundle": "<5.3"
}
}
@@ -0,0 +1,4 @@
* Modify your DATABASE_URL config in <fg=green>.env</>
* Configure the <fg=green>driver</> (postgresql) and
<fg=green>server_version</> (16) in <fg=green>config/packages/doctrine.yaml</>
@@ -0,0 +1,52 @@
doctrine:
dbal:
url: '%env(resolve:DATABASE_URL)%'
# IMPORTANT: You MUST configure your server version,
# either here or in the DATABASE_URL env var (see .env file)
#server_version: '16'
profiling_collect_backtrace: '%kernel.debug%'
use_savepoints: true
orm:
auto_generate_proxy_classes: true
enable_lazy_ghost_objects: true
report_fields_where_declared: true
validate_xml_mapping: true
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
auto_mapping: true
mappings:
App:
type: attribute
is_bundle: false
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App
controller_resolver:
auto_mapping: false
when@test:
doctrine:
dbal:
# "TEST_TOKEN" is typically set by ParaTest
dbname_suffix: '_test%env(default::TEST_TOKEN)%'
when@prod:
doctrine:
orm:
auto_generate_proxy_classes: false
proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
query_cache_driver:
type: pool
pool: doctrine.system_cache_pool
result_cache_driver:
type: pool
pool: doctrine.result_cache_pool
framework:
cache:
pools:
doctrine.result_cache_pool:
adapter: cache.app
doctrine.system_cache_pool:
adapter: cache.system
@@ -0,0 +1,54 @@
{
"bundles": {
"Doctrine\\Bundle\\DoctrineBundle\\DoctrineBundle": ["all"]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/",
"src/": "%SRC_DIR%/"
},
"env": {
"#1": "Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url",
"#2": "IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml",
"#3": "",
"#4": "DATABASE_URL=\"sqlite:///%kernel.project_dir%/var/data.db\"",
"#5": "DATABASE_URL=\"mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8.0.32&charset=utf8mb4\"",
"#6": "DATABASE_URL=\"mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4\"",
"DATABASE_URL": "postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8"
},
"dockerfile": [
"RUN install-php-extensions pdo_pgsql"
],
"docker-compose": {
"docker-compose.yml": {
"services": [
"database:",
" image: postgres:${POSTGRES_VERSION:-16}-alpine",
" environment:",
" POSTGRES_DB: ${POSTGRES_DB:-app}",
" # You should definitely change the password in production",
" POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-!ChangeMe!}",
" POSTGRES_USER: ${POSTGRES_USER:-app}",
" healthcheck:",
" test: [\"CMD\", \"pg_isready\", \"-d\", \"${POSTGRES_DB:-app}\", \"-U\", \"${POSTGRES_USER:-app}\"]",
" timeout: 5s",
" retries: 5",
" start_period: 60s",
" volumes:",
" - database_data:/var/lib/postgresql/data:rw",
" # You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!",
" # - ./docker/db/data:/var/lib/postgresql/data:rw"
],
"volumes": ["database_data:"]
},
"docker-compose.override.yml": {
"services": [
"database:",
" ports:",
" - \"5432\""
]
}
},
"conflict": {
"symfony/framework-bundle": "<7.1"
}
}

Some files were not shown because too many files have changed in this diff Show More