SlideShare a Scribd company logo
1 of 128
What’s new in Doctrine
Jonathan H. Wage

         Titre présentation | Conférencier
What’s new in Doctrine


•   Doctrine Book
•   Doctrine 1.1
•   Doctrine 2.0
•   Default ORM in Symfony as of today!!




            What’s new in Doctrine | Jonathan H. Wage
The first Doctrine book




         What’s new in Doctrine | Jonathan H. Wage
The first Doctrine book


• Available late June
• Available online(html/pdf) and in book format
• Complete user manual and reference guide for
  existing and new Doctrine developers




          What’s new in Doctrine | Jonathan H. Wage
Doctrine 1.1



What’s new in Doctrine | Jonathan H. Wage
Doctrine 1.1




   Evolution of 1.x codebase



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 1.1




    Stability, bugs and minor
              features



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 1.1




      Zero failing test cases



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 1.1




   Dozens of new test cases
  adding more complete code
          coverage


         What’s new in Doctrine | Jonathan H. Wage
Doctrine 1.1




               Fine tuned API



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 1.1




        Improved hydration
           performance



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 1.1




  Hydrate larger result sets in
           less time



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 1.1




  Re-written documentation
which is also the book that will
     be available in print


         What’s new in Doctrine | Jonathan H. Wage
New Features



What’s new in Doctrine | Jonathan H. Wage
New Features




 New configuration options to
  remove hardcoded values



        What’s new in Doctrine | Jonathan H. Wage
New Features

Specify more global default values
 $manager->setAttribute(
    Doctrine::ATTR_DEFAULT_TABLE_CHARSET,                Global table
    'utf8'                                               character set
 );
 $manager->setAttribute(
    Doctrine::ATTR_DEFAULT_TABLE_COLLATE,                Global table
    'utf8_unicode_ci'                                    collation
 );
 $manager->setAttribute(
    Doctrine::ATTR_DEFAULT_IDENTIFIER_OPTIONS,           Default automatic
    array('length' => 4)                                 identifier definition
 );
 $manager->setAttribute(
                                                         Default column
    Doctrine::ATTR_DEFAULT_COLUMN_OPTIONS,
                                                         definition
    array('notnull' => true)
 );


             What’s new in Doctrine | Jonathan H. Wage
New Features




  Better custom accessor and
        mutator support



        What’s new in Doctrine | Jonathan H. Wage
New Features
Custom accessors and mutators
$manager->setAttribute(
                                                        Feature is disabled
  Doctrine::ATTR_AUTO_ACCESSOR_OVERRIDE,                by default
  true
);

class User extends BaseUser
{                                                        Define a new
  public function setPassword($password)                 mutator
  {
    $this->_set('password', md5($password));
  }                                                      Set password
}                                                        property and
                                                         setPassword() is
                                                         invoked
$user->password = 'changeme';


            What’s new in Doctrine | Jonathan H. Wage
New Features




  Enhanced fromArray() and
   synchronizeWithArray()
   methods to better handle
        relationships


        What’s new in Doctrine | Jonathan H. Wage
New Features

                                                     Use the array with an
  Define array structure                              instance of a Doctrine
  $userData = array(                                 model
     'username' => 'jwage',
                                                         $user = new User();
     'password' => 'changeme',
                                                         $user->fromArray($userData);
     'Groups' => array(
       array(
          '_identifier' => 1,
       ),
       array(
          '_identifier' => 2                    Internally Symfony uses
       ),
       array(                                   these methods to merge
          'name' => 'New Group'                 form values to your model
       )
    )
                                                instances
  );




             What’s new in Doctrine | Jonathan H. Wage
New Features




  Generate phpDoc property
 tags for integration with IDEs



        What’s new in Doctrine | Jonathan H. Wage
New Features


  /**                       All columns and relationships
   * BaseUser
   *                        get a generated @property tag
   * This class has been auto-generated by the Doctrine ORM Framework
   *
   * @property string $username
   * @property string $password
   *
   * @package    ##PACKAGE##
   * @subpackage ##SUBPACKAGE##
   * @author     ##NAME## <##EMAIL##>
   * @version    SVN: $Id: Builder.php 5441 2009-01-30 22:58:43Z jwage $
   */
  abstract class BaseUser extends Doctrine_Record
  // ....


          Offers auto complete for modern IDEs

             What’s new in Doctrine | Jonathan H. Wage
Database Migrations



 What’s new in Doctrine | Jonathan H. Wage
Database Migrations




     General improvements
all around to make things more
       intuitive and flexible


        What’s new in Doctrine | Jonathan H. Wage
Database Migrations


• Generated migration class files use timestamp
  prefix instead of incremented number

         1.0                                               1.1
001_my_migration.class.php                    1244735632_my_migration.class.php
002_my_migration2.class.php                   1244735800_my_migration2.class.php



• Avoid conflicts between developers when
  generating migrations

             What’s new in Doctrine | Jonathan H. Wage
Database Migrations




     Introduced new Diff tool



        What’s new in Doctrine | Jonathan H. Wage
Database Migrations




  Generate migration classes
  automatically from changes
     made to your schema


        What’s new in Doctrine | Jonathan H. Wage
Database Migrations


 The schema we’re migrating from


   User:
     columns:
       username: string(255)
       password: string(255)



        What’s new in Doctrine | Jonathan H. Wage
Database Migrations


 The schema we’re migrating to

User:
  columns:
    username: string(255)
    password: string(255)
    email_address: string(255)
 We added a new email_address column

         What’s new in Doctrine | Jonathan H. Wage
Database Migrations


• How can we get these changes to our DBMS in
  dev, staging, production, etc.?
  – Manually write the SQL and apply it in dev, staging and
    production? Eeeek!!
  – Make SQL change in dev server and filter all DDL
    statements from DBMS query log? Eeeek!!
• People handle this a lot of different ways and they
  are all dangerous and error prone
• Database migrations give you a reliable and
  programmatic way to deploy and even revert
  database changes
           What’s new in Doctrine | Jonathan H. Wage
Database Migrations


   Generating the changes

$from = '/path/to/schema/from.yml';
$to = '/path/to/schema/to.yml';
$migrationsDir = '/path/to/migrations';
$diff = new Doctrine_Migration_Diff($from, $to, $migrationsDir);
$changes = $diff->generateChanges();

print_r($changes);




             What’s new in Doctrine | Jonathan H. Wage
Database Migrations

          The generated changes
                Array
                (
                  [created_columns] => Array
                     (
                       [user] => Array
                          (
                            [email_address] => Array
                               (
                                 [type] => string
                                 [length] => 255
                               )

                               )

                        )
                )

        What’s new in Doctrine | Jonathan H. Wage
Database Migrations


• Changes array used to generate migration classes
• The class generation is not 100%
• Some changes cannot be detected
  – For example we can’t detect if a column was renamed or
    an old column dropped and a new one created.
• You should always review the generated classes to
  make sure they do what you want
• So now we can generate our classes to help us
  migrate our database changes


          What’s new in Doctrine | Jonathan H. Wage
Database Migrations


            Generating migration classes

$from = '/path/to/schema/from.yml';
$to = '/path/to/schema/to.yml';
$migrationsDir = '/path/to/migrations';
$diff = new Doctrine_Migration_Diff($from, $to, $migrationsDir);
$diff->generateMigrationClasses();




            New migration class written
            to the $migrationsDir

             What’s new in Doctrine | Jonathan H. Wage
Database Migrations


                 Generating migration classes
// /path/to/migrations/1239913213_version1.php

