Download the PHP package dersonsena/yii2-skeleton without Composer

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

Yii 2 Skeleton


Yii 2 Skeleton is a new approach to a design skeleton using Yii 2 as a basis.

The motivation to make this new template was to try to organize the packages inside a src directory, keeping all the class there, ie a place where the main application code will be.

REQUIREMENTS

The minimum requirement by this project template that your Web server supports PHP 8+.

RESOURCES

INSTALLATION

Install via Composer

If you do not have Composer, you may install it by following the instructions at getcomposer.org.

You can then install this project template using the following command:

Your Enviroments Variables

Make a copy of the .env.sample file, you can use cp .env.sample .env in your terminal to do that.

You can place your environment settings in .env file, as below (note the sample file is ready to basic usage):

NOTE: the commented environment variables are optional and your values set here is its default value.

Run your Application

Before anything change PROJECT_NAME env variable to your project name/alias. This one it will be used to prefixed the application containers and other stuff.

To start your application and start up your containers just run the follow command:

The command above will start 2 docker containers: yii2-skeleton-app (Nginx + PHP 8.1) and yii2-skeleton-db (MySQL)

If you have set a DOCKER_APP_PORT environment variable to 8000, you will can then access the yout application through the following URL:

COHESIVE CONTROLLER

Trying to follow the best programming practices, this boilerplate has a controller type called CohesiveController to help you a create a controller class with a single action (aka handle() method) and a single responsibility.

To create a cohesive controller got to config/routes.php and add your route such as:

The next step is create your CohesiveXptoRoutineController class extending from App\Core\Controller\CohesiveController and implement the handle() method, as below:

Finally, access your Cohesive action: http://localhost:8080/specific/route/to/cohesive/a/controller

THE USEFUL MAKEFILE

The makefile file has several commands to help with day-to-day work. In it you can execute commands inside the container by typing a few letters in your terminal.

If you wanted to install or update the dependencies of your application, you should do something like:

For you not to have to write all this, use make:

Thanks @wilcorrea for showing me this simple yet useful approach.

The makefile of skeleton comes with the following commands:


All versions of yii2-skeleton with dependencies

PHP Build Version
Package Version
Requires php Version >=8
ext-intl Version *
ext-json Version *
yiisoft/yii2 Version ~2.0.45
yiisoft/yii2-bootstrap5 Version ~2.0.2
yiisoft/yii2-swiftmailer Version ~2.1.3
vlucas/phpdotenv Version ^5.3
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 dersonsena/yii2-skeleton contains the following files

Loading the files please wait ....