Umstellung auf Composer
authorMarkus Broeker<broeker.markus@googlemail.com>
Sun, 14 Feb 2016 22:24:29 +0100
changeset 45 a56e7f9a0463
parent 44 8745fd3bb425
child 46 f11c31f7fa3e
Umstellung auf Composer
.hgignore
classes/bfw/core/View.php
composer.json
composer.lock
config/config.php
--- a/.hgignore
+++ b/.hgignore
@@ -1,17 +1,17 @@
+syntax: glob
+
 \.orig$
 \.orig\..*$
 \.chg\..*$
 \.rej$
 \.conflict\~$
 
+syntax: regexp
+
 ^data/templates_c$
 ^logs/bfw.log$
-
-syntax: glob
-.hgignore
-
-syntax: regexp
 ^tests$
+^vendor$
 
 # Private Einstellungen der IDE's
 .idea/workspace.xml
--- a/classes/bfw/core/View.php
+++ b/classes/bfw/core/View.php
@@ -9,8 +9,6 @@
 
 use Smarty;
 
-require_once 'library/smarty/libs/Smarty.class.php';
-
 /**
  * Class View
  */
new file mode 100644
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,6 @@
+{
+    "require": {
+        "smarty/smarty": "^3.1",
+        "apache/log4php": "^2.3"
+    }
+}
new file mode 100644
--- /dev/null
+++ b/composer.lock
@@ -0,0 +1,104 @@
+{
+    "_readme": [
+        "This file locks the dependencies of your project to a known state",
+        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+        "This file is @generated automatically"
+    ],
+    "hash": "1298441be6b0aff4dfb5322e43c90c38",
+    "content-hash": "ce0cd6acc8f625b8fe35cb33e29cf404",
+    "packages": [
+        {
+            "name": "apache/log4php",
+            "version": "2.3.0",
+            "source": {
+                "type": "git",
+                "url": "https://git-wip-us.apache.org/repos/asf/logging-log4php.git",
+                "reference": "8c6df2481cd68d0d211d38f700406c5f0a9de0c2"
+            },
+            "require": {
+                "php": ">=5.2.7"
+            },
+            "type": "library",
+            "autoload": {
+                "classmap": [
+                    "src/main/php/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "Apache-2.0"
+            ],
+            "description": "A versatile logging framework for PHP",
+            "homepage": "http://logging.apache.org/log4php/",
+            "keywords": [
+                "log",
+                "logging",
+                "php"
+            ],
+            "time": "2012-10-26 09:13:25"
+        },
+        {
+            "name": "smarty/smarty",
+            "version": "v3.1.29",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/smarty-php/smarty.git",
+                "reference": "35480f10e7ce9b0fdaf23d3799d7b79463919b1e"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/smarty-php/smarty/zipball/35480f10e7ce9b0fdaf23d3799d7b79463919b1e",
+                "reference": "35480f10e7ce9b0fdaf23d3799d7b79463919b1e",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.2"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.1.x-dev"
+                }
+            },
+            "autoload": {
+                "classmap": [
+                    "libs/Smarty.class.php",
+                    "libs/SmartyBC.class.php",
+                    "libs/sysplugins/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "LGPL-3.0"
+            ],
+            "authors": [
+                {
+                    "name": "Monte Ohrt",
+                    "email": "monte@ohrt.com"
+                },
+                {
+                    "name": "Uwe Tews",
+                    "email": "uwe.tews@googlemail.com"
+                },
+                {
+                    "name": "Rodney Rehm",
+                    "email": "rodney.rehm@medialize.de"
+                }
+            ],
+            "description": "Smarty - the compiling PHP template engine",
+            "homepage": "http://www.smarty.net",
+            "keywords": [
+                "templating"
+            ],
+            "time": "2015-12-21 01:57:06"
+        }
+    ],
+    "packages-dev": [],
+    "aliases": [],
+    "minimum-stability": "stable",
+    "stability-flags": [],
+    "prefer-stable": false,
+    "prefer-lowest": false,
+    "platform": [],
+    "platform-dev": []
+}
--- a/config/config.php
+++ b/config/config.php
@@ -6,7 +6,7 @@
 define('BFW_PATH', dirname(dirname(__FILE__)));
 
 require_once BFW_PATH . '/classes/bfw/Configuration.php';
-require_once BFW_PATH . '/library/log4php/Logger.php';
+require_once BFW_PATH . '/vendor/autoload.php';
 
 Logger::configure(bfw\Configuration::bfw_loggerConfiguration());
 spl_autoload_register('bfw\Configuration::bfw_autoLoader');