class Version1 extends Doctrine_Migration_Base
{
    public function up()
    {
        $this->addColumn('user', 'email_address', 'string', '255', array('email' => '1'));
    }

    public function down()
    {
        $this->removeColumn('user', 'email_address');
    }
}




                   What’s new in Doctrine | Jonathan H. Wage
Database Migrations


                     Migrating changes


 Migrate from version 0 to version 1
$migration = new Doctrine_Migration('migrations');
$migration->migrate();




          What’s new in Doctrine | Jonathan H. Wage
Database Migrations




 Migrating from version 0 to 1
   would execute the up()
           methods


        What’s new in Doctrine | Jonathan H. Wage
Database Migrations




 Migrating from version 1 to 0
  would execute the down()
           methods


        What’s new in Doctrine | Jonathan H. Wage
Database Migrations


                     Migrating changes


        Migrate back to version 0
$migration = new Doctrine_Migration('migrations');
$migration->migrate(0);




          What’s new in Doctrine | Jonathan H. Wage
Database Migrations

               Symfony CLI Workflow
      • First modify your YAML schema
      • Second run the following command
       $ php symfony doctrine:generate-migrations-diff

      • Now you need to review the generated migrations
        classes in lib/migration/doctrine. Once you
        confirm they look good run this command.

       $ php symfony doctrine:migrate

      • Your database is migrated and you can rebuild
        your models from your schema.

       $ php symfony doctrine:build-model

         What’s new in Doctrine | Jonathan H. Wage
Database Migrations




In Symfony migrations work by
   comparing your modified
   YAML schema to the old
      generated models


        What’s new in Doctrine | Jonathan H. Wage
New Hydration Types



 What’s new in Doctrine | Jonathan H. Wage
Scalar Hydration



What’s new in Doctrine | Jonathan H. Wage
Scalar Hydration


•   Flat
•   Rectangular result set
•   Performs well
•   Harder to work with
•   Can contain duplicate data
•   Like a normal SQL resultset




            What’s new in Doctrine | Jonathan H. Wage
Scalar Hydration




 $q = Doctrine::getTable('User')
     ->createQuery('u')
     ->leftJoin('u.Phonenumbers p');

 $results = $q->execute(array(), Doctrine::HYDRATE_SCALAR);

 print_r($results);




            What’s new in Doctrine | Jonathan H. Wage
Scalar Hydration

                Array
                (
                  [0] => Array
                     (
                       [u_id] => 1
                       [u_username] => jwage
                       [u_password] => changeme
                       [u_email_address] => jonwage@gmail.com
                       [p_id] => 1
                       [p_user_id] => 1
                       [p_phonenumber] => 16155139185
                     )

                    [1] => Array
                       (
                         [u_id] => 1
                         [u_username] => jwage
                         [u_password] => changeme
                         [u_email_address] => jonwage@gmail.com
                         [p_id] => 2
                         [p_user_id] => 1
                         [p_phonenumber] => 14159925468
                       )
                )


         What’s new in Doctrine | Jonathan H. Wage
Single Scalar Hydration



   What’s new in Doctrine | Jonathan H. Wage
Single Scalar Hydration




  Sub type of scalar hydration



         What’s new in Doctrine | Jonathan H. Wage
Single Scalar Hydration




  Returns single scalar value



         What’s new in Doctrine | Jonathan H. Wage
Single Scalar Hydration




  Useful for retrieving single
value for aggregate/calculated
            results


         What’s new in Doctrine | Jonathan H. Wage
Single Scalar Hydration




Very fast since no need exists
   to hydrate the data in to
objects or any other structure


         What’s new in Doctrine | Jonathan H. Wage
Single Scalar Hydration




$q = Doctrine::getTable('User')
    ->createQuery('u')
    ->select('COUNT(p.id) as num_phonenumbers')
    ->leftJoin('u.Phonenumbers p');

$results = $q->execute(array(), Doctrine::HYDRATE_SINGLE_SCALAR);

echo $results; // 2




              What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0



What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




         Requires PHP 5.3



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




Performance increase from 5.3



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0



Test suite runs 20% faster and
   uses 30% less memory!
These performance increases are without
  any code changes. With Doctrine 1.x
  under 5.3 the same increases apply


         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0


     Hydration Performance
         Doctrine 1.1
         4.3435637950897 for 5000 records

         Doctrine 2.0
         1.4314442552312 for 5000 records

         Doctrine 2.0
         3.4690098762512 for 10000 records

         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




Everything re-designed and re-
         implemented



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




     Simplified the public API



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




   Heavily influenced by JPA/
        Java Hibernate

       JPA = Java Persistence API
            Created by Sun

         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




            Smaller footprint



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




Un-necessary clutter removed



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




      Removed Limitations



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0

                              The old way
       class User extends Doctrine_Record
       {
           public function setTableDefinition()
           {
               $this->hasColumn('id', 'integer', null, array(
                 'primary' => true,
                 'auto_increment' => true
               ));

                 $this->hasColumn('username', 'string', 255);
           }
       }




           What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0

                            The new way
               /**
                 * @DoctrineEntity
                 * @DoctrineTable(name="user")
                 */
               class User
               {
                    /**
                     * @DoctrineId
                     * @DoctrineColumn(type="integer")
                     * @DoctrineGeneratedValue(strategy="auto")
                     */
                    public $id;

                    /**
                     * @DoctrineColumn(type="varchar", length=255)
                     */
                    public $username;
               }




         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




   No need to extend a base
        class anymore



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




   No more cyclic references



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0

       print_r() your objects
          $user = new User();
          $user->username = 'jwage';
          print_r($user);

                      User Object
                      (
                        [id] =>
                        [username] => jwage
                      )


         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0


• Positive effect of removing the base
  class all around
• Performance increase
• Easier to debug




         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




 No more shared identity map
     across connections



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




Other general improvements



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




    Code heavily de-coupled



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




      Three main packages



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




                          Common



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




                                 DBAL



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




                                  ORM



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




Use just the DBAL without the
        ORM present



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




 Database Abstraction Layer



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0


• Under the hood of Doctrine is a powerful database
  abstraction layer.

• It is an evolution of code that has existed in other
  projects such as PEAR MDB/MDB2 and Zend_Db

• This layer has always existed but not advertised.

• Now that it can be used standalone we’ll be
  advertising it much more as a separate system.
           What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




 A few examples of the DBAL



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0


 Programatically issue DDL statements
      $columns = array(
          'id' => array(
              'type' => DoctrineDBALType::getType('integer'),
              'autoincrement' => true,
              'primary' => true,
              'notnull' => true
          ),
          'test' => array(
              'type' => DoctrineDBALType::getType('string'),
              'length' => 255
          )
      );

      $options = array();

      $sm->createTable('new_table', $columns, $options);

           What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0


     Try a method. If an error
      occurs in the DBAL an
       exception is thrown
  Sometimes you may want to
    catch the exception and
           swallow it.
         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0



 Use the tryMethod() to......try a method
 and return false if it fails. The exception
 that was thrown if any can be retrieved
              and inspected.

if ($sm->tryMethod('createTable', 'new_table', $columns, $options)) {
  // do something
}




             What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




 Often when issuing DDL statements you
 are creating something that may or may
not exist already so you might want to get
     rid of it first before re-creating it.



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0


 Previously in Doctrine 1.x, the code for
    that might look something like the
  following for dropping and creating a
                 database.
              try {
                $sm->dropDatabase('test_db');
              } catch (Exception $e) {}

              $sm->createDatabase('test_db');



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0



