CakePHP 2 fork that supports PHP 8
Find a file
Markus Podar d201312a0e
php-8.0-compat: fix "Error: Unknown named parameter $subject"
PHP 8 added support for named parameters however will throw an error when
a named parameter, which does not exist, will be called/appears.

In this case the code uses `array_filter(compact('subject))` to conveniently
prepend `$subject` to the callback, if it's non-null.

It's then combined with `$params` but mixing a hash wih a sequential array
and then end result is `['subject' => …, ]` which then triggers this
TypeError in PHP 8.

The solution applies `array_values()` on above array as to remove the keys
and then the error disappears.

With this change, our internal test suite (2k tests) is green on both PHP8
and PHP7.4, aka this change is expecte to be backwards compatible.
2020-11-12 17:30:04 +01:00
app tweak typo perfomance -> performance 2018-06-26 13:42:50 +09:00
lib/Cake php-8.0-compat: fix "Error: Unknown named parameter $subject" 2020-11-12 17:30:04 +01:00
plugins allowing install/cake-wide plugins 2009-08-02 15:01:15 -07:00
vendors we still want the vendors folder - creating empty file to ensure the 2011-03-12 20:11:33 +01:00
.editorconfig Add formatting rules for .yml files to editorconfig. 2014-05-04 18:37:41 +05:30
.gitattributes Adding webfont formats as binary in .gitattributes 2015-01-29 16:38:01 +01:00
.gitignore added Eclipse paths to gitignore 2016-09-05 21:01:12 +02:00
.htaccess Add commented-out Apache pass-through for .well-known directory 2016-04-14 15:10:18 +02:00
.stickler.yml Make stickler ignore 2.x and 2.next branches. 2016-07-01 17:28:50 +05:30
.travis.yml Fix failures on PHP 7.4. Run phpcs on PHP 7.0 2019-12-05 15:11:35 +02:00
build.properties Update build config for new pear server. 2016-11-10 19:41:07 -05:00
build.xml Fix hostname. 2016-11-12 09:41:28 -05:00
composer.json Set max PHP version. 2020-10-24 20:48:23 -04:00
CONTRIBUTING.md Update URL in *.md, *.json 2017-03-12 03:04:59 +09:00
index.php Use HTTPS for the opensource.org MIT license URL 2017-06-11 00:23:22 +02:00
README.md Update URL in *.md, *.json 2017-03-12 03:04:59 +09:00

CakePHP

Latest Stable Version License Bake Status Code consistency

CakePHP is a rapid development framework for PHP which uses commonly known design patterns like Active Record, Association Data Mapping, Front Controller and MVC. Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility.

CakePHP - The rapid development PHP framework

CookBook - THE CakePHP user documentation; start learning here!

API - A reference to CakePHP's classes

Plugins - A repository of extensions to the framework

The Bakery - Tips, tutorials and articles

Community Center - A source for everything community related

Training - Join a live session and get skilled with the framework

CakeFest - Don't miss our annual CakePHP conference

Cake Software Foundation - Promoting development related to CakePHP

Get Support!

#cakephp on irc.freenode.net - Come chat with us, we have cake

Google Group - Community mailing list and forum

GitHub Issues - Got issues? Please tell us!

Roadmaps - Want to contribute? Get involved!

Contributing

CONTRIBUTING.md - Quick pointers for contributing to the CakePHP project

CookBook "Contributing" Section (2.x) (3.x) - Version-specific details about contributing to the project