Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Commits on Apr 3, 2012
  1. @stof

    Merge pull request #24 from marcw/patch-1

    stof authored
    Fixes broken link to documentation
  2. @marcw
Commits on Feb 6, 2012
  1. @stof

    Updated the license header

    stof authored
  2. @stof
  3. @stof
Commits on Jan 17, 2012
  1. @stof

    Merge pull request #19 from pminnieur/patch-1

    stof authored
    fixed target-dir and autoload in composer.json
  2. @pminnieur
Commits on Dec 17, 2011
  1. @beberlei

    Fix composer.json

    beberlei authored
Commits on Dec 15, 2011
  1. @beberlei

    Merge pull request #14 from doctrine/DoctrineMove

    beberlei authored
    Doctrine move
Commits on Dec 7, 2011
  1. @beberlei

    Fix docs

    beberlei authored
  2. @beberlei

    Fix namespace

    beberlei authored
Commits on Nov 17, 2011
  1. @beberlei
Commits on Aug 25, 2011
  1. @fabpot
Commits on Jun 18, 2011
  1. @fabpot

    Merge pull request #3 from weaverryan/new_readme

    fabpot authored
    Adding README with a link to the cookbook article
Commits on Jun 17, 2011
  1. @jwage

    Merge pull request #4 from stfalcon/master

    jwage authored
    added installation guide
  2. @stfalcon

    added installation guide

    stfalcon authored
Commits on May 29, 2011
  1. @weaverryan
Commits on May 9, 2011
  1. @kriswallsmith

    Merge pull request #1 from mcbennn/master

    kriswallsmith authored
    Fixes setApplicationEntityManager call
  2. @mcbennn
Commits on Mar 17, 2011
  1. @vicb
  2. @vicb

    [Config] Component refactoring

    vicb authored
    The Config component API have changed and the extension configuration files must be updated accordingly:
    
    1. Array nodes must enclosed their children definition in ->children() ... ->end() calls:
    
    Before:
    
        $treeBuilder->root('zend', 'array')
            ->arrayNode('logger')
                ->scalarNode('priority')->defaultValue('INFO')->end()
                ->booleanNode('log_errors')->defaultFalse()->end()
            ->end();
    
    After:
    
        $treeBuilder->root('zend', 'array')
            ->children()
                ->arrayNode('logger')
                    ->children()
                        ->scalarNode('priority')->defaultValue('INFO')->end()
                        ->booleanNode('log_errors')->defaultFalse()->end()
                    ->end()
                ->end()
            ->end();
    
    2. The 'builder' method (in NodeBuilder) has been dropped in favor of an 'append' method (in ArrayNodeDefinition)
    
    Before:
    
        $treeBuilder->root('doctrine', 'array')
            ->arrayNode('dbal')
                ->builder($this->getDbalConnectionsNode())
            ->end();
    
    After:
    
        $treeBuilder->root('doctrine', 'array')
            ->children()
                ->arrayNode('dbal')
                    ->append($this->getDbalConnectionsNode())
                ->end()
            ->end();
    
    3. The root of a TreeBuilder is now an NodeDefinition (and most probably an ArrayNodeDefinition):
    
    Before:
    
        $root = $treeBuilder->root('doctrine', 'array');
        $this->addDbalSection($root);
    
        public function addDbalSection(NodeBuilder $node)
        {
            ...
        }
    
    After:
    
        $root = $treeBuilder->root('doctrine', 'array');
        $this->addDbalSection($root);
    
        public function addDbalSection(ArrayNodeDefinition $node)
        {
            ...
        }
    
    4. The NodeBuilder API has changed (this is seldom used):
    
    Before:
    
        $node = new NodeBuilder('connections', 'array');
    
    After:
    
    The recommended way is to use a tree builder:
    
        $treeBuilder = new TreeBuilder();
        $node = $treeBuilder->root('connections', 'array');
    
    An other way would be:
    
        $builder = new NodeBuilder();
        $node = $builder->node('connections', 'array');
    
    Some notes:
    
    - Tree root nodes should most always be array nodes, so this as been made the default:
    
        $treeBuilder->root('doctrine', 'array') is equivalent to $treeBuilder->root('doctrine')
    
    - There could be more than one ->children() ... ->end() sections. This could help with the readability:
    
        $treeBuilder->root('doctrine')
            ->children()
                ->scalarNode('default_connection')->end()
            ->end()
            ->fixXmlConfig('type')
            ->children()
                ->arrayNode('types')
                    ....
                ->end()
            ->end()
Commits on Mar 16, 2011
  1. @hason
Commits on Mar 11, 2011
  1. @fabpot
Commits on Mar 6, 2011
  1. @fabpot
Commits on Feb 20, 2011
  1. @lsmith77

    added a DI extension for DoctrineMigrations, removed --bundle option …

    lsmith77 authored
    …in favor of application level settings
Commits on Feb 19, 2011
  1. @lsmith77 @fabpot

    small fix for recent refactoring in Doctrine Migrations

    lsmith77 authored fabpot committed
Commits on Feb 5, 2011
  1. @fabpot
Commits on Feb 4, 2011
  1. @fabpot

    fixed previous commit

    fabpot authored
  2. @vicb @fabpot

    [Bundle] Make getPath() less error prone by allowing both backward an…

    vicb authored fabpot committed
    …d forward slashes
Commits on Feb 3, 2011
  1. @bobthecow @fabpot
Commits on Jan 24, 2011
  1. @stfalcon @fabpot
