🍰 Social media plugin for CakePHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Fix contain in posts controller index action (task #9985) Feb 12, 2019
.codeclimate.yml Removed webroot/plugins/ from CodeClimate Dec 1, 2017
.travis.yml Enable phpstan (task #9910) Feb 6, 2019
LICENSE Copyright years update (task #5220) Jan 18, 2018
phpunit.xml.dist Updated configuration (task #8244) Oct 29, 2018


CakePHP Plugin Template


Template for building CakePHP 3 plugins.

Developed by Qobo, used in Qobrix.


Pull the template code into your plugin directory (must be a git directory):

cd my-plugin
git pull https://github.com/QoboLtd/cakephp-plugin-template master

If you get the following error, please make sure that the plugin directory is a valid git directory. If not, you can always initiate it by executing git init

fatal: not a git repository (or any of the parent directories): .git

Make sure your composer.json has something like this:

"autoload": {
    "psr-4": {
        "Foobar\\": "src"
"autoload-dev": {
    "psr-4": {
        "Foobar\\Test\\": "tests",
        "Cake\\Test\\": "./vendor/cakephp/cakephp/tests"

If you do change your composer.json file, don't forget to run either composer update or at least composer dump-autoload.

Change the following:

  1. Uncomment the $pluginName line in tests/bootstrap.php and change Foobar to the name of your plugin.
  2. Change the Foobar namespace to your plugin's in the following files:
  3. tests/config/routes.php
  4. tests/App/Application.php
  5. tests/App/Controller/AppController.php
  6. tests/App/Controller/UsersController.php
  7. tests/Fixture/UsersFixture.php
  8. Put your tests into tests/TestCase.
  9. Put your fixtures into tests/Fixture.
  10. Run vendor/bin/phpunit

If you know of any better way to do this please open an issue on GitHub or, better even, send a pull request.