But now we have added new methods for
dropping and creating things so the code
          looks like this now.

        $sm->dropAndCreateDatabase('test_db');



 Every create*() method has a matching
       dropAndCreate*() method
         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




 You’ll be hearing a lot more about the
Doctrine DBAL but for now we’ll get back
  to talking about what else is new in
                Doctrine



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




 Due to the decoupling things
  are easier to extend and
           override


         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




   Better support for multiple
    database connections



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




   Sequences, schemas and
    catalogs fully supported



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0


      Simplified connection information

  $config = new DoctrineORMConfiguration();
  $eventManager = new DoctrineCommonEventManager();
  $connectionOptions = array(
      'driver' => 'pdo_sqlite',
      'path' => 'database.sqlite'
  );
  $em = DoctrineORMEntityManager::create(
      $connectionOptions, $config, $eventManager
  );




          What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




   No more DSN nightmares



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




   Connection information
specified as simple PHP arrays



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




     Removed old and heavy
     constant based attribute
             system


         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




  Replaced with a simpler and
      lighter string based
     configuration system


         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




    Real Native SQL support



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




    Driver based Meta Data



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0

                               Annotations
        /**
          * @DoctrineEntity
          * @DoctrineTable(name="user")
          */
        class User
        {
             /**
              * @DoctrineId
              * @DoctrineColumn(type="integer")
              * @DoctrineGeneratedValue(strategy="auto")
              */
             public $id;

               /**
                * @DoctrineColumn(type="varchar", length=255)
                */
               public $username;
        }


            What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0

                               PHP Code
         $metadata = new ClassMetadata('User');

         $metadata->mapField(array(
           'fieldName' => 'id',
           'type' => 'integer',
           'id' => true
         ));

         $metadata->setIdGeneratorType('auto');

         $metadata->mapField(array(
           'fieldName' => 'username',
           'type' => 'varchar',
           'length' => 255
         ));
         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0

                                    YAML

              User:
                properties:
                  id:
                    id: true
                    type: integer
                    idGenerator: auto
                  username:
                    type: varchar
                    length: 255


         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0


• Other drivers possible
• XML, PHP arrays, etc.
• Write your own driver




          What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




                           Caching



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




                   Query Cache
   Cache final SQL that is generated from parsing DQL




          What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




                Metadata Cache
Cache the metadata containers so they are only populated once




             What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




                  Result Cache
         Cache the result sets of your queries




         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




      Inheritance Mapping



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




                    Single Table
                     One table per hierarchy




         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




                      Class Table
                         One table per class




         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




               Concrete Table
                One table per concrete class




         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




                             Testing



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




        Switched to phpUnit



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




        Better mock testing



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




 Test suite can be ran against
 any DBMS. MySQL, PgSQL,
      Oracle, Sqlite, etc.


         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




  Because of code decoupling
  tests are more granular and
         easier to debug


         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




                New Features



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




           New DQL Parser



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




Hand written recursive descent
            parser



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




     Constructs AST objects



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0


   PHP class names of DQL
  parser directly represent the
         language itself
                     OrderByClause.php
                     SelectClause.php
                     SelectExpression.php
                     Subselect.php
                     DeleteClause.php
                     etc. etc.

         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




Every DQL feature has a class
    to handle the parsing



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0


• Easy to use
• Easy to expand and add new features
• Easy to use and understand the parsing of a DQL
  string
• Expand the DQL parser with your own functionality
  and add to the DQL language




          What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




Performance of DQL parser is
 irrelevant due to the parsing
         being cached


         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




       Custom Data Types



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0

       namespace DoctrineDBALTypes;

       class MyCustomObjectType extends Type
       {
           public function getName()
           {
               return 'MyCustomObjectType';
           }

           public function getSqlDeclaration(array $fieldDeclaration,
           DoctrineDBALPlatformsAbstractPlatform $platform)
           {
               return $platform->getClobDeclarationSql($fieldDeclaration);
           }

           public function convertToDatabaseValue($value,
           DoctrineDBALPlatformsAbstractPlatform $platform)
           {
               return serialize($value);
           }

           public function convertToPHPValue($value)
           {
               return unserialize($value);
           }
       }


           What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0


                 Add the custom type


       Type::addCustomType(
          'MyCustomObjectType',
          'DoctrineDBALTypesMyCustomObjectType'
       );




         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0




      Overriding data types



         What’s new in Doctrine | Jonathan H. Wage
Doctrine 2.0


                            Override Types

class MyString extends StringType
{

}

Type::overrideType('string', 'DoctrineDBALTypesMyString');




            What’s new in Doctrine | Jonathan H. Wage
Questions



      Jonathan H. Wage
      jonathan.wage@sensio.com
      +1 415 992 5468

      sensiolabs.com | doctrine-project.org | sympalphp.org | jwage.com



You can contact Jonathan about Doctrine and Open-Source or
 for training, consulting, application development, or business
        related questions at jonathan.wage@sensio.com



              What’s new in Doctrine | Jonathan H. Wage

More Related Content

What's hot

Rails Model Basics
Rails Model BasicsRails Model Basics
Rails Model BasicsJames Gray
 
Building a Pluggable Plugin
Building a Pluggable PluginBuilding a Pluggable Plugin
Building a Pluggable PluginBrandon Dove
 
JavaFX 2.0 With Alternative Languages - JavaOne 2011
JavaFX 2.0 With Alternative Languages - JavaOne 2011JavaFX 2.0 With Alternative Languages - JavaOne 2011
JavaFX 2.0 With Alternative Languages - JavaOne 2011Stephen Chin
 
Database API, your new friend
Database API, your new friendDatabase API, your new friend
Database API, your new friendkikoalonsob
 
Symfony2 and Doctrine2 Integration
Symfony2 and Doctrine2 IntegrationSymfony2 and Doctrine2 Integration
Symfony2 and Doctrine2 IntegrationJonathan Wage
 
究極のコントローラを目指す
究極のコントローラを目指す究極のコントローラを目指す
究極のコントローラを目指すYasuo Harada
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAAiman Hud
 
CS101- Introduction to Computing- Lecture 26
CS101- Introduction to Computing- Lecture 26CS101- Introduction to Computing- Lecture 26
CS101- Introduction to Computing- Lecture 26Bilal Ahmed
 
CoffeeScript - A Rubyist's Love Affair
CoffeeScript - A Rubyist's Love AffairCoffeeScript - A Rubyist's Love Affair
CoffeeScript - A Rubyist's Love AffairMark
 
concurrency with GPars
concurrency with GParsconcurrency with GPars
concurrency with GParsPaul King
 
JavaFX and Scala in the Cloud: Stephen Chin
JavaFX and Scala in the Cloud: Stephen ChinJavaFX and Scala in the Cloud: Stephen Chin
JavaFX and Scala in the Cloud: Stephen Chinjaxconf
 
Java script objects 1
Java script objects 1Java script objects 1
Java script objects 1H K
 
Build Widgets
Build WidgetsBuild Widgets
Build Widgetsscottw
 
Design Summit - Navigating the ManageIQ Object Model - Brad Ascar
Design Summit - Navigating the ManageIQ Object Model - Brad AscarDesign Summit - Navigating the ManageIQ Object Model - Brad Ascar
Design Summit - Navigating the ManageIQ Object Model - Brad AscarManageIQ
 
Functional streams with Kafka - A comparison between Akka-streams and FS2
Functional streams with Kafka - A comparison between Akka-streams and FS2Functional streams with Kafka - A comparison between Akka-streams and FS2
Functional streams with Kafka - A comparison between Akka-streams and FS2Luis Miguel Reis
 
