Permalink
Commits on Dec 15, 2011
  1. Merge branch '2.0'

    fabpot committed Dec 15, 2011
    * 2.0:
      [FrameworkBundle] Added functional tests.
      [Form] Added missing use statements (closes #2880)
      [Console] Improve input definition output for Boolean defaults
      [SecurityBundle] Changed environment to something unique.
      2879: missing space between catch and the brace
      #2688: Entities are generated in wrong folder (doctrine:generate:entities Namespace)
      [TwigBundle] Fix the exception message escaping
Commits on Dec 14, 2011
  1. 2879: missing space between catch and the brace

    Arno Geurts committed Dec 14, 2011
  2. #2688: Entities are generated in wrong folder (doctrine:generate:enti…

    Arno Geurts committed Dec 14, 2011
    …ties Namespace)
Commits on Dec 13, 2011
  1. merged 2.0

    fabpot committed Dec 13, 2011
  2. [DoctrineBridge] fixed some CS

    fabpot committed Dec 13, 2011
Commits on Dec 11, 2011
  1. merged 2.0

    fabpot committed Dec 11, 2011
Commits on Dec 9, 2011
  1. merged branch aboks/doctrine_data_collector (PR #2733)

    fabpot committed Dec 9, 2011
    Commits
    -------
    
    bb0d202 Switched sanitizeParameter() for existing varToString()-method; now always stores a string representation of each parameter
    4fe4dfd Fixed vendor version mismatch in tests
    28730e9 [DoctrineBridge] Added unit tests
    4535abe [DoctrineBridge] Fixed attempt to serialize non-serializable values
    
    Discussion
    ----------
    
    [DoctrineBridge] Fixed attempt to serialize non-serializable values
    
    Bug fix: yes
    Feature addition: no
    Backwards compatibility break: no (99%)
    Symfony2 tests pass: yes
    Fixes the following tickets: -
    Todo: -
    
    The Doctrine DBAL type system does not pose any restrictions on the php-types of parameters in queries. Hence one could write a doctrine-type that uses a resource or an `\SplFileInfo` as its corresponding php-type. Parameters of these types are logged in the `DoctrineDataCollector` however, which is then serialized in the profiler. Since resources or `\SplFileInfo` variables cannot be serialized this throws an exception.
    
    This PR fixes this problem (for known cases) by sanitizing the query parameters to only contain serializable types. The `isNotSerializable`-check surely is not complete yet, but more non-serializable classes can be added on a case-by-case basis.
    
    ---------------------------------------------------------------------------
    
    by fabpot at 2011/12/07 07:04:43 -0800
    
    Tests do not pass for me.
    
    Furthermore, let's reuse what we already have in the framework (see https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/HttpKernel.php#L187 -- yes you can just copy/paster the existing code).
    
    ---------------------------------------------------------------------------
    
    by aboks at 2011/12/09 01:41:14 -0800
    
    @fabpot I fixed the tests (seems I had the wrong vendor versions in my copy) and reused the `varToString()`-code. This introduces a tiny BC break in the rare case that someone writes his own templates for the web profiler (the parameters returned by the data collector are now always a string; could be any type before).
    
    After merging this PR, merging 2.0 into master would give a merge conflict and failing tests (because of the changes related to the introduction of the `ManagerRegistry` interface). To prevent this, please merge #2820 into master directly after merging this PR (so before merging 2.0 into master). After that 2.0 can be cleanly merged into master.
    
    ---------------------------------------------------------------------------
    
    by stof at 2011/12/09 03:43:38 -0800
    
    it is not a BC break. Using ``yaml_encode`` on a string will not break the template
Commits on Dec 8, 2011
  1. Switched sanitizeParameter() for existing varToString()-method; now a…

    aboks committed Dec 8, 2011
    …lways stores a string representation of each parameter
  2. merged 2.0

    fabpot committed Dec 8, 2011
Commits on Dec 5, 2011
Commits on Dec 3, 2011
  1. Fix composer.json

    beberlei committed Dec 3, 2011
  2. Change composer.json

    beberlei committed Dec 3, 2011
  3. Fix composer.json

    beberlei committed Dec 3, 2011
Commits on Dec 1, 2011
  1. merged 2.0

    fabpot committed Dec 1, 2011
Commits on Nov 29, 2011
Commits on Nov 26, 2011
Commits on Nov 25, 2011
Commits on Nov 24, 2011
  1. removed unused use statements

    fabpot committed Nov 24, 2011
  2. merged 2.0

    fabpot committed Nov 24, 2011
  3. removed unused use statements

    fabpot committed Nov 24, 2011
Commits on Nov 23, 2011
  1. merged 2.0

    fabpot committed Nov 23, 2011
  2. Fix composer.json

    Seldaek committed Nov 23, 2011
Commits on Nov 22, 2011
  1. fixed a merge problem

    fabpot committed Nov 22, 2011
  2. merged branch beberlei/DoctrineValidation (PR #2535)

    fabpot committed Nov 22, 2011
    Commits
    -------
    
    47ebf08 Fix some bugs
    fad825e Add DoctrineValidationPass to DoctrineBundle#buildContainer
    a064acd Implement feature to add validations based on the Manager-Type (ORM, MongoDB, CouchDB)
    
    Discussion
    ----------
    
    [WIP] Validation on a Doctrine Manager Basis
    
    Hello,
    
    we have had problems before with validation that is "persistence" related. Unique-validators or any other validation that is based on services that depend on persistence.
    
    The problem is two-fold:
    
    1. In annotations you cannot define validators for all persistence layers you support, because then users need them all installed.
    2. In XML/YAML the same is true, since there is only one validation.xml or validation.yml file looked for.
    
    Now one solution is to have three model classes that extend from a base class to get around this (like FOSUserBundle does) but that is cumbersome. This PR provides a new solution that is Doctrine specific (and takes the responsibility out of the Core).
    
    Each Doctrine Bundle (ORM, CouchDB, MongoDB, PHPCR) can add this compiler pass with a manager type name:
    
        $container->addCompilerPass(new DoctrineValidationPass('orm'));
    
    This leads to the compiler pass searching for additional validation files "Resources/config/validation.orm.yml" and "Resources/configvalidation.orm.xml".
    
    My first idea was to put this into the Resources/config/doctrine folder as well, but then it is detected as mapping file of course.
    
    Regarding tests, this is not easily testable without a full fledged bundle setup, i tested this inside Acme Demo Bundle, however for a good unit-test we probably need a filesystem abstraction testing layer. Has anyone a good idea how to test this without having to setup another test-bundle? I can't use the one from DoctrineBundle since this code is in the Bridge.
    
    ---------------------------------------------------------------------------
    
    by fabpot at 2011/11/13 23:12:06 -0800
    
    @beberlei: Is it still WIP?
    
    ---------------------------------------------------------------------------
    
    by beberlei at 2011/11/15 10:47:49 -0800
    
    @fabpot it is complete, but it has no tests, that was the WIP part. :-)
    
    ---------------------------------------------------------------------------
    
    by mvrhov at 2011/11/15 23:56:11 -0800
    
    I wanted to refactor how validation is managed today, so it could do one validation file per class, same as with Doctrine but @stof pointed me to this PR. I still find this a great idea as the validation is easier to find.
    
    ```php
            foreach ($container->getParameter('kernel.bundles') as $bundle) {
                $reflection = new \ReflectionClass($bundle);
                $bundleDir = dirname($reflection->getFilename());
    
                //check for per class validation files
                if (is_dir($dir = $bundleDir . '/Resources/config/validation')) {
                    $finder = new Finder();
                    $finder
                        ->name('*'.$extension)
                        ->in($dir);
    
                    foreach ($finder as $file) {
                        $files[] = realpath($file);
                        $container->addResource(new FileResource($file));
                    }
                }
    
                //global validation file?
                if (is_file($file = $bundleDir . '/Resources/config/validation'.$extension)) {
                    $files[] = realpath($file);
                    $container->addResource(new FileResource($file));
                }
            }
    ```
Commits on Nov 18, 2011
  1. merged branch beberlei/DoctrineInfoMappingException (PR #2656)

    fabpot committed Nov 18, 2011
    Commits
    -------
    
    6d7e6a8 [DoctrineBundle] Enhance error reporting during mapping validation when nested exceptions occur.
    
    Discussion
    ----------
    
    Doctrine info mapping exception
    
    Better error handling when nested exceptions occur (which is commonly possible with reflection errors).
    
    ---------------------------------------------------------------------------
    
    by fabpot at 2011/11/16 02:10:13 -0800
    
    It should probably be done on the 2.0 branch, no?
    
    ---------------------------------------------------------------------------
    
    by beberlei at 2011/11/18 02:11:06 -0800
    
    Its not necessarily a bugfix but an enhancement.
Commits on Nov 17, 2011
  1. Add symfony dependency

    beberlei committed Nov 17, 2011
  2. Fix c&p error

    beberlei committed Nov 17, 2011
  3. Fix use clauses

    beberlei committed Nov 17, 2011
  4. Fix LICENSE

    beberlei committed Nov 17, 2011