Skip to content

v2.4.1

Choose a tag to compare

@ttsuru ttsuru released this 16 Oct 03:46
b074b4a

Note

Requires pieceofcake2/cakephp 2.12.7 or later (the 'dsn' key of database and email configurations). The skeleton is the starting point of new applications: existing applications are not changed by this release, but can copy the parts they need. If you do, note that the database variables are now DATABASE_URL (the DB_*, DB_TEST_* and DATABASE_TEST_URL variables are gone) and that the email configuration reads MAILER_DSN.

Database and Email DSNs, .env Files (PR #23)

  • DATABASE_URL is the DSN of the default and test connections (config/database.php.default), as in Symfony and CakePHP 5. There is one variable: the committed config/.env.test sets it to the test database
  • MAILER_DSN is the DSN of the default email profile (config/email.php.default), in the Symfony Mailer format
  • .env files in Symfony's order: config/.env.{APP_ENV}.local, config/.env.{APP_ENV}, config/.env.local, config/.env and .env in the project root. Real environment variables win over all files, and earlier files win over later ones
  • Tests use APP_ENV=test: vendor/bin/phpunit, bin/cake test and webroot/test.php set APP_ENV=test when it is not set, so the tests load config/.env.test. Per-machine test databases go in config/.env.test.local
  • .gitignore ignores config/.env.local and config/.env.*.local
  • config/.env.example uses plain KEY="value" lines without the export prefix (PR #18)

CakePHP 5 Look (PR #14)

  • The welcome page, layouts, styles (normalize, milligram and the CakePHP 5 cake.css) and production error pages of the CakePHP 5 application skeleton are ported to the CakePHP 2 skeleton

End-to-End Tests (PR #19, PR #22)

  • An EndToEnd test suite in phpunit.xml.dist for browser tests with pieceofcake2/panther (Symfony Panther), configured with environment variables. The web server of the tests uses the test database where the fixtures are

Security and Web Server

  • webroot/.htaccess follows the current CakePHP application skeleton: requests for directories (e.g. /css/) go to index.php and get a CakePHP 404 instead of a directory listing. The documentation warns against using the project root as the document root (PR #17)
  • The documentation explains how to generate the security salts and the weakness of Security.cipherSeed (PR #16)
  • The .gitignore of the skeleton works for new applications, and the development plugins are loaded (PR #13)

Documentation

Development

  • The coding standard is CakePHP2 of pieceofcake2/phpcs-cakephp2 ^1.1 (PR #25, PR #29)
  • CI shows job summaries (PR #15, PR #24), and a Qlty configuration was added; the GitHub token of CI is limited to what each job needs (PR #28)

Installation

composer create-project pieceofcake2/app my_app

Full Changelog: v2.4.0...v2.4.1