cottacush / yii2-base-project
A Yii 2 Base Project Template
Installs: 63
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 10
Forks: 2
Open Issues: 0
Type:project
Requires
- php: ~8.0
- cottacush/yii2-user-auth: ^2.0
- cottacush/yii2-utils: ^3.0
- cottacush/yii2-widgets: ^2.0
- lukasoppermann/http-status: ^2.0
- ogheo/yii2-htmlcompress: ^1.1
- vlucas/phpdotenv: ^2.2
- yiisoft/yii2: ~2.0.40
- yiisoft/yii2-bootstrap4: ^2.0
- yiisoft/yii2-swiftmailer: *
Requires (Dev)
- codeception/codeception: *
- pdepend/pdepend: 2.2.4
- phploc/phploc: *
- phpmd/phpmd: @stable
- phpunit/phpunit: ^9.0
- sebastian/phpcpd: *
- squizlabs/php_codesniffer: ^3.5
- theseer/phpdox: *
- yiisoft/yii2-debug: *
- yiisoft/yii2-faker: *
- yiisoft/yii2-gii: *
- dev-master
- 2.0.0
- 1.6.0
- 1.5.0
- 1.3.1
- 1.3.0
- 1.2.1
- 1.2.0
- 1.1.0
- 1.0.0
- dev-improvements/project-upgrade
- dev-fixes/update-deprecated-methods-deployer
- dev-features/transpile-es-with-babel
- dev-features/invite-flow
- dev-move-bower-dependencies
- dev-fixes/deployer-shared-dirs-config
- dev-features/dropzone-image-upload-demo
This package is auto-updated.
Last update: 2024-11-05 22:46:54 UTC
README
A Yii 2 Base Project Template
Features
-
Yii framework as the PHP MVC framework.
-
Security - It sets some headers that projects applications against click-jacking and XSS.
-
Assets version - This fixes issue with updates to js and css files and cached browser files.
-
New Relic - Ensures that the proper routes show up in the new relic monitoring dashboard.
-
Continuous Integration - Sample ant build.xml file that can be easily modified.
Requirements
The minimum requirement by this project template that your Web server supports PHP 8.0.
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:
composer global require "fxp/composer-asset-plugin:~1.4"
composer create-project --prefer-dist cottacush/yii2-base-project new_project
Virtual Host Setup
Sample Virtual Host Config for Apache
<VirtualHost *:80> ServerAdmin admin@example.com DocumentRoot "<WebServer Root Dir>/yii2-base-project/app/web" ServerName local.yii2-base-template.com <Directory <WebServer Root Dir>/yii2-base-project/app/web> AllowOverride all Options -MultiViews Require all granted </Directory> </VirtualHost>
Build
Dependencies
Run build
ant
Environment Variables
Make a copy of .env.sample
to .env
in the env directory.
Docker
This project is dockerized using the LEMP stack. The stack consists of:
- PHP 8
- nginx
Inspired by yii2-dockerized
Installation
Running Containers
- Ensure docker is running
- Change directory to project directory
- Run the command
docker-compose up
- To rebuild the containers after updates to docker config files, run
docker-compose up --build
Entering Container CLI
- Run the command
docker ps
- Check the Container ID for container with image ending with "_web"
- Run the command
docker exec -it [container_id] bash
Change log
Please see CHANGELOG for more information what has changed recently.
Security
If you discover any security related issues, please email developers@cottacush.com instead of using the issue tracker.
Credits
- Adegoke Obasa goke@cottacush.com
- All Contributors
License
The MIT License (MIT). Please see License File for more information.