Skip to content

Commit

Permalink
Fixing sandbox for source control code and removing it from the build…
Browse files Browse the repository at this point in the history
….xml
  • Loading branch information
jwage committed Jun 17, 2010
1 parent d27733f commit bead9b8
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 29 deletions.
15 changes: 0 additions & 15 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,6 @@
<include name="Symfony/Components/**"/>
</fileset>

<!--
Fileset for the Doctrine ORM tools + sandbox.
-->
<fileset id="orm-tools" dir=".">
<include name="tools/sandbox/Entities"/>
<include name="tools/sandbox/xml"/>
<include name="tools/sandbox/yaml"/>
<include name="tools/sandbox/cli-config.php"/>
<include name="tools/sandbox/config.php"/>
<include name="tools/sandbox/doctrine"/>
<include name="tools/sandbox/doctrine.php"/>
<include name="tools/sandbox/index.php"/>
</fileset>

<!--
Clean the directory for the next build.
-->
Expand Down Expand Up @@ -100,7 +86,6 @@
<target name="build-orm" depends="test">
<copy todir="${build.dir}/orm">
<fileset refid="shared-artifacts"/>
<fileset refid="orm-tools"/>
</copy>
<copy todir="${build.dir}/orm">
<fileset refid="common-sources"/>
Expand Down
11 changes: 9 additions & 2 deletions tools/sandbox/cli-config.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
<?php

require_once __DIR__ . '/../../lib/Doctrine/Common/ClassLoader.php';
require_once '../../lib/vendor/doctrine-common/lib/Doctrine/Common/ClassLoader.php';

$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\\ORM', realpath(__DIR__ . '/../../lib'));
$classLoader->register();
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\\DBAL', realpath(__DIR__ . '/../../lib/vendor/doctrine-dbal/lib'));
$classLoader->register();
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\\Common', realpath(__DIR__ . '/../../lib/vendor/doctrine-common/lib'));
$classLoader->register();
$classLoader = new \Doctrine\Common\ClassLoader('Symfony', realpath(__DIR__ . '/../../lib/vendor'));
$classLoader->register();
$classLoader = new \Doctrine\Common\ClassLoader('Entities', __DIR__);
$classLoader->register();

$classLoader = new \Doctrine\Common\ClassLoader('Proxies', __DIR__);
$classLoader->register();

Expand Down
15 changes: 11 additions & 4 deletions tools/sandbox/doctrine.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
<?php

require __DIR__ . '/../../lib/Doctrine/Common/ClassLoader.php';
require_once '../../lib/vendor/doctrine-common/lib/Doctrine/Common/ClassLoader.php';

$classLoader = new \Doctrine\Common\ClassLoader('Doctrine', __DIR__ . '/../../lib');
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\\ORM', realpath(__DIR__ . '/../../lib'));
$classLoader->register();

$classLoader = new \Doctrine\Common\ClassLoader('Symfony', __DIR__ . '/../../lib/vendor');
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\\DBAL', realpath(__DIR__ . '/../../lib/vendor/doctrine-dbal/lib'));
$classLoader->register();
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\\Common', realpath(__DIR__ . '/../../lib/vendor/doctrine-common/lib'));
$classLoader->register();
$classLoader = new \Doctrine\Common\ClassLoader('Symfony', realpath(__DIR__ . '/../../lib/vendor'));
$classLoader->register();
$classLoader = new \Doctrine\Common\ClassLoader('Entities', __DIR__);
$classLoader->register();
$classLoader = new \Doctrine\Common\ClassLoader('Proxies', __DIR__);
$classLoader->register();

// Variable $helperSet is defined inside cli-config.php
Expand Down
21 changes: 13 additions & 8 deletions tools/sandbox/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,22 @@
Doctrine\Common\Cache\ApcCache,
Entities\User, Entities\Address;

require '../../lib/Doctrine/Common/ClassLoader.php';
require_once '../../lib/vendor/doctrine-common/lib/Doctrine/Common/ClassLoader.php';

// Set up class loading. You could use different autoloaders, provided by your favorite framework,
// if you want to.
$doctrineClassLoader = new ClassLoader('Doctrine', realpath(__DIR__ . '/../../lib'));
$doctrineClassLoader->register();
$entitiesClassLoader = new ClassLoader('Entities', __DIR__);
$entitiesClassLoader->register();
$proxiesClassLoader = new ClassLoader('Proxies', __DIR__);
$proxiesClassLoader->register();
$classLoader = new ClassLoader('Doctrine\\ORM', realpath(__DIR__ . '/../../lib'));
$classLoader->register();
$classLoader = new ClassLoader('Doctrine\\DBAL', realpath(__DIR__ . '/../../lib/vendor/doctrine-dbal/lib'));
$classLoader->register();
$classLoader = new ClassLoader('Doctrine\\Common', realpath(__DIR__ . '/../../lib/vendor/doctrine-common/lib'));
$classLoader->register();
$classLoader = new ClassLoader('Symfony', realpath(__DIR__ . '/../../lib/vendor'));
$classLoader->register();
$classLoader = new ClassLoader('Entities', __DIR__);
$classLoader->register();
$classLoader = new ClassLoader('Proxies', __DIR__);
$classLoader->register();

// Set up caches
$config = new Configuration;
Expand Down Expand Up @@ -54,4 +60,3 @@
$address = new Address;

echo 'Hello World!' . PHP_EOL;

0 comments on commit bead9b8

Please sign in to comment.