From cd6fba136161993eb75913c55e1a3bf3da036e52 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Mon, 24 Jul 2017 00:09:01 -0400 Subject: [PATCH 1/7] Revert "Takes into account the current recursive value in deleteAll()." --- lib/Cake/Model/Model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Cake/Model/Model.php b/lib/Cake/Model/Model.php index 967219970..3813e3883 100644 --- a/lib/Cake/Model/Model.php +++ b/lib/Cake/Model/Model.php @@ -2832,12 +2832,12 @@ class Model extends CakeObject implements CakeEventListener { if (!$cascade && !$callbacks) { return $db->delete($this, $conditions); } - $recursive = min($this->recursive, 0); + $ids = $this->find('all', array_merge(array( 'fields' => "{$this->alias}.{$this->primaryKey}", 'order' => false, 'group' => "{$this->alias}.{$this->primaryKey}", - 'recursive' => $recursive), compact('conditions')) + 'recursive' => 0), compact('conditions')) ); if ($ids === false || $ids === null) { From 4bd49eeb157dd850de4efea5745c9a9fe32de906 Mon Sep 17 00:00:00 2001 From: mark_story Date: Wed, 26 Jul 2017 22:42:19 -0400 Subject: [PATCH 2/7] Attempt to fix travis for 2.x There has been a distrubance in the force, and our travis builds no longer work. --- .travis.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5e46a2c26..2321d41c4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,8 +37,8 @@ matrix: before_script: - - composer global require "phpunit/phpunit=$PHPUNIT" - - echo "require_once '$HOME/.composer/vendor/autoload.php';" >> app/Config/bootstrap.php + - composer require "phpunit/phpunit=$PHPUNIT" + - echo "require_once 'vendor/autoload.php';" >> app/Config/bootstrap.php - sudo locale-gen de_DE - sudo locale-gen es_ES - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi" @@ -49,8 +49,8 @@ before_script: - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE SCHEMA test3;' -U postgres -d cakephp_test; fi" - chmod -R 777 ./app/tmp - if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.3" ]] ; then pecl install timezonedb ; 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 require 'cakephp/cakephp-codesniffer:1.*'; fi" + - sh -c "if [ '$PHPCS' = '1' ]; then vendor/bin/phpcs --config-set installed_paths vendor/cakephp/cakephp-codesniffer; fi" - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - 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 @@ -136,9 +136,10 @@ before_script: } } }" > app/Config/database.php + script: - sh -c "if [ '$PHPCS' != '1' ]; then ./lib/Cake/Console/cake test core AllTests --stderr; fi" - - sh -c "if [ '$PHPCS' = '1' ]; then ~/.composer/vendor/bin/phpcs -p --extensions=php --standard=CakePHP ./lib/Cake; fi;" + - sh -c "if [ '$PHPCS' = '1' ]; then vendor/bin/phpcs -p --extensions=php --standard=CakePHP ./lib/Cake; fi;" notifications: email: false From 51b48c9e456d9a2913b80f5b3e12b385d23dbc6d Mon Sep 17 00:00:00 2001 From: mark_story Date: Wed, 26 Jul 2017 22:58:09 -0400 Subject: [PATCH 3/7] Fix path. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2321d41c4..0d8cd1e2a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,7 +38,7 @@ matrix: before_script: - composer require "phpunit/phpunit=$PHPUNIT" - - echo "require_once 'vendor/autoload.php';" >> app/Config/bootstrap.php + - echo "require_once 'vendors/autoload.php';" >> app/Config/bootstrap.php - sudo locale-gen de_DE - sudo locale-gen es_ES - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi" From b7b9b067bb625124935f9f718ee8b5773afa2180 Mon Sep 17 00:00:00 2001 From: mark_story Date: Wed, 26 Jul 2017 23:17:48 -0400 Subject: [PATCH 4/7] Use localhost not 0.0.0.0 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0d8cd1e2a..de40675e2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -62,7 +62,7 @@ before_script: private \$identities = array( 'mysql' => array( 'datasource' => 'Database/Mysql', - 'host' => '0.0.0.0', + 'host' => '127.0.0.1', 'login' => 'travis' ), 'pgsql' => array( From 83a7b7b785372f27753e90476e79326419fb6174 Mon Sep 17 00:00:00 2001 From: mark_story Date: Wed, 26 Jul 2017 23:20:03 -0400 Subject: [PATCH 5/7] Fix vendors dir. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index de40675e2..e3f1f771e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,7 +50,7 @@ before_script: - chmod -R 777 ./app/tmp - if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.3" ]] ; then pecl install timezonedb ; fi - sh -c "if [ '$PHPCS' = '1' ]; then composer require 'cakephp/cakephp-codesniffer:1.*'; fi" - - sh -c "if [ '$PHPCS' = '1' ]; then vendor/bin/phpcs --config-set installed_paths vendor/cakephp/cakephp-codesniffer; fi" + - sh -c "if [ '$PHPCS' = '1' ]; then vendors/bin/phpcs --config-set installed_paths vendors/cakephp/cakephp-codesniffer; fi" - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - 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 @@ -139,7 +139,7 @@ before_script: script: - sh -c "if [ '$PHPCS' != '1' ]; then ./lib/Cake/Console/cake test core AllTests --stderr; fi" - - sh -c "if [ '$PHPCS' = '1' ]; then vendor/bin/phpcs -p --extensions=php --standard=CakePHP ./lib/Cake; fi;" + - sh -c "if [ '$PHPCS' = '1' ]; then vendors/bin/phpcs -p --extensions=php --standard=CakePHP ./lib/Cake; fi;" notifications: email: false From 0974f7bc9fadbdb77a555926a48aa8a7d3bd0e1f Mon Sep 17 00:00:00 2001 From: mark_story Date: Wed, 26 Jul 2017 23:49:59 -0400 Subject: [PATCH 6/7] Fix db credentials. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e3f1f771e..d8c3db203 100644 --- a/.travis.yml +++ b/.travis.yml @@ -63,7 +63,7 @@ before_script: 'mysql' => array( 'datasource' => 'Database/Mysql', 'host' => '127.0.0.1', - 'login' => 'travis' + 'login' => 'root' ), 'pgsql' => array( 'datasource' => 'Database/Postgres', From 06712abc389fec35ad3906e65374091de9691719 Mon Sep 17 00:00:00 2001 From: mark_story Date: Thu, 27 Jul 2017 22:06:14 -0400 Subject: [PATCH 7/7] Try precise instead of trusty. --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index d8c3db203..ad66e35ad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,8 @@ language: php +# We require precise here, as 5.3 doesn't exist on trusty. +dist: precise + php: - 5.3 - 5.4