Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update composer

  • Loading branch information...
commit 65764459974a9bcdb1a8bc4ac9be0f0922d27139 1 parent 412dc94
@Vrtak-CZ Vrtak-CZ authored
View
2  .gitignore
@@ -1,3 +1,3 @@
-vendors
+vendor
composer.lock
composer.phar
View
18 Nella/Config/Configurator.php
@@ -22,24 +22,6 @@ class Configurator extends \Nette\Config\Configurator
/** @var \Nella\Event\IEventDispatcher */
private $eventManager;
- public function __construct()
- {
- @header('X-Powered-By: Nette Framework with Nella Framework');
- require_once __DIR__ . '/../shortcuts.php';
- parent::__construct();
- }
-
- /**
- * @return array
- */
- protected function getDefaultParameters()
- {
- $params = parent::getDefaultParameters();
- $trace = debug_backtrace(FALSE);
- $params['appDir'] = isset($trace[2]['file']) ? dirname($trace[2]['file']) : NULL;
- return $params;
- }
-
/**
* @return \Nella\Event\IEventDispatcher
*/
View
25 Nella/loader.php
@@ -8,33 +8,10 @@
* please view the file LICENSE.txt that was distributed with this source code.
*/
-use Nette\Diagnostics\Debugger;
-
-if (!defined('LIBS_DIR')) {
- define('LIBS_DIR', realpath(__DIR__ . '/../'));
-}
-
-// Load and init Nette Framework
-if (!defined('NETTE')) {
- $file = LIBS_DIR . '/Nette/loader.php';
- if (!file_exists($file)) {
- die('You must load Nette Framework first');
- }
- require_once $file;
-}
-
-/**
- * Load and configure Nella Framework
- */
-define('NELLA_FRAMEWORK', TRUE);
-define('NELLA_FRAMEWORK_VERSION_ID', 20000); // v2.0.0
-@header('X-Powered-By: Nette Framework with Nella Framework'); // @ - headers may be sent
+require_once __DIR__ . '/shortcuts.php';
require_once __DIR__ . '/SplClassLoader.php';
$map = array(
'Nella' => __DIR__,
);
Nella\SplClassLoader::getInstance($map)->register();
-
-require_once __DIR__ . '/shortcuts.php';
-
View
13 Nella/shortcuts.php
@@ -4,10 +4,21 @@
*
* Copyright (c) 2006, 2012 Patrik Votoček (http://patrik.votocek.cz)
*
- * For the full copyright and license information,
+ * For the full copyright and license information,
* please view the file LICENSE.txt that was distributed with this source code.
*/
+if (!class_exists('Nette\Framework')) {
+ die('You must load Nette Framework first');
+}
+
+/**
+ * Load and configure Nella Framework
+ */
+define('NELLA_FRAMEWORK', TRUE);
+define('NELLA_FRAMEWORK_VERSION_ID', 20000); // v2.0.0
+@header('X-Powered-By: Nette Framework with Nella Framework'); // @ - headers may be sent
+
/**
* @param mixed
* @param string
View
13 composer.json
@@ -4,7 +4,7 @@
"description": "Nella Framework",
"keywords": ["nella", "framework", "doctrine", "nette"],
"homepage": "http://nellafw.org",
- "license": ["BSD-3", "GPLv2", "GPLv3"],
+ "license": ["BSD-3-Clause", "GPL-2.0+"],
"authors": [
{
"name": "Patrik Votoček",
@@ -17,16 +17,17 @@
}
],
"autoload": {
- "psr-0": { "Nella": "" }
+ "psr-0": { "Nella": "./" },
+ "files": ["Nella/shortcuts.php"]
},
"require": {
"php": ">=5.3.2",
- "doctrine/common": "2.3.*@beta",
- "doctrine/dbal": "2.3.*@beta",
- "doctrine/orm": "2.3.*@beta",
+ "doctrine/common": "2.3.*@rc",
+ "doctrine/dbal": "2.3.*@rc",
+ "doctrine/orm": "2.3.*@rc",
"doctrine/migrations": "@dev",
"symfony/console": "2.0.*",
- "nette/nette": "2.0.*"
+ "nette/nette": ">=2.0.5"
},
"require-dev": {
"nella/testing": "dev-master"
View
8 tests/bootstrap.php
@@ -21,9 +21,7 @@
require_once $params['libsDir'] . "/autoload.php";
require_once __DIR__ . "/../Nella/loader.php";
Nella\SplClassLoader::getInstance()
- ->addNamespaceAlias('NellaTests', __DIR__ . '/cases')
- ->addNamespaceAlias('Doctrine', $params['libsDir'] . "/Doctrine")
- ->addNamespaceAlias('Symfony', $params['libsDir'] . "/Symfony");
+ ->addNamespaceAlias('NellaTests', __DIR__ . '/cases');
// Setup Nette profiler
//Debugger::$browser = '';
@@ -31,7 +29,7 @@
Debugger::enable(Debugger::DEVELOPMENT, __DIR__ . "/temp/log");
// Init DI Container
-$configurator = new \Nette\Config\Configurator;
+$configurator = new Nette\Config\Configurator;
$configurator->addParameters($params);
$configurator->setTempDirectory($params['tempDir']);
@@ -41,4 +39,4 @@
require_once __DIR__ . "/mocks/EntityManagerMock.php";
require_once __DIR__ . "/mocks/UserStorage.php";
-\Nette\Environment::setContext($container);
+Nette\Environment::setContext($container);
Please sign in to comment.
Something went wrong with that request. Please try again.