Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[WCM] Document constraint validator alias made optional#5952

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
Mx-Glitter wants to merge143 commits intosymfony:2.8fromMx-Glitter:fix-constraint-validator-alias-required
Closed
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
143 commits
Select commitHold shift + click to select a range
1a587c5
Added February changelog
wouterjMar 1, 2015
653ac94
fix changelog syntax
xabbuhMar 2, 2015
515e87c
Merge branch '2.7'
weaverryanMar 2, 2015
a2395ef
minor #5054 [Changelog] fix changelog syntax (xabbuh)
weaverryanMar 2, 2015
feb621b
Merge branch '2.7'
weaverryanMar 13, 2015
f24c84f
Merge branch '2.7'
weaverryanMar 14, 2015
3fb0d42
Merge branch '2.7'
weaverryanMar 15, 2015
7681e39
Merge branch '2.7'
weaverryanMar 24, 2015
5dd50f5
Merge branch '2.7'
wouterjApr 2, 2015
392398b
Merge branch '2.7'
wouterjApr 4, 2015
56fe069
Merge branch '2.7'
wouterjApr 5, 2015
e84182d
Added March changelog
wouterjApr 5, 2015
c4e07cc
Merge branch '2.7'
wouterjApr 7, 2015
2e86186
Merge branch '2.8'
weaverryanApr 15, 2015
b74593c
Merge branch '2.8'
weaverryanApr 17, 2015
701f2cf
Merge branch '2.8'
wouterjApr 26, 2015
f0429d7
Merge branch '2.8'
weaverryanApr 27, 2015
83636f0
Merge branch '2.8'
wouterjMay 2, 2015
041b2af
Merge branch '2.8'
wouterjMay 2, 2015
643f4c4
Merge branch '2.8'
wouterjMay 2, 2015
c1cbb9a
Merge branch '2.8'
weaverryanMay 3, 2015
de9b3d5
Merge branch '2.8'
wouterjMay 10, 2015
25c9705
Merge branch '2.8'
wouterjMay 17, 2015
12d8531
Merge branch '2.8'
weaverryanMay 22, 2015
c2b92e1
Merge branch '2.8'
wouterjMay 23, 2015
2d64dd5
Merge branch '2.8'
weaverryanMay 23, 2015
7cadcdc
Merge branch '2.8'
wouterjMay 24, 2015
c3fd4f5
Merge branch '2.8'
wouterjMay 24, 2015
68f51df
Merge branch '2.8'
weaverryanMay 25, 2015
0c089ec
Update create_form_type_extension.rst
May 28, 2015
78bab15
Merge branch '2.8'
weaverryanMay 29, 2015
ed88e1c
bug #5328 Update create_form_type_extension.rst (jackdelin)
wouterjMay 31, 2015
d6c5d5b
Merge branch '2.8'
wouterjMay 31, 2015
6a9a26a
Merge branch '2.8'
wouterjMay 31, 2015
f78cab7
Merge branch '2.8'
wouterjMay 31, 2015
078bb2d
Merge branch '2.8'
wouterjJun 7, 2015
d01d7ab
Remove deprecated parameters
norkunasJun 10, 2015
a68ff44
Merge branch '2.8'
weaverryanJun 19, 2015
41d1733
Merge branch '2.8'
weaverryanJun 19, 2015
2d430dc
Merge branch '2.8'
wouterjJun 20, 2015
cc87822
Merge branch '2.8'
weaverryanJun 28, 2015
0ef7e1a
Merge branch '2.8'
weaverryanJun 28, 2015
e08724e
Merge branch '2.8'
weaverryanJun 30, 2015
7d6737b
Merge branch '2.8'
wouterjJul 1, 2015
3cdbc7c
Merge branch '2.8'
weaverryanJul 2, 2015
b3a32af
Merge branch '2.8'
xabbuhJul 2, 2015
11237e7
Merge branch '2.8'
xabbuhJul 6, 2015
6cc3445
Merge branch '2.7'
weaverryanJul 7, 2015
3244eed
Merge branch '2.8'
weaverryanJul 8, 2015
2bb0d16
Merge branch '2.8'
weaverryanJul 12, 2015
55a841d
Merge branch '2.8'
weaverryanJul 15, 2015
2c6aa2f
Merge branch '2.8'
weaverryanJul 15, 2015
b77b148
Merge branch '2.8'
weaverryanJul 16, 2015
e166d69
Merge branch '2.8'
weaverryanJul 16, 2015
6603c33
Merge branch '2.8'
xabbuhJul 17, 2015
2a30c19
Merge branch '2.8'
wouterjJul 23, 2015
7711e97
Merge branch '2.8'
xabbuhJul 23, 2015
14b39c3
Merge branch '2.8'
wouterjJul 28, 2015
489adc2
Merge branch '2.8'
wouterjJul 28, 2015
dc93af2
Merge branch '2.8'
wouterjJul 28, 2015
fceaa9f
feature #5374 Remove deprecated parameters (norkunas)
wouterjJul 28, 2015
ee7f14f
Merge branch '2.8'
weaverryanAug 8, 2015
8a2205c
Merge branch '2.8'
wouterjAug 9, 2015
135d4b8
Added July changelog
wouterjAug 9, 2015
e0a8dfe
Merge branch '2.8'
wouterjAug 12, 2015
6fc096e
Merge branch '2.8'
xabbuhAug 18, 2015
b25b9e5
Merge branch '2.8'
xabbuhAug 19, 2015
feb2ab1
Remove mentions of Symfony1
wouterjJul 29, 2015
a991ea1
Merge branch '2.8'
weaverryanAug 21, 2015
26ca438
minor #5579 [3.0] Remove mentions of Symfony1 (WouterJ)
wouterjAug 22, 2015
7eaf928
Merge branch '2.8'
wouterjAug 23, 2015
a30b0fa
Merge branch '2.8'
weaverryanAug 28, 2015
1941e85
[#5480] Adding missing map entry (added 2 so it's easier to find)
weaverryanAug 28, 2015
3a4e8ca
Merge branch '2.8'
weaverryanAug 28, 2015
7c926c6
Merge branch '2.8'
wouterjSep 1, 2015
bb2f991
Added August changelog
wouterjSep 1, 2015
9f8d766
Merge branch '2.8'
weaverryanSep 2, 2015
b1ba29d
Merge branch '2.8'
wouterjSep 5, 2015
fbc7a8a
Merge branch '2.8'
xabbuhSep 23, 2015
a46560c
Merge branch '2.8'
xabbuhSep 23, 2015
194f5cc
Merge branch '2.8'
xabbuhSep 24, 2015
1b91720
Merge branch '2.8'
xabbuhOct 3, 2015
0e3f25b
Merge branch '2.8'
xabbuhOct 8, 2015
46096d3
Merge branch '2.8'
wouterjOct 11, 2015
b13593e
Merge branch '2.8'
xabbuhOct 12, 2015
a0b06ae
Merge remote-tracking branch 'origin/master'
weaverryanOct 14, 2015
9569e2d
Merge branch '2.8'
weaverryanOct 15, 2015
b785d35
Merge branch '2.8'
weaverryanOct 15, 2015
71d51f8
Merge branch '2.8'
xabbuhOct 17, 2015
d7ae2a0
Merge branch '2.8'
xabbuhOct 19, 2015
d8db51a
Merge branch '2.8'
xabbuhNov 1, 2015
8465e85
Merge branch '2.8'
xabbuhNov 5, 2015
267e898
Merge branch '2.8'
xabbuhNov 8, 2015
af97ce1
Merge branch '2.8'
xabbuhNov 26, 2015
8794a4d
app/console -> bin/console
wouterjNov 28, 2015
1461bdc
app/phpunit.xml.dist -> phpunit.xml.dist
wouterjNov 28, 2015
3318f2e
app/(cache|logs) -> var/(cache|logs)
wouterjNov 28, 2015
6b5c977
app/bootstrap.php.cache -> var/bootstrap.php.cache
wouterjNov 28, 2015
0d69414
Updating 'Exploring the Project'
wouterjNov 28, 2015
ed43015
Prefix commands with 'php'
wouterjNov 28, 2015
215c36d
[BestPractices] Use new directory structure
wouterjNov 28, 2015
c6d436b
[QuickTour] Use new directory structure
wouterjNov 28, 2015
bea4a0c
app/console -> bin/console
wouterjNov 28, 2015
b6d93f0
app/phpunit.xml.dist -> phpunit.xml.dist
wouterjNov 28, 2015
b3da3b7
app/cache -> var/cache
wouterjNov 28, 2015
6614c0f
app/logs -> var/logs
wouterjNov 28, 2015
af7052b
app/bootstrap.php.cache -> var/bootstrap.php.cache
wouterjNov 28, 2015
ef613f6
app/SymfonyRequirements.php -> bin/SymfonyRequirements.php
wouterjNov 28, 2015
df20095
Testing changes
wouterjNov 28, 2015
f2be12a
Updated directory structures
wouterjNov 28, 2015
47e11f8
Applied comments
wouterjNov 28, 2015
25ae8c1
Applied suggestions
wouterjNov 28, 2015
7bb2785
Merge branch '2.8'
weaverryanNov 30, 2015
35ae50c
Merge branch '2.8'
weaverryanNov 30, 2015
81c7572
Removed scopes article
wouterjNov 28, 2015
eff9733
removing more scope stuff
weaverryanNov 30, 2015
1a27539
removing scope reference
weaverryanNov 30, 2015
2daccc3
Merge branch '2.8'
weaverryanNov 30, 2015
dbf0d31
feature #5913 [3.0][Book] Use the 3.0 directory structure (WouterJ)
weaverryanNov 30, 2015
8236647
feature #5916 [3.0][Best Practices][Quick Tour] Use the 3.0 directory…
weaverryanNov 30, 2015
89f4d25
feature #5917 [3.0][Cookbook] Use the 3.0 directory structure (WouterJ)
weaverryanNov 30, 2015
0e53bb5
[#5917] Adding bin
weaverryanNov 30, 2015
3083e90
[#5917] Finding some more places with the old directory structure ref…
weaverryanNov 30, 2015
d577848
Update docs accordingly to min PHP version requirement
ogizanagiDec 3, 2015
7a64f05
feature #5948 Update 3.0 docs accordingly to min PHP version requirem…
wouterjDec 5, 2015
8c17033
[#5948] Very minor detail
wouterjDec 5, 2015
8d21262
Merge branch '2.8' into 3.0
xabbuhDec 9, 2015
dcde292
Merge branch '2.8' into 3.0
xabbuhDec 9, 2015
7d922b9
[#5956] change app/console back to bin/console
xabbuhDec 9, 2015
bf48c59
Merge branch '2.8' into 3.0
xabbuhDec 9, 2015
e19f7a1
[#5957] remove deep parameter documentation
xabbuhDec 9, 2015
55a015e
Merge branch '2.8' into 3.0
wouterjDec 12, 2015
276aa1f
Added october and november changelog
wouterjDec 12, 2015
744bed4
Merge branch '2.8' into 3.0
wouterjDec 12, 2015
3ad7f26
Merge branch '2.8' into 3.0
weaverryanDec 13, 2015
7c60ea1
Merge branch '2.8' into 3.0
xabbuhDec 17, 2015
a7effb8
Fix #6037
zsturgessDec 17, 2015
a6ed958
minor #6038 Fix #6037 (zsturgess)
xabbuhDec 17, 2015
4cd6dc2
Merge branch '2.8' into 3.0
wouterjDec 18, 2015
bfc54c6
Merge branch '2.8' into 3.0
wouterjDec 18, 2015
786096e
Update Symfony version to 3.0
wouterjDec 18, 2015
3b2939f
Update Symfony version to 3.1
wouterjDec 18, 2015
d5a2c06
Document constraint validator alias optional
Dec 5, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletionbest_practices/business-logic.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,6 +21,8 @@ Inside here, you can create whatever directories you want to organize things:
│ └─ AppBundle/
│ └─ Utils/
│ └─ MyClass.php
├─ tests/
├─ var/
├─ vendor/
└─ web/

Expand All@@ -40,6 +42,8 @@ and put things there:
│ │ └─ Utils/
│ │ └─ MyClass.php
│ └─ AppBundle/
├─ tests/
├─ var/
├─ vendor/
└─ web/

Expand DownExpand Up@@ -318,7 +322,7 @@ command:

.. code-block:: bash

$ phpapp/console doctrine:fixtures:load
$ phpbin/console doctrine:fixtures:load

Careful, database will be purged. Do you want to continue Y/N ? Y
> purging database
Expand Down
53 changes: 22 additions & 31 deletionsbest_practices/creating-the-project.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -27,7 +27,6 @@ to create files and execute the following commands:

.. code-block:: bash

# Linux, Mac OS X
$ cd projects/
$ symfony new blog

Expand DownExpand Up@@ -63,27 +62,35 @@ number of files and directories generated automatically:

blog/
├─ app/
│ ├─ console
│ ├─ cache/
│ ├─ config/
│ ├─ logs/
│ └─ Resources/
├─ bin
│ └─ console
├─ src/
│ └─ AppBundle/
├─ var/
│ ├─ cache/
│ ├─ logs/
│ └─ sessions/
├─ tests/
│ └─ AppBundle/
├─ vendor/
└─ web/

This file and directory hierarchy is the convention proposed by Symfony to
structure your applications. The recommended purpose of each directory is the
following:

* ``app/cache/``, stores all the cache files generated by the application;
* ``app/config/``, stores all the configuration defined for any environment;
* ``app/logs/``, stores all the log files generated by the application;
* ``app/Resources/``, stores all the templates and the translation files for the
application;
* ``src/AppBundle/``, stores the Symfony specific code (controllers and routes),
your domain code (e.g. Doctrine classes) and all your business logic;
* ``var/cache/``, stores all the cache files generated by the application;
* ``var/logs/``, stores all the log files generated by the application;
* ``var/sessions/``, stores all the session files generated by the application;
* ``tests/AppBundle/``, stores the automatic tests (e.g. Unit tests) of the
application.
* ``vendor/``, this is the directory where Composer installs the application's
dependencies and you should never modify any of its contents;
* ``web/``, stores all the front controller files and all the web assets, such
Expand DownExpand Up@@ -128,13 +135,18 @@ that follows these best practices:

blog/
├─ app/
│ ├─ console
│ ├─ cache/
│ ├─ config/
│ ├─ logs/
│ └─ Resources/
├─ bin/
│ └─ console
├─ src/
│ └─ AppBundle/
├─ tests/
│ └─ AppBundle/
├─ var/
│ ├─ cache/
│ ├─ logs/
└─ sessions/
├─ vendor/
└─ web/
├─ app.php
Expand All@@ -147,7 +159,7 @@ that follows these best practices:

.. code-block:: bash

$ phpapp/console generate:bundle --namespace=AppBundle --dir=src --format=annotation --no-interaction
$ phpbin/console generate:bundle --namespace=AppBundle --dir=src --format=annotation --no-interaction

Extending the Directory Structure
---------------------------------
Expand All@@ -157,27 +169,6 @@ structure of Symfony, you can
:doc:`override the location of the main directories </cookbook/configuration/override_dir_structure>`:
``cache/``, ``logs/`` and ``web/``.

In addition, Symfony3 will use a slightly different directory structure when
it's released:

.. code-block:: text

blog-symfony3/
├─ app/
│ ├─ config/
│ └─ Resources/
├─ bin/
│ └─ console
├─ src/
├─ var/
│ ├─ cache/
│ └─ logs/
├─ vendor/
└─ web/

The changes are pretty superficial, but for now, we recommend that you use
the Symfony directory structure.

.. _`Composer`: https://getcomposer.org/
.. _`Get Started`: https://getcomposer.org/doc/00-intro.md
.. _`Composer download page`: https://getcomposer.org/download/
Expand Down
4 changes: 0 additions & 4 deletionsbest_practices/introduction.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -76,12 +76,8 @@ installer and then execute this command to download the demo application:

.. code-block:: bash

# Linux and Mac OS X
$ symfony demo

# Windows
c:\> php symfony demo

**The demo application is a simple blog engine**, because that will allow us to
focus on the Symfony concepts and features without getting buried in difficult
implementation details. Instead of developing the application step by step in
Expand Down
4 changes: 2 additions & 2 deletionsbest_practices/tests.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -30,8 +30,8 @@ A functional test can be as easy as this:

.. code-block:: php

//src/AppBundle/Tests/ApplicationAvailabilityFunctionalTest.php
namespaceAppBundle\Tests;
//tests/AppBundle/ApplicationAvailabilityFunctionalTest.php
namespace Tests\AppBundle;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

Expand Down
3 changes: 2 additions & 1 deletionbook/bundles.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -107,6 +107,7 @@ Now that you've created the bundle, enable it via the ``AppKernel`` class::
{
$bundles = array(
// ...

// register your bundle
new Acme\TestBundle\AcmeTestBundle(),
);
Expand All@@ -122,7 +123,7 @@ generating a basic bundle skeleton:

.. code-block:: bash

$ phpapp/console generate:bundle --namespace=Acme/TestBundle
$ phpbin/console generate:bundle --namespace=Acme/TestBundle

The bundle skeleton generates a basic controller, template and routing
resource that can be customized. You'll learn more about Symfony's command-line
Expand Down
6 changes: 3 additions & 3 deletionsbook/configuration.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -122,13 +122,13 @@ FrameworkBundle configuration:

.. code-block:: bash

$app/console config:dump-reference FrameworkBundle
$php bin/console config:dump-reference FrameworkBundle

The extension alias (configuration key) can also be used:

.. code-block:: bash

$app/console config:dump-reference framework
$php bin/console config:dump-reference framework

.. note::

Expand DownExpand Up@@ -177,7 +177,7 @@ cached files and allow them to rebuild:

.. code-block:: bash

$ phpapp/console cache:clear --env=prod --no-debug
$ phpbin/console cache:clear --env=prod --no-debug

.. note::

Expand Down
2 changes: 1 addition & 1 deletionbook/controller.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -534,7 +534,7 @@ console command:

.. code-block:: bash

$ phpapp/console debug:container
$ phpbin/console debug:container

.. versionadded:: 2.6
Prior to Symfony 2.6, this command was called ``container:debug``.
Expand Down
24 changes: 12 additions & 12 deletionsbook/doctrine.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -116,7 +116,7 @@ for you:

.. code-block:: bash

$ phpapp/console doctrine:database:create
$ phpbin/console doctrine:database:create

.. sidebar:: Setting up the Database to be UTF8

Expand All@@ -128,8 +128,8 @@ for you:

.. code-block:: bash

$ phpapp/console doctrine:database:drop --force
$ phpapp/console doctrine:database:create
$ phpbin/console doctrine:database:drop --force
$ phpbin/console doctrine:database:create

There's no way to configure these defaults inside Doctrine, as it tries to be
as agnostic as possible in terms of environment configuration. One way to solve
Expand DownExpand Up@@ -227,7 +227,7 @@ just a simple PHP class.

.. code-block:: bash

$ phpapp/console doctrine:generate:entity
$ phpbin/console doctrine:generate:entity

.. index::
single: Doctrine; Adding mapping metadata
Expand DownExpand Up@@ -392,7 +392,7 @@ a regular PHP class, you need to create getter and setter methods (e.g. ``getNam

.. code-block:: bash

$ phpapp/console doctrine:generate:entities AppBundle/Entity/Product
$ phpbin/console doctrine:generate:entities AppBundle/Entity/Product

This command makes sure that all the getters and setters are generated
for the ``Product`` class. This is a safe command - you can run it over and
Expand DownExpand Up@@ -434,10 +434,10 @@ mapping information) of a bundle or an entire namespace:
.. code-block:: bash

# generates all entities in the AppBundle
$ phpapp/console doctrine:generate:entities AppBundle
$ phpbin/console doctrine:generate:entities AppBundle

# generates all entities of bundles in the Acme namespace
$ phpapp/console doctrine:generate:entities Acme
$ phpbin/console doctrine:generate:entities Acme

.. note::

Expand All@@ -459,7 +459,7 @@ in your application. To do this, run:

.. code-block:: bash

$ phpapp/console doctrine:schema:update --force
$ phpbin/console doctrine:schema:update --force

.. tip::

Expand DownExpand Up@@ -852,7 +852,7 @@ used earlier to generate the missing getter and setter methods:

.. code-block:: bash

$ phpapp/console doctrine:generate:entities AppBundle
$ phpbin/console doctrine:generate:entities AppBundle

Next, add a new method - ``findAllOrderedByName()`` - to the newly generated
repository class. This method will query for all the ``Product`` entities,
Expand DownExpand Up@@ -906,7 +906,7 @@ you can let Doctrine create the class for you.

.. code-block:: bash

$ phpapp/console doctrine:generate:entity --no-interaction \
$ phpbin/console doctrine:generate:entity --no-interaction \
--entity="AppBundle:Category" \
--fields="name:string(255)"

Expand DownExpand Up@@ -1063,7 +1063,7 @@ methods for you:

.. code-block:: bash

$ phpapp/console doctrine:generate:entities AppBundle
$ phpbin/console doctrine:generate:entities AppBundle

Ignore the Doctrine metadata for a moment. You now have two classes - ``Category``
and ``Product`` with a natural one-to-many relationship. The ``Category``
Expand DownExpand Up@@ -1092,7 +1092,7 @@ table, and ``product.category_id`` column, and new foreign key:

.. code-block:: bash

$ phpapp/console doctrine:schema:update --force
$ phpbin/console doctrine:schema:update --force

.. note::

Expand Down
2 changes: 0 additions & 2 deletionsbook/forms.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -95,8 +95,6 @@ from inside a controller::

$form = $this->createFormBuilder($task)
->add('task', TextType::class)
// If you use PHP 5.3 or 5.4 you must use
// ->add('task', 'Symfony\Component\Form\Extension\Core\Type\TextType')
->add('dueDate', DateType::class)
->add('save', SubmitType::class, array('label' => 'Create Task'))
->getForm();
Expand Down
5 changes: 1 addition & 4 deletionsbook/http_cache.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -145,12 +145,9 @@ To enable caching, modify the code of a front controller to use the caching
kernel::

// web/app.php
require_once __DIR__.'/../app/bootstrap.php.cache';
require_once __DIR__.'/../app/AppKernel.php';
require_once __DIR__.'/../app/AppCache.php';

use Symfony\Component\HttpFoundation\Request;

// ...
$kernel = new AppKernel('prod', false);
$kernel->loadClassCache();
// wrap the default AppKernel with the AppCache one
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp