Composer / Plugins

The spoova project packages are stored in the root vendor/ folder where they become accessible by the entire framework. Although the composer vendor folder is placed at the root of the project application, it is suggested that the vendor folder which is a core aspect of the application, should be placed in the core/ directory to further strengthen its security. Since spoova is a very flexible framework, developers are allowed to move the vendor folder into the core/ if needed. However, note that the core/ directory is a strictly protected directory meant strictly for backend php files or classes. This means that the files in this directory is only accessible internally and this behaviour will prevent static files from loading. If static files will be imported to the vendor folder which are required to be accessible, then it is better to leave the vendor folder out of this directory.

Vendor Folder
This folder contains all loaded packages from the Composer package installer. The folder can be found at the root of the project application which makes it easier to run composer commands easily. Although this folder is placed at the root, it can be moved to the core/if required. This can be done by applying the following processes:

  • Move the vendor folder into the core directory.
  • Edit the json file autoload key such that it moves out of the core/ directory as shown below
        "autoload": {
            "psr-4": {
              "spoova\\mi\\": "../",
  • Run the composer dump-autoload -o command to update the application
  • Refresh your application to ensure that it runs perfectly fine
  • Once the application runs fine, move the composer.json file into the icore/ directory for security purposes.
  • Lastly, it is important to note that if the vendor folder is transferred to the core/ directory, then composer commands must also be executed within that directory.

Core Directory
This directory contains the core classes of the framework. Developers should avoid tampering with the core files within the core/ directory. If new classes will be created, custom folders may be used for classes. The root namespace follow the pattern of spoova\mi. This means that custom classes should also apply this namespacing rule.