Download the PHP package majisti/boilerplate without Composer

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

Introduction

This is the Majisti's Scaffolding project. We use it here to bootstrap projects. This is not a generator, just a place where to centralize the knowledge of creating rich applications with a PHP backend and frontend (JavaScript, SCSS, etc.).

The following is provided out of the box:

Roadmap

Short term

Long term

Experimentations

The BlackJack Game

This boilerplate comes with a BlackJack game, playable within the Symfony Console. It was programmed in order to showcase full stack testing techniques.

Here is a little screenshot:

alt text

Known Bugs

Installation

Docker & docker-compose

In order to setup this project without playing around with global dependencies, use docker and docker-compose.

Setup

Make sure your nginx proxy is setup to always start on boot:

note: you might want to use 8080:80 or 8081:80 if port 80 or 8080 are already used.

Once this is done, you only need to run:

Add to your /etc/host file:

Usage

Continuous Integration

To run the entire setup with tests: make ci

Testing with Behaviour Driven Development

You can run all tests using make test. This will run the whole testing pyramid, such as Acceptance, Functional, Integration and Unit tests

The project is setup to be tested using BDD techniques. It is far from perfect and it is an effort to bring BDD on the table for the codebase. The tools installed are the following:

Codeception

Codeception is good for:

Behat

Behat is used for StoryBDD and functional tests. application using either:

at the acceptance and functional level. Gherkin is used to writes stories.

Behat is good for:

Running Functional tests using BrowserKit (fastest, but does not support JavaScript)

Running Functional tests in a real browser

Running Functional tests in phantomjs

Screenshots

Running Unit tests under IntelliJ

  1. Configure a new local PHP interpreter that points to bin/php7-docker-ide under Settings > PHP
  2. Configure under Settings > PHP > PHPUnit
    • Use custom autoloader, using the vendor/autoload.php
    • Use optional configuration file, located within ./phpunit.xml.dist

Code Style

You can checkstyle your PHP code by running a dry-run with make cs or if you want to automatically fix the code, you can run make cs-fix

Debugging

If you want to enable XDebug run your command with the XDEBUG env variable : XDEBUG=1 docker-compose ...

if you want to always have XDebug enabled you can add these lines to your docker-compose.override.yml :

Where YOUR_HOST_IP is the ip of the host machine (not the ip of the VM used for docker).

Now to make step debugging work within PHPStorm, you must do the following:

Running your code within the command line will stop at the line where you place a breakpoint. To debug within your browser, you must install the Chrome XDebug Helper extension. Once installed, you can click on it and select "debug". Your code will stop on the line.

Note: for now, step debugging using bin/test_env.sh will not work. You need to use docker-compose run --rm php bin/codecept -v run

Intellij

Plugins


All versions of boilerplate with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
symfony/symfony Version 3.0.*
doctrine/orm Version ^2.5
doctrine/doctrine-bundle Version ^1.6
doctrine/doctrine-cache-bundle Version ^1.2
symfony/swiftmailer-bundle Version ^2.3
symfony/monolog-bundle Version ^2.8
sensio/distribution-bundle Version ^5.0
sensio/framework-extra-bundle Version ^3.0.2
incenteev/composer-parameter-handler Version ^2.0
oneup/flysystem-bundle Version ~1.3
myclabs/php-enum Version ~1.4
jasonlewis/expressive-date 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 majisti/boilerplate contains the following files

Loading the files please wait ....