Commit Graph

2640 Commits

Author SHA1 Message Date
Jordi Boggiano
00c4267726 Update branch aliases 2012-04-27 12:47:50 +02:00
Douglas Greenshields
ca52348381 [Validator] fixed grammar in exception message 2012-04-27 03:15:37 +02:00
Fabien Potencier
95a03f82da [Validator] added CHANGELOG 2012-04-26 22:38:45 +02:00
Fabien Potencier
52e1fa97ee merged branch willdurand/validator-assertion (PR #4110)
Commits
-------

9328b28 [Validator] Added missing assertion

Discussion
----------

[Validator] Added missing assertion

There was no assertion before.
2012-04-25 18:09:31 +02:00
William DURAND
9328b28f95 [Validator] Added missing assertion 2012-04-25 16:05:39 +02:00
Fabien Potencier
76ef8da030 merged 2.0 2012-04-25 12:18:06 +02:00
Joseph Bielawski
fde94caad8 [Validator] Fixed example in README file (fixes #4088) 2012-04-23 18:53:08 +03:00
Fabien Potencier
a47a5aa52c merged branch umpirsky/issue-3379 (PR #3922)
Commits
-------

24bd8f4 Added missing dot to translation messages.
4bff221 Added missing dot to translation messages.
7454894 Added missing dot to translation messages.
6e90c50 Updated upgrade instructions.
7e21dd1 Added missing dot to translation messages.

Discussion
----------

Issue 3379

This should fix [issues 3379](https://github.com/symfony/symfony/issues/3379)

---------------------------------------------------------------------------

by stof at 2012-04-13T15:06:32Z

Your branch conflicts with master. Please rebase it

---------------------------------------------------------------------------

by umpirsky at 2012-04-13T19:11:54Z

@stof I tried to rebase, I'm not sure if I did everything right. Is it ok now?

---------------------------------------------------------------------------

by umpirsky at 2012-04-13T19:12:06Z

@stof I tried to rebase, I'm not sure if I did everything right. Is it ok now?

---------------------------------------------------------------------------

by mvrhov at 2012-04-13T19:19:34Z

IMHO no, because there are commits from other people. Did you follow the [instructions](http://symfony.com/doc/current/contributing/code/patches.html#id1)?

---------------------------------------------------------------------------

by stof at 2012-04-13T19:36:53Z

@mvrhov commits from others ?

---------------------------------------------------------------------------

by umpirsky at 2012-04-13T19:41:53Z

@stof There were some, so I reverted. Now I'm trying again following instructions from Symfony doc.

I come to this:

```
$ git push origin issue-3379
To git@github.com:umpirsky/symfony.git
 ! [rejected]        issue-3379 -> issue-3379 (non-fast-forward)
error: failed to push some refs to 'git@github.com:umpirsky/symfony.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again.  See the
'Note about fast-forwards' section of 'git push --help' for details.
```

And I don't know how to fix this. Any idea?

---------------------------------------------------------------------------

by stof at 2012-04-13T19:43:45Z

@umpirsky when you rebase, it is logical to need to force the push

---------------------------------------------------------------------------

by umpirsky at 2012-04-13T19:44:38Z

@stof I did `git push -f origin issue-3379`. I hope it's fixed now.

---------------------------------------------------------------------------

by maoueh at 2012-04-13T20:39:34Z

@umpirsky seems better than last time I checked :)

---------------------------------------------------------------------------

by umpirsky at 2012-04-13T20:43:04Z

@maoueh Is it good enough? :)

---------------------------------------------------------------------------

by maoueh at 2012-04-13T20:51:27Z

@umpirsky At least, the rebase seems good enough :D As for the subject of the PR, I don't pronounce myself ;)

---------------------------------------------------------------------------

by vicb at 2012-04-13T20:53:23Z

you should probably squash the commits
2012-04-18 11:57:20 +02:00
Fabien Potencier
99f8a3ce97 Merge branch '2.0'
* 2.0:
  Revert "merged branch jakzal/2.0-StaticMethodLoaderFix (PR #3937)"
  fixed CS
2012-04-18 11:42:52 +02:00
Fabien Potencier
29a41ec13b Revert "merged branch jakzal/2.0-StaticMethodLoaderFix (PR #3937)"
This reverts commit 0078faa84b, reversing
changes made to 098b934410.
2012-04-18 11:42:27 +02:00
Fabien Potencier
92b0824900 merged 2.0 2012-04-18 10:38:31 +02:00
Bernhard Schussek
5208bbec8a [Validator] Fixed typo, updated CHANGELOG and UPGRADE 2012-04-17 17:19:12 +02:00
Bernhard Schussek
dc059abc3c [Validator] Added default validate() implementation to ConstraintValidator for BC 2012-04-17 16:54:40 +02:00
Bernhard Schussek
6336d9314e [Validator] Renamed ConstraintValidatorInterface::isValid() to validate() because of the lack of a return value 2012-04-17 16:46:43 +02:00
Bernhard Schussek
46f0393f70 [Validator] Removed return value from ConstraintValidatorInterface::isValid() 2012-04-17 16:46:43 +02:00
Jakub Zalas
089188f603 [Validator] Fixed StaticMethodLoader when used with abstract methods. 2012-04-13 21:40:36 +01:00
Sasa Stamenkovic
4bff221e7b Added missing dot to translation messages. 2012-04-13 21:43:24 +02:00
Fabien Potencier
cc833b13b6 merged branch hason/validator (PR #552)
Commits
-------

f9a486e [Validator] Added support for pluralization of the SizeLengthValidator
c0715f1 [FrameworkBundle], [TwigBundle] added support for form error message pluralization
7a6376e [Form] added support for error message pluralization
345981f [Validator] added support for plural messages

Discussion
----------

[Validator] Added support for plural error messages

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Todo: create translations for en and update others (FrameworkBundle)

[![Build Status](https://secure.travis-ci.org/hason/symfony.png?branch=validator)](http://travis-ci.org/hason/symfony)

---------------------------------------------------------------------------

by fabpot at 2011-05-14T20:41:01Z

@bschussek: What's your opinion?

---------------------------------------------------------------------------

by stof at 2011-09-04T13:14:29Z

@hason could you rebase your branch on top of master and update the PR ?

You also need to change the messages in the constraint that uses the pluralization to a pluralized format.

---------------------------------------------------------------------------

by stof at 2011-10-16T18:06:22Z

@hason ping

---------------------------------------------------------------------------

by stof at 2011-11-11T14:58:19Z

@hason ping again

---------------------------------------------------------------------------

by stof at 2011-12-12T20:39:10Z

@hason ping again. Can you update your PR ?

---------------------------------------------------------------------------

by hason at 2011-12-12T21:29:14Z

@stof I hope that I will update PR this week.

---------------------------------------------------------------------------

by bschussek at 2012-01-15T19:07:32Z

Looks good to me.

---------------------------------------------------------------------------

by canni at 2012-02-02T17:28:54Z

@hason can you update this PR and squash commits, it conflicts with current master

---------------------------------------------------------------------------

by hason at 2012-02-09T07:21:41Z

@stof, @canni Rebased.

What is the best solution for the translation of messages?

1. Change messages in the classes and all xliff files?
2. Keep messages in the classes and change all xliff files?

---------------------------------------------------------------------------

by stof at 2012-02-09T08:19:41Z

The constraints contain the en message so you will need to modify them to update the message

---------------------------------------------------------------------------

by hason at 2012-02-09T08:55:55Z

I prefer second option. The Validator component should be decoupled from the Translation component. The constraints contain the en message which is also the key for Translation component. We should create validators.en.xlf in the FrameworkBundle for en message. I think that this is better solution. What do you think?

---------------------------------------------------------------------------

by stof at 2012-04-04T02:22:02Z

@hason Please rebase your branch. It conflicts with master because of the move of the tests

@fabpot ping
2012-04-11 16:12:39 +02:00
Fabien Potencier
3469713d90 merged branch kmohrf/ticket_2827_validator_mail_A_RR_DNS_hostcheck (PR #3799)
Commits
-------

f617e02 [Validator] added less-strict email host verification

Discussion
----------

[Validator] added less-strict email host verification

uhhhhh, my first pull request :>. uhm... tell me if i did something wrong :)

#### Request info
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes... well,not really (i guess master branch is not passing - at least i didnt broke the email test)
Fixes the following tickets: #2827

#### Description
New checkHost attribute in email constraint will make the validator check for only one of MX, A or AAAA DNS resource records to verify it as a valid email address.
2012-04-11 14:41:31 +02:00
Fabien Potencier
72e854e943 fixed CS 2012-04-07 09:10:50 +02:00
Konrad Mohrfeldt
f617e02a96 [Validator] added less-strict email host verification
New checkHost attribute in email constraint will
make the validator check for only one of MX, A or AAAA
DNS resource records to verify it as a valid
email address.
2012-04-06 02:33:41 +02:00
Jordi Boggiano
8ceb569b52 Fix typo 2012-04-05 19:10:13 +02:00
Jordi Boggiano
8702ea5f6d [Validator] Allow empty keys in the validation config 2012-04-05 17:21:24 +02:00
Eriksen Costa
2cac50d8a9 fixed CS (missing or misplaced license blocks) 2012-04-02 00:52:14 -03:00
Eriksen Costa
013f998bb8 updated license blocks 2012-03-31 18:00:32 -03:00
Victor Berchet
234ce4df9e [PhpUnit] Fix the path to the boostrap files in the components 2012-03-30 13:49:28 +02:00
Fabien Potencier
fea6b79acd moved component and bridge unit tests to the src/ directory
This is the first step to make each Symfony Component and Bridge self-contained.
2012-03-29 08:37:22 +02:00
Rafael Dohms
836d12b660 Fixing typo. 2012-03-19 23:29:43 +01:00
Rafael Dohms
ac2a187b4d Improved feedback for Upload Validator to cover all PHP error states.
This way we don't get a unclear "upload error" message unless its something completely unexpected.
2012-03-19 14:37:25 +01:00
Victor Berchet
99406eb761 Update src/Symfony/Component/Validator/Mapping/ClassMetadataFactory.php 2012-03-16 23:38:13 +01:00
Fabien Potencier
7a54fe41ca merged 2.0 2012-03-15 15:47:03 +01:00
Victor Berchet
93cc9efb8a [Validator] Remove a race condition in the ClassMetaDataFactory (fix #3217) 2012-03-13 10:54:33 +01:00
Fabien Potencier
595e6d6ca2 merged 2.0 2012-03-11 18:00:10 +01:00
Christophe Coevoet
f26c1ce98d Fixed constraint requirements for Doctrine Common 2012-03-11 02:47:07 +01:00
Jordi Boggiano
bafcaafbe6 Removed version field 2012-02-27 09:59:20 +01:00
Jordi Boggiano
f9d9dc7ce9 Add branch-alias for composer 2012-02-25 03:26:20 +01:00
Fabien Potencier
f373085928 merged 2.0 2012-02-22 18:59:56 +01:00
marc.weistroff
89868f7901 Updated LICENSE files copyright 2012-02-22 10:10:37 +01:00
Fabien Potencier
92cb685ebc fixed CS 2012-02-10 13:35:11 +01:00
Fabien Potencier
11e3516583 merged branch blogsh/dynamic_group_sequence (PR #3199)
Commits
-------

411a0cc [Validator] Added GroupSequenceProvider to changelog
815c769 [Validator] Renamed getValidationGroups to getGroupSequence
d84a2e4 [Validator] Updated test expectations
9f2310b [Validator] Fixed typos, renamed hasGroupSequenceProvider
e0d2828 [Validator] GroupSequenceProvider tests improved, configuration changed
c3b04a3 [Validator] Changed GroupSequenceProvider implementation
6c4455f [Validator] Added GroupSequenceProvider

Discussion
----------

[Validator] Added GroupSequenceProvider

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: ![](https://secure.travis-ci.org/blogsh/symfony.png?branch=dynamic_group_sequence)

As discussed in #3114 I implemented the "GroupSequenceProvider" pattern for the validator component. It allows the user to select certain validation groups based on the current state of an object. Here is an example:

    /**
     * @Assert\GroupSequenceProvider("UserGroupSequnceProvider")
     */
    class User
    {
        /**
         * @Assert\NotBlank(groups={"Premium"})
         */
        public function getAddress();

        public function hasPremiumSubscription();
    }

    class UserGroupSequenceProvider implements GroupSequenceProviderInterface
    {
        public function getValidationGroups($user)
        {
            if ($user->hasPremiumSubscription()) {
                return array('User', 'Premium');
            } else {
                return array('User');
            }
        }
    }

With this patch there are two mechanisms to define the group sequence now. Either you can use @GroupSequence to define a static order of validation groups or you can use @GroupSequenceProvider to create dynamic validation group arrays.
The ClassMetadata therefore has methods now which implement quite similar things. The question is whether it would make sense to interpret the static group sequence as a special case and create something like a DefaultGroupSequenceProvider or StaticGroupSequenceProvider which is assigned by default. This would cause a BC break inside the validator component.

---------------------------------------------------------------------------

by bschussek at 2012-01-28T13:39:54Z

I like the implementation, but I think we should differ a little bit from Java here.

1. `GroupSequenceProviderInterface` should be implemented by the domain classes themselves (`User`), not by a separate class.
2. As such, the parameter `$object` from `getValidationGroups($object)` can be removed
3. `ClassMetadata::setGroupSequenceProvider()` should accept a boolean to activate/deactivate this functionality. Also the check for the interface (does the underlying class implement it?) should be done here

Apart from that, special cases need to be treated:

* A definition of a group sequence and a group sequence provider in the same `ClassMetadata` should not be allowed. Either of them must not be set.
* Metadata loaders must take care of settings made by parent classes. If `Animal` is extended by `Dog`, `Animal` defines a group sequence (or group sequence provider) and `Dog` a group sequence provider (or group sequence), only the setting of `Dog` should apply

---------------------------------------------------------------------------

by blogsh at 2012-01-28T21:25:37Z

Changes of the latest commit:

- GroupSequenceProviderInterface has to be implemented by the domain class
- The annotation/configuration options let the user define whether the provider is activated or not (is this neccessary at all?)
- An error is thrown if the user wants to use static group sequences and the provider simultaneously

At the moment neither the static group sequence nor the provider is inherited from parent classes or interfaces. I don't know if it would make sense to enable this feature. There could be problems if a user wants to define a static group sequence in the parent class and a sequence provider in the child class.

---------------------------------------------------------------------------

by bschussek at 2012-01-30T13:07:04Z

> There could be problems if a user wants to define a static group sequence in the parent class and a sequence provider in the child class.

In this case, the setting in the child class should override the setting of the parent class.

But we can leave this open for now. As it seems, [this issue is unresolved in Hibernate as well](https://hibernate.onjira.com/browse/HV-467).

---------------------------------------------------------------------------

by blogsh at 2012-01-30T22:54:41Z

Okay, finally I managed to upload the latest commit. If you got a bunch of notifications or so I'm sorry, but I had to revert some accidental changes in the commit :(

I've rewritten the tests and have removed the "active" setting in the XML configuration.

---------------------------------------------------------------------------

by blogsh at 2012-02-02T15:24:01Z

Okay, typos are fixed now and `hasGroupSequenceProvider` has been renamed to `isGroupSequenceProvider`. I also had to adjust some tests after the rebase with master.

---------------------------------------------------------------------------

by bschussek at 2012-02-03T09:25:19Z

Looks good.

@fabpot 👍

---------------------------------------------------------------------------

by fabpot at 2012-02-03T09:46:52Z

Can you add a note in the CHANGELOG before I merge? Thanks.

---------------------------------------------------------------------------

by blogsh at 2012-02-09T12:31:27Z

@fabpot done
2012-02-09 13:39:47 +01:00
Martin Hasoň
f9a486edde [Validator] Added support for pluralization of the SizeLengthValidator 2012-02-09 07:57:22 +01:00
Martin Hason
345981f6b6 [Validator] added support for plural messages 2012-02-09 07:57:17 +01:00
Bernhard Schussek
78c145196b [Validator] Throwing exception in ConstraintValidator::setMessage() if initialize() wasn't called 2012-02-05 10:03:22 +01:00
Sebastian Hörl
815c769292 [Validator] Renamed getValidationGroups to getGroupSequence 2012-02-02 20:27:50 +01:00
Sebastian Hörl
9f2310b2f8 [Validator] Fixed typos, renamed hasGroupSequenceProvider 2012-02-02 20:27:50 +01:00
Sebastian Hörl
e0d28284fc [Validator] GroupSequenceProvider tests improved, configuration changed 2012-02-02 20:27:50 +01:00
Sebastian Hörl
c3b04a3336 [Validator] Changed GroupSequenceProvider implementation 2012-02-02 20:27:50 +01:00
Sebastian Hörl
6c4455fef7 [Validator] Added GroupSequenceProvider 2012-02-02 20:27:49 +01:00
Fabien Potencier
3c8d300125 fixed CS 2012-02-02 11:21:34 +01:00
Bernhard Schussek
2e4ebe444f [Validator] Renamed methods addViolationAtRelativePath() and getAbsolutePropertyPath() in ExecutionContext 2012-02-02 10:13:41 +01:00
Bernhard Schussek
9153f0e569 [Validator] Deprecated ConstraintValidator methods setMessage(), getMessageTemplate() and getMessageParameters()
Had to refactor the validation tests at the same time and fixed various small bugs while doing so.
2012-02-01 14:03:13 +01:00
Bernhard Schussek
0417282740 [Validator] Fixed typos 2012-02-01 09:21:22 +01:00
Bernhard Schussek
a30a679135 [Validator] Made ExecutionContext immutable and introduced new class GlobalExecutionContext
A new ExecutionContext is now created everytime that GraphWalker::walkConstraint() is
launched. Because of this, a validator B launched from within a validator A can't break
A anymore by changing the context.

Because we have a new ExecutionContext for every constraint validation, there is no point
in modifying its state anymore. Because of this it is now immutable.
2012-01-31 21:35:48 +01:00
Bernhard Schussek
fe85bbdb06 [Validator] Simplified ExecutionContext::addViolation(), added ExecutionContext::addViolationAt() 2012-01-31 18:42:14 +01:00
Bernhard Schussek
f77fd416c8 [Form] Fixed typos 2012-01-31 07:45:20 +01:00
Bernhard Schussek
1fc615cdcb Fixed string access by curly brace to bracket
This seems to be the version officially favored by PHP:
http://www.php.net/manual/en/language.types.string.php#language.types.string.substr
2012-01-31 07:39:54 +01:00
Bernhard Schussek
a103c28b08 [Validator] The Collection constraint adds "missing" and "extra" errors to the individual fields now 2012-01-30 20:57:20 +01:00
Bernhard Schussek
f904a9ed53 [Validator] Fixed: GraphWalker does not add constraint violation if error message is empty 2012-01-30 20:56:10 +01:00
Bernhard Schussek
1dd302cbea [Validator] Fixed ConstraintViolationList::__toString() to not include dots in the output if the root is empty 2012-01-30 18:43:47 +01:00
Bernhard Schussek
1678a3dbdf [Validator] Fixed: Validator::validateValue() propagates empty validation root instead of the provided value 2012-01-30 18:43:47 +01:00
Fabien Potencier
63adb97cf2 Revert "merged branch blogsh/dynamic_constraints (PR #3114)"
This reverts commit 6b9a355fb0, reversing
changes made to 811ead8589.
2012-01-22 16:50:02 +01:00
Fabien Potencier
6b9a355fb0 merged branch blogsh/dynamic_constraints (PR #3114)
Commits
-------

92f820a Renamed registerConstraints to loadDynamicValidatorMetadata
dd12ff8 CS fix, getConstraints renamed
09c1911 [Validator] Improved dynamic constraints
54cb6e4 [Validator] Added dynamic constraints

Discussion
----------

[Validator] Dynamic constraints

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes

By now the Validator component is based on a per-class configuration of
constraints, but in some cases it might be neccessary to add new constraints
dynamically at runtime.
This pull request adds a "ConstraintProviderInterface" to the Validator component. If an object is validated that implements this interface the method "getConstraints" is used to add dynamic constraints:

    class User implements ConstraintProviderInterface
    {
        protected $isPremium;
        protected $paymentInformation;

        public function getConstraints(ClassMetadata $metadata)
        {
            if ($this->isPremium) {
                $metadata->addPropertyConstraint('paymentInformation', new NotBlank());
            }
        }
    }

---------------------------------------------------------------------------

by alexandresalome at 2012-01-15T11:20:04Z

Related to #1151

---------------------------------------------------------------------------

by canni at 2012-01-16T09:22:28Z

👍

---------------------------------------------------------------------------

by bschussek at 2012-01-16T12:32:44Z

I think this is a good addition. I think we still have a naming problem though. When constraints are loaded using a static method, the default name for the loader method is `loadValidatorMetadata`. Since the method for dynamic constraint loading is basically the same, I think the two names should be related.

Solution (1): Rename the method in your interface to `loadDynamicValidatorMetadata`. Ugly and long.

    class MyClass implements ConstraintProviderInterface
    {
        public static loadValidatorMetadata(ClassMetadata $metadata) ...

        public loadDynamicValidatorMetadata(ClassMetadata $metadata) ...
    }

Solution (2): Rename the default method name in `StaticMethodLoader` to `registerConstraints` and adjust the docs. Breaks BC.

    class MyClass implements ConstraintProviderInterface
    {
        public static registerConstraints(ClassMetadata $metadata) ...

        public registerDynamicConstraints(ClassMetadata $metadata) ...
    }

@fabpot: Are we allowed to break BC here? If not, we should probably stick to (1).

---------------------------------------------------------------------------

by fabpot at 2012-01-16T12:36:14Z

I would prefer to not break BC if possible.

---------------------------------------------------------------------------

by blogsh at 2012-01-16T15:25:46Z

So "loadDynamicValidatorMetadata" would be the best solution?

---------------------------------------------------------------------------

by althaus at 2012-01-17T13:39:19Z

>So "loadDynamicValidatorMetadata" would be the best solution?

Sounds fine for me based on @bschussek's comment.
2012-01-22 10:26:39 +01:00
Sebastian Hörl
92f820a094 Renamed registerConstraints to loadDynamicValidatorMetadata 2012-01-18 22:24:42 +01:00
Fabien Potencier
e8f9a55012 fixed CS 2012-01-17 11:23:46 +01:00
Bernhard Schussek
509c7bfb5b [Validator] Moved Optional and Required constraints to dedicated sub namespace. 2012-01-16 11:30:56 +01:00
Bernhard Schussek
bf5901850a [Validator] Removed @api-tag from Optional and Required constraint, since these two are new. 2012-01-16 11:30:56 +01:00
Bernhard Schussek
6641f3e231 [Validator] Added constraints Optional and Required for the CollectionValidator 2012-01-16 11:30:56 +01:00
Fabien Potencier
5fa0f2d92b merged 2.0 2012-01-16 07:44:08 +01:00
Sebastian Hörl
dd12ff836d CS fix, getConstraints renamed 2012-01-15 13:11:15 +01:00
Sebastian Hörl
09c191136a [Validator] Improved dynamic constraints 2012-01-14 02:24:14 +01:00
Sebastian Hörl
54cb6e458e [Validator] Added dynamic constraints 2012-01-14 02:06:07 +01:00
Dariusz Górecki
253eebad88 [BugFix][Validator] Fix for PHP incosistent behaviour of ArrayAccess
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #2779
Todo: -

Because PHP function `array_key_exists` is buggy, it works great with native
PHP `ArrayObject` instances, but hand written implementations of `ArrayAccess`
and `Traversable` objects will fail to work with `CollectionValidator`
2012-01-10 11:06:00 +01:00
Fabien Potencier
8ce034fae0 Revert "merged 2.0"
This reverts commit 7000e944fd, reversing
changes made to 9d9013d662.
2012-01-08 20:43:02 +01:00
Fabien Potencier
7000e944fd merged 2.0 2012-01-05 14:54:04 +01:00
Fabien Potencier
208c2e468c removed the version attribute in all composer.json files 2012-01-05 14:51:20 +01:00
Fabien Potencier
5d6a7d35b0 merged 2.0 2011-12-18 14:48:17 +01:00
Fabien Potencier
4316595dbb fixed CS 2011-12-18 14:42:59 +01:00
Fabien Potencier
997f354d53 tweaked the README files 2011-12-18 14:22:28 +01:00
Fabien Potencier
0f2caf1106 merged branch lsmith77/component_readmes (PR #2561)
Commits
-------

1e370d7 typo fix
93d8d44 added some more infos about Config
27efd59 added READMEs for the bridges
34fc866 cosmetic tweaks
d6af3f1 fixed README for Console
6a72b8c added basic README files for all components

Discussion
----------

added basic README files for all components and bridges

heavily based on http://fabien.potencier.org/article/49/what-is-symfony2 and the official Symfony2 documentation

---------------------------------------------------------------------------

by jmikola at 2011/11/03 13:36:07 -0700

Great work. For syntax highlighting on the PHP snippets, you could add "php" after the three backticks.

---------------------------------------------------------------------------

by lsmith77 at 2011/11/03 13:41:29 -0700

done

---------------------------------------------------------------------------

by stealth35 at 2011/11/03 13:49:31 -0700

Nice job, but you also need to add `<?php`

ex :

``` php
<?php
use Symfony\Component\DomCrawler\Crawler;

$crawler = new Crawler();
$crawler->addContent('<html><body><p>Hello World!</p></body></html>');

print $crawler->filter('body > p')->text();
```

---------------------------------------------------------------------------

by lsmith77 at 2011/11/03 13:56:57 -0700

done

---------------------------------------------------------------------------

by ericclemmons at 2011/11/03 19:57:57 -0700

@lsmith77 Well done!  This makes consumption of individual components that much easier, *especially* now that `composer.json` files have been added.

---------------------------------------------------------------------------

by lsmith77 at 2011/11/04 01:18:23 -0700

ok .. fixed the issues you mentioned @fabpot

---------------------------------------------------------------------------

by lsmith77 at 2011/11/11 15:00:27 -0800

@fabpot anything else left? seems like an easy merge .. and imho there is considerable benefit for our efforts to spread the word about the components with this PR merged.

---------------------------------------------------------------------------

by drak at 2011/11/11 18:54:13 -0800

You know, it might be a nice idea to put a link to the documentation for each component if there is some at symfony.com

---------------------------------------------------------------------------

by lsmith77 at 2011/11/12 00:59:14 -0800

i did that in some. but i might have missed a few places.
On 12.11.2011, at 03:54, Drak <reply@reply.github.com> wrote:

> You know, it might be a nice idea to put a link to the documentation for each component if there is some at symfony.com
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/symfony/symfony/pull/2561#issuecomment-2715762

---------------------------------------------------------------------------

by breerly at 2011/11/21 10:28:36 -0800

Pretty excited with this.

---------------------------------------------------------------------------

by dbu at 2011/11/24 00:02:50 -0800

is there anything we can help with to make this ready to be merged?

---------------------------------------------------------------------------

by lsmith77 at 2011/12/18 02:39:23 -0800

@fabpot: seriously .. if you are not going to deliver something "better" and don't provide a reason what is wrong with this .. then its beyond frustrating. i obviously do not claim that these README's are perfect (and certainly still no replacement for proper documentation), but I do claim that in their current form they are a radical step forward to potential users of the Symfony2 components.
2011-12-18 12:42:02 +01:00
Fabien Potencier
a6cdddd716 merged 2.0 2011-12-14 19:13:35 +01:00
Fabien Potencier
12ea7568a0 merged branch pulzarraider/explode_optimalisation (PR #2782)
Commits
-------

cd24fb8 change explode's limit parameter based on known variable content
b3cc270 minor optimalisations for explode

Discussion
----------

[FrameworkBundle][CssSelector][HttpFoundation][HttpKernel] [Security][Validator] Minor optimizations for "explode" function

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -

I added limit parameter in some places, where it may be usefull. I did not check the context of what values may have been exploded. So to not break anything, I added +1 to limit parameter.

If you find out that in some places limit (or limit+1) is not important or meaningless, write a comment please and I will fix it.

---------------------------------------------------------------------------

by fabpot at 2011/12/07 06:56:49 -0800

Adding +1 just to be sure to not break anything is clearly something we won't do. What is the benefit of doing that anyway?

---------------------------------------------------------------------------

by pulzarraider at 2011/12/07 13:50:24 -0800

The main idea of making this PR was to notify about some places that may run faster with just adding one parameter to explode function.

If in code is someting like: ```list($a, $b) = explode(':', $s);```
Function ```explode``` will create n-items (depends on ```$s```), but we need in code only the first two items. There is no reason to let ```explode``` create more items in memory that are NEVER used in our code. The limit parameter is there for these situations, so let's use it.

I know that it is microoptimization and may look unimportant, but we are writing a framework - so people expect that code will be as fast as possible without this kind of mistakes.

As I've noticed above, I know that +1 is not ideal solution, but the fastest without debugging the code. I expect that someone (with good knowledge of that code) will look at it and write in comments if variable may contain 1 comma (dot or someting on what is doing the explode) or maybe 2 in some situations or more.

Anyway, +1 will not break anything, because same items are created as it is now, but no unnecessary item is created.

---------------------------------------------------------------------------

by fabpot at 2011/12/07 23:14:59 -0800

I'm +1 for adding the number to avoid problems but I'm -1 on the optimization side of things as it won't optimize anything.

---------------------------------------------------------------------------

by helmer at 2011/12/08 12:46:49 -0800

*.. The main idea of making this PR was to notify about some places that **may** run faster ..*

I am also unsure the optimization is really an optimization, care to benchmark (with meaningful inputs)? As for the limit+1 thing, why would you want to +1 it? The number of ``list`` arguments should always reflect the ``limit`` parameter, no?

---------------------------------------------------------------------------

by pulzarraider at 2011/12/08 23:11:34 -0800

@helmer please try this simple benchmark:

```
<?php

header('Content-Type: text/plain; charset=UTF-8');
define('COUNT', 10000);

$source_string = 'aaaaaaaaaaaaaaaaaaaa:bbbbbbbbbbbbbbbbbbbbb:cccccccccccccccccccccccc:dddddddddddddddddddddd:eeeeeeeeeeeeeeeeeeeeeeeee:fffffffffffffffffffffffffff';

$start = microtime(true);
for ($i = 0; $i < COUNT; $i++) {
    list($a, $b) = explode(':', $source_string);
}
$end = microtime(true)-$start;
echo 'without limit: '.$end."\n";

$start = microtime(true);
for ($i = 0; $i < COUNT; $i++) {
    list($a, $b) = explode(':', $source_string, 2);
}
$end = microtime(true)-$start;
echo 'with limit:    '.$end."\n";
```

My results are:

```
without limit: 0.057228803634644
with limit:    0.028676986694336
```
That is 50% difference (with APC enabled).  Of course the result depends on the length of source string and if it's too short, the difference may be none or very very small. That's why I said, that it **may** run faster and is just a micro optimization.

---------------------------------------------------------------------------

by pulzarraider at 2011/12/08 23:18:12 -0800

@helmer And why +1? It depends on a code:

```
$source_string = 'aaaaaaaaaaaaaaaaaaaa:bbbbbbbbbbbbbbbbbbbbb:cccccccccccccccccccccccc';
list($a, $b) = explode(':', $source_string, 2);
var_dump($a, $b);
```

and

```
$source_string = 'aaaaaaaaaaaaaaaaaaaa:bbbbbbbbbbbbbbbbbbbbb:cccccccccccccccccccccccc';
list($a, $b) = explode(':', $source_string, 3);
var_dump($a, $b);
```
gives different results. That's why the content of the variable must be known.

---------------------------------------------------------------------------

by helmer at 2011/12/09 00:08:28 -0800

@pulzarraider Thanks for the benchmark, seems like a gain enough. Although, we are more likely having a scenario of:
``explode(':', 'a🅱️c')`` vs ``explode(':', 'a🅱️c', 3)`` with a ``COUNT`` of 10, where the difference is not even in microseconds anymore :)

The limit addition alters the behaviour though, ie suddenly you can define a controller [logical name](http://symfony.com/doc/current/book/routing.html#controller-string-syntax) as ´´AcmeBlogBundle:Blog:show:something``, and things go downhill from there on.

All that aside, I'm +1 for setting the limit to the exact number of ``list`` parameters, but certainly not number+1, this is just too wtfy (as you said, this was a safety thing, but I reckon for this PR to be merged it needs to be +0).

---------------------------------------------------------------------------

by drak at 2011/12/09 08:28:58 -0800

Overall `list()` is ugly as it's not very explicit.  Even though it would mean extra lines, it's better to `explode()` then explicitly assign variables:

```
$parts = explode(':', $foo);
$name = $parts[0];
$tel = $parts[1];
```

`list()` is one of those bad relics from the PHP past...

---------------------------------------------------------------------------

by fabpot at 2011/12/11 10:07:47 -0800

@drak: why is `list` not explicit? It is in fact as explicit as the more verbose syntax you propose.

---------------------------------------------------------------------------

by pulzarraider at 2011/12/11 13:08:50 -0800

@drak: I agree with @fabpot. In speech of benchmarks ```list``` is faster then using a helper variable.

@fabpot, @helmer I've changed explode's limit to be correct (without +1) and removed some changes from this PR, where I can't find out what the content of variable may be. Unit tests pass, so I think it's ready for merge.
2011-12-13 17:39:32 +01:00
Fabien Potencier
142cef21bb merged 2.0 2011-12-13 16:12:53 +01:00
Fabien Potencier
e3421a0b1d [DoctrineBridge] fixed some CS 2011-12-13 10:22:12 +01:00
Andrej Hudec
cd24fb86a8 change explode's limit parameter based on known variable content 2011-12-11 21:58:35 +01:00
Andrej Hudec
b3cc270450 minor optimalisations for explode 2011-12-11 21:58:30 +01:00
Fabien Potencier
4730f4303b merged 2.0 2011-12-08 15:36:57 +01:00
meze
03ed770d35 [Validator] The current class isn't set in execution context when doing validateProperty() 2011-12-07 16:20:32 +01:00
Fabien Potencier
2b5d4b90d8 merged 2.0 2011-11-24 07:16:52 +01:00
Fabien Potencier
5878490b16 removed unused use statements 2011-11-24 07:16:14 +01:00
Fabien Potencier
a7f7be2309 merged 2.0 2011-11-23 23:28:22 +01:00
Jordi Boggiano
c76487ee04 Fix composer.json files to be stricter 2011-11-23 17:51:23 +01:00
Jordi Boggiano
e7215aeb40 Fix composer.json 2011-11-23 16:10:32 +01:00
Fabien Potencier
d1ae6c7cb6 bumped Symfony version in composer.json files to 2.0.7 2011-11-17 06:58:47 +01:00
Fabien Potencier
b8e0f411d7 merged 2.0 2011-11-11 23:22:38 +01:00
Fabien Potencier
fb0fffe6db [Validator] fixed a unit test for PHP 5.4 (closes #2585) 2011-11-11 23:22:12 +01:00
Joseph Rouff
fb0379d3b7 Fix some CheckStyle violations on Components.
On casts, Control signature etc.
2011-11-11 20:46:32 +01:00
Lukas Kahwe Smith
6a72b8c6b9 added basic README files for all components
heavily inspired by http://fabien.potencier.org/article/49/what-is-symfony2 and the official Symfony2 documentation
2011-11-03 21:11:40 +01:00
Fabien Potencier
f8f622b39c bumped Symfony version to 2.0.6-DEV 2011-11-02 14:18:45 +01:00
Fabien Potencier
7f21a5e979 bumped Symfony version in composer.json files to 2.0.5 2011-11-02 12:42:41 +01:00
Fabien Potencier
04a1deace0 updated CHANGELOG for 2.1 2011-11-01 15:30:43 +01:00
Benjamin Dulau
05a4e9d386 [Validators][Type] Added support for ctype_* functions + tests 2011-11-01 13:01:54 +01:00
Fabien Potencier
8a62e3249f merged 2.0 2011-11-01 12:32:44 +01:00
Fabien Potencier
d7a5351aaa updated composer.json files to contain information about autoloading and target dirs 2011-11-01 12:30:24 +01:00
Fabien Potencier
d34d50f0b0 fixed CS 2011-10-29 12:05:45 +02:00
Fabien Potencier
dec43f5539 merged 2.0 2011-10-29 12:01:39 +02:00
Fabien Potencier
851eb73778 removed unused use statements 2011-10-29 11:56:30 +02:00
Fabien Potencier
f1e9709742 updated composer.json files 2011-10-16 03:38:02 +02:00
Fabien Potencier
ae8efc4da9 merged 2.0 2011-10-16 03:34:55 +02:00
Igor Wiedler
575771380b [composer] add doctrine and twig dependencies 2011-10-15 16:55:54 +02:00
Hugo Hamon
73312ab5e9 [Validator] The Type constraint now accepts the "Boolean" type instead of "boolean".
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
2011-10-11 12:27:45 +02:00
Fabien Potencier
245ff6d7a8 updated composer.json for 2.1 2011-09-29 17:40:43 +02:00
Fabien Potencier
f5ab6ec934 Merge branch '2.0'
* 2.0:
  [composer] add missing deps for FrameworkBundle
  [composer] change ext/intl to the new ext-intl syntax
  [composer] fix monolog-bridge composer.json, add more inter-component deps
  [composer] add composer.json
2011-09-29 17:29:32 +02:00
Fabien Potencier
5c760b0d40 merged branch igorw/composer (PR #2275)
Commits
-------

731b28b [composer] add missing deps for FrameworkBundle
9c8f100 [composer] change ext/intl to the new ext-intl syntax
d535afe [composer] fix monolog-bridge composer.json, add more inter-component deps
9ade639 [composer] add composer.json

Discussion
----------

Composer

This PR adds a composer.json file for [composer](https://github.com/composer/composer) ([more info](packagist.org/about-composer)).

For discussion you can also go into #composer-dev on freenode and argue with naderman, seldaek and everzet.

---------------------------------------------------------------------------

by naderman at 2011/09/26 15:51:51 -0700

You haven't entered any keywords, they might come in handy when searching for packages on packagist.

But really this is just a +1 ;-)

---------------------------------------------------------------------------

by stof at 2011/09/26 16:12:21 -0700

See my comments on your previous (non-rebased) commit: f1c0242b5a

---------------------------------------------------------------------------

by igorw at 2011/09/27 00:04:36 -0700

Following dependencies do not have a composer.json yet: Twig, Doctrine (orm, dbal, common), swiftmailer.

Also missing from the standard edition: assetic, twig-extensions, jsm-metadata, SensioFrameworkExtraBundle, JMSSecurityExtraBundle, SensioDistributionBundle, SensioGeneratorBundle, AsseticBundle.

The point is, those can be added later on. Having the components composerized is already a leap forward. Also, doctrine depends on some symfony components, we've got to start somewhere.

---------------------------------------------------------------------------

by Seldaek at 2011/09/27 00:36:41 -0700

Also, just for information, the plan is to have `symfony/framework-bundle` be the "framework", with all dependencies to doctrine etc, though we should really only have strict requirements in there, and then in symfony-standard we ship a composer.json that requires the framework-bundle, doctrine-orm and things like that that are not essential to core. Otherwise people don't have a choice about what they use anymore.

Just a comment btw, the json is invalid, all / should be escaped. However json_decode is nice enough to parse those without complaining, browsers do too, even Crockford's json2.js does, so I'm not sure if we should privilege readability over strictness, since it seems nobody really cares about this escaping.

---------------------------------------------------------------------------

by igorw at 2011/09/27 00:41:39 -0700

So, I've implemented all of @stof's suggestions, except (for reasons stated above):

* doctrine to DoctrineBundle
* swiftmailer to SwiftmailerBundle
* twig to TwigBundle
* doctrine-common to Validator
* FrameworkBundle (what exactly does it depend on?)

---------------------------------------------------------------------------

by stof at 2011/09/27 00:52:31 -0700

@igorw at least HttpKernel, Routing, Templating, EventDispatcher, Doctrine Common (annotations cannot be disabled), Translator, Form (optional), Validator (optional), Console (optional). See the service definitions to see the others

@Seldaek FrameworkBundle does not depend on Doctrine, except for Common

---------------------------------------------------------------------------

by beberlei at 2011/09/27 03:15:34 -0700

What does the symfony/ or ext/ prefix control in composer?

---------------------------------------------------------------------------

by Seldaek at 2011/09/27 03:33:52 -0700

symfony/ is just the (mandatory) vendor namespace. Also ext/ has been renamed to ext- now, so it's not in any vendor, and should avoid potential issues.

---------------------------------------------------------------------------

by beberlei at 2011/09/27 05:07:03 -0700

@Seldaek Mandatory? So every package name is "vendor/package"? I like that because previously i thought package names are not namespaced, and thus clashes could occur between different communities easily.

---------------------------------------------------------------------------

by Seldaek at 2011/09/27 05:16:20 -0700

@beberlei: Mandatory. As of yesterday http://packagist.org/ will tell you you have an invalid package name if there's no slash in it. See 1306d1ca82 (diff-3)
2011-09-29 17:27:38 +02:00
Fabien Potencier
41a55ba8d7 Merge branch '2.0'
* 2.0:
  [Validator] added support for grapheme_strlen when mbstring is not installed but intl is installed
  removed separator of choice widget when the separator is null
2011-09-29 16:17:23 +02:00
Fabien Potencier
1cf3e91365 [Validator] added support for grapheme_strlen when mbstring is not installed but intl is installed 2011-09-29 16:17:19 +02:00
Fabien Potencier
600b8ef5af [Validator] added support for grapheme_strlen when mbstring is not installed but intl is installed 2011-09-29 16:15:57 +02:00
Fabien Potencier
d6c4bfb001 added a Size validator 2011-09-29 15:56:37 +02:00
Fabien Potencier
b9ba117208 [Validator] added a SizeLength validator 2011-09-29 15:45:52 +02:00
Fabien Potencier
e02915b09d Merge branch '2.0'
* 2.0:
  fixed usage of LIBXML_COMPACT as it is not always available
  Fixed the phpdoc
2011-09-28 21:56:42 +02:00
Fabien Potencier
17af13813a fixed usage of LIBXML_COMPACT as it is not always available 2011-09-28 21:54:54 +02:00
Igor Wiedler
9ade639bb4 [composer] add composer.json 2011-09-27 00:55:43 +02:00
jdreesen
1134c1a1d8 [Validator] Fixed typo in Image constraint 2011-09-06 16:59:08 +02:00
Arnout Boks
522addebe5 [Validator] Fixed typo in Image constraint 2011-09-06 14:34:25 +02:00
Benjamin Dulau
89f4791704 Fixed CS 2011-09-04 19:10:51 +02:00
Benjamin Dulau
a348efec19 Removed trailing whitespaces 2011-09-04 18:12:05 +02:00
Benjamin Dulau
6ad83e7970 Updated according to PR review 2011-09-04 17:45:25 +02:00
Benjamin Dulau
a5a2dfaaa6 [ImageValidator] Added dedicated ImageValidator class with min width, max width, min height and max height validations 2011-09-04 17:28:46 +02:00
Fabien Potencier
e7b2d2d659 merged 2.0 branch 2011-09-04 09:28:37 +02:00
Fabien Potencier
adb7291b67 Merge branch 'EvanK-patch-1' into 2.0
* EvanK-patch-1:
  Per the [documentation][1], the `NotBlank` constraint should be using the `empty` language construct, otherwise it will not trigger on, for example, a boolean false from an unchecked checkbox field.
2011-09-02 09:39:11 +02:00
Evan Kaufman
639513a67a Per the [documentation][1], the NotBlank constraint should be using the empty language construct, otherwise it will not trigger on, for example, a boolean false from an unchecked checkbox field.
[1]: http://symfony.com/doc/2.0/reference/constraints/NotBlank.html
2011-09-02 09:37:48 +02:00
Fabien Potencier
74a77af694 merged branch stealth35/mime_wildcard (PR #2075)
Commits
-------

5a47010 [Validator] FileValidator allow MIME with wildcard

Discussion
----------

[Validator] FileValidator allow MIME with wildcard

 - Allow MIME with wildcard like `image/*`
 - Image constraint use wildcard mime

(squash failed sorry #2068)
2011-09-01 16:19:23 +02:00
stealth35
5a470103f0 [Validator] FileValidator allow MIME with wildcard 2011-09-01 16:10:16 +02:00
Fabien Potencier
0eae562cb2 converted file_exists calls to either is_file or is_dir where it makes sense 2011-08-29 15:28:26 +02:00
Fabien Potencier
ea800c2e51 merged branch hidenorigoto/validator_pattern_late_static_bind (PR #1914)
Commits
-------

275da0d [Validator] changed 'self' to 'static' for child class to override pattern constant

Discussion
----------

[Validator] change 'self::' to 'static::' for PATTERN constant overridable in child classes

In TimeValidator and UrlValidator, PATTERN constant is not used with late static bind(static::) while DateValidator supports it.
2011-08-19 14:11:41 +02:00
Hugo Hamon
d7c93cacd0 [Validator] fixed phpdoc. 2011-08-10 16:11:31 +02:00
hidenorigoto
275da0d478 [Validator] changed 'self' to 'static' for child class to override pattern constant 2011-08-07 15:48:14 +09:00
Fabien Potencier
b36c002fa4 [Validator] tagged the public @api 2011-07-20 10:37:57 +02:00
Deni
0f328d228b [Validator] Fixed using the strict option in the choice validator. 2011-07-16 21:16:21 +04:00
Fabien Potencier
c04512086e [Validator] fixed error message property path when a collection error occurs 2011-07-16 00:29:54 +02:00
Fabien Potencier
fe6f23163e removed unused use statements 2011-07-12 17:58:39 +02:00
Fabien Potencier
88d915d175 [Validator] fixed Min and Max validator when the input value is not a number (now return an error message instead of an exception which does not make sense in this context) 2011-07-12 17:40:02 +02:00
Fabien Potencier
4a7b7597d8 merged branch marcw/validator-choice (PR #1577)
Commits
-------

df57e0f [Validator] Added strict option to ChoiceConstraint.

Discussion
----------

[Validator] Added strict option to ChoiceConstraint.

By default, ChoiceValidator was ensuring strict type when checking if value is present in choices. This behavior is a problem when you want to validate against integer values. As all data you will receive from a request will be typed as a string, you won't be able to validate these numeric values.
This patch solves this.

In order for being nice to developers, I've set "strict" to false by default.
2011-07-09 09:19:08 +02:00
marc.weistroff
df57e0fe9a [Validator] Added strict option to ChoiceConstraint. 2011-07-07 15:11:36 +02:00
Victor Berchet
6786e81f61 [HttpFoundation] code factorization in UploadedFile 2011-07-07 10:47:10 +02:00
Fabien Potencier
b9adab9796 merged branch vicb/form/ini-max-size (PR #1542)
Commits
-------

d58ba34 [Validator] Consider the ini directive 'upload_max_filesize' while validating an uploaded file (fixes GH-1441)

Discussion
----------

[Validator] FileValidator support for uploaded files

[Validator] Consider the ini directive 'upload_max_filesize' while validating an uploaded file (fixes GH-1441)

Added validator messages should get translated in all the available languages.
2011-07-06 14:22:15 +02:00
Fabien Potencier
082473659e fixed validation of Doctrine proxy objects 2011-07-06 13:03:38 +02:00
Victor Berchet
d58ba34246 [Validator] Consider the ini directive 'upload_max_filesize' while validating an uploaded file (fixes GH-1441) 2011-07-05 20:05:50 +02:00
Fabien Potencier
cf1714c9db [Validator] fixed non-anchored regex 2011-07-05 19:49:32 +02:00
Victor Berchet
2af2260c34 Remove useless code 2011-07-04 14:08:20 +02:00
Johannes Schmitt
efcb435268 updated to doctrine changes 2011-06-30 12:03:19 +02:00
Fabien Potencier
f57e1d3e10 fixed CS 2011-06-23 14:07:53 +02:00
Fabien Potencier
482492625d [Validator] restricted the True and False validator accepted values (the notion of True/False in PHP alone is too large) 2011-06-23 08:49:04 +02:00
Fabien Potencier
1c36d5a529 [Validator] tweaked previous merge 2011-06-21 21:30:03 +02:00
Sebastian Hörl
2f78a44175 Changed recognition of constraints in annoations 2011-06-21 19:30:26 +02:00
Jordi Boggiano
159fc0edf0 [Validator] Added symbols to IDNs validation 2011-06-20 13:52:36 +02:00
Jordi Boggiano
c827faf694 [Validator] Add support for IDNs and custom TLDs 2011-06-20 12:57:46 +02:00
Fabien Potencier
c5223bbcd1 merged branch vicb/file (PR #1317)
Commits
-------

9d6357c [HttpFoundation] Document the changes to the File classes
136b80a [HttFoundation] Add File::getExtension() as \SplFileInfo::getExtension() was introduced in PHP 5.3.6
38b3b74 [HttpKernel] Fix and test previous commit
ac0c00c [HttpFoundation] Make File extends \SplFileInfo

Discussion
----------

[HttpFoundation] Make File extends \SplFileInfo

This is a rebased version of [PR 674](https://github.com/symfony/symfony/pull/674).

  * File: The API has changed (now extends \SplFileInfo),
  * File: move() creates the target directory when it does not exist
  * UploadedFile: introduction of getClientXXX() methods (for Size, OriginalName, MimeType)

If this PR does not get merged UploadedFile should at least be fixed: [Client.php](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/Client.php#L124) relies on a last parameter which is no more defined and which is used to bypass [move_uploaded_file()](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/File/UploadedFile.php#L155) in test mode.

If this could be merged, I'll detail the changes in UPDATE.md

---------------------------------------------------------------------------

by fabpot at 2011/06/14 08:20:59 -0700

I'll merge it. Can you update the UPDATE file?

---------------------------------------------------------------------------

by vicb at 2011/06/14 09:24:01 -0700

done
2011-06-15 08:57:16 +02:00
Fabien Potencier
3859589daa [Yaml] renamed load() to parse() 2011-06-14 16:25:25 +02:00
Fabien Potencier
a232c148eb fixed CS 2011-06-14 12:54:32 +02:00
Fabien Potencier
a7c1ff8558 merged branch ajessu/time_validator (PR #1254)
# Commits

ca52a04 [Validator] Allow DateTime objects as valid Times

# Discussion

## [Validator] Allow DateTime objects as valid Times

Also added tests for `DateTime` objects as valid on `Date` and `Time` constraints.

I didn't include the test for the `DateTime` constraint, as it's already included in this PR:

https://github.com/symfony/symfony/pull/1085

---------------------------------------------------------------------------

## fabpot @ 2011/06/09 09:07:21 -0700

I don't think it makes sense to use a \DateTime instance to represent a Time.

---------------------------------------------------------------------------

## ajessu @ 2011/06/09 09:33:20 -0700

If I have an entity with a doctrine type `Time`:

    Time (DateTime instance where only H:i:s get persisted)

```php
<?php
    /**
     * @ORM\Column(type="time")
     * @Assert\Time()
     */
    protected $startTime;
```

and I create a form out of this Entity, a `DateTime` object is passed when the form is submitted.

This generates an `UnexpectedTypeException`.

I just made this change to match the `Date` validator with the doctrine type `Date`, which also shares this behavior:
https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Validator/Constraints/DateValidator.php#L28

    Date (DateTime instance where only Y-m-d get persisted)
2011-06-14 12:08:41 +02:00
Victor Berchet
ac0c00c6e8 [HttpFoundation] Make File extends \SplFileInfo 2011-06-14 10:47:04 +02:00
Victor Berchet
87ca9f3a52 [Validation] some tweaks and phpDoc 2011-06-14 09:40:26 +02:00
Joseph Bielawski
6bb9075b35 Remove unused code from DateTime constraint 2011-06-11 01:18:16 -07:00
Albert Jessurum
ca52a04f5e [Validator] Allow DateTime objects as valid Times 2011-06-09 15:47:51 +02:00
Fabien Potencier
1aabc5da64 fixed CS 2011-06-08 12:16:48 +02:00
Fabien Potencier
62e4342a86 fixed CS 2011-06-08 12:12:55 +02:00
Fabien Potencier
65200aa86a added missing license headers 2011-05-31 10:57:06 +02:00
Fabien Potencier
699ecfcf90 Merge remote branch 'stloyd/validators_refactoring'
* stloyd/validators_refactoring:
  Refactor validators constraints: - remove need for defining "getTargets()" method as 95% of validators use same one - replace abstract "Constraint::getTargets()" with one that use 95% of validators - add additional tests for "Constraint::getTargets()" method - remove unused "use" statement in Constraint\Valid
2011-05-26 14:58:24 +02:00
Fabien Potencier
66064cc8fc fixed CS 2011-05-25 11:35:29 +02:00
stloyd
db28beb395 Simplify RegexValidator 2011-05-25 11:08:13 +02:00
stloyd
3ea2a32c53 Refactor validators constraints:
- remove need for defining "getTargets()" method as 95% of validators use same one
- replace abstract "Constraint::getTargets()" with one that use 95% of validators
- add additional tests for "Constraint::getTargets()" method
- remove unused "use" statement in Constraint\Valid
2011-05-25 10:51:35 +02:00
Fabien Potencier
465be3d94c Merge remote branch 'jdhoek/patch-3'
* jdhoek/patch-3:
  Add {} around @inheritDoc.
2011-05-24 09:53:10 +02:00
jdhoek
42d33489c5 Add {} around @inheritDoc. 2011-05-24 00:36:03 -07:00
jdhoek
cda87bef23 Add {} around @inheritDoc 2011-05-24 00:33:56 -07:00
Johannes Schmitt
6c0b0449a6 Merge remote branch 'origin/master' into annotations
Conflicts:
	UPDATE.md
	src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
	src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
2011-05-19 22:49:59 +02:00
Johannes Schmitt
42fb34b647 fixed tests 2011-05-19 22:46:34 +02:00
Fabien Potencier
9fe1c3ae0e Merge remote branch 'bschussek/form'
* bschussek/form: (22 commits)
  Fix merge error (function "guess" was in there twice)
  [Form] Added test case for bf2f9d2a02
  [Form] Form::isBound() and Form::isValid() work correctly now for read-only forms
  [Locale] Improved error reporting and added stubs for intl_is_failure(), intl_get_error_code() and intl_get_error_message()
  [Form] Implemented fix for 361c67f54f
  [Form] Add test for the handling of array values in the constraint violation
  [Form] Further simplified PropertyPath code
  [Form] Added test for 6c337d1cc0
  [Form] Removed unused option "pattern" of date and time type
  [Form] Renamed view variable "name" to "full_name"
  [Form] Renamed collection option "type_options" to "options" to be consistent with the repeated type
  [Form] CSRF documentation and a few CS changes
  [Form] Move CSRF options from types to the CSRF extension
  [Form] Added a search form field type
  [Form] Optimization of PropertyPath
  [Form] replace assertEquals by assertFalse, assertTrue, assertNull
  [Form] fix file permissions to 644 again ;)
  [Form] add tests for type_options in collectionType
  fix file permissions to 644
  [Form] add type_options for CollectionType to be abble to set options to type
  ...
2011-05-19 16:25:30 +02:00
Fabien Potencier
c4232b11fa Merge remote branch 'beberlei/DoctrineUniqueValidator'
* beberlei/DoctrineUniqueValidator:
  [Doctrine] Fix default value to null for entity manager to make fluent integration with Doctrine Registry work
  [Doctrine] Add fields as default option and allow strings to be passed.
  [Doctrine] Add DoctrineBundle integration (DI Container registration) for the UniqueEntityValidator
  [Doctrine] Implement suggested changes by Stof, added functional test to verify unique validator works.
  [Doctrine] Add Unique Validator
2011-05-19 15:38:20 +02:00
stealth35
61b23a5a68 checkdnsrr exits for all PHP 5.3 version 2011-05-19 05:21:53 -07:00
Bernhard Schussek
06f829ace5 [Form] Implemented fix for 361c67f54f 2011-05-18 23:51:39 +02:00
Benjamin Eberlei
cfc2471109 [Doctrine] Add Unique Validator 2011-05-17 23:04:13 +02:00
Fabien Potencier
1394183a68 Merge remote branch 'stloyd/patch-3'
* stloyd/patch-3:
  Fix for bug when using APC in version 3.1.4
2011-05-17 09:41:45 +02:00
Fabien Potencier
86a2d27da9 Merge remote branch 'stloyd/ipvalidator_fix'
* stloyd/ipvalidator_fix:
  Better comment about no test IP6 addresses for "FILTER_FLAG_NO_RES_RANGE"
  Refactoring of IpValidator to use native php filter extension, also adding additional flag support and test cover.
2011-05-17 09:25:04 +02:00
Johannes Schmitt
54ae90d36d some cleanups 2011-05-17 07:41:49 +02:00
Johannes Schmitt
796d9af0c4 some updates 2011-05-16 22:26:24 +02:00
Johannes Schmitt
8e5b11a226 Merge remote branch 'origin/master' into annotations 2011-05-15 18:35:25 +02:00
Fabien Potencier
d2525c9492 [Validator] fixed possible warning 2011-05-15 11:18:03 +02:00
Fabien Potencier
4ef13b6d5c added exceptions when APC is not enabled 2011-05-14 17:43:25 +02:00
Fabien Potencier
fe4515bde3 Merge remote branch 'stloyd/patch-2'
* stloyd/patch-2:
  Throw an exception when APC is not loaded but cache is enabled in app config
2011-05-14 17:38:41 +02:00
Fabien Potencier
9c1bdc6ca4 Merge remote branch 'mvrhov/metadata_defaultgroup_fix'
* mvrhov/metadata_defaultgroup_fix:
  If there is no namespace in classname the 1st character was stripped off
2011-05-14 17:25:51 +02:00
Fabien Potencier
e6766a3189 [Validator] fixed various bugs in previous merge 2011-05-14 17:18:23 +02:00
Johannes Schmitt
2d8afd8dd6 Merge remote branch 'origin/master' into annotations
Conflicts:
	src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
	src/Symfony/Bundle/FrameworkBundle/Resources/config/validator.xml
	src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
2011-05-14 12:51:05 +02:00
Joseph Bielawski
d235570653 Fix for bad regexp used in PHP <= 5.3.2. Closes #897 2011-05-14 03:43:46 -07:00
Bernhard Schussek
f801c398eb Merge remote branch 'francisbesset/validators_date_datime' into francis_merge
Conflicts:
	src/Symfony/Component/Validator/Constraints/DateTimeValidator.php
	src/Symfony/Component/Validator/Constraints/DateValidator.php
2011-05-13 17:09:54 +02:00
Miha Vrhovnik
cd7ab69a17 If there is no namespace in classname the 1st character was stripped off 2011-05-13 16:38:01 +02:00
Joseph Bielawski
23b34749f9 Fix for bug when using APC in version 3.1.4 2011-05-12 07:50:47 -07:00
Joseph Bielawski
ec3ea65819 Throw an exception when APC is not loaded but cache is enabled in app config 2011-05-12 07:44:22 -07:00
stloyd
5997b930a5 Refactoring of IpValidator to use native php filter extension, also adding additional flag support and test cover. 2011-05-11 13:19:03 +02:00
John Wards
d96e2c5d79 [Validator] Adding support for Closure in CallbackValidator
Usage:
$formBuilder = $this->get('form.factory')
            ->createBuilder('form');
$formBuilder->setAttribute('validation_constraint', new Callback(array("methods"=>array(
    'validate' => function ($data, $context) use ($elements) {
       // logic to add violations depending on the elements
    }
))));
2011-05-10 12:12:18 +01:00
Johannes Schmitt
f7e03f2d87 Merge remote branch 'origin/master' into annotations
Conflicts:
	UPDATE.md
	src/Symfony/Bundle/DoctrineBundle/Resources/config/orm.xml
	src/Symfony/Bundle/DoctrineBundle/Tests/DependencyInjection/AbstractDoctrineExtensionTest.php
2011-05-08 07:28:23 +02:00
Pascal Borreli
e60a68f2c6 [Validator] Fixing method_exists
see dea5b26c3f
2011-05-07 19:08:30 +00:00
Drew Butler
dea5b26c3f Method exists does not work if you append the () to the method name, thus this never words for objects that actually have the __toString method. Removed the erroneous () so that this works as it appears to have been intended. 2011-05-06 13:20:29 -07:00
Johannes Schmitt
7e26575bbd [FrameworkBundle] added framework-wide annotation reader, updated validator tests 2011-04-29 15:54:44 +02:00
Johannes Schmitt
d151d2d4b8 added Annotations library 2011-04-28 23:09:08 +02:00
Eriksen Costa
164ce5210d capitalized 'boolean' 2011-04-27 02:35:10 -03:00
Francis Besset
886149fa00 [Validator] Refactoring DateTimeValidator and DateValidator 2011-04-27 00:14:31 +02:00
Francis Besset
c6d39ed61f [Validator] Date: check if the value is a DateTime instance 2011-04-27 00:09:57 +02:00
Fabien Potencier
0ac679e73c Merge remote branch 'markchalloner/master'
* markchalloner/master:
  [Validator] Updated ContraintViolationList ArrayAccess setter to check equivalence to null instead of using is_null
  Implemented ArrayAccess interface
2011-04-26 15:34:47 +02:00
Fabien Potencier
889c422d6e Merge remote branch 'igorw/ipv6'
* igorw/ipv6:
  [HttpFoundation] minor optimization
  minor adjustments suggested by vicb
  [HttpFoundation] IPv6 support for RequestMatcher
  [HttpFoundation] refactor RequestMatcherTest to use dataProvider
  [Validator] use full iPv6 regex
  [Validator] add IPv6 support to UrlValidator
  [HttpFoundation] add IPv6 support to Request
  [HttpFoundation] test Request::create with an IP as host name
  [HttpFoundation] refactor Request::getClientIp test
2011-04-24 22:04:25 +02:00
Pascal Borreli
8c0beea677 [Phpdoc] Cleaning/fixing 2011-04-23 15:18:47 +00:00
Igor Wiedler
51d12758a0 minor adjustments suggested by vicb 2011-04-22 18:37:20 +02:00
Bernhard Schussek
54e66c518f [Form] Reorganized code into "form extensions"
The extension classes are now the only constructor argument of the FormFactory class. They replace the existing "type loader" classes.

    new FormFactory(array(
        new CoreExtension($validator, $storage),
        new CsrfExtension($csrfProvider),
        new DoctrineOrmExtension($em),
    ));

Together with a few upcoming commits this mechanism will make

 * extension of the form framework in bundles and
 * usage of the forms outside of Symfony2

much easier.
2011-04-22 17:41:21 +02:00
Igor Wiedler
e5b923a0ec [Validator] use full iPv6 regex
it was taken from:
https://github.com/strattg/ipv6-address-test/blob/master/Tests/Rfc3986RegexTest.php
2011-04-22 17:07:44 +02:00
Igor Wiedler
afcdbf8b79 [Validator] add IPv6 support to UrlValidator 2011-04-22 17:07:44 +02:00
Ryan Weaver
1856601524 [Validator] Modifying Choice message and adding a different multiple message 2011-04-21 20:05:13 -05:00
Kris Wallsmith
3ff157c8a5 [Validator] switched to apc_exists() 2011-04-06 04:12:29 -07:00
Kris Wallsmith
9ff2ca7f1d [Validator] fixed apc cache 2011-04-06 04:07:37 -07:00
Fabien Potencier
a9160eee70 [Validator] made fields the default option for Collection constraint 2011-03-31 15:36:04 +02:00
Fabien Potencier
16a98cf104 [Validator] added a Metadata factory that can be used with ValidatorInterface::validateValue() 2011-03-31 15:05:18 +02:00
Martin Hason
e21591e16e [Validator] fixed CS 2011-03-31 14:02:00 +02:00
Fabien Potencier
07838c9612 [FrameworkBundle] removed the possibility to change the method name for validation static method loader (as it would break third-party bundles) 2011-03-30 23:21:17 +02:00
Fabien Potencier
f92055ce42 [Validator] renamed methods that do not follow CS
requiredOptions -> getRequiredOptions
targets -> getTargets
defaultOption -> getDefaultOption
2011-03-30 23:18:20 +02:00
Fabien Potencier
525702b5c6 [Validator] renamed method to follow CS 2011-03-30 23:10:30 +02:00
Mark Challoner
1adbb763cb [Validator] Updated ContraintViolationList ArrayAccess setter to check equivalence to null instead of using is_null 2011-03-30 08:43:05 +01:00
Mark Challoner
77ae8b5898 Implemented ArrayAccess interface 2011-03-28 13:54:37 +01:00
Johannes M. Schmitt
7887f04dc2 removed Assert prefix from all constraints, renamed annotation namespace to assert 2011-03-26 15:26:05 +01:00
Bernhard Schussek
3e29348d21 [Validator] Added support for static callbacks to Callback constraint 2011-03-25 01:36:58 +01:00
Bernhard Schussek
9c6a6e13bf [Validator] Renamed Execute constraint to Callback 2011-03-25 01:34:35 +01:00
Fabien Potencier
539e0e4870 Merge remote branch 'mweimerskirch/master' 2011-03-14 14:38:00 +01:00
Fabien Potencier
8c423edfef replaced symfony-project.org by symfony.com 2011-03-06 12:40:06 +01:00
Pascal Borreli
65560b30e1 [Validator] Fixed Typo 2011-03-01 18:58:08 +01:00
Christophe Coevoet
92bfbf575c Fixed CS 2011-02-27 20:56:29 +01:00
Michel Weimerskirch
5f0d83662c Simplified EmailValidator using native PHP validation function. 2011-02-24 04:30:23 -08:00
Fabien Potencier
f54cedfe5e added LICENSE files for the subtree repositories 2011-02-22 18:58:15 +01:00
Bernhard Schussek
89dbb04c63 [Validator] Made method name shorter 2011-02-16 23:05:22 +01:00
Lukas Kahwe Smith
dd71501f54 some fixes by just "blindly" trying to make phpStorm code analysis happier 2011-02-04 19:30:28 +01:00
Bernhard Schussek
1a34743990 [Validator] Fixed: Collections annotated with @Valid may contain scalar values. These values are ignored by the GraphWalker 2011-02-03 13:21:37 +01:00
Bernhard Schussek
55a97ec78e [Validator] Made GraphWalker::validateReference() method public 2011-02-03 11:00:03 +01:00
Bernhard Schussek
5ed4d91bb8 [Validator] Implemented Execute constraint 2011-02-03 11:00:03 +01:00
Thomas
e6dc155e89 fix validator class metadata warning 2011-02-02 11:37:41 +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
Fabien Pennequin
c392f2518d [Form][Validator] Fixed indentation 2011-01-26 10:36:10 +01:00
Ryan Weaver
17f9162b89 [Standards] Changing many instances of "boolean" to "Boolean". 2011-01-21 09:53:24 +01:00
Bernhard Schussek
d143eaad72 [Validator] Fixed XML schema 2011-01-19 16:50:45 +01:00
Bernhard Schussek
d327a90ff2 [Validator] Added namespace prefix support for XML and YAML loaders 2011-01-19 16:25:50 +01:00
Bernhard Schussek
2d7c47e488 [Validator] Each object is now only validated once for a given group 2011-01-19 16:25:50 +01:00
Bernhard Schussek
d52ae8e103 [Validator] Removed unused class GroupChain 2011-01-19 16:25:50 +01:00
Bernhard Schussek
eed3c9a48c [Validator] Added abstract method Constraint::targets() to define whether constraints can be put onto properties, classes or both 2011-01-19 16:25:50 +01:00
Bernhard Schussek
6ad22fd702 [Validator] Added ValidatorFactory for programmatically creating validators 2011-01-19 16:25:50 +01:00
Dominique Bongiraud
64fb94c725 normalized license messages in PHP files 2011-01-18 08:07:46 +01:00
Ryan Weaver
11085fd6a6 [Validator] Adding a significant amount of PHPDoc to the Validator component. 2011-01-16 07:40:15 +01:00
Bernhard Schussek
39c9bf160e [Validator] Implemented @Ip constraint 2011-01-03 22:07:15 +01:00
Bernhard Schussek
708c780213 [Validator] Renamed @Validation constraint to @Set 2011-01-03 22:06:52 +01:00
Bernhard Schussek
52ecffe51b [Validator] Implemented Locale constraint 2011-01-02 10:41:09 +01:00
Jordi Boggiano
094d428e68 CS: Unified strict equality comparisons, put var on the right side 2010-12-21 08:51:21 +01:00
Bernhard Schussek
a059ec891d [Validator] Implemented Image constraint 2010-12-16 10:18:33 +01:00
Bernhard Schussek
993257a83e [Validator] Implemented Language constraint 2010-12-16 10:18:33 +01:00
Bernhard Schussek
fdb7f84c7d [Locale][Form][Validator] Refactored code to new Locale component, implemented Country constraint 2010-12-16 10:18:33 +01:00
Fabien Potencier
48e30537c4 added exception when a loaded YAML resource is not an array 2010-12-12 08:39:37 +01:00
Johannes Schmitt
cc3a783890 removed dead code 2010-12-10 16:34:20 +01:00
Bernhard Schussek
1b2ca259f1 [Validator] Fixed string-based constraint validators to accept empty values 2010-12-10 14:28:11 +01:00
Gustavo Falco
af291bb0f1 [Validator] Fixed UrlValidator to accept empty strings (closes #9297) 2010-12-10 14:28:07 +01:00
pablodip
984a857a96 [Validator] fixed the static method loader to not repeat the loading when the static method is in the parent classes 2010-12-10 14:27:49 +01:00
Bernhard Schussek
68cebd667a [Validator] Group sequences must now always contain the group "<ClassName>" and never the group "Default" since that group is redefined by the group sequence 2010-11-19 07:11:26 +01:00
Bernhard Schussek
a71cad480a [Validator] Added @validation:GroupSequence to annotation driver 2010-11-19 07:11:23 +01:00
Jordi Boggiano
e69c5ae860 Coding style fixes 2010-11-18 07:00:03 +01:00
Bernhard Schussek
46145d8de7 [Validator] Fixed exception thrown in Valid constraint to be thrown only when the options are not empty 2010-11-17 10:55:48 +01:00
Bernhard Schussek
940ce9aedf [Validator] Group "Default" is now propagated to validated references when group sequences are validated
This conforms to JSR303 (see version 1.0 final, page 39).
2010-11-17 08:02:10 +01:00
Bernhard Schussek
6a148465da [Validator][Form] Removed support for match-all group "*"
The constraint "Valid" does not accept any options or groups anymore. As per
JSR303 1.0 final, section 3.5.1 "Object graph validation" (page 39),
properties  annotated with valid should be cascaded independent of the current
group (i.e. always). Thus the group "*" is not necessary anymore and was
removed from the "Valid" constraint in the Form validation.xml.
2010-11-17 08:02:06 +01:00
Bernhard Schussek
8df966f507 [Validator] Made class Constraint abstract because it must not be instantiated 2010-11-17 08:02:03 +01:00
Benjamin Eberlei
5aeb358721 [Validator] Made the namespace prefix for annotations configurable
Modified the framework bundle to use validation => Symfony\Component\Validator\Validator defaults.
Enhanced Framework Extension validator configuration to allow to extend this configuration with
user-specified annotations, for example:

    validation:
        enabled: true
        annotations:
            namespaces:
                myprojectvalidator: MyProject\Validator\

to register @myprojectvalidator:Validator(...)
2010-11-16 07:28:02 +01:00
jeff
69cd21d8be [Validator] Fixed annotation loader to not add parent constraints twice 2010-11-12 17:56:09 +01:00
ever.zet
4c340c5cc9 [Form] fixed forms grouped validation
Added ability to specify **match-all** validation group, which
constraints will runs on every specified validation group.
Added groups="*" option to `Form::data` Valid validator.
2010-11-12 17:53:17 +01:00
Kris Wallsmith
4a18624927 [Validator] removed ftp and ftps from default url protocols 2010-10-18 16:57:07 +02:00
pborreli
082090d880 [Validator] Fixed coding standard 2010-10-16 10:49:41 +02:00
Kris Wallsmith
5d4c80f27b [Validator] removed DependencyInjection integration 2010-10-16 08:34:36 +02:00
Fabien Potencier
0fc8906feb [Validator] forced all validation annotations to be in the validation namespace to avoid collisions, removed the need for the wrapping @Validation annotation
Before:

    /**
     * @Validation({@DateTime()})
     */

After:

    /**
     * @validation:DateTime()
     */

The @validation:Validation() construct is not needed anymore (it is still supported
as this is useful when you have several annotations with the same class).

So, the above is equivalent to:

    /**
     * @validation:Validation({@validation:DateTime()})
     */
2010-10-02 15:07:00 +02:00
Fabien Potencier
3a4d9cb185 [Validation] fixed license 2010-10-02 12:42:35 +02:00
Fabien Potencier
1a055fc7f0 [Validator] fixed typo 2010-09-30 07:21:54 +02:00
Fabien Potencier
3b1e83380b [Validator] removed the convention that error parameters are delimited with %% 2010-09-29 07:59:45 +02:00
Fabien Potencier
9580c74f0b [Validator] changed the convention for placeholders in messages to be compatible with Twig (from %limit% to {{ limit }}) 2010-09-27 09:46:56 +02:00
Fabien Potencier
866c306dc8 removed the message interpolator system in the Validator component (i18n management should be done globally, not in a specific component) 2010-09-24 16:41:28 +02:00
Jordi Boggiano
82f6a68eb2 [Validator] Allow DateTime objects as valid DateTimes 2010-09-22 09:16:26 +02:00
Jeremy Mikola
a86bac44ce [Validator] Remove leading '@' when validating email domain MX record 2010-09-10 20:42:22 +02:00
Fabien Potencier
a141c98917 [HttpFoundation] moved File Component into the HttpFoundation one 2010-09-09 17:01:48 +02:00
Fabien Potencier
fc9325a737 fixed file upload 2010-09-09 16:07:12 +02:00
Bulat Shakirzyanov
bb51e7cb26 [Validator] fixed Xliff loader to use forward slashes in file path 2010-09-09 08:01:46 +02:00
Fabien Potencier
4d669d106e [Validator] changed Xliff loader to get XSD locally 2010-09-07 14:30:50 +02:00
Fabien Potencier
dadfaa271f [Validator] fixed indentation 2010-09-07 14:18:00 +02:00
Fabien Potencier
bf82cf42dd renamed Symfony\Components to Symfony\Component 2010-08-20 23:09:55 +02:00