2017 © Pedro Peláez
 

cakephp-plugin cakephp-loadsys-theme

CakePHP 3.x bake generation theme that matches Loadsys' code sniffer standards.

image

loadsys/cakephp-loadsys-theme

CakePHP 3.x bake generation theme that matches Loadsys' code sniffer standards.

  • Monday, June 20, 2016
  • by jtyost2
  • Repository
  • 11 Watchers
  • 2 Stars
  • 9,056 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 13 Open issues
  • 5 Versions
  • 7 % Grown

The README.md

Loadsys Bake Theme for CakePHP

Latest Version Software License Total Downloads, (*1)

A CakePHP 3.x bake generation theme that matches Loadsys' code sniffer standards. It's designed to dovetail with our CakePHP App Skeleton., (*2)

Requirements

  • CakePHP 3.x

Installation

$ composer require loadsys/cakephp-loadsys-theme:~1.0

This plugin includes Bake in its own composer dependencies, so when using this theme you do not need to include it separately in your projects., (*3)

Usage

  • Add this plugin to your application by adding this line to your bootstrap.php
CakePlugin::load('LoadsysTheme', ['bootstrap' => true, 'routes' => false]);
  • To use when baking, use the CLI option --theme LoadsysTheme like so
$ ./vendor/bin/cake bake all --theme LoadsysTheme name-of-thing

Notable Changes

Tabs instead of spaces

Loadsys has chosen to ignore the requirement of PSR-2 to use spaces for indenting. We've found tabs to be more convenient, and we're keeping them. If you disagree, that's fine -- this plugin isn't going to be much use to you., (*4)

K&R/1TBS Braces

We're also sticking to K&R style braces for everything., (*5)

    public function foo() {
        echo 'hi';
    }

AppTable

The core team believes that using AppController and AppView continues to provide significant value to the framework (thread), but does not feel that hold true for AppTable (or AppEntity). We disagree., (*6)

Table classes baked by this plugin extend from a parent [App]Table class (conveniently still called Table thanks to PHP namespaces.) The Table class it depends upon is provided from the Loadsys CakePHP Skeleton. As in Cake 2, it's safe to completely ignore this file, provided it is at least present in your app. If you need a Table class baked in which you wish to change this, you must either bake using Cake's default theme or modify the classes after baking them., (*7)

Additionally, because our table.ctp template assumes that our Skeleton's base Table class will be used, we suppress certain parts of the table baking process. The [App]Table class sets up the primary key, adds the Timestamp and CreatorModifier behaviors, defines two default associations to Creators and Modifiers in the Users table, and suppresses validation for the 5 related fields. It would therefore be redundant and defeat the purpose of the based Table class to bake tables that repeated these steps, so they are skipped., (*8)

Contributing

Code of Conduct

This project has adopted the Contributor Covenant as its code of conduct. All contributors are expected to adhere to this code. Translations are available., (*9)

Reporting Issues

Please use GitHub Isuses for listing any known defects or issues., (*10)

Development

When developing this plugin, please fork and issue a PR for any new development., (*11)

Running Tests

  • vendor/bin/phpunit --coverage-html=tmp/coverage/
  • vendor/bin/phpcs

License

MIT, (*12)

Loadsys Web Strategies 2016, (*13)

The Versions

20/06 2016

dev-master

9999999-dev https://github.com/loadsys/CakePHP-LoadsysTheme

CakePHP 3.x bake generation theme that matches Loadsys' code sniffer standards.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp templates bake

20/06 2016

1.1.0

1.1.0.0 https://github.com/loadsys/CakePHP-LoadsysTheme

CakePHP 3.x bake generation theme that matches Loadsys' code sniffer standards.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp templates bake

01/03 2016

1.0.0

1.0.0.0 https://github.com/loadsys/CakePHP-LoadsysTheme

CakePHP 3.x bake generation theme that matches Loadsys' code sniffer standards.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp templates bake

02/07 2015

dev-f/unit-tests

dev-f/unit-tests https://github.com/loadsys/CakePHP-LoadsysTheme

CakePHP 3.x bake generation theme that matches Loadsys' code sniffer standards.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp templates bake

29/06 2015

1.0.0-beta.1

1.0.0.0-beta1 https://github.com/loadsys/CakePHP-LoadsysTheme

CakePHP 3.x bake generation theme that matches Loadsys' code sniffer standards.

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp templates bake