Skip to content

Commit e78497b

Browse files
committed
Add a note about having PHP files in recipes and copying PHP files from the package
1 parent 0b2fc1d commit e78497b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,13 @@ Copies files or directories from the Composer package contents to the Symfony
150150
application. It's defined as an associative array where the key is the original
151151
file/directory and the value is the target file/directory.
152152

153+
.. caution::
154+
155+
Copying files from the package should be avoided, except for some very
156+
specific use cases. Copying PHP files under the project's ``src/``
157+
directory is almost always a bad idea; consider adding a command in your
158+
bundle that is able to generate such PHP files instead.
159+
153160
This example copies the ``bin/check.php`` script of the package into the binary
154161
directory of the application:
155162

@@ -202,9 +209,12 @@ files and directories:
202209
203210
"copy-from-recipe": {
204211
"config/": "%CONFIG_DIR%/",
205-
"src/": "%SRC_DIR%/"
206212
}
207213
214+
Avoid storing PHP files that should land under the ``src/`` directory; consider
215+
adding a command in your bundle that is able to generate such PHP files
216+
instead.
217+
208218
``env`` Configurator
209219
~~~~~~~~~~~~~~~~~~~~
210220

0 commit comments

Comments
 (0)