Christophe Coevoet
de401fd94c
[DoctrineBundle] Fixed doctrine:generate:entities help message
2011-02-02 11:34:47 +01:00
Jeremy Mikola
4e0db56810
[Form] Fix getValidator() to reference the "validator" option instead of property
2011-02-02 11:34:18 +01:00
Fabien Potencier
209dcfefce
[From] fixed phpdoc
2011-02-02 11:34:10 +01:00
Jeremy Mikola
0169892dcd
[Security] Missing Event namespace in SwitchUserListener
2011-02-02 11:32:56 +01:00
Johannes M. Schmitt
2b697423b4
[Security] bug fix in FormAuthenticationEntryPoint
2011-02-02 11:31:28 +01:00
Sebastian Utz
4d5853866a
[Security] fixed a Token serialization bug
2011-02-02 11:31:28 +01:00
Johannes M. Schmitt
fbc21fedf7
[Security] some bug fixes
2011-02-02 11:31:28 +01:00
Thomas
7b9b90809a
fix variable name
2011-02-02 11:30:30 +01:00
Fabien Potencier
1893e4e250
[DoctrineMongoDBBundle] fixed merge problem
2011-02-01 16:51:54 +01:00
Johannes Schmitt
b484763a7a
[DependencyInjection] added first version of the config normalizer
...
This is mainly intended for complex configurations to ease the work you
have with normalizing different configuration formats (YAML, XML, and PHP).
First, you have to set-up a config tree:
$treeBuilder = new TreeBuilder();
$tree = $treeBuilder
->root('security_config', 'array')
->node('access_denied_url', 'scalar')->end()
->normalize('encoder')
->node('encoders', 'array')
->key('class')
->prototype('array')
->before()->ifString()->then(function($v) { return array('algorithm' => $v); })->end()
->node('algorithm', 'scalar')->end()
->node('encode_as_base64', 'scalar')->end()
->node('iterations', 'scalar')->end()
->end()
->end()
->end()
->buildTree()
;
This tree and the metadata attached to the different nodes is then used
to intelligently transform the passed config array:
$normalizedConfig = $tree->normalize($config);
2011-02-01 16:07:04 +01:00
Bernhard Schussek
a28151a8af
[Form] Removed FormFactory and improved the form instantiation process
...
With the form factory there was no reasonable way to implement instantiation of custom form classes. So the implementation was changed to let the classes instantiate themselves. A FormContext instance with default settings has to be passed to the creation method. This context is by default configured in the DI container.
$context = $this->get('form.context');
// or
$context = FormContext::buildDefault();
$form = MyFormClass::create($context, 'author');
If you want to circumvent this process, you can also create a form manually. Remember that the services stored in the default context won't be available then unless you pass them explicitely.
$form = new MyFormClass('author');
2011-02-01 15:27:12 +01:00
Bernhard Schussek
fb1f99137d
[Form] Changed semantics of a "bound" form
...
A form now always has to be bound, independent of whether the request is a POST request or not. The bind() method detects itself whether the request was a post request or not and reads its data accordingly. The "old" bind()/isBound() methods were renamed to submit()/isSubmitted().
$form = new Form('author');
$form->bind($request, $author);
if ($form->isValid()) {
// isValid() implies isSubmitted(), non-submitted forms can
// never be valid
// do something with author now
}
Alternatively, you can only bind global variables, if you don't have a request object.
$form->bindGlobals($author);
Note that the $author object is in both cases optional. You can also pass no object at all and read the data using $form->getData(), but then no validation will occur. You can also prefill the form with an object during instantiation.
$form = new Form('author', array('data' => $author));
$form->bind($request);
// etc.
2011-02-01 15:27:12 +01:00
Bernhard Schussek
e5ed98c324
[Form] Added option 'data' to Field for populating a field with a fixed value
2011-02-01 15:27:12 +01:00
Bernhard Schussek
fdbc064f06
[Form] Removed automatic distribution of the locale in the Form component. This leads to more problems than it solves.
2011-02-01 15:27:12 +01:00
Bernhard Schussek
c468db5c5b
[Form] Merged classes FieldGroup and Form for simplicity
2011-02-01 15:27:12 +01:00
Bernhard Schussek
7680657944
[Form] Form::isPostMaxSizeReached() only triggers for root forms
2011-02-01 15:27:12 +01:00
Bernhard Schussek
4fcb98547c
[Form] Simplified Form::bind(), added convenience methods Form::bindRequest() and Form::bindGlobals()
2011-02-01 15:27:12 +01:00
Bernhard Schussek
57cbd57265
[Form] Fields may now be anonymous, but anonymous fields must not be added to groups. They can only be used as prototypes
2011-02-01 15:27:12 +01:00
Bernhard Schussek
916e599937
[Form] Fixed broken namespace paths
2011-02-01 15:27:12 +01:00
Bernhard Schussek
d152b5e265
[Form] Moved Doctrine2 specific files
2011-02-01 15:27:12 +01:00
Bernhard Schussek
3bf9f7782d
[DoctrineBundle][Form] Implemented EntityFieldFactoryGuesser
2011-02-01 15:27:12 +01:00
Bernhard Schussek
347c069e8d
[DoctrineBundle][Form] Implemented EntityChoiceField
2011-02-01 15:27:12 +01:00
Lukas Kahwe Smith
46d900682f
is_scalar(null) !== true
2011-02-01 13:55:10 +01:00
Fabien Potencier
2889e91c27
[DoctrineMongoDBBundle] fixed unit tests
2011-02-01 13:35:39 +01:00
Victor Berchet
cb445b9ca0
[Container] Tweak code
2011-02-01 13:21:10 +01:00
Bulat Shakirzyanov
132e5805b3
[DoctrineMongoDBBundle] fixed annotations ns conflict, switched to @mongodb:Unique annotation
2011-02-01 13:19:37 +01:00
Bernhard Schussek
22c12e2c8f
[HttpFoundation] Fixed failing tests introduced in 8dd0c5641a
2011-01-31 15:38:13 +01:00
Fabien Potencier
2c4355460e
[HttpKernel] added a StoreInterface
2011-01-31 14:15:12 +01:00
Fabien Potencier
1babf3c7a1
[FrameworkBundle] added a safeguard for infinite loops on some Windows configurations
2011-01-31 08:54:05 +01:00
Fabien Potencier
839cb027a6
[HttpKernel] added a bootstrap file for HTTP cache front controllers
2011-01-31 08:30:32 +01:00
Fabien Potencier
b52e28243d
[HttpFoundation] added ApacheRequest
2011-01-31 08:28:55 +01:00
Fabien Potencier
8dd0c5641a
[HttpFoundation] made small optimizations
2011-01-31 08:26:40 +01:00
Damien Alexandre
56483dc14f
The ControlerResolver service as been moved in http_kernel
2011-01-30 20:17:31 +01:00
Victor Berchet
f470c5605e
[Request] Fix getting mime type
2011-01-30 20:14:40 +01:00
Bulat Shakirzyanov
d1cd442361
[FrameworkBundle] added session listener for test environment
2011-01-30 20:13:29 +01:00
Fabien Potencier
b1448ecdc7
[HttpFoundation] fixed typo
2011-01-30 20:13:00 +01:00
Fabien Potencier
b7a0f71b87
[FrameworkBundle] added more file to the class cache when using the PHP templating engine
2011-01-30 14:37:22 +01:00
Fabien Potencier
4e877a84ad
[FrameworkBundle] fixed router:apache-dump command
2011-01-30 11:37:38 +01:00
Fabien Potencier
0c439e2c64
updated bootstrap.php
2011-01-30 11:07:12 +01:00
Fabien Potencier
3686edf769
[ClassLoader] made a small optimization
2011-01-30 10:53:57 +01:00
Fabien Potencier
ee3d03ee8a
[HttpFoundation] made Request::create() overridable
2011-01-30 10:53:45 +01:00
Fabien Potencier
e081e5919e
reverted changes to the adaptive cache loader cache
2011-01-29 17:58:40 +01:00
Victor Berchet
5e5b6f0cf8
[HttpKernel] made sure that parent bundles are registered before their descendants
2011-01-29 16:38:06 +01:00
Dominique Bongiraud
996c2b0914
[HttpFoundation] Moved licence
2011-01-29 16:12:10 +01:00
Fabien Potencier
55f38e10af
[HttpKernel] simplified code
2011-01-29 15:36:57 +01:00
Fabien Potencier
5f11e49d0b
[HttpKernel] made exceptions more robust (avoid too deep nested arrays PHP errors)
2011-01-29 15:31:46 +01:00
Fabien Potencier
dacb25f13a
updated bootstrap.php
2011-01-29 15:20:21 +01:00
Fabien Potencier
025e142dd4
removed parameter converters as decided during IRC meeting (supported is still provided by FrameworkExtraBundle)
...
You must remove the configuration element if you had enabled the feature:
<app:param-converter />
2011-01-29 15:04:28 +01:00
Johannes Schmitt
36e30e21cd
[Security] some tests
2011-01-29 14:51:13 +01:00
Fabien Potencier
faf871990e
fixed CS
2011-01-29 12:21:55 +01:00
Miha Vrhovnik
6ee13a6b8d
Added optional parameter bundleName,
...
added namespace validation,
fixed dir trailing / handling
2011-01-29 12:18:44 +01:00
Fabien Potencier
8ac1a189bf
[HttpKernel] removed unnecessary code
2011-01-29 12:18:16 +01:00
Johannes M. Schmitt
f2a3135bd0
[Security] made a unique name required for each firewall
2011-01-29 10:22:27 +01:00
Lukas Kahwe Smith
2539da5e6a
[Security] added AbstractFactory
2011-01-29 10:22:27 +01:00
Johannes M. Schmitt
3ac4994507
[Security] added missing argument to SwitchUserListener
2011-01-29 10:22:27 +01:00
Johannes M. Schmitt
8a879531bd
[Security] added key normalization, and removed some conditionals
2011-01-29 10:22:27 +01:00
Johannes M. Schmitt
af696f6a65
[Security] allow custom logout handlers to be configured
2011-01-29 10:22:26 +01:00
Johannes M. Schmitt
e23f39c42f
[Security] config refactoring
2011-01-29 10:22:26 +01:00
Victor Berchet
65eb70d3b6
[Kernel] Tweak bundle management
2011-01-29 10:15:25 +01:00
Christophe Coevoet
96a0a7e7d1
Fixed SecurityDataCollector
2011-01-29 10:12:07 +01:00
Benjamin Eberlei
c4a2fb41ec
[DoctrineBundle] Shortened Dependency Injection Fixture namespace to avoid Windows filepath length error.
2011-01-29 10:11:21 +01:00
Benjamin Eberlei
6d6c9a5c9d
[DoctrineBundle] Small cleanup of Import Mapping.
2011-01-29 10:10:09 +01:00
Benjamin Eberlei
5014ee9739
[DoctrineBundle] More cleanups of doctrine commands.
2011-01-29 10:09:55 +01:00
Benjamin Eberlei
bdbfb44a96
[DoctrineBundle] First round of cleanup the Command namespace in DoctrineBundle
2011-01-29 10:09:42 +01:00
Benjamin Eberlei
394a60b4be
[DoctrineBundle] Fix getBundleMetadata helper function in DoctrineCommand
2011-01-29 10:09:25 +01:00
Sergey Linnik
92ddaa11cd
Fixed typo
2011-01-28 18:46:27 +01:00
Fabien Potencier
4e89fede54
[HttpKernel] removed a stupid line of code
2011-01-28 18:42:34 +01:00
Fabien Potencier
8df5d42009
[HttpKernel] fixed typo
2011-01-28 18:31:55 +01:00
Benjamin Eberlei
6ac5c298bd
[Console] Add missing method isInteractive() to InputInterface and added some docblock comments to all interface methods.
2011-01-28 18:28:17 +01:00
Jeremy Mikola
7b287550ff
[SecurityBundle] Remove obsolete "path" option from HttpBasicFactory
2011-01-28 18:26:49 +01:00
Bulat Shakirzyanov
5252d3aef0
[Serializer] switched to setEncoder, to be consistent with getEncoder
2011-01-28 18:24:34 +01:00
Johannes M. Schmitt
62d52d8015
enables normalizeConfig() to handle irregular plural forms, e.g. factory -> factories
2011-01-28 18:22:17 +01:00
Bulat Shakirzyanov
81219bba15
[Security] fixed typo
2011-01-28 18:20:59 +01:00
Bulat Shakirzyanov
799375dfd6
[EventDispatcher] removed unused class variable
2011-01-28 16:36:43 +01:00
Fabien Potencier
01439d5f14
updated bootstrap file
2011-01-28 10:11:09 +01:00
Bernhard Schussek
ebd2ca6cfe
[Form] Moved option 'empty_value' to ChoiceField. An empty value is displayed if the field is not required.
2011-01-28 09:22:06 +01:00
Bernhard Schussek
34865a3533
[Form] Added a field guess for AssertType('\DateTime') constraint
2011-01-28 09:20:58 +01:00
Bernhard Schussek
ce61baf717
[Form] ChoiceField now accepts closures in the 'choices' option
2011-01-28 09:20:41 +01:00
Bernhard Schussek
9e6e95d7e4
[Form] Fixed: required setting in FieldFactory is now properly overridable
2011-01-28 09:20:27 +01:00
Bernhard Schussek
0c3ca26e6e
[Validator] Implemented traversing of \Traversable objects using the @Valid constraint. Can be disabled by setting the @Valid option 'traverse' to false
2011-01-28 09:19:32 +01:00
Johannes Schmitt
803dd58002
add definition inheritance support
2011-01-28 09:12:29 +01:00
Lukas Kahwe Smith
26666a272d
fixed array support in twig globals
2011-01-27 21:48:20 +01:00
Fabien Potencier
98c1056fbf
renamed Request::fromGlobals() to Request::createFromGlobals() (for consistency with the existing create() method)
2011-01-27 21:20:08 +01:00
Kris Wallsmith
224e66f77b
[HttpFoundation] added static Request::fromGlobals()
...
The Request constructor no longer uses values from PHP's super globals. If you want a Request populated with these values you must use the new static method Request::fromGlobals().
Your front controllers (i.e. web/app.php, web/app_dev.php ...) will need to be updated:
// old
$kernel->handle(new Request())->send();
// new
$kernel->handle(Request::fromGlobals())->send();
2011-01-27 21:12:55 +01:00
Johannes M. Schmitt
f3c2e98b25
lazy-load the compiler, and related objects
2011-01-27 21:06:49 +01:00
Benjamin Eberlei
63375060e8
[DoctrineBundle] Refactor doctrine-1.0.xsd
2011-01-27 16:38:33 +01:00
Benjamin Eberlei
3c9c43d592
[DoctrineBundle] Add support to configure DBAL Types through the dbal configuration section.
2011-01-27 16:38:32 +01:00
Victor Berchet
cd96c91447
json_encode() syntax (fix commit fb889a2eee
)
2011-01-27 16:37:25 +01:00
Fabien Potencier
4ecafd883e
[FrameworkBundle] moved class cache loader earlier
2011-01-27 16:34:54 +01:00
Fabien Potencier
2509c9da4b
added an autoloader that uses a class map
...
A class in Symfony2 can be loaded by four different mechanisms:
* bootstrap.php: This file contains classes that are always required and
needed very early in the request handling;
* classes.php: This file contains classes that are always required and
managed by extensions via addClassesToCompile();
* MapFileClassLoader: This autoloader uses a map of class/file to load
classes (classes are managed by extensions via addClassesToAutoloadMap(),
and should contain often used classes);
* UniversalAutolaoder: This autoloader loads all other classes (it's the
slowest one).
2011-01-27 16:30:58 +01:00
Fabien Potencier
02820a5a56
[HttpKernel] fixed phpdoc
2011-01-27 16:30:58 +01:00
Fabien Potencier
532bbbde30
[SecurityBundle] fixed typo
2011-01-27 14:50:10 +01:00
Fabien Potencier
d5b540a4fe
[FrameworkBundle] made a small optimization
2011-01-27 14:32:30 +01:00
Fabien Potencier
249ed63373
[FrameworkBundle] made a small change
2011-01-27 14:14:15 +01:00
Fabien Potencier
95e10b3ed9
moved ClassLoaderCollection class to the ClassLoader component
2011-01-27 14:11:54 +01:00
Fabien Potencier
db818284af
moved class compiled in cache to the FrameworkBundle
2011-01-27 14:07:30 +01:00
Fabien Potencier
6997fbac0d
fixed previous commit
2011-01-27 13:58:21 +01:00
Johannes M. Schmitt
8ccb8eb8c2
added two events "security.interactive_login", and "security.switch_user"
2011-01-27 13:49:01 +01:00
Johannes M. Schmitt
00d3d8c3bc
renamed PreAuthenticatedListener to AbstractPreAuthenticatedListener to be consistent
2011-01-27 13:49:01 +01:00
Johannes Schmitt
139510a78e
added some doc comments
2011-01-27 13:49:00 +01:00