Download the PHP package somehow-digital/craft-stack without Composer

On this page you can find all versions of the php package somehow-digital/craft-stack. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package craft-stack

Stack for Craft CMS

Brings a namespace system to better organize and load Twig templates in Craft CMS.

Stack provides a namespace system to resolve template files and behaves similar to how Twig's native FilesystemLoader works. Under the hood it uses Craft's Template Roots mechanism. Currently, this plugin works in frontend mode only. (It does not work with Craft's panel templates.)

Requirements

Installation

Install this plugin from the Plugin Store or via Composer.

Plugin Store

Go to the “Plugin Store” in your project’s Control Panel, search for “stack” and click on the “Install” button in its modal window.

Composer

Configuration

Settings can be configured via a config/stack.php config file.

prefix - handle prefix for namespaced template file paths.

default: @

namespaces - list of namespaces for template file path resolution.

default: []

config/stack.php

Usage

Due to how Craft's template roots work, if a defined template path resolves to an existing template file, Stack's namespace system will not be used, because Craft will resolve existing template files, before configured template roots are evaluated. This also means that Stack will not interfere with template paths of existing template files.

Dynamic Resolution

The template file will be resolved by the order of the configured namespaces and their paths.

  1. If the current site's handle is mysite and the current site-group's name is mygroup, the first resolved template path is templates/sites/mysite/header.twig. If this template file exists, it will be used.
  2. If it doesn't exist, the next resolved template path is templates/groups/mygroup/header.twig. If this template file exists, it will be used.
  3. If it doesn't exist, the last resolved template path is templates/_global/header.twig. If this template file exists, it will be used.
  4. If it doesn't exist, Craft will throw the default TemplateNotFound exception.

Static Resolution

Prefixing a template file path with a namespace handle, a template file for a specific namespace can be used. If the template does not exist, Craft will throw a TemplateNotFound exception. The namespace prefix will be evaluated via the handle value defined in the config file.

  1. If the current site's handle is mysite, the resolved template path is templates/sites/mysite/header.twig. If this template file exists, it will be used.
  2. If it doesn't exist, Craft will throw the default TemplateNotFound exception.

somehow digital.


All versions of craft-stack with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
craftcms/cms Version ^5.8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package somehow-digital/craft-stack contains the following files

Loading the files please wait ...