The Query the Whole Query and Nothing but the Query
The Query the Whole Query and Nothing but the QueryThe Query the Whole Query and Nothing but the Query
The Query the Whole Query and Nothing but the QueryChris Olbekson
 

What's hot (20)

Rails Model Basics
Rails Model BasicsRails Model Basics
Rails Model Basics
 
Building a Pluggable Plugin
Building a Pluggable PluginBuilding a Pluggable Plugin
Building a Pluggable Plugin
 
Phactory
PhactoryPhactory
Phactory
 
Ch8(oop)
Ch8(oop)Ch8(oop)
Ch8(oop)
 
JavaFX 2.0 With Alternative Languages - JavaOne 2011
JavaFX 2.0 With Alternative Languages - JavaOne 2011JavaFX 2.0 With Alternative Languages - JavaOne 2011
JavaFX 2.0 With Alternative Languages - JavaOne 2011
 
Database API, your new friend
Database API, your new friendDatabase API, your new friend
Database API, your new friend
 
Symfony2 and Doctrine2 Integration
Symfony2 and Doctrine2 IntegrationSymfony2 and Doctrine2 Integration
Symfony2 and Doctrine2 Integration
 
究極のコントローラを目指す
究極のコントローラを目指す究極のコントローラを目指す
究極のコントローラを目指す
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
CS101- Introduction to Computing- Lecture 26
CS101- Introduction to Computing- Lecture 26CS101- Introduction to Computing- Lecture 26
CS101- Introduction to Computing- Lecture 26
 
CoffeeScript - A Rubyist's Love Affair
CoffeeScript - A Rubyist's Love AffairCoffeeScript - A Rubyist's Love Affair
CoffeeScript - A Rubyist's Love Affair
 
concurrency with GPars
concurrency with GParsconcurrency with GPars
concurrency with GPars
 
Guice2.0
Guice2.0Guice2.0
Guice2.0
 
JavaFX and Scala in the Cloud: Stephen Chin
JavaFX and Scala in the Cloud: Stephen ChinJavaFX and Scala in the Cloud: Stephen Chin
JavaFX and Scala in the Cloud: Stephen Chin
 
Java script objects 1
Java script objects 1Java script objects 1
Java script objects 1
 
Introduction to hibernate
Introduction to hibernateIntroduction to hibernate
Introduction to hibernate
 
Build Widgets
Build WidgetsBuild Widgets
Build Widgets
 
Design Summit - Navigating the ManageIQ Object Model - Brad Ascar
Design Summit - Navigating the ManageIQ Object Model - Brad AscarDesign Summit - Navigating the ManageIQ Object Model - Brad Ascar
Design Summit - Navigating the ManageIQ Object Model - Brad Ascar
 
Functional streams with Kafka - A comparison between Akka-streams and FS2
Functional streams with Kafka - A comparison between Akka-streams and FS2Functional streams with Kafka - A comparison between Akka-streams and FS2
Functional streams with Kafka - A comparison between Akka-streams and FS2
 
The Query the Whole Query and Nothing but the Query
The Query the Whole Query and Nothing but the QueryThe Query the Whole Query and Nothing but the Query
The Query the Whole Query and Nothing but the Query
 

Viewers also liked

Sympal The Flexible Symfony Cms
Sympal The Flexible Symfony CmsSympal The Flexible Symfony Cms
Sympal The Flexible Symfony Cmsnarkoza
 
Symfony 2 (PHP Quebec 2009)
Symfony 2 (PHP Quebec 2009)Symfony 2 (PHP Quebec 2009)
Symfony 2 (PHP Quebec 2009)Fabien Potencier
 
Symfony Live 09 Symfony 2
Symfony Live 09 Symfony 2Symfony Live 09 Symfony 2
Symfony Live 09 Symfony 2narkoza
 
Building A Platform From Open Source At Yahoo
Building A Platform From Open Source At YahooBuilding A Platform From Open Source At Yahoo
Building A Platform From Open Source At Yahoonarkoza
 
антонич б. і. зелена євангелія. львів, 1938
антонич б. і. зелена євангелія. львів, 1938антонич б. і. зелена євангелія. львів, 1938
антонич б. і. зелена євангелія. львів, 1938narkoza
 
E-commerce con SF: dal case study alla realtà
E-commerce con SF: dal case study alla realtàE-commerce con SF: dal case study alla realtà
E-commerce con SF: dal case study alla realtàSimone D'Amico
 
Entrepreneurship support - an entrepreneur's perspective
Entrepreneurship support - an entrepreneur's perspectiveEntrepreneurship support - an entrepreneur's perspective
Entrepreneurship support - an entrepreneur's perspectiveSalim Virani
 
Database Design for News App
Database Design for News AppDatabase Design for News App
Database Design for News Appscubeuser31
 

Viewers also liked (9)

Sympal The Flexible Symfony Cms
Sympal The Flexible Symfony CmsSympal The Flexible Symfony Cms
Sympal The Flexible Symfony Cms
 
Symfony 2 (PHP Quebec 2009)
Symfony 2 (PHP Quebec 2009)Symfony 2 (PHP Quebec 2009)
Symfony 2 (PHP Quebec 2009)
 
Symfony Live 09 Symfony 2
Symfony Live 09 Symfony 2Symfony Live 09 Symfony 2
Symfony Live 09 Symfony 2
 
Building A Platform From Open Source At Yahoo
Building A Platform From Open Source At YahooBuilding A Platform From Open Source At Yahoo
Building A Platform From Open Source At Yahoo
 
антонич б. і. зелена євангелія. львів, 1938
антонич б. і. зелена євангелія. львів, 1938антонич б. і. зелена євангелія. львів, 1938
антонич б. і. зелена євангелія. львів, 1938
 
E-commerce con SF: dal case study alla realtà
E-commerce con SF: dal case study alla realtàE-commerce con SF: dal case study alla realtà
E-commerce con SF: dal case study alla realtà
 
SaaS con Symfony2
SaaS con Symfony2SaaS con Symfony2
SaaS con Symfony2
 
Entrepreneurship support - an entrepreneur's perspective
Entrepreneurship support - an entrepreneur's perspectiveEntrepreneurship support - an entrepreneur's perspective
Entrepreneurship support - an entrepreneur's perspective
 
Database Design for News App
Database Design for News AppDatabase Design for News App
Database Design for News App
 

Similar to What S New In Doctrine

Why Your Test Suite Sucks - PHPCon PL 2015
Why Your Test Suite Sucks - PHPCon PL 2015Why Your Test Suite Sucks - PHPCon PL 2015
Why Your Test Suite Sucks - PHPCon PL 2015CiaranMcNulty
 
Building Better Applications with Data::Manager
Building Better Applications with Data::ManagerBuilding Better Applications with Data::Manager
Building Better Applications with Data::ManagerJay Shirley
 
OOP Is More Than Cars and Dogs
OOP Is More Than Cars and DogsOOP Is More Than Cars and Dogs
OOP Is More Than Cars and DogsChris Tankersley
 
PHP: 4 Design Patterns to Make Better Code
PHP: 4 Design Patterns to Make Better CodePHP: 4 Design Patterns to Make Better Code
PHP: 4 Design Patterns to Make Better CodeSWIFTotter Solutions
 
Supercharging WordPress Development - Wordcamp Brighton 2019
Supercharging WordPress Development - Wordcamp Brighton 2019Supercharging WordPress Development - Wordcamp Brighton 2019
Supercharging WordPress Development - Wordcamp Brighton 2019Adam Tomat
 
