Skip to content

Latest commit

 

History

History
59 lines (41 loc) · 1.7 KB

README.md

File metadata and controls

59 lines (41 loc) · 1.7 KB

CakePHP Setup Plugin Documentation

Version notice

This branch only works for CakePHP 4.x

Installation

Detailed Documentation - Quicklinks

Bake Templates Deluxe

The highly advanced bake templates have been further enhanced and are part of this plugin. The defaults go well together with the Tools plugin, Bootstrap3+ and some other useful defaults. You can also just steal ideas, of course ;)

Useful debugging help

The following are convenience wrappers to debug safely. They will only show output with debug true.

  • dd($data) = debug() + die() // This is now also in CakePHP 3.3+ directly :-)
  • prd($data) = pr() + die()
  • vd() = var_dump()
  • vdd($data) = var_dump() + die()

They are available when you include the plugin's bootstrap at Plugin::load().

Testing

You can test using a local installation of phpunit or the phar version of it:

cd .../cakephp-setup
composer install // or: php composer.phar install
composer test-setup
composer test

To test a specific file:

php phpunit.phar /path/to/MyClass.php

To test MySQL specific tests, run this before (you might have to adjust your connection details):

export DB_URL="mysql://root:[email protected]/cake_test"

By default the tests use an SQLite DB.

Tips

Import Huge SQL file:

...\bin\mysql -u root dbname < dumpfilename.sql

Same other direction:

...\bin\mysqldump -h host -u root -p dbname > dumpfilename.sql