Coder Social home page Coder Social logo

training's Introduction

PHP Scaffolding

MIT Software License

This is a scaffolding for PHP projects using Docker.

In this repository you will find:

  • PHP (7.4)
  • Composer (currently 2.0)
  • PHPUnit (currently 9)
  • XDebug (currently 3)
  • Psalm (currently 4)
  • A basic Dockerfile ready to use from your docker-compose.yml
  • Basic structure ready to start coding in src and tests

Setup

curl -sS https://raw.githubusercontent.com/Chemaclass/php-scaffolding/master/setup.sh > setup.sh
bash setup.sh YourNewProjectName
rm setup.sh

Getting the bash from your project

docker exec -ti -u dev your_project_name bash

Some composer scripts

composer test-all     # run test-quality & test-unit
composer test-quality # run csrun & psalm
composer test-unit    # run phpunit

composer csrun  # check code style
composer psalm  # run Psalm coverage

Git hooks

  • ./tools/scripts/git-hooks/pre-commit.sh
  • ./tools/scripts/git-hooks/pre-push.sh

Installation

ln -s tools/scripts/git-hooks/pre-commit.sh .git/hooks/pre-commit
ln -s tools/scripts/git-hooks/pre-push.sh .git/hooks/pre-push

Contributions

Installing this repository locally

docker-compose up -d
docker-compose exec php_scaffolding composer install
docker-compose exec -u dev php_scaffolding composer test-all
docker exec -ti -u dev php_scaffolding bash

Feel free to open any PR with your ideas, suggestions or improvements.

Or contact me directly via Twitter.

training's People

Contributors

chemaclass avatar sebastianlarisch avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.