Workshop quality assurance for php projects - ZendCon 2013
Workshop quality assurance for php projects - ZendCon 2013Workshop quality assurance for php projects - ZendCon 2013
Workshop quality assurance for php projects - ZendCon 2013Michelangelo van Dam
 
Workshop quality assurance for php projects tek12
Workshop quality assurance for php projects tek12Workshop quality assurance for php projects tek12
Workshop quality assurance for php projects tek12Michelangelo van Dam
 
Workshop quality assurance for php projects - phpbelfast
Workshop quality assurance for php projects - phpbelfastWorkshop quality assurance for php projects - phpbelfast
Workshop quality assurance for php projects - phpbelfastMichelangelo van Dam
 
PHP - Introduction to Object Oriented Programming with PHP
PHP -  Introduction to  Object Oriented Programming with PHPPHP -  Introduction to  Object Oriented Programming with PHP
PHP - Introduction to Object Oriented Programming with PHPVibrant Technologies & Computers
 
WordPress plugin #2
WordPress plugin #2WordPress plugin #2
WordPress plugin #2giwoolee
 
Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012Michelangelo van Dam
 
Extending WordPress. Making use of Custom Post Types
Extending WordPress. Making use of Custom Post TypesExtending WordPress. Making use of Custom Post Types
Extending WordPress. Making use of Custom Post TypesUtsav Singh Rathour
 
Meet Magento Belarus debug Pavel Novitsky (eng)
Meet Magento Belarus debug Pavel Novitsky (eng)Meet Magento Belarus debug Pavel Novitsky (eng)
Meet Magento Belarus debug Pavel Novitsky (eng)Pavel Novitsky
 
Software Testing & PHPSpec
Software Testing & PHPSpecSoftware Testing & PHPSpec
Software Testing & PHPSpecDarren Craig
 
Rails vs Web2py
Rails vs Web2pyRails vs Web2py
Rails vs Web2pyjonromero
 
Coming to Terms with OOP In Drupal - php[world] 2016
Coming to Terms with OOP In Drupal - php[world] 2016Coming to Terms with OOP In Drupal - php[world] 2016
Coming to Terms with OOP In Drupal - php[world] 2016Chris Tankersley
 

Similar to What S New In Doctrine (20)

Why Your Test Suite Sucks - PHPCon PL 2015
Why Your Test Suite Sucks - PHPCon PL 2015Why Your Test Suite Sucks - PHPCon PL 2015
Why Your Test Suite Sucks - PHPCon PL 2015
 
Unit testing zend framework apps
Unit testing zend framework appsUnit testing zend framework apps
Unit testing zend framework apps
 
Twig tips and tricks
Twig tips and tricksTwig tips and tricks
Twig tips and tricks
 
Building Better Applications with Data::Manager
Building Better Applications with Data::ManagerBuilding Better Applications with Data::Manager
Building Better Applications with Data::Manager
 
OOP Is More Than Cars and Dogs
OOP Is More Than Cars and DogsOOP Is More Than Cars and Dogs
OOP Is More Than Cars and Dogs
 
PHP: 4 Design Patterns to Make Better Code
PHP: 4 Design Patterns to Make Better CodePHP: 4 Design Patterns to Make Better Code
PHP: 4 Design Patterns to Make Better Code
 
Supercharging WordPress Development - Wordcamp Brighton 2019
Supercharging WordPress Development - Wordcamp Brighton 2019Supercharging WordPress Development - Wordcamp Brighton 2019
Supercharging WordPress Development - Wordcamp Brighton 2019
 
Workshop quality assurance for php projects - ZendCon 2013
Workshop quality assurance for php projects - ZendCon 2013Workshop quality assurance for php projects - ZendCon 2013
Workshop quality assurance for php projects - ZendCon 2013
 
Workshop quality assurance for php projects tek12
Workshop quality assurance for php projects tek12Workshop quality assurance for php projects tek12
Workshop quality assurance for php projects tek12
 
Workshop quality assurance for php projects - phpbelfast
Workshop quality assurance for php projects - phpbelfastWorkshop quality assurance for php projects - phpbelfast
Workshop quality assurance for php projects - phpbelfast
 
PHP - Introduction to Object Oriented Programming with PHP
PHP -  Introduction to  Object Oriented Programming with PHPPHP -  Introduction to  Object Oriented Programming with PHP
PHP - Introduction to Object Oriented Programming with PHP
 
WordPress plugin #2
WordPress plugin #2WordPress plugin #2
WordPress plugin #2
 
Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012
 
Extending WordPress. Making use of Custom Post Types
Extending WordPress. Making use of Custom Post TypesExtending WordPress. Making use of Custom Post Types
Extending WordPress. Making use of Custom Post Types
 
Meet Magento Belarus debug Pavel Novitsky (eng)
Meet Magento Belarus debug Pavel Novitsky (eng)Meet Magento Belarus debug Pavel Novitsky (eng)
Meet Magento Belarus debug Pavel Novitsky (eng)
 
Software Testing & PHPSpec
Software Testing & PHPSpecSoftware Testing & PHPSpec
Software Testing & PHPSpec
 
Rails vs Web2py
Rails vs Web2pyRails vs Web2py
Rails vs Web2py
 
Coming to Terms with OOP In Drupal - php[world] 2016
Coming to Terms with OOP In Drupal - php[world] 2016Coming to Terms with OOP In Drupal - php[world] 2016
Coming to Terms with OOP In Drupal - php[world] 2016
 
Libertyvasion2010
Libertyvasion2010Libertyvasion2010
Libertyvasion2010
 
Only oop
Only oopOnly oop
Only oop
 

Recently uploaded

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 

Recently uploaded (20)

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 

