Skip to content

๐Ÿ˜๐Ÿš€ PHP Basic Skeleton: Bootstrap your new projects using this Composer Project

License

Notifications You must be signed in to change notification settings

satboy78/php-basic-skeleton

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

31 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

PHP Bootstrap (base / project skeleton)

Latest Version on Packagist Software License Build Status Quality Score Total Downloads

Introduction

This is a repository intended to serve as a starting point if you want to bootstrap a project in PHP. This repository has been explained in the CodelyTV video "Introducciรณn a PHP: Cรณmo configurar tu entorno de desarrollo ๐Ÿ˜" (Spanish).

It could be useful if you want to start from scratch a kata or a little exercise or project. The idea is that you don't have to worry about the boilerplate, just run composer create-project codelytv/php-bootstrap your-project-name and there you go:

How To Start

You have 2 different alternatives: Using our Packagist project with Composer, or manually cloning this repo:

Using Composer

Start completely from scratch without having to delete this bootstrap project Git history:

  1. If you don't have it already, install Composer.
  2. Create your project based on the Packagist project. This will also download the project dependencies: composer create-project codelytv/php-bootstrap your-project-name.
  3. Move to the project directory: cd your-project-name
  4. Run all the checks: composer test. This will do some checks that you can perform with isolated commands:
    1. PHP Parallel Lint: composer lint.
    2. PHP Style Check: composer style. If you want to fix style issues automatically: composer fix-style.
    3. PHP Unit: composer phpunit.
  5. Create your own repository:
    1. Initialize your own Git repository: git init
    2. Add the bootstrap files: git add .
    3. Commit: git commit -m "Initial commit with project boilerplate based on https://github.com/CodelyTV/php-bootstrap"
    4. Add your remote repository: git remote add origin git@github.com:your-username/your-project-name
    5. Upload your local commits to the new remote repo: git push -u origin master
  6. Start coding!

Cloning the repository

Just in case you prefer to avoid dealing with composer create-project, you can also clone this repository. We recommend to follow the next step by step process in order to avoid adding the bootstrap project commits to your project Git history:

  1. Clone this repository: git clone https://github.com/CodelyTV/php-bootstrap your-project-name
  2. Move to the project directory: cd your-project-name
  3. If you don't have it already, install Composer.
  4. Install the project dependencies: composer install
  5. Run all the checks: composer test. This will do some checks that you can perform with isolated commands:
    1. PHP Parallel Lint: composer lint.
    2. PHP Style Check: composer style. If you want to fix style issues automatically: composer fix-style.
    3. PHP Unit: composer phpunit.
  6. Create your own repository cleaning the bootstrap project history:
    1. Remove previous Git history in order to do not add the bootstrap repo noise in your project: rm -rf .git
    2. Initialize your own Git repository: git init
    3. Add the bootstrap files: git add .
    4. Commit: git commit -m "Initial commit with project boilerplate based on https://github.com/CodelyTV/php-bootstrap"
    5. Add your remote repository: git remote add origin git@github.com:your-username/your-project-name
    6. Upload your local commits to the new remote repo: git push -u origin master
  7. Start coding!

Helpful resources

PHP 7

PHPUnit

Refactoring

Other programming languages

About

This hopefully helpful utility has been developed by CodelyTV and contributors.

We'll try to maintain this project as simple as possible, but Pull Requests are welcomed!

License

The MIT License (MIT). Please see License File for more information.

About

๐Ÿ˜๐Ÿš€ PHP Basic Skeleton: Bootstrap your new projects using this Composer Project

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%