Commits on Jan 20, 2011
  1. @fabpot

    refactored bundle management

    fabpot authored
    Before I explain the changes, let's talk about the current state.
    
    Before this patch, the registerBundleDirs() method returned an ordered (for
    resource overloading) list of namespace prefixes and the path to their
    location. Here are some problems with this approach:
    
     * The paths set by this method and the paths configured for the autoloader
       can be disconnected (leading to unexpected behaviors);
    
     * A bundle outside these paths worked, but unexpected behavior can occur;
    
     * Choosing a bundle namespace was limited to the registered namespace
       prefixes, and their number should stay low enough (for performance reasons)
       -- moreover the current Bundle\ and Application\ top namespaces does not
       respect the standard rules for namespaces (first segment should be the
       vendor name);
    
     * Developers must understand the concept of "namespace prefixes" to
       understand the overloading mechanism, which is one more thing to learn,
       which is Symfony specific;
    
     * Each time you want to get a resource that can be overloaded (a template for
       instance), Symfony would have tried all namespace prefixes one after the
       other until if finds a matching file. But that can be computed in advance
       to reduce the overhead.
    
    Another topic which was not really well addressed is how you can reference a
    file/resource from a bundle (and take into account the possibility of
    overloading). For instance, in the routing, you can import a file from a
    bundle like this:
    
      <import resource="FrameworkBundle/Resources/config/internal.xml" />
    
    Again, this works only because we have a limited number of possible namespace
    prefixes.
    
    This patch addresses these problems and some more.
    
    First, the registerBundleDirs() method has been removed. It means that you are
    now free to use any namespace for your bundles. No need to have specific
    prefixes anymore. You are also free to store them anywhere, in as many
    directories as you want. You just need to be sure that they are autoloaded
    correctly.
    
    The bundle "name" is now always the short name of the bundle class (like
    FrameworkBundle or SensioCasBundle). As the best practice is to prefix the
    bundle name with the vendor name, it's up to the vendor to ensure that each
    bundle name is unique. I insist that a bundle name must be unique. This was
    the opposite before as two bundles with the same name was how Symfony2 found
    inheritance.
    
    A new getParent() method has been added to BundleInterface. It returns the
    bundle name that the bundle overrides (this is optional of course). That way,
    there is no ordering problem anymore as the inheritance tree is explicitely
    defined by the bundle themselves.
    
    So, with this system, we can easily have an inheritance tree like the
    following:
    
    FooBundle < MyFooBundle < MyCustomFooBundle
    
    MyCustomFooBundle returns MyFooBundle for the getParent() method, and
    MyFooBundle returns FooBundle.
    
    If two bundles override the same bundle, an exception is thrown.
    
    Based on the bundle name, you can now reference any resource with this
    notation:
    
        @FooBundle/Resources/config/routing.xml
        @FooBundle/Controller/FooController.php
    
    This notation is the input of the Kernel::locateResource() method, which
    returns the location of the file (and of course it takes into account
    overloading).
    
    So, in the routing, you can now use the following:
    
        <import resource="@FrameworkBundle/Resources/config/internal.xml" />
    
    The template loading mechanism also use this method under the hood.
    
    As a bonus, all the code that converts from internal notations to file names
    (controller names: ControllerNameParser, template names: TemplateNameParser,
    resource paths, ...) is now contained in several well-defined classes. The
    same goes for the code that look for templates (TemplateLocator), routing
    files (FileLocator), ...
    
    As a side note, it is really easy to also support multiple-inheritance for a
    bundle (for instance if a bundle returns an array of bundle names it extends).
    However, this is not implemented in this patch as I'm not sure we want to
    support that.
    
    How to upgrade:
    
     * Each bundle must now implement two new mandatory methods: getPath() and
       getNamespace(), and optionally the getParent() method if the bundle extends
       another one. Here is a common implementation for these methods:
    
        /**
         * {@inheritdoc}
         */
        public function getParent()
        {
            return 'MyFrameworkBundle';
        }
    
        /**
         * {@inheritdoc}
         */
        public function getNamespace()
        {
            return __NAMESPACE__;
        }
    
        /**
         * {@inheritdoc}
         */
        public function getPath()
        {
            return strtr(__DIR__, '\\', '/');
        }
    
     * The registerBundleDirs() can be removed from your Kernel class;
    
     * If your code relies on getBundleDirs() or the kernel.bundle_dirs parameter,
       it should be upgraded to use the new interface (see Doctrine commands for
       many example of such a change);
    
     * When referencing a bundle, you must now always use its name (no more \ or /
       in bundle names) -- this transition was already done for most things
       before, and now applies to the routing as well;
    
     * Imports in routing files must be changed:
        Before: <import resource="Sensio/CasBundle/Resources/config/internal.xml" />
        After:  <import resource="@SensioCasBundle/Resources/config/internal.xml" />
Commits on Jan 18, 2011
  1. @blue-eyes @fabpot

    normalized license messages in PHP files

    blue-eyes authored fabpot committed
Commits on Nov 27, 2010
  1. @weaverryan @fabpot

    [Command] Changing the InputOption::PARAMETER_* constants to InputOpt…

    weaverryan authored fabpot committed
    …ion::VALUE_* to more accurately reflect that these constants refer to the value or lack of value assigned to a particular option (e.g. --verbose or --em=doctrine).
    
    To keep language consistent, three methods were changed in InputOption:
    
     * `InputOption::acceptParameter()` -> `InputOption::acceptValue()`
     * `InputOption::isParameterRequired()` -> InputOption::isValueRequired()`
     * `InputOption::isParameterOptional()` -> `InputOption::isValueOptional()`
    
    The InputDefinition::asXml() method was also modified to update the `accept_value` and `is_value_required` attributes.
Commits on Oct 18, 2010
  1. @kriswallsmith @fabpot
Something went wrong with that request. Please try again.