Download the PHP package yii2mod/base without Composer

On this page you can find all versions of the php package yii2mod/base. 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 base

Yii 2 Basic Project Template


Yii 2 Basic Application Template is a skeleton Yii 2 application best for rapidly creating small projects.

It includes all commonly used configurations that would allow you to focus on adding new features to your application.

Latest Stable Version Total Downloads License Scrutinizer Code Quality Build Status

Support us

Does your business depend on our contributions? Reach out and support us on Patreon. All pledges will be dedicated to allocating workforce on maintenance and new awesome stuff.

DIRECTORY STRUCTURE

  assets/             contains assets definition
  commands/           contains console commands (controllers)
  config/             contains application configurations
  controllers/        contains Web controller classes
  mail/               contains view files for e-mails
  models/             contains model classes
  runtime/            contains files generated during runtime
  tests/              contains various tests for the basic application
  vendor/             contains dependent 3rd-party packages
  views/              contains view files for the Web application
  web/                contains the entry script and Web resources

FEATURES

REQUIREMENTS

The minimum requirement by this application template that your Web server supports PHP 5.6

INSTALLATION

Installing using Composer

If you do not have Composer, follow the instructions in the Installing Yii section of the definitive guide to install it.

With Composer installed, you can then install the application using the following commands:

composer create-project --prefer-dist --stability=dev yii2mod/base application

The first command installs the composer asset plugin which allows managing bower and npm package dependencies through Composer. You only need to run this command once for all. The second command installs the yii2mod/base application in a directory named application. You can choose a different directory name if you want.

CONFIGURATION

After you install the application, you have to conduct the following steps to initialize the installed application. You only need to do these once for all.

1) Init the application by the following command:

2) Create a new database and adjust the components['db'] configuration in config/common-local.php accordingly.

3) Apply migrations:

4) Set document root of your web server to /path/to/application/web/ folder.

Installing using Docker

You need to have docker (1.10.0+) and docker-compose (1.6.0+) installed.

You can install the application using the following commands:

In .env file your need to set your UID. You can get your UID by the following command in the terminal: id -u <username>

It may take some minutes to download the required docker images. When done, you need to install vendors as follows:

After this steps, you need to update db section in the common-local.php file as follows:

When done, you need to execute the following commands in the web container:

After this steps, you can access your app from http://localhost.

TESTING

Tests are located in tests directory. They are developed with Codeception PHP Testing Framework. By default there are 3 test suites:

Running tests

  1. Create a new database and configure database connection in config/test_db.php accordingly.
  2. Execute migrations by the following command:
    • ./yii_test migrate --interactive=0 && ./yii_test rbac/migrate --interactive=0
  3. Run unit and functional tests:

The command above will execute unit and functional tests. Unit tests are testing the system components, while functional tests are for testing user interaction. Acceptance tests are disabled by default as they require additional setup since they perform testing in real browser.

Running acceptance tests

To execute acceptance tests do the following:

  1. Rename tests/acceptance.suite.yml.example to tests/acceptance.suite.yml to enable suite configuration

  2. Replace codeception/base package in composer.json with codeception/codeception to install full featured version of Codeception

  3. Update dependencies with Composer

  4. Download Selenium Server and launch it:

  5. Start web server:

  6. Now you can run all available tests

Code coverage support

By default, code coverage is disabled in codeception.yml configuration file, you should uncomment needed rows to be able to collect code coverage. You can run your tests and collect coverage with the following command:

You can see code coverage output under the tests/_output directory.


All versions of base with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
yiisoft/yii2 Version ~2.0.14
yiisoft/yii2-bootstrap Version ~2.0.0
yiisoft/yii2-swiftmailer Version ~2.0.0 || ~2.1.0
yiisoft/yii2-redis Version ~2.0.0
yii2mod/yii2-cms Version ~1.9
yii2mod/yii2-user Version ~2.1
yii2mod/yii2-rbac Version ~2.2
yii2mod/yii2-cron-log Version ~1.5
yii2mod/yii2-settings Version ~2.4
yii2mod/yii2-scheduling Version ~1.1
yii2mod/yii2-bootstrap-notify Version ~1.2
yii2mod/yii2-editable Version ~1.5
yii2tech/sitemap Version ^1.0
yii2tech/admin Version ~1.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 yii2mod/base contains the following files

Loading the files please wait ....