Browse Source

change composer.json to autoload all files if koseven is used a package

Puskás Zsolt 6 years ago
parent
commit
8e1ad9d28b
3 changed files with 9 additions and 0 deletions
  1. 3 0
      composer.json
  2. 1 0
      system/guide/kohana/menu.md
  3. 5 0
      system/guide/kohana/tutorials/composer-koseven.md

+ 3 - 0
composer.json

@@ -39,5 +39,8 @@
   },
   "replace": {
     "kohana/core": "3.3.*"
+  },
+  "autoload": {
+    "classmap": ["/"]
   }
 }

+ 1 - 0
system/guide/kohana/menu.md

@@ -46,4 +46,5 @@
    - [Clean URLs](tutorials/clean-urls)
    - [Sharing Kohana](tutorials/sharing-kohana)
    - [Kohana as a Library](tutorials/library-kohana)
+   - [Koseven as a Composer package](tutorials/composer-koseven)
    - [Working with Git](tutorials/git)

+ 5 - 0
system/guide/kohana/tutorials/composer-koseven.md

@@ -0,0 +1,5 @@
+# Koseven as a Composer package
+
+Koseven can be used as a composer package to keep it seperate from your application. In this way you can easily upgrade koseven in your app using composer and don't have to manually update individual files. Also the individual helper classes (eg. HTML, Session) from koseven can be used even if the Core is not inited.
+
+Please note that before using most of the classes, you must define the DOCROOT, APPPATH, MODPATH and SYSPATH constants like in public/index.php. More info on writing init and bootstrap files can be found at [Kohana as a Library](tutorials/library-kohana) The DOCROOT must be set to vendor/koseven/koseven.