mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge branch '2.x' of https://github.com/cakephp/cakephp into duplicate_primary
This commit is contained in:
commit
3ad91204b9
7 changed files with 39 additions and 25 deletions
|
@ -43,7 +43,8 @@ before_script:
|
||||||
- sh -c "if [ '$PHPCS' = '1' ]; then composer global require 'cakephp/cakephp-codesniffer:1.*'; fi"
|
- sh -c "if [ '$PHPCS' = '1' ]; then composer global require 'cakephp/cakephp-codesniffer:1.*'; fi"
|
||||||
- sh -c "if [ '$PHPCS' = '1' ]; then ~/.composer/vendor/bin/phpcs --config-set installed_paths ~/.composer/vendor/cakephp/cakephp-codesniffer; fi"
|
- sh -c "if [ '$PHPCS' = '1' ]; then ~/.composer/vendor/bin/phpcs --config-set installed_paths ~/.composer/vendor/cakephp/cakephp-codesniffer; fi"
|
||||||
- echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
- echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
||||||
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]] ; then print "yes" | pecl install apcu-5.1.3; else print "yes" | pecl install apcu-4.0.11; fi
|
- if [[ ${TRAVIS_PHP_VERSION:0:1} == "7" ]] ; then echo "yes" | pecl install apcu-5.1.3 || true; fi
|
||||||
|
- if [[ ${TRAVIS_PHP_VERSION:0:1} == "5" ]] ; then echo "yes" | pecl install apcu-4.0.11 || true; fi
|
||||||
- echo -e "extension = apcu.so\napc.enable_cli=1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
- echo -e "extension = apcu.so\napc.enable_cli=1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
||||||
- phpenv rehash
|
- phpenv rehash
|
||||||
- set +H
|
- set +H
|
||||||
|
|
|
@ -37,7 +37,7 @@ Help us keep CakePHP open and inclusive. Please read and follow our [Code of Con
|
||||||
* Core test cases should continue to pass. You can run tests locally or enable
|
* Core test cases should continue to pass. You can run tests locally or enable
|
||||||
[travis-ci](https://travis-ci.org/) for your fork, so all tests and codesniffs
|
[travis-ci](https://travis-ci.org/) for your fork, so all tests and codesniffs
|
||||||
will be executed.
|
will be executed.
|
||||||
* Your work should apply the [CakePHP coding standards](http://book.cakephp.org/2.0/en/contributing/cakephp-coding-conventions.html).
|
* Your work should apply the [CakePHP coding standards](https://book.cakephp.org/2.0/en/contributing/cakephp-coding-conventions.html).
|
||||||
|
|
||||||
## Which branch to base the work
|
## Which branch to base the work
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ Help us keep CakePHP open and inclusive. Please read and follow our [Code of Con
|
||||||
|
|
||||||
## Test cases and codesniffer
|
## Test cases and codesniffer
|
||||||
|
|
||||||
CakePHP tests requires [PHPUnit](http://www.phpunit.de/manual/current/en/installation.html)
|
CakePHP tests requires [PHPUnit](https://phpunit.de/manual/current/en/installation.html)
|
||||||
3.7, version 4 is not compatible. To run the test cases locally use the following command:
|
3.7, version 4 is not compatible. To run the test cases locally use the following command:
|
||||||
|
|
||||||
./lib/Cake/Console/cake test core AllTests --stderr
|
./lib/Cake/Console/cake test core AllTests --stderr
|
||||||
|
@ -69,11 +69,11 @@ for the sniff and phpcs.
|
||||||
|
|
||||||
## Reporting a Security Issue
|
## Reporting a Security Issue
|
||||||
|
|
||||||
If you've found a security related issue in CakePHP, please don't open an issue in GitHub. Instead contact us at security@cakephp.org. For more information on how we handle security issues, [see the CakePHP Security Issue Process](http://book.cakephp.org/2.0/en/contributing/tickets.html#reporting-security-issues).
|
If you've found a security related issue in CakePHP, please don't open an issue in GitHub. Instead contact us at security@cakephp.org. For more information on how we handle security issues, [see the CakePHP Security Issue Process](https://book.cakephp.org/2.0/en/contributing/tickets.html#reporting-security-issues).
|
||||||
|
|
||||||
# Additional Resources
|
# Additional Resources
|
||||||
|
|
||||||
* [CakePHP coding standards](http://book.cakephp.org/2.0/en/contributing/cakephp-coding-conventions.html)
|
* [CakePHP coding standards](https://book.cakephp.org/2.0/en/contributing/cakephp-coding-conventions.html)
|
||||||
* [Existing issues](https://github.com/cakephp/cakephp/issues)
|
* [Existing issues](https://github.com/cakephp/cakephp/issues)
|
||||||
* [Development Roadmaps](https://github.com/cakephp/cakephp/wiki#roadmaps)
|
* [Development Roadmaps](https://github.com/cakephp/cakephp/wiki#roadmaps)
|
||||||
* [General GitHub documentation](https://help.github.com/)
|
* [General GitHub documentation](https://help.github.com/)
|
||||||
|
|
26
README.md
26
README.md
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
[![Latest Stable Version](https://poser.pugx.org/cakephp/cakephp/v/stable.svg)](https://packagist.org/packages/cakephp/cakephp)
|
[![Latest Stable Version](https://poser.pugx.org/cakephp/cakephp/v/stable.svg)](https://packagist.org/packages/cakephp/cakephp)
|
||||||
[![License](https://poser.pugx.org/cakephp/cakephp/license.svg)](https://packagist.org/packages/cakephp/cakephp)
|
[![License](https://poser.pugx.org/cakephp/cakephp/license.svg)](https://packagist.org/packages/cakephp/cakephp)
|
||||||
[![Bake Status](https://secure.travis-ci.org/cakephp/cakephp.png?branch=master)](http://travis-ci.org/cakephp/cakephp)
|
[![Bake Status](https://secure.travis-ci.org/cakephp/cakephp.png?branch=master)](https://travis-ci.org/cakephp/cakephp)
|
||||||
[![Code consistency](http://squizlabs.github.io/PHP_CodeSniffer/analysis/cakephp/cakephp/grade.svg)](http://squizlabs.github.io/PHP_CodeSniffer/analysis/cakephp/cakephp/)
|
[![Code consistency](https://squizlabs.github.io/PHP_CodeSniffer/analysis/cakephp/cakephp/grade.svg)](https://squizlabs.github.io/PHP_CodeSniffer/analysis/cakephp/cakephp/)
|
||||||
|
|
||||||
CakePHP is a rapid development framework for PHP which uses commonly known design patterns like Active Record, Association Data Mapping, Front Controller and MVC.
|
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.
|
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.
|
||||||
|
@ -11,28 +11,28 @@ Our primary goal is to provide a structured framework that enables PHP users at
|
||||||
|
|
||||||
## Some Handy Links
|
## Some Handy Links
|
||||||
|
|
||||||
[CakePHP](http://www.cakephp.org) - The rapid development PHP framework
|
[CakePHP](https://cakephp.org) - The rapid development PHP framework
|
||||||
|
|
||||||
[CookBook](http://book.cakephp.org) - THE CakePHP user documentation; start learning here!
|
[CookBook](https://book.cakephp.org) - THE CakePHP user documentation; start learning here!
|
||||||
|
|
||||||
[API](http://api.cakephp.org) - A reference to CakePHP's classes
|
[API](https://api.cakephp.org) - A reference to CakePHP's classes
|
||||||
|
|
||||||
[Plugins](http://plugins.cakephp.org/) - A repository of extensions to the framework
|
[Plugins](https://plugins.cakephp.org) - A repository of extensions to the framework
|
||||||
|
|
||||||
[The Bakery](http://bakery.cakephp.org) - Tips, tutorials and articles
|
[The Bakery](https://bakery.cakephp.org) - Tips, tutorials and articles
|
||||||
|
|
||||||
[Community Center](http://community.cakephp.org) - A source for everything community related
|
[Community Center](https://community.cakephp.org) - A source for everything community related
|
||||||
|
|
||||||
[Training](http://training.cakephp.org) - Join a live session and get skilled with the framework
|
[Training](https://training.cakephp.org) - Join a live session and get skilled with the framework
|
||||||
|
|
||||||
[CakeFest](http://cakefest.org) - Don't miss our annual CakePHP conference
|
[CakeFest](https://cakefest.org) - Don't miss our annual CakePHP conference
|
||||||
|
|
||||||
[Cake Software Foundation](http://cakefoundation.org) - Promoting development related to CakePHP
|
[Cake Software Foundation](https://cakefoundation.org) - Promoting development related to CakePHP
|
||||||
|
|
||||||
|
|
||||||
## Get Support!
|
## Get Support!
|
||||||
|
|
||||||
[#cakephp](http://webchat.freenode.net/?channels=#cakephp) on irc.freenode.net - Come chat with us, we have cake
|
[#cakephp](https://webchat.freenode.net/?channels=#cakephp) on irc.freenode.net - Come chat with us, we have cake
|
||||||
|
|
||||||
[Google Group](https://groups.google.com/group/cake-php) - Community mailing list and forum
|
[Google Group](https://groups.google.com/group/cake-php) - Community mailing list and forum
|
||||||
|
|
||||||
|
@ -45,4 +45,4 @@ Our primary goal is to provide a structured framework that enables PHP users at
|
||||||
|
|
||||||
[CONTRIBUTING.md](CONTRIBUTING.md) - Quick pointers for contributing to the CakePHP project
|
[CONTRIBUTING.md](CONTRIBUTING.md) - Quick pointers for contributing to the CakePHP project
|
||||||
|
|
||||||
[CookBook "Contributing" Section (2.x)](http://book.cakephp.org/2.0/en/contributing.html) [(3.0)](http://book.cakephp.org/3.0/en/contributing.html) - Version-specific details about contributing to the project
|
[CookBook "Contributing" Section (2.x)](https://book.cakephp.org/2.0/en/contributing.html) [(3.x)](https://book.cakephp.org/3.0/en/contributing.html) - Version-specific details about contributing to the project
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"description": "CakePHP Application skeleton",
|
"description": "CakePHP Application skeleton",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"keywords": ["application", "cakephp"],
|
"keywords": ["application", "cakephp"],
|
||||||
"homepage": "http://cakephp.org",
|
"homepage": "https://cakephp.org",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/cakephp/cakephp/issues",
|
"issues": "https://github.com/cakephp/cakephp/issues",
|
||||||
"forum": "http://stackoverflow.com/tags/cakephp",
|
"forum": "https://stackoverflow.com/tags/cakephp",
|
||||||
"irc": "irc://irc.freenode.org/cakephp",
|
"irc": "irc://irc.freenode.org/cakephp",
|
||||||
"source": "https://github.com/cakephp/cakephp"
|
"source": "https://github.com/cakephp/cakephp"
|
||||||
},
|
},
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"description": "The CakePHP framework",
|
"description": "The CakePHP framework",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"keywords": ["framework"],
|
"keywords": ["framework"],
|
||||||
"homepage": "http://cakephp.org",
|
"homepage": "https://cakephp.org",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/cakephp/cakephp/issues",
|
"issues": "https://github.com/cakephp/cakephp/issues",
|
||||||
"forum": "http://stackoverflow.com/tags/cakephp",
|
"forum": "https://stackoverflow.com/tags/cakephp",
|
||||||
"irc": "irc://irc.freenode.org/cakephp",
|
"irc": "irc://irc.freenode.org/cakephp",
|
||||||
"source": "https://github.com/cakephp/cakephp"
|
"source": "https://github.com/cakephp/cakephp"
|
||||||
},
|
},
|
||||||
|
|
|
@ -655,8 +655,21 @@ class HashTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testFilter() {
|
public function testFilter() {
|
||||||
$result = Hash::filter(array('0', false, true, 0, array('one thing', 'I can tell you', 'is you got to be', false)));
|
$result = Hash::filter(array(
|
||||||
$expected = array('0', 2 => true, 3 => 0, 4 => array('one thing', 'I can tell you', 'is you got to be'));
|
'0',
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
0,
|
||||||
|
0.0,
|
||||||
|
array('one thing', 'I can tell you', 'is you got to be', false)
|
||||||
|
));
|
||||||
|
$expected = array(
|
||||||
|
'0',
|
||||||
|
2 => true,
|
||||||
|
3 => 0,
|
||||||
|
4 => 0.0,
|
||||||
|
5 => array('one thing', 'I can tell you', 'is you got to be')
|
||||||
|
);
|
||||||
$this->assertSame($expected, $result);
|
$this->assertSame($expected, $result);
|
||||||
|
|
||||||
$result = Hash::filter(array(1, array(false)));
|
$result = Hash::filter(array(1, array(false)));
|
||||||
|
|
|
@ -573,7 +573,7 @@ class Hash {
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
protected static function _filter($var) {
|
protected static function _filter($var) {
|
||||||
if ($var === 0 || $var === '0' || !empty($var)) {
|
if ($var === 0 || $var === 0.0 || $var === '0' || !empty($var)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue