Skip to content

Commit 3ffcfd3

Browse files
authored
Merge pull request #1328 from phalcon/3.4.x
3.4.4
2 parents a51c53b + edbd07a commit 3ffcfd3

File tree

15 files changed

+57
-146
lines changed

15 files changed

+57
-146
lines changed

.travis.yml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
11
language: php
22

33
sudo: required
4-
dist: trusty
5-
6-
php:
7-
- 5.5
8-
- 5.6
94

105
services:
116
- postgresql
7+
- mysql
128

139
matrix:
1410
include:
15-
- php: 7.0
11+
- php: '5.5'
12+
env: PHALCON_VERSION="v3.4.1"
13+
dist: trusty
14+
- php: '5.6'
15+
- php: '7.0'
16+
env: ZEND_BACKEND="--backend=ZendEngine3"
17+
- php: '7.1'
1618
env: ZEND_BACKEND="--backend=ZendEngine3"
17-
- php: 7.1
19+
- php: '7.2'
1820
env: ZEND_BACKEND="--backend=ZendEngine3"
19-
- php: 7.2
21+
- php: '7.3'
2022
env: ZEND_BACKEND="--backend=ZendEngine3"
2123

2224
git:
2325
depth: 1
2426

2527
cache:
26-
apt: true
2728
ccache: true
2829
timeout: 691200
2930
directories:
@@ -38,7 +39,7 @@ env:
3839
global:
3940
- PATH="$PATH:~/bin"
4041
- DISPLAY=":99.0"
41-
- PHALCON_VERSION="v3.4.0"
42+
- PHALCON_VERSION="v3.4.4"
4243

4344
before_install:
4445
- export PHP_VERSION=$(php-config --version)
@@ -48,7 +49,7 @@ before_install:
4849
- export $(cut -d= -f1 $TRAVIS_BUILD_DIR/tests/_ci/environment)
4950
- phpenv config-rm xdebug.ini || true
5051
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com $GH_TOKEN; fi;
51-
- if [ ! -f "$HOME/cphalcon/$PHALCON_VERSION/tests/_ci/phalcon.ini" ]; then git clone -q --depth=1 https://github.com/phalcon/cphalcon.git $HOME/cphalcon/$PHALCON_VERSION >/dev/null 2>&1; fi;
52+
- if [ ! -f "$HOME/cphalcon/$PHALCON_VERSION/tests/_ci/phalcon.ini" ]; then git clone -q --branch $PHALCON_VERSION --depth=1 https://github.com/phalcon/cphalcon.git $HOME/cphalcon/$PHALCON_VERSION >/dev/null 2>&1; fi;
5253
- bash tests/_ci/setup_dbs.sh
5354