What S New In Doctrine

  • 1. What’s new in Doctrine Jonathan H. Wage Titre présentation | Conférencier
  • 2. What’s new in Doctrine • Doctrine Book • Doctrine 1.1 • Doctrine 2.0 • Default ORM in Symfony as of today!! What’s new in Doctrine | Jonathan H. Wage
  • 3. The first Doctrine book What’s new in Doctrine | Jonathan H. Wage
  • 4. The first Doctrine book • Available late June • Available online(html/pdf) and in book format • Complete user manual and reference guide for existing and new Doctrine developers What’s new in Doctrine | Jonathan H. Wage
  • 5. Doctrine 1.1 What’s new in Doctrine | Jonathan H. Wage
  • 6. Doctrine 1.1 Evolution of 1.x codebase What’s new in Doctrine | Jonathan H. Wage
  • 7. Doctrine 1.1 Stability, bugs and minor features What’s new in Doctrine | Jonathan H. Wage
  • 8. Doctrine 1.1 Zero failing test cases What’s new in Doctrine | Jonathan H. Wage
  • 9. Doctrine 1.1 Dozens of new test cases adding more complete code coverage What’s new in Doctrine | Jonathan H. Wage
  • 10. Doctrine 1.1 Fine tuned API What’s new in Doctrine | Jonathan H. Wage
  • 11. Doctrine 1.1 Improved hydration performance What’s new in Doctrine | Jonathan H. Wage
  • 12. Doctrine 1.1 Hydrate larger result sets in less time What’s new in Doctrine | Jonathan H. Wage
  • 13. Doctrine 1.1 Re-written documentation which is also the book that will be available in print What’s new in Doctrine | Jonathan H. Wage
  • 14. New Features What’s new in Doctrine | Jonathan H. Wage
  • 15. New Features New configuration options to remove hardcoded values What’s new in Doctrine | Jonathan H. Wage
  • 16. New Features Specify more global default values $manager->setAttribute( Doctrine::ATTR_DEFAULT_TABLE_CHARSET, Global table 'utf8' character set ); $manager->setAttribute( Doctrine::ATTR_DEFAULT_TABLE_COLLATE, Global table 'utf8_unicode_ci' collation ); $manager->setAttribute( Doctrine::ATTR_DEFAULT_IDENTIFIER_OPTIONS, Default automatic array('length' => 4) identifier definition ); $manager->setAttribute( Default column Doctrine::ATTR_DEFAULT_COLUMN_OPTIONS, definition array('notnull' => true) ); What’s new in Doctrine | Jonathan H. Wage
  • 17. New Features Better custom accessor and mutator support What’s new in Doctrine | Jonathan H. Wage
  • 18. New Features Custom accessors and mutators $manager->setAttribute( Feature is disabled Doctrine::ATTR_AUTO_ACCESSOR_OVERRIDE, by default true ); class User extends BaseUser { Define a new public function setPassword($password) mutator { $this->_set('password', md5($password)); } Set password } property and setPassword() is invoked $user->password = 'changeme'; What’s new in Doctrine | Jonathan H. Wage
  • 19. New Features Enhanced fromArray() and synchronizeWithArray() methods to better handle relationships What’s new in Doctrine | Jonathan H. Wage
  • 20. New Features Use the array with an Define array structure instance of a Doctrine $userData = array( model 'username' => 'jwage', $user = new User(); 'password' => 'changeme', $user->fromArray($userData); 'Groups' => array( array( '_identifier' => 1, ), array( '_identifier' => 2 Internally Symfony uses ), array( these methods to merge 'name' => 'New Group' form values to your model ) ) instances ); What’s new in Doctrine | Jonathan H. Wage
  • 21. New Features Generate phpDoc property tags for integration with IDEs What’s new in Doctrine | Jonathan H. Wage
  • 22. New Features /** All columns and relationships * BaseUser * get a generated @property tag * This class has been auto-generated by the Doctrine ORM Framework * * @property string $username * @property string $password * * @package ##PACKAGE## * @subpackage ##SUBPACKAGE## * @author ##NAME## <##EMAIL##> * @version SVN: $Id: Builder.php 5441 2009-01-30 22:58:43Z jwage $ */ abstract class BaseUser extends Doctrine_Record // .... Offers auto complete for modern IDEs What’s new in Doctrine | Jonathan H. Wage
  • 23. Database Migrations What’s new in Doctrine | Jonathan H. Wage
  • 24. Database Migrations General improvements all around to make things more intuitive and flexible What’s new in Doctrine | Jonathan H. Wage
  • 25. Database Migrations • Generated migration class files use timestamp prefix instead of incremented number 1.0 1.1 001_my_migration.class.php 1244735632_my_migration.class.php 002_my_migration2.class.php 1244735800_my_migration2.class.php • Avoid conflicts between developers when generating migrations What’s new in Doctrine | Jonathan H. Wage
  • 26. Database Migrations Introduced new Diff tool What’s new in Doctrine | Jonathan H. Wage
  • 27. Database Migrations Generate migration classes automatically from changes made to your schema What’s new in Doctrine | Jonathan H. Wage
  • 28. Database Migrations The schema we’re migrating from User: columns: username: string(255) password: string(255) What’s new in Doctrine | Jonathan H. Wage
  • 29. Database Migrations The schema we’re migrating to User: columns: username: string(255) password: string(255) email_address: string(255) We added a new email_address column What’s new in Doctrine | Jonathan H. Wage
  • 30. Database Migrations • How can we get these changes to our DBMS in dev, staging, production, etc.? – Manually write the SQL and apply it in dev, staging and production? Eeeek!! – Make SQL change in dev server and filter all DDL statements from DBMS query log? Eeeek!! • People handle this a lot of different ways and they are all dangerous and error prone • Database migrations give you a reliable and programmatic way to deploy and even revert database changes What’s new in Doctrine | Jonathan H. Wage
  • 31. Database Migrations Generating the changes $from = '/path/to/schema/from.yml'; $to = '/path/to/schema/to.yml'; $migrationsDir = '/path/to/migrations'; $diff = new Doctrine_Migration_Diff($from, $to, $migrationsDir); $changes = $diff->generateChanges(); print_r($changes); What’s new in Doctrine | Jonathan H. Wage
  • 32. Database Migrations The generated changes Array ( [created_columns] => Array ( [user] => Array ( [email_address] => Array ( [type] => string [length] => 255 ) ) ) ) What’s new in Doctrine | Jonathan H. Wage
  • 33. Database Migrations • Changes array used to generate migration classes • The class generation is not 100% • Some changes cannot be detected – For example we can’t detect if a column was renamed or an old column dropped and a new one created. • You should always review the generated classes to make sure they do what you want • So now we can generate our classes to help us migrate our database changes What’s new in Doctrine | Jonathan H. Wage
  • 34. Database Migrations Generating migration classes $from = '/path/to/schema/from.yml'; $to = '/path/to/schema/to.yml'; $migrationsDir = '/path/to/migrations'; $diff = new Doctrine_Migration_Diff($from, $to, $migrationsDir); $diff->generateMigrationClasses(); New migration class written to the $migrationsDir What’s new in Doctrine | Jonathan H. Wage
  • 35. Database Migrations Generating migration classes // /path/to/migrations/1239913213_version1.php class Version1 extends Doctrine_Migration_Base { public function up() { $this->addColumn('user', 'email_address', 'string', '255', array('email' => '1')); } public function down() { $this->removeColumn('user', 'email_address'); } } What’s new in Doctrine | Jonathan H. Wage
  • 36. Database Migrations Migrating changes Migrate from version 0 to version 1 $migration = new Doctrine_Migration('migrations'); $migration->migrate(); What’s new in Doctrine | Jonathan H. Wage
  • 37. Database Migrations Migrating from version 0 to 1 would execute the up() methods What’s new in Doctrine | Jonathan H. Wage
  • 38. Database Migrations Migrating from version 1 to 0 would execute the down() methods What’s new in Doctrine | Jonathan H. Wage
  • 39. Database Migrations Migrating changes Migrate back to version 0 $migration = new Doctrine_Migration('migrations'); $migration->migrate(0); What’s new in Doctrine | Jonathan H. Wage
  • 40. Database Migrations Symfony CLI Workflow • First modify your YAML schema • Second run the following command $ php symfony doctrine:generate-migrations-diff • Now you need to review the generated migrations classes in lib/migration/doctrine. Once you confirm they look good run this command. $ php symfony doctrine:migrate • Your database is migrated and you can rebuild your models from your schema. $ php symfony doctrine:build-model What’s new in Doctrine | Jonathan H. Wage
  • 41. Database Migrations In Symfony migrations work by comparing your modified YAML schema to the old generated models What’s new in Doctrine | Jonathan H. Wage
  • 42. New Hydration Types What’s new in Doctrine | Jonathan H. Wage
  • 43. Scalar Hydration What’s new in Doctrine | Jonathan H. Wage
  • 44. Scalar Hydration • Flat • Rectangular result set • Performs well • Harder to work with • Can contain duplicate data • Like a normal SQL resultset What’s new in Doctrine | Jonathan H. Wage
  • 45. Scalar Hydration $q = Doctrine::getTable('User') ->createQuery('u') ->leftJoin('u.Phonenumbers p'); $results = $q->execute(array(), Doctrine::HYDRATE_SCALAR); print_r($results); What’s new in Doctrine | Jonathan H. Wage
  • 46. Scalar Hydration Array ( [0] => Array ( [u_id] => 1 [u_username] => jwage [u_password] => changeme [u_email_address] => jonwage@gmail.com [p_id] => 1 [p_user_id] => 1 [p_phonenumber] => 16155139185 ) [1] => Array ( [u_id] => 1 [u_username] => jwage [u_password] => changeme [u_email_address] => jonwage@gmail.com [p_id] => 2 [p_user_id] => 1 [p_phonenumber] => 14159925468 ) ) What’s new in Doctrine | Jonathan H. Wage
  • 47. Single Scalar Hydration What’s new in Doctrine | Jonathan H. Wage
  • 48. Single Scalar Hydration Sub type of scalar hydration What’s new in Doctrine | Jonathan H. Wage
  • 49. Single Scalar Hydration Returns single scalar value What’s new in Doctrine | Jonathan H. Wage
  • 50. Single Scalar Hydration Useful for retrieving single value for aggregate/calculated results What’s new in Doctrine | Jonathan H. Wage
  • 51. Single Scalar Hydration Very fast since no need exists to hydrate the data in to objects or any other structure What’s new in Doctrine | Jonathan H. Wage
  • 52. Single Scalar Hydration $q = Doctrine::getTable('User') ->createQuery('u') ->select('COUNT(p.id) as num_phonenumbers') ->leftJoin('u.Phonenumbers p'); $results = $q->execute(array(), Doctrine::HYDRATE_SINGLE_SCALAR); echo $results; // 2 What’s new in Doctrine | Jonathan H. Wage
  • 53. Doctrine 2.0 What’s new in Doctrine | Jonathan H. Wage
  • 54. Doctrine 2.0 Requires PHP 5.3 What’s new in Doctrine | Jonathan H. Wage
  • 55. Doctrine 2.0 Performance increase from 5.3 What’s new in Doctrine | Jonathan H. Wage
  • 56. Doctrine 2.0 Test suite runs 20% faster and uses 30% less memory! These performance increases are without any code changes. With Doctrine 1.x under 5.3 the same increases apply What’s new in Doctrine | Jonathan H. Wage
  • 57. Doctrine 2.0 Hydration Performance Doctrine 1.1 4.3435637950897 for 5000 records Doctrine 2.0 1.4314442552312 for 5000 records Doctrine 2.0 3.4690098762512 for 10000 records What’s new in Doctrine | Jonathan H. Wage
  • 58. Doctrine 2.0 Everything re-designed and re- implemented What’s new in Doctrine | Jonathan H. Wage
  • 59. Doctrine 2.0 Simplified the public API What’s new in Doctrine | Jonathan H. Wage
  • 60. Doctrine 2.0 Heavily influenced by JPA/ Java Hibernate JPA = Java Persistence API Created by Sun What’s new in Doctrine | Jonathan H. Wage
  • 61. Doctrine 2.0 Smaller footprint What’s new in Doctrine | Jonathan H. Wage
  • 62. Doctrine 2.0 Un-necessary clutter removed What’s new in Doctrine | Jonathan H. Wage
  • 63. Doctrine 2.0 Removed Limitations What’s new in Doctrine | Jonathan H. Wage
  • 64. Doctrine 2.0 The old way class User extends Doctrine_Record { public function setTableDefinition() { $this->hasColumn('id', 'integer', null, array( 'primary' => true, 'auto_increment' => true )); $this->hasColumn('username', 'string', 255); } } What’s new in Doctrine | Jonathan H. Wage
  • 65. Doctrine 2.0 The new way /** * @DoctrineEntity * @DoctrineTable(name="user") */ class User { /** * @DoctrineId * @DoctrineColumn(type="integer") * @DoctrineGeneratedValue(strategy="auto") */ public $id; /** * @DoctrineColumn(type="varchar", length=255) */ public $username; } What’s new in Doctrine | Jonathan H. Wage
  • 66. Doctrine 2.0 No need to extend a base class anymore What’s new in Doctrine | Jonathan H. Wage
  • 67. Doctrine 2.0 No more cyclic references What’s new in Doctrine | Jonathan H. Wage
  • 68. Doctrine 2.0 print_r() your objects $user = new User(); $user->username = 'jwage'; print_r($user); User Object ( [id] => [username] => jwage ) What’s new in Doctrine | Jonathan H. Wage
  • 69. Doctrine 2.0 • Positive effect of removing the base class all around • Performance increase • Easier to debug What’s new in Doctrine | Jonathan H. Wage
  • 70. Doctrine 2.0 No more shared identity map across connections What’s new in Doctrine | Jonathan H. Wage
  • 71. Doctrine 2.0 Other general improvements What’s new in Doctrine | Jonathan H. Wage
  • 72. Doctrine 2.0 Code heavily de-coupled What’s new in Doctrine | Jonathan H. Wage
  • 73. Doctrine 2.0 Three main packages What’s new in Doctrine | Jonathan H. Wage
  • 74. Doctrine 2.0 Common What’s new in Doctrine | Jonathan H. Wage
  • 75. Doctrine 2.0 DBAL What’s new in Doctrine | Jonathan H. Wage
  • 76. Doctrine 2.0 ORM What’s new in Doctrine | Jonathan H. Wage
  • 77. Doctrine 2.0 Use just the DBAL without the ORM present What’s new in Doctrine | Jonathan H. Wage
  • 78. Doctrine 2.0 Database Abstraction Layer What’s new in Doctrine | Jonathan H. Wage
  • 79. Doctrine 2.0 • Under the hood of Doctrine is a powerful database abstraction layer. • It is an evolution of code that has existed in other projects such as PEAR MDB/MDB2 and Zend_Db • This layer has always existed but not advertised. • Now that it can be used standalone we’ll be advertising it much more as a separate system. What’s new in Doctrine | Jonathan H. Wage
  • 80. Doctrine 2.0 A few examples of the DBAL What’s new in Doctrine | Jonathan H. Wage
  • 81. Doctrine 2.0 Programatically issue DDL statements $columns = array( 'id' => array( 'type' => DoctrineDBALType::getType('integer'), 'autoincrement' => true, 'primary' => true, 'notnull' => true ), 'test' => array( 'type' => DoctrineDBALType::getType('string'), 'length' => 255 ) ); $options = array(); $sm->createTable('new_table', $columns, $options); What’s new in Doctrine | Jonathan H. Wage
  • 82. Doctrine 2.0 Try a method. If an error occurs in the DBAL an exception is thrown Sometimes you may want to catch the exception and swallow it. What’s new in Doctrine | Jonathan H. Wage
  • 83. Doctrine 2.0 Use the tryMethod() to......try a method and return false if it fails. The exception that was thrown if any can be retrieved and inspected. if ($sm->tryMethod('createTable', 'new_table', $columns, $options)) { // do something } What’s new in Doctrine | Jonathan H. Wage
  • 84. Doctrine 2.0 Often when issuing DDL statements you are creating something that may or may not exist already so you might want to get rid of it first before re-creating it. What’s new in Doctrine | Jonathan H. Wage
  • 85. Doctrine 2.0 Previously in Doctrine 1.x, the code for that might look something like the following for dropping and creating a database. try { $sm->dropDatabase('test_db'); } catch (Exception $e) {} $sm->createDatabase('test_db'); What’s new in Doctrine | Jonathan H. Wage
  • 86. Doctrine 2.0 But now we have added new methods for dropping and creating things so the code looks like this now. $sm->dropAndCreateDatabase('test_db'); Every create*() method has a matching dropAndCreate*() method What’s new in Doctrine | Jonathan H. Wage
  • 87. Doctrine 2.0 You’ll be hearing a lot more about the Doctrine DBAL but for now we’ll get back to talking about what else is new in Doctrine What’s new in Doctrine | Jonathan H. Wage
  • 88. Doctrine 2.0 Due to the decoupling things are easier to extend and override What’s new in Doctrine | Jonathan H. Wage
  • 89. Doctrine 2.0 Better support for multiple database connections What’s new in Doctrine | Jonathan H. Wage
  • 90. Doctrine 2.0 Sequences, schemas and catalogs fully supported What’s new in Doctrine | Jonathan H. Wage
  • 91. Doctrine 2.0 Simplified connection information $config = new DoctrineORMConfiguration(); $eventManager = new DoctrineCommonEventManager(); $connectionOptions = array( 'driver' => 'pdo_sqlite', 'path' => 'database.sqlite' ); $em = DoctrineORMEntityManager::create( $connectionOptions, $config, $eventManager ); What’s new in Doctrine | Jonathan H. Wage
  • 92. Doctrine 2.0 No more DSN nightmares What’s new in Doctrine | Jonathan H. Wage
  • 93. Doctrine 2.0 Connection information specified as simple PHP arrays What’s new in Doctrine | Jonathan H. Wage
  • 94. Doctrine 2.0 Removed old and heavy constant based attribute system What’s new in Doctrine | Jonathan H. Wage
  • 95. Doctrine 2.0 Replaced with a simpler and lighter string based configuration system What’s new in Doctrine | Jonathan H. Wage
  • 96. Doctrine 2.0 Real Native SQL support What’s new in Doctrine | Jonathan H. Wage
  • 97. Doctrine 2.0 Driver based Meta Data What’s new in Doctrine | Jonathan H. Wage
  • 98. Doctrine 2.0 Annotations /** * @DoctrineEntity * @DoctrineTable(name="user") */ class User { /** * @DoctrineId * @DoctrineColumn(type="integer") * @DoctrineGeneratedValue(strategy="auto") */ public $id; /** * @DoctrineColumn(type="varchar", length=255) */ public $username; } What’s new in Doctrine | Jonathan H. Wage
  • 99. Doctrine 2.0 PHP Code $metadata = new ClassMetadata('User'); $metadata->mapField(array( 'fieldName' => 'id', 'type' => 'integer', 'id' => true )); $metadata->setIdGeneratorType('auto'); $metadata->mapField(array( 'fieldName' => 'username', 'type' => 'varchar', 'length' => 255 )); What’s new in Doctrine | Jonathan H. Wage
  • 100. Doctrine 2.0 YAML User: properties: id: id: true type: integer idGenerator: auto username: type: varchar length: 255 What’s new in Doctrine | Jonathan H. Wage
  • 101. Doctrine 2.0 • Other drivers possible • XML, PHP arrays, etc. • Write your own driver What’s new in Doctrine | Jonathan H. Wage
  • 102. Doctrine 2.0 Caching What’s new in Doctrine | Jonathan H. Wage
  • 103. Doctrine 2.0 Query Cache Cache final SQL that is generated from parsing DQL What’s new in Doctrine | Jonathan H. Wage
  • 104. Doctrine 2.0 Metadata Cache Cache the metadata containers so they are only populated once What’s new in Doctrine | Jonathan H. Wage
  • 105. Doctrine 2.0 Result Cache Cache the result sets of your queries What’s new in Doctrine | Jonathan H. Wage
  • 106. Doctrine 2.0 Inheritance Mapping What’s new in Doctrine | Jonathan H. Wage
  • 107. Doctrine 2.0 Single Table One table per hierarchy What’s new in Doctrine | Jonathan H. Wage
  • 108. Doctrine 2.0 Class Table One table per class What’s new in Doctrine | Jonathan H. Wage
  • 109. Doctrine 2.0 Concrete Table One table per concrete class What’s new in Doctrine | Jonathan H. Wage
  • 110. Doctrine 2.0 Testing What’s new in Doctrine | Jonathan H. Wage
  • 111. Doctrine 2.0 Switched to phpUnit What’s new in Doctrine | Jonathan H. Wage
  • 112. Doctrine 2.0 Better mock testing What’s new in Doctrine | Jonathan H. Wage
  • 113. Doctrine 2.0 Test suite can be ran against any DBMS. MySQL, PgSQL, Oracle, Sqlite, etc. What’s new in Doctrine | Jonathan H. Wage
  • 114. Doctrine 2.0 Because of code decoupling tests are more granular and easier to debug What’s new in Doctrine | Jonathan H. Wage
  • 115. Doctrine 2.0 New Features What’s new in Doctrine | Jonathan H. Wage
  • 116. Doctrine 2.0 New DQL Parser What’s new in Doctrine | Jonathan H. Wage
  • 117. Doctrine 2.0 Hand written recursive descent parser What’s new in Doctrine | Jonathan H. Wage
  • 118. Doctrine 2.0 Constructs AST objects What’s new in Doctrine | Jonathan H. Wage
  • 119. Doctrine 2.0 PHP class names of DQL parser directly represent the language itself OrderByClause.php SelectClause.php SelectExpression.php Subselect.php DeleteClause.php etc. etc. What’s new in Doctrine | Jonathan H. Wage
  • 120. Doctrine 2.0 Every DQL feature has a class to handle the parsing What’s new in Doctrine | Jonathan H. Wage
  • 121. Doctrine 2.0 • Easy to use • Easy to expand and add new features • Easy to use and understand the parsing of a DQL string • Expand the DQL parser with your own functionality and add to the DQL language What’s new in Doctrine | Jonathan H. Wage
  • 122. Doctrine 2.0 Performance of DQL parser is irrelevant due to the parsing being cached What’s new in Doctrine | Jonathan H. Wage
  • 123. Doctrine 2.0 Custom Data Types What’s new in Doctrine | Jonathan H. Wage
  • 124. Doctrine 2.0 namespace DoctrineDBALTypes; class MyCustomObjectType extends Type { public function getName() { return 'MyCustomObjectType'; } public function getSqlDeclaration(array $fieldDeclaration, DoctrineDBALPlatformsAbstractPlatform $platform) { return $platform->getClobDeclarationSql($fieldDeclaration); } public function convertToDatabaseValue($value, DoctrineDBALPlatformsAbstractPlatform $platform) { return serialize($value); } public function convertToPHPValue($value) { return unserialize($value); } } What’s new in Doctrine | Jonathan H. Wage
  • 125. Doctrine 2.0 Add the custom type Type::addCustomType( 'MyCustomObjectType', 'DoctrineDBALTypesMyCustomObjectType' ); What’s new in Doctrine | Jonathan H. Wage
  • 126. Doctrine 2.0 Overriding data types What’s new in Doctrine | Jonathan H. Wage
  • 127. Doctrine 2.0 Override Types class MyString extends StringType { } Type::overrideType('string', 'DoctrineDBALTypesMyString'); What’s new in Doctrine | Jonathan H. Wage
  • 128. Questions Jonathan H. Wage jonathan.wage@sensio.com +1 415 992 5468 sensiolabs.com | doctrine-project.org | sympalphp.org | jwage.com You can contact Jonathan about Doctrine and Open-Source or for training, consulting, application development, or business related questions at jonathan.wage@sensio.com What’s new in Doctrine | Jonathan H. Wage