Merge branch 'master' into feature/composer
authorKyle Spraggs <theman@spiffyjr.me>
Sun, 20 May 2012 20:01:14 +0000 (15:01 -0500)
committerKyle Spraggs <theman@spiffyjr.me>
Sun, 20 May 2012 20:01:14 +0000 (15:01 -0500)
Conflicts:
vendor/ZendFramework

.gitignore
README.md
composer.json [new file with mode: 0644]
composer.lock [new file with mode: 0644]
composer.phar [new file with mode: 0755]
public/index.php
vendor/README.md [deleted file]

index 77d8e16..04932a3 100644 (file)
@@ -6,4 +6,4 @@ nbproject
 .idea
 .project
 .settings
-
+vendor
index 5f21e53..35c3a87 100644 (file)
--- a/README.md
+++ b/README.md
@@ -10,33 +10,13 @@ looking to get their feet wet with ZF2.
 
 Installation
 ------------
-The easiest way to get a working copy of this project is to do a recursive
-clone:
+The easiest way to get a working copy of this project is to clone the repository
+and use composer to install dependencies:
 
-    git clone --recursive git://github.com/zendframework/ZendSkeletonApplication.git
+    cd my/project/dir
+    git clone git://github.com/zendframework/ZendSkeletonApplication.git
+    cd ZendSkeletonApplication
+    php composer.phar install
 
-After the clone is complete, set up a virtual host to point to the public/
-directory of the project and you should be ready to go!
-
-If you're wondering what the `--recursive` flag is, keep reading:
-
-Git Submodules
---------------
-This project makes use of [Git submodules](http://book.git-scm.com/5_submodules.html).
-Utilizing Git submodules allows us to reference an exact commit in the upstream
-[zendframework/zf2](https://github.com/zendframework/zf2) repository and ensure
-that those who have cloned the project have that same commit checked out. This
-provides several benefits:
-
-* Developers do not have to worry about which commit of the zf2 project to have
-  checked out for this project to work.
-* No additional steps to "install" Zend Framework are needed; it "just works"
-  after a cloning the project.
-
-There are a couple of mild caveats to be aware of:
-
-* Be sure to always run `git submodule update` after pulling, as merge/rebase
-  does not automatically update the checked out commit in submodules if it has
-  been changed.
-* The initial clone will be a bit slower, due to it having to pull down a
-  separate copy of ZF2 from what you already have.
+Afterwards, set up a virtual host to point to the public/ directory of the
+project and you should be ready to go!
\ No newline at end of file
diff --git a/composer.json b/composer.json
new file mode 100644 (file)
index 0000000..5dee8be
--- /dev/null
@@ -0,0 +1,14 @@
+{
+    "name": "zendframework/skeleton-application",
+    "description": "Skeleton Application for ZF2",
+    "license": "BSD-3-Clause",
+    "keywords": [
+        "framework",
+        "zf2"
+    ],
+    "homepage": "http://framework.zend.com/",
+    "require": {
+        "php": ">=5.3.3",
+        "zendframework/zendframework": "dev-master"
+    }
+}
diff --git a/composer.lock b/composer.lock
new file mode 100644 (file)
index 0000000..656881c
--- /dev/null
@@ -0,0 +1,32 @@
+{
+    "hash": "0dec7f0ed037ec44a5f067188ff04355",
+    "packages": [
+        {
+            "package": "zendframework/zendframework",
+            "version": "dev-master",
+            "source-reference": "0a3c5746b98e26a958e95e172be07124b3ba08ae",
+            "alias-pretty-version": "2.0.x-dev",
+            "alias-version": "2.0.9999999.9999999-dev"
+        },
+        {
+            "package": "zendframework/zendframework",
+            "version": "dev-master",
+            "source-reference": "0a3c5746b98e26a958e95e172be07124b3ba08ae"
+        },
+        {
+            "package": "zendframework/zendframework",
+            "version": "dev-master",
+            "source-reference": "8eb84d3957d69346bccd876a5dc0f4e2dbb91e9c",
+            "alias-pretty-version": "2.0.x-dev",
+            "alias-version": "2.0.9999999.9999999-dev"
+        }
+    ],
+    "packages-dev": null,
+    "aliases": [
+
+    ],
+    "minimum-stability": "dev",
+    "stability-flags": {
+        "zendframework/zendframework": 20
+    }
+}
diff --git a/composer.phar b/composer.phar
new file mode 100755 (executable)
index 0000000..2d82ef5
Binary files /dev/null and b/composer.phar differ
index 2868a5c..adaa631 100644 (file)
@@ -1,21 +1,19 @@
 <?php
-chdir(dirname(__DIR__));
-require_once (getenv('ZF2_PATH') ?: 'vendor/ZendFramework/library') . '/Zend/Loader/AutoloaderFactory.php';
+use Zend\ServiceManager\ServiceManager,
+    Zend\Mvc\Service\ServiceManagerConfiguration;
 
-use Zend\Loader\AutoloaderFactory,
-Zend\ServiceManager\ServiceManager,
-Zend\Mvc\Service\ServiceManagerConfiguration;
+chdir(dirname(__DIR__));
 
-// setup autoloader
-AutoloaderFactory::factory();
+// Composer autoloading
+require_once('vendor/autoload.php');
 
-// get application stack configuration
+// Get application stack configuration.
 $configuration = include 'config/application.config.php';
 
-// setup service manager
+// Setup service manager.
 $serviceManager = new ServiceManager(new ServiceManagerConfiguration($configuration['service_manager']));
 $serviceManager->setService('ApplicationConfiguration', $configuration);
 $serviceManager->get('ModuleManager')->loadModules();
 
-// run application
-$serviceManager->get('Application')->bootstrap()->run()->send();
+// Run application.
+$serviceManager->get('Application')->bootstrap()->run()->send();
\ No newline at end of file
diff --git a/vendor/README.md b/vendor/README.md
deleted file mode 100644 (file)
index 77ae06b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-This `vendor/` directory is where third-party modules should be installed.