5455
install:
@@ -73,13 +74,6 @@ script:
7374
notifications:
7475
email:
7576
recipients:
76-
- build@phalconphp.com
77+
- build@phalcon.io
7778
on_success: change
7879
on_failure: always
79-
80-
addons:
81-
apt:
82-
packages:
83-
- mysql-server-5.6
84-
- mysql-client-core-5.6
85-
- mysql-client-5.6

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"forum": "https://forum.phalconphp.com/"
2323
},
2424
"require": {
25-
"php": ">=5.5 < 7.3.2 || >7.3.3",
25+
"php": ">=5.5,!=7.3.2",
2626
"ext-phalcon": "~3.3",
2727
"psy/psysh": "~0.9",
2828
"nikic/php-parser": "^3.1"
@@ -34,8 +34,8 @@
3434
"phpunit/phpunit": "^4.8",
3535
"codeception/specify": "^0.4",
3636
"codeception/verify": "^0.3",
37-
"squizlabs/php_codesniffer": "^3.2"
38-
37+
"squizlabs/php_codesniffer": "^3.2",
38+
"phalcon/ide-stubs": "^3.4.3"
3939
},
4040
"autoload": {
4141
"psr-4" : {

scripts/Phalcon/Builder/AllModels.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function __construct(array $options = [])
5656

5757
public function build()
5858
{
59-
if ($this->options->contains('directory')) {
59+
if ($this->options->offsetExists('directory')) {
6060
$this->path->setRootPath($this->options->get('directory'));
6161
}
6262

@@ -112,7 +112,7 @@ public function build()
112112
*/
113113
$db = new $adapterName($configArray);
114114

115-
if ($this->options->contains('schema')) {
115+
if ($this->options->offsetExists('schema')) {
116116
$schema = $this->options->get('schema');
117117
} else {
118118
$schema = Utils::resolveDbSchema($config->database);
@@ -175,7 +175,7 @@ public function build()
175175
}
176176

177177
foreach ($db->listTables($schema) as $name) {
178-
$className = ($this->options->contains('abstract') ? 'Abstract' : '');
178+
$className = ($this->options->offsetExists('abstract') ? 'Abstract' : '');
179179
$className .= Utils::camelize($name);
180180

181181
if (!file_exists($modelPath . $className . '.php') || $forceProcess) {

scripts/Phalcon/Builder/Component.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
namespace Phalcon\Builder;
2323

24+
use Phalcon\Config;
2425
use Phalcon\Validation;
2526
use Phalcon\Script\Color;
2627
use Phalcon\Validation\Validator\Namespaces;
@@ -36,7 +37,7 @@ abstract class Component
3637
{
3738
/**
3839
* Builder Options
39-
* @var Options
40+
* @var Config
4041
*/
4142
protected $options = null;
4243

@@ -53,7 +54,7 @@ abstract class Component
5354
*/
5455
public function __construct(array $options = [])
5556
{
56-
$this->options = new Options($options);
57+
$this->options = new Config($options);
5758
$this->path = new Path(realpath('.') . DIRECTORY_SEPARATOR);
5859
}
5960

scripts/Phalcon/Builder/Controller.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ public function __construct(array $options = [])
5858
*/
5959
public function build()
6060
{
61-
if ($this->options->contains('directory')) {
61+
if ($this->options->offsetExists('directory')) {
6262
$this->path->setRootPath($this->options->get('directory'));
6363
}
6464

6565
$namespace = '';
66-
if ($this->options->contains('namespace') && $this->checkNamespace($this->options->get('namespace'))) {
66+
if ($this->options->offsetExists('namespace') && $this->checkNamespace($this->options->get('namespace'))) {
6767
$namespace = 'namespace '.$this->options->get('namespace').';'.PHP_EOL.PHP_EOL;
6868
}
6969

@@ -78,7 +78,7 @@ public function build()
7878
$controllersDir = $config->path('application.controllersDir');
7979
}
8080

81-
if (!$this->options->contains('name')) {
81+
if (!$this->options->offsetExists('name')) {
8282
throw new BuilderException('The controller name is required.');
8383
}
8484

@@ -97,7 +97,7 @@ public function build()
9797
$baseClass . "\n{\n\n\tpublic function indexAction()\n\t{\n\n\t}\n\n}\n\n";
9898
$code = str_replace("\t", " ", $code);
9999

100-
if (file_exists($controllerPath) && !$this->options->contains('force')) {
100+
if (file_exists($controllerPath) && !$this->options->offsetExists('force')) {
101101
throw new BuilderException(sprintf('The Controller %s already exists.', $name));
102102
}
103103

scripts/Phalcon/Builder/Module.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function __construct(array $options)
6464
*/
6565
public function build()
6666
{
67-
if (!$this->options->contains('name')) {
67+
if (!$this->options->offsetExists('name')) {
6868
throw new BuilderException('Please, specify the model name');
6969
}
7070

@@ -74,7 +74,7 @@ public function build()
7474
. 'templates' . DIRECTORY_SEPARATOR . 'module';
7575
}
7676

77-
if ($this->options->contains('directory')) {
77+
if ($this->options->offsetExists('directory')) {
7878
$this->path->setRootPath($this->options->get('directory'));
7979
}
8080

scripts/Phalcon/Builder/Options.php

Lines changed: 0 additions & 84 deletions
This file was deleted.

scripts/Phalcon/Builder/Project.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@ class Project extends Component
6666
*/
6767
public function build()
6868
{
69-
if ($this->options->contains('directory')) {
69+
if ($this->options->offsetExists('directory')) {
7070
$this->path->setRootPath($this->options->get('directory'));
7171
}
7272

7373
$templatePath =
7474
str_replace('scripts/' . str_replace('\\', DIRECTORY_SEPARATOR, __CLASS__) . '.php', '', __FILE__) .
7575
'templates';
7676

77-
if ($this->options->contains('templatePath')) {
77+
if ($this->options->offsetExists('templatePath')) {
7878
$templatePath = $this->options->get('templatePath');
7979
}
8080

@@ -94,7 +94,7 @@ public function build()
9494

9595
$builderClass = $this->types[$this->currentType];
9696

97-
if ($this->options->contains('name')) {
97+
if ($this->options->offsetExists('name')) {
9898
$this->path->appendRootPath($this->options->get('name'));
9999
}
100100

scripts/Phalcon/Builder/Project/Cli.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class Cli extends ProjectBuilder
5151
*/
5252
private function createConfig()
5353
{
54-
$type = $this->options->contains('useConfigIni') ? 'ini' : 'php';
54+
$type = $this->options->offsetExists('useConfigIni') ? 'ini' : 'php';
5555

5656
$getFile = $this->options->get('templatePath') . '/project/cli/config.' . $type;
5757
$putFile = $this->options->get('projectPath') . 'app/config/config.' . $type;

scripts/Phalcon/Builder/Project/Micro.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ private function createIndexViewFiles()
107107
*/
108108
private function createConfig()
109109
{
110-
$type = $this->options->contains('useConfigIni') ? 'ini' : 'php';
110+
$type = $this->options->offsetExists('useConfigIni') ? 'ini' : 'php';
111111

112112
$getFile = $this->options->get('templatePath') . '/project/micro/config.' . $type;
113113
$putFile = $this->options->get('projectPath') . 'app/config/config.' . $type;

0 commit comments

Comments
 (0)