-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
1221 lines (1068 loc) · 52.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Symfony Side-by-Side Reference</title>
<link href="http://fonts.googleapis.com/css?family=Voces" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="css/styles.css"/>
</head>
<body>
<div id="toc"></div>
<a href="https://github.com/andreia/symfony-reference"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
<div id="wrapper"><h1>Symfony Side-by-Side Reference</h1>
<p>Symfony Side-by-Side Reference for versions 1.0.x - 1.3.x/1.4.x - 2.0.x </p>
<p>This is a work in progress. If you want to contribute or if you have corrections, please fork and report on <a href="https://github.com/andreia/symfony-reference">GitHub</a></p>
<p class="credit">by <a href="http://www.twitter.com/andreiabohner">Andréia Bohner</a></p>
<p>Last updated in: <time itemprop="published" datetime="2012-07-10">2012-07-10 20:30</time>.</p>
<h2>CLI</h2>
<h3>Tasks (commands)</h3>
<table class="default" cellspacing="0">
<thead>
<tr>
<th class="nobg"></th>
<th scope="col">1.0</th>
<th scope="col">1.3 / 1.4</th>
<th scope="col">2.0</th>
</tr>
</thead>
<tbody>
<tr>
<td class="desc">Usage</td>
<td><code>$ symfony task_name</code></td>
<td><code>$ symfony [options] task_name [arguments]</code></td>
<td><code>$ php app/console [options] command [arguments]</code></td>
</tr>
<tr>
<td class="desc">Options for every task (command)</td>
<td>-</td>
<td><code>
<dl>
<dt><dfn>--help -H </dfn></dt>
<dd>Display this help message</dd>
<dt><dfn>--quiet -q </dfn></dt>
<dd>Do not log messages to standard output</dd>
<dt><dfn>--trace -t </dfn></dt>
<dd>Turn on invoke/execute tracing, enable full backtrace</dd>
<dt><dfn>--version -V </dfn></dt>
<dd>Display the program version</dd>
<dt><dfn>--color </dfn></dt>
<dd>Forces ANSI color output</dd>
<dt><dfn>--xml </dfn></dt>
<dd> To output help as XML</dd>
</dl>
</code></td>
<td>
<code>
<dl>
<dt><dfn>--help -h </dfn></dt>
<dd>Display this help message.</dd>
<dt><dfn>--quiet -q</dfn></dt>
<dd>Do not output any message.</dd>
<dt><dfn>--verbose -v</dfn></dt>
<dd>Increase verbosity of messages.</dd>
<dt><dfn>--version -V</dfn></dt>
<dd>Display this application version.</dd>
<dt><dfn>--ansi</dfn></dt>
<dd>Force ANSI output.</dd>
<dt><dfn>--no-ansi</dfn></dt>
<dd>Disable ANSI output.</dd>
<dt><dfn>--no-interaction -n </dfn></dt>
<dd>Do not ask any interactive question.</dd>
<dt><dfn>--shell -s</dfn></dt>
<dd>Launch the shell.</dd>
<dt><dfn>--env -e</dfn></dt>
<dd>The Environment name.</dd>
<dt><dfn>--no-debug</dfn></dt>
<dd>Switches off debug mode.</dd>
</dl>
</code></td>
</tr>
<tr>
<td class="desc">List available tasks (commands)</td>
<td><code>$ symfony -T</code></td>
<td><code>$ symfony list [--xml] [namespace]</code><br />or<br /><code>$ symfony</code></td>
<td><code>$ php app/console list</code><br />or<br /><code>$ php app/console</code></td>
</tr>
<tr>
<td class="desc">Installed version of the symfony package (and path of the symfony libraries used by CLI)</td>
<td><code>$ symfony -V</code></td>
<td><code>$ symfony -V</code></td>
<td><code>$ console</code></td>
</tr>
<tr>
<td class="desc">Displays help for a task (command)</td>
<td>-</td>
<td><code>$ symfony help [--xml] [task_name]</code></td>
<td><code>$ php app/console help [command]</code></td>
</tr>
<tr>
<td class="desc">Creates a skeleton class for a new task</td>
<td>-</td>
<td><code>$ symfony generate:task [--dir=[lib/task]] [--use-database=[doctrine|propel|main|false]] [--brief-description="..."] <task_name></code></td>
<td><code></code></td>
</tr>
</tbody>
</table>
<h3>Project</h3>
<table class="default" cellspacing="0">
<thead>
<tr>
<th class="nobg"></th>
<th scope="col">1.0</th>
<th scope="col">1.3 / 1.4</th>
<th scope="col">2.0</th>
</tr>
</thead>
<tbody>
<tr>
<td class="desc">Clear the cached information</td>
<td><code>$ symfony clear-cache <application_name> [template|config]</code>
<br />shortcut:<br />
<code>$ symfony cc <application_name> [template|config]</code>
</td>
<td><code>$ symfony cache:clear [--app=app_name] [--env=[prod|dev]] [--type=type]</code>
<br />shortcut:<br />
<code>$ symfony cc </code></td>
<td><code>$ php app/console cache:clear [--no-warmup]</code></td>
</tr>
<tr>
<td class="desc">Warms up an empty cache</td>
<td> - </td>
<td> - </td>
<td><code>$ php app/console cache:warmup</code></td>
</tr>
<tr>
<td class="desc">Configure the author for a project. Used by the generates to pre-configure the PHPDoc header</td>
<td> - </td>
<td><code>$ symfony configure:author <author_name></code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Displays current routes for an application</td>
<td> - </td>
<td><code>$ symfony app:routes <app_name> [route_name]</code></td>
<td><code>$ php app/console router:debug [route_name]</code></td>
</tr>
<tr>
<td class="desc">Dumps all routes as Apache rewrite rules</td>
<td> - </td>
<td> - </td>
<td><code>$ php app/console router:dump-apache [--base-uri=...] [script_name]</code></td>
</tr>
<tr>
<td class="desc">Initialize the project. Create basic directory structure for a new project in the current directory</td>
<td><code>$ symfony init-project <project_name></code></td>
<td><code>$ symfony generate:project [--orm=[Doctrine|Propel|none]] [--installer=installer_script] <project_name> [author_name]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Initialize an application. Creates basic directory structure for a new application in the
current project. PHP files corresponding to the front controllers of each default environment are also created in the project root <code>web/</code> directory</td>
<td><code>$ symfony init-app <app_name></code></td>
<td><code>$ symfony generate:app [--escaping-strategy=...] [--csrf-secret=...] <app_name></code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Initialize a module. Creates the basic directory structure for a new module in an existing application.</td>
<td><code>$ symfony init-module <application_name> <module_name></code></td>
<td><code>$ symfony generate:module <app_name> <module_name></code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Synchronise the current project with another machine</td>
<td><code>$ symfony sync <environment_name> [go]</code></td>
<td><code></code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Deploys a project on a server. The server must be configured in <code>config/properties.ini</code>. The <code>--rsync-dir</code> is the directory where to look for <code>rsync*.txt</code> files
</td>
<td> - </td>
<td><code>$ symfony project:deploy [--go] [--rsync-dir=config] [--rsync-options=[-azC|--force|--delete|--progress]] <server_name></code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Convert the project to an independent, stand-alone application</td>
<td><code>$ symfony freeze</code></td>
<td><code></code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Revert a project to its initial state. It erases the <code>data/symfony/</code>, <code>lib/symfony/</code> and <code>web/sf/</code></td>
<td><code>$ symfony unfreeze</code></td>
<td><code></code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Temporarily disable your application, when you need to upgrade a library or a large amount of data</td>
<td><code>$ symfony disable <application_name> <environment_name></code></td>
<td><code>$ symfony project:disable <env_name> [app1] ... [appN]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Reenables the application and clears the cache</td>
<td><code>$ symfony enable <application_name> <environment_name></code></td>
<td><code>$ symfony project:enable <env_name> [app1] ... [appN]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Clears all non production environment controllers</td>
<td><code>$ symfony clear-controllers</code></td>
<td><code>$ symfony project:clear-controllers</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Fixes directory permissions, to change the <code>log/</code> and <code>cache/</code> permissions to 0777 (these directories need to be writable)</td>
<td><code>$ symfony fix-perms</code></td>
<td><code>$ symfony project:permissions</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Optimizes a project for better performance. This task should only be used on a prod server</td>
<td> - </td>
<td><code>$ symfony project:optimize <app_name> [env_name]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Detects deprecated usage in your project</td>
<td> - </td>
<td><code>$ symfony project:validate</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Displays current services for an application</td>
<td> - </td>
<td> - </td>
<td><code>$ php app/console container:debug [--show-private] [service_name]</code></td>
</tr>
<tr>
<td class="desc">Dumps all assets to the filesystem</td>
<td> - </td>
<td> - </td>
<td><code>$ php app/console assetic:dump [--watch] [--force] [--period=...] [write_to]</code></td>
</tr>
</tbody>
</table>
<h3>Database</h3>
<table class="default" cellspacing="0">
<thead>
<tr>
<th class="nobg"></th>
<th scope="col">1.0</th>
<th scope="col">1.3 / 1.4</th>
<th scope="col">2.0</th>
</tr>
</thead>
<tbody>
<tr>
<td class="desc">Configures the database DSN for a project</td>
<td> - </td>
<td><code>$ symfony configure:database [--env=env_name] [--name=conn_name] [--class=db_class_name] [--app=app_name] <dsn> [username] [password]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Propel: Generate the schema.yml for representation of an existing database. For schema.xml use option xml</td>
<td><code>$ symfony propel-build-schema [xml]</code></td>
<td><code>$ symfony propel:build-schema [--application=app_name] [--env=env_name] [--connection=conn_name] [--xml] [--phing-arg=arbitrary_phing_arguments] </code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Propel: Generate the PHP classes for the model, according with the schema.yml</td>
<td><code>$ symfony propel-build-model</code><br /><span class='note'>The base data access classes will be created in the myproject/lib/model/om/. The data access classes will be created in myproject/lib/model</span></td>
<td><code>$ symfony propel:build-model [--phing-arg=arbitrary_phing_arguments]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Propel: Creates form classes for the current model</td>
<td> - </td>
<td><code>$ symfony propel:build-forms [--connection=conn_name] [--model-dir-name=model_dir_name]
[--form-dir-name=form_dir_name] [--application=app_name] [--generator-class=generator_class_name]</code><br />Read the schema information in and/or from the project and
all installed plugins</td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Propel: Creates filter form classes from the schema for the current model</td>
<td> - </td>
<td><code>$ symfony propel:build-filters [--connection=conn_name] [--model-dir-name=model_dir_name] [--filter-dir-name=filter_form_dir_name] [--application=app_name] [--generator-class=generator_class]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Propel: Generates code based on your schema. You must specify what you would like built.</td>
<td> - </td>
<td><code>$ symfony propel:build [--application=app_name] [--env=env_name] [--no-confirmation] [--all] [--all-classes] [--model] [--forms] [--filters] [--sql] [--db] [--and-load=fixture_file] [--and-append=fixture_file]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Propel: Generates model and form classes, SQL and initializes the database</td>
<td> - </td>
<td><code>$ symfony propel:build-all [--application=app_name] [--env=env_name] [--connection=conn_name]
[--no-confirmation] [-F|--skip-forms] [-C|--classes-only] [--phing-arg=arbitrary_phing_arguments]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Propel: Generates model and form classes, SQL, initializes the database, and loads data</td>
<td> - </td>
<td><code>$ symfony propel:build-all-load [--application=app_name] [--env=env_name] [--connection=conn_name] [--no-confirmation] [-F|--skip-forms] [-C|--classes-only] [--phing-arg=arbitrary_phing_arguments] [--append] [--dir=fixture_dir] </code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Propel: Generate a new CRUD module based on a class from the model (Scaffolding)</td>
<td><code>$ symfony propel-generate-crud <application_name> <module_name> <model_name></code></td>
<td><code>$ symfony propel:generate-module [--theme=theme_name] [--generate-in-cache] [--non-verbose-templates] [--with-show]
[--singular=singular_name] [--plural=plural_name] [--route-prefix=route_prefix] [--with-propel-route] [--env=env_name]
[--actions-base-class=base_class_for_actions] <app_name> <module_name> <model_name></code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Propel: Generates a module for a route definition</td>
<td> - </td>
<td><code>$ symfony propel:generate-module-for-route [--theme=them_name] [--non-verbose-templates]
[--singular=singular_name] [--plural=plural_name] [--env=env_name] [--actions-base-class=base_class_for_actions] <app_name> <route_name>
</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Propel: Generate the SQL code to create the tables described in the schema.yml</td>
<td><code>$ symfony propel-build-sql</code><br>(in myproject/data/sql/lib.model.schema.sql)</td>
<td><code>$ symfony propel:build-sql [--phing-arg=arbitrary_phing_arguments]</code><br />(in myproject/config/sql/*schema.sql)</td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Propel: Create an empty database</td>
<td><code>$ symfony propel-build-db</code></td>
<td><code> - </code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Propel: Insert the SQL code into the database</td>
<td><code>$ symfony propel-insert-sql</code><br>(from lib.model.schema.sql file)</td>
<td><code>$ symfony propel:insert-sql [--application=app_name] [--env=env_name] [--connection=conn_name] [--no-confirmation] [--phing-arg=arbitrary_phing_arguments] </code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Propel: Initialize a new admin module based on a class from the model</td>
<td><code>$ symfony propel-init-admin <application_name> <module_name> <model_name></code></td>
<td><code>$ symfony propel:generate-admin [--module=module_name] [--theme=theme_name] [--singular=singular_name] [--plural=plural_name] [--env=env_name] [--actions-base-class=base_class_for_actions] <app_name> <route_or_model></code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Propel: Loads data fixtures into the database. Loads data from all the files found in <code>data/fixtures/</code></td>
<td> - </td>
<td><code>$ symfony propel:data-load [--application=app_name] [--env=env_name] [--append] [--connection=conn_name] [dir_or_file1] ... [dir_or_fileN]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Propel: Dumps database data to the fixtures directory</td>
<td> - </td>
<td><code>$ symfony propel:data-dump [--application=app_name] [--env=env_name] [--connection=conn_name] [--classes=...] [target]</code><br />E.g.:<code>$ symfony propel:data-dump > data/fixtures/dump.yml</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Propel: Creates a graphviz DOT visualization for automatic graph drawing of object model</td>
<td> - </td>
<td><code>$ symfony propel:graphviz [--phing-arg=arbitrary_phing_arguments]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Propel: Converts YML schemas to XML</td>
<td> - </td>
<td><code>$ symfony propel:schema-to-xml</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Propel: Converts XML schemas to YML</td>
<td> - </td>
<td><code>$ symfony propel:schema-to-yml</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Doctrine: Generates code based on your schema </td>
<td> - </td>
<td><code>$ symfony doctrine:build [--application=app_name] [--env=env_name] [--no-confirmation] [--all] [--all-classes] [--model] [--forms] [--filters] [--sql] [--db] [--and-migrate] [--and-load=fixture_file] [--and-append=fixture_file]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Doctrine: Creates one or more databases</td>
<td> - </td>
<td><code>$ symfony doctrine:build-db [--application=app_name] [--env=env_name] [database1] ... [databaseN]</code><br />based on configuration in <code>config/databases.yml</code></td>
<td><code>$ php app/console doctrine:database:create [--connection=...]</code></td>
</tr>
<tr>
<td class="desc">Doctrine: Creates form filter classes from the schema. The classes are created in <code>lib/doctrine/filter</code></td>
<td> - </td>
<td><code>$ symfony doctrine:build-filters [--application=app_name] [--env=env_name] [--model-dir-name=...]
[--filter-dir-name=form_dir_name] [--generator-class=generator_class_name]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Doctrine: Creates form classes from the schema for the current model. The classes are created in <code>lib/doctrine/form</code></td>
<td> - </td>
<td><code>$ symfony doctrine:build-forms [--application=app_name] [--env=env_name] [--model-dir-name=...]
[--form-dir-name=form_dir_name] [--generator-class=generator_class_name]</code></td>
<td> - </td>
</tr>
<tr>
<td class="desc">Doctrine: Generates a form class based on a Doctrine entity</td>
<td> - </td>
<td> - </td>
<td><code>$ php app/console doctrine:generate:form <entity> </code></td>
</tr>
<tr>
<td class="desc">Doctrine: Creates model classes from the schema. Read the schema information in <code>config/doctrine/*.yml</code></td>
<td> - </td>
<td><code>$ symfony doctrine:build-model [--application=app_name] [--env=env_name]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Doctrine: Creates a schema from an existing database ([sf2] Convert mapping information between supported formats) </td>
<td> - </td>
<td><code>$ symfony doctrine:build-schema [--application=app_name] [--env=env_name]</code><br />The task creates a yml file in <code>config/doctrine</code></td>
<td><code>$ php app/console doctrine:mapping:convert [--filter=...] [--force] [--from-database] [--extend=...] [--num-spaces=...] [--namespace=...] [--em=...] <to-type> <dest-path></code></td>
</tr>
<tr>
<td class="desc">Doctrine: Creates SQL for the current model. The generated SQL is optimized for the database configured in <code>config/databases.yml</code></td>
<td> - </td>
<td><code>$ symfony doctrine:build-sql [--application=app_name] [--env=env_name]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Doctrine: Delete all generated model classes for models which no longer exist in your YAML schema. </td>
<td> - </td>
<td><code>$ symfony doctrine:clean-model-files [--no-confirmation]</code><br />Alias: <code>doctrine:clean</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Doctrine: Drop and recreate tables for specified models</td>
<td> - </td>
<td><code>$ symfony doctrine:create-model-tables [--application=app_name] [--env=env_name] [models1] ... [modelsN]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Doctrine: Dumps the database data in <code>data/fixtures/%target_filename%</code></td>
<td> - </td>
<td><code>$ symfony doctrine:data-dump [--application=app_name] [--env=env_name] [target_filename]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Doctrine: Loads data from all the files found in <code>data/fixtures/</code>. Using the option <code>--append</code>, the task don't delete current data in the database</td>
<td> - </td>
<td><code>$ symfony doctrine:data-load [--application=app_name] [--env=env_name] [--append] [dir_or_file1] ... [dir_or_fileN]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Doctrine: Deletes all files associated with certain models</td>
<td> - </td>
<td><code>$ symfony doctrine:delete-model-files [--no-confirmation] model_name1 ... [model_nameN]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Doctrine: Executes a DQL query and displays the formatted results</td>
<td> - </td>
<td><code>$ symfony doctrine:dql [--application=app_name] [--env=env_name] [--show-sql] [--table] <dql_query> [param1] ... [paramN]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Doctrine: Drops databases</td>
<td> - </td>
<td><code>$ symfony doctrine:drop-db [--application=app_name] [--env=env_name] [--no-confirmation] [db1] ... [dbN]</code><br />(for current model)</td>
<td><code>$ php app/console doctrine:database:drop [--connection=...] [--force]</code></td>
</tr>
<tr>
<td class="desc">Doctrine: Generates a Doctrine admin module</td>
<td> - </td>
<td><code>$ symfony doctrine:generate-admin [--module=module_name] [--theme=theme_name] [--singular=singular_name] [--plural=plural_name] [--env=env_name] [--actions-base-class=base_class_for_actions] <app_name> <route_or_model></code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Doctrine: Generates migration template</td>
<td> - </td>
<td><code>$ symfony doctrine:generate-migration [--application=app_name] [--env=env_name] [--editor-cmd=...] <name></code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Doctrine: Generates migration classes from existing database connections</td>
<td> - </td>
<td><code>$ symfony doctrine:generate-migrations-db [--application=app_name] [--env=env_name]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Doctrine: Generate migration classes by producing a diff between your old and new schema</td>
<td> - </td>
<td><code>$ symfony doctrine:generate-migrations-diff [--application=app_name] [--env=env_name]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Doctrine: Generates migration classes from an existing set of models</td>
<td> - </td>
<td><code>$ symfony doctrine:generate-migrations-models [--application=app_name] [--env=env_name]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Doctrine: Generates a Doctrine module</td>
<td> - </td>
<td><code>$ symfony doctrine:generate-module [--theme=theme_name] [--generate-in-cache] [--non-verbose-templates] [--with-show] [--singular=singular_name] [--plural=plural_name] [--route-prefix=route_prefix] [--with-doctrine-route] [--env=env_name] [--actions-base-class=base_class_for_actions] <app_name> <module_name> <model_class_name></code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Doctrine: Generates a Doctrine module for a route definition</td>
<td> - </td>
<td><code>$ symfony doctrine:generate-module-for-route [--theme=them_name] [--non-verbose-templates] [--singular=singular_name] [--plural=plural_name] [--env=env_name] [--actions-base-class=base_class_for_actions] <app_name> <route_name></code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Doctrine: Inserts SQL for current model. The task connects to the database and creates tables for all the <code>lib/model/doctrine/*.class.php</code> files.</td>
<td> - </td>
<td><code>$ symfony doctrine:insert-sql [--application=app_name] [--env=env_name]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Doctrine: Migrates database to current/specified version</td>
<td> - </td>
<td><code>$ symfony doctrine:migrate [--application=app_name] [--env=env_name] [--up] [--down] [--dry-run] [version]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Doctrine: Generates a new Doctrine entity inside a bundle</td>
<td> - </td>
<td> - </td>
<td><code>$ php app/console doctrine:generate:entity [--entity=...] [--fields=...] [--format=...] [--with-repository]</code></td>
</tr>
<tr>
<td class="desc">Doctrine: Clears all metadata cache for an entity manager</td>
<td> - </td>
<td> - </td>
<td><code>$ php app/console doctrine:cache:clear-metadata [--em=...]</code></td>
</tr>
<tr>
<td class="desc">Doctrine: Clears all query cache for an entity manager</td>
<td> - </td>
<td> - </td>
<td><code>$ php app/console doctrine:cache:clear-query [--em=...]</code></td>
</tr>
<tr>
<td class="desc">Doctrine: Clears result cache for an entity manager</td>
<td> - </td>
<td> - </td>
<td><code>$ php app/console doctrine:cache:clear-result [--flush] [--em=...]</code></td>
</tr>
<tr>
<td class="desc">Doctrine: Imports mapping information from an existing database</td>
<td> - </td>
<td> - </td>
<td><code>$ php app/console doctrine:mapping:import [--em=...] [--filter=...] [--force] <bundle> [mapping-type]</code></td>
</tr>
<tr>
<td class="desc">Doctrine: Shows basic information about all mapped entities</td>
<td> - </td>
<td> - </td>
<td><code>$ php app/console doctrine:mapping:info [--em=...]</code></td>
</tr>
<tr>
<td class="desc">Doctrine: Generates entity classes and method stubs from your mapping information</td>
<td> - </td>
<td> - </td>
<td><code>$ php app/console doctrine:generate:entities [--path=...] [--no-backup] <name></code></td>
</tr>
<tr>
<td class="desc">Doctrine: Generates a CRUD based on a Doctrine entity</td>
<td> - </td>
<td> - </td>
<td><code>$ php app/console doctrine:generate:crud [--entity=...] [--route-prefix=...] [--with-write] [--format=...]</code></td>
</tr>
<tr>
<td class="desc">Doctrine: Executes arbitrary DQL directly from the command line</td>
<td> - </td>
<td> - </td>
<td><code>$ php app/console doctrine:query:dql [--hydrate=...] [--first-result=...] [--max-result=...] [--depth=...] [--em=...] <dql></code></td>
</tr>
<tr>
<td class="desc">Doctrine: Executes arbitrary SQL directly from the command line</td>
<td> - </td>
<td> - </td>
<td><code>$ php app/console doctrine:query:sql [--depth=...] [--connection=...] <sql_to_execute></code></td>
</tr>
<tr>
<td class="desc">Doctrine: Executes (or dumps) the SQL needed to generate the database schema</td>
<td> - </td>
<td> - </td>
<td><code>$ php app/console doctrine:schema:create [--dump-sql] [--em=...]</code></td>
</tr>
<tr>
<td class="desc">Doctrine: Executes (or dumps) the SQL needed to drop the current database schema</td>
<td> - </td>
<td> - </td>
<td><code>$ php app/console doctrine:schema:drop [--dump-sql] [--force] [--full-database] [--em=...]</code></td>
</tr>
<tr>
<td class="desc">Doctrine: Executes (or dumps) the SQL needed to update the database schema to match the current mapping metadata</td>
<td> - </td>
<td> - </td>
<td><code>$ php app/console doctrine:schema:update [--complete] [--dump-sql] [--force] [--em=...]</code></td>
</tr>
<tr>
<td class="desc">Doctrine: Checks the current mappings for valid forward and reverse mappings</td>
<td> - </td>
<td> - </td>
<td><code>$ php app/console doctrine:schema:validate [--em=...]</code></td>
</tr>
<tr>
<td class="desc">Doctrine: Verify that Doctrine is properly configured for a production environment</td>
<td> - </td>
<td> - </td>
<td><code>$ php app/console doctrine:ensure-production-settings [--complete] [--em=...]</code></td>
</tr>
<tr>
<td class="desc">Mounts ACL tables in the database</td>
<td> - </td>
<td> - </td>
<td><code>$ php app/console init:acl</code></td>
</tr>
</tbody>
</table>
<h3>Plugins</h3>
<table class="default" cellspacing="0">
<thead>
<tr>
<th class="nobg"></th>
<th scope="col">1.0</th>
<th scope="col">1.3 / 1.4</th>
<th scope="col">2.0</th>
</tr>
</thead>
<tbody>
<tr>
<td class="desc">Install a new plugin</td>
<td><code>$ symfony plugin-install [local|global] <channel_name>/<plugin_name></code></td>
<td><code>$ symfony plugin:install
[-s|--stability=[stable|beta|alpha]]
[-r|--release=preferred_version]
[-c|--channel=PEAR_channel_name]
[-d|--install_deps] [--force-license] <name></code></td>
<td> - </td>
</tr>
<tr>
<td class="desc">Adds a new PEAR channel</td>
<td> - </td>
<td><code>$ symfony plugin:add-channel <name></code></td>
<td> - </td>
</tr>
<tr>
<td class="desc">Lists all installed plugins. Also gives the channel and version for each plugin</td>
<td> - </td>
<td><code>$ symfony plugin:list</code></td>
<td> - </td>
</tr>
<tr>
<td class="desc">Publishes web assets for all plugins</td>
<td> - </td>
<td><code>$ symfony plugin:publish-assets [--core-only] [plugins1] ... [pluginsN]</code></td>
<td> - </td>
</tr>
<tr>
<td class="desc">Uninstalls a plugin</td>
<td> - </td>
<td><code>$ symfony plugin:uninstall
[-c|--channel=PEAR_channel_name]
[-d|--install_deps] <name></code></td>
<td> - </td>
</tr>
<tr>
<td class="desc">Upgrades a plugin. The default channel is symfony. If the plugin contains some web content (images, css or js),
the task also updates the web/%name% directory content on Windows.</td>
<td> - </td>
<td><code>$ symfony plugin:upgrade
[-s|--stability=[stable|beta|alpha]]
[-r|--release=preferred version]
[-c|--channel=PEAR_channel_name] <name></code></td>
<td> - </td>
</tr>
</tbody>
</table>
<h3>Bundles</h3>
<table class="default" cellspacing="0">
<thead>
<tr>
<th class="nobg"></th>
<th scope="col">1.0</th>
<th scope="col">1.3 / 1.4</th>
<th scope="col">2.0</th>
</tr>
</thead>
<tbody>
<tr>
<td class="desc">Generates a bundle</td>
<td> - </td>
<td> - </td>
<td><code>$ php app/console generate:bundle [--namespace=Acme/BlogBundle] [--dir=...] [--bundle-name=...] [--format=...] [--structure]</code><br /><span class='note'> Note: the bundle namespace must end with "Bundle"</span></td>
</tr>
<tr>
<td class="desc">Installs bundles web assets under a public web directory</td>
<td> - </td>
<td> - </td>
<td><code>$ php app/console assets:install <target_dir> [--symlink]</code></td>
</tr>
</tbody>
</table>
<h3>Test</h3>
<table class="default" cellspacing="0">
<thead>
<tr>
<th class="nobg"></th>
<th scope="col">1.0</th>
<th scope="col">1.3 / 1.4</th>
<th scope="col">2.0</th>
</tr>
</thead>
<tbody>
<tr>
<td class="desc">Launch the test suite</td>
<td><code>$ symfony test <application_name></code></td>
<td><code>$ symfony symfony:test [-u|--update-autoloader] [-f|--only-failed][--xml=file_name] [--rebuild-all]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Launches all unit and functional tests found in <code>test/</code>. If some tests fail, you can use the --trace option to have more information about the failures: <code>$ symfony test:all -t</code></td>
<td> - </td>
<td><code>$ symfony test:all [-f|--only-failed] [--xml=file_name]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Outputs the test code coverage given a test file or test directory and a lib file or lib directory for which you want code coverage</td>
<td> - </td>
<td><code>$ symfony test:coverage [--detailed] <test_name> <lib_name></code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Launches functional tests for a given application. The task launches all tests found in <code>test/functional/%application%</code></td>
<td> - </td>
<td><code>$ symfony test:functional [--xml="..."] <app_name> [controller1] ... [controllerN]</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Launches all unit tests found in <code>test/unit</code></td>
<td> - </td>
<td><code>$ symfony test:unit [--xml=filename] [name1]...[nameN]</code></td>
<td><code></code></td>
</tr>
</tbody>
</table>
<h3>Log</h3>
<table class="default" cellspacing="0">
<thead>
<tr>
<th class="nobg"></th>
<th scope="col">1.0</th>
<th scope="col">1.3 / 1.4</th>
<th scope="col">2.0</th>
</tr>
</thead>
<tbody>
<tr>
<td class="desc">Erases (Clears) symfony log files</td>
<td><code>$ symfony log-purge</code><br /><span class='note'>in apps and environments where the <code>logging.yml</code> file specifies <code>purge: on</code> (default value)</span></td>
<td><code>$ symfony log:clear</code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Rotates an application’s log files</td>
<td> - </td>
<td><code>$ symfony log:rotate [--history = max_number_old_log_files_to_keep]
[--period=period_in_days] <app_name> <env_name></code></td>
<td><code></code></td>
</tr>
</tbody>
</table>
<h3>I18N</h3>
<table class="default" cellspacing="0">
<thead>
<tr>
<th class="nobg"></th>
<th scope="col">1.0</th>
<th scope="col">1.3 / 1.4</th>
<th scope="col">2.0</th>
</tr>
</thead>
<tbody>
<tr>
<td class="desc">Extracts i18n strings from your project files for the given app and target culture.</td>
<td> - </td>
<td><code>$ symfony i18n:extract [--display-new] [--display-old]
[--auto-save] [--auto-delete] <app_name> <culture></code></td>
<td><code></code></td>
</tr>
<tr>
<td class="desc">Finds non internationalized strings embedded in templates. Is able to find non internationalized strings in pure HTML and in PHP code</td>
<td> - </td>
<td><code>$ symfony i18n:find [--env=env_name] <app_name></code></td>
<td><code></code></td>
</tr>
</tbody>
</table>
<h3>E-mail</h3>
<table class="default" cellspacing="0">
<thead>
<tr>
<th class="nobg"></th>
<th scope="col">1.0</th>
<th scope="col">1.3 / 1.4</th>
<th scope="col">2.0</th>
</tr>
</thead>
<tbody>
<tr>
<td class="desc">Sends e-mails from the spool (queue)</td>
<td> - </td>
<td><code>$ symfony project:send-emails [--application=app_name] [--env=env_name] [--message-limit=max_number_msg_to_send] [--time-limit=time_limit_in_sec]</code></td>
<td><code>php app/console swiftmailer:spool:send [--message-limit=max_number_msg_to_send] [--time-limit=time_limit_in_sec]</code></td>
</tr>
</tbody>
</table>
<h2>Directory Structure</h2>
<table class="default" cellspacing="0">
<thead>
<tr>
<th scope="col">1.0</th>
<th scope="col">1.3 / 1.4</th>
<th scope="col">2.0</th>
</tr>
</thead>
<tbody>
<tr>
<td class="image"><img src="images/dir10.png" /></td>
<td class="image"><img src="images/dir14.png" /></td>
<td class="image"><img src="images/dir2.png" /></td>
</tr>
</tbody>
</table>
<h2>Request</h2>
<table class="default" cellspacing="0">
<thead>
<tr>
<th class="nobg"></th>
<th scope="col">1.0</th>
<th scope="col">1.3 / 1.4</th>
<th scope="col">2.0</th>
</tr>
</thead>
<tbody>
<tr>
<td class="desc">Access the Request object (Controller)</td>
<td><code>$this->getRequest();</code></td>
<td><code>$request;</code><br /><span class='note'>Note: $request is the type sfWebRequest</span></td>
<td><code>$this->getRequest();</code></td>
</tr>
<tr>
<td class="desc">Check if it is an ajax request (Controller)</td>
<td><code>$this->getRequest()->isXmlHttpRequest();</code></td>
<td><code>$request->isXmlHttpRequest();</code></td>
<td><code>$this->getRequest()->isXmlHttpRequest();</code></td>
</tr>
<tr>
<td class="desc">Get a $_GET parameter (Controller)</td>
<td><code>$this->getRequestParameter('page');</code></td>
<td><code>$request->getParameter('page');</code> or <code>$request->getGetParameter('page');</code></td>
<td><code>$this->getRequest()-> query->get('page');</code></td>
</tr>
<tr>
<td class="desc">Get all $_GET parameters (Controller)</td>
<td><code>$this->getRequest()-> getParameterHolder()->getAll();</code></td>
<td><code>$request-> getParameterHolder()->getAll();</code></td>
<td><code>$this->getRequest()-> query->all();</code></td>
</tr>
<tr>
<td class="desc">Get a $_POST parameter (Controller)</td>
<td><code>$this->getRequestParameter('page');</code></td>
<td><code>$request-> getParameter('page');</code> or <code>$request->getPostParameter('page');</code></td>
<td><code>$this->getRequest()-> request->get('page');</code></td>
</tr>
<tr>
<td class="desc">Get all $_POST parameters (Controller)</td>
<td><code>$this->getRequest()-> getParameterHolder()->getAll();</code></td>
<td><code>$request-> getParameterHolder()->getAll();</code></td>
<td><code>$this->getRequest()-> request->all();</code></td>