Skip to content

Commit 58e6b65

Browse files
authored
Merge pull request #764 from phalcon/3.0.x
3.0.1
2 parents c10d185 + 4e211ca commit 58e6b65

File tree

121 files changed

+1444
-11151
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+1444
-11151
lines changed

README.md

Lines changed: 13 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@ Create the composer.json file as follows:
3434
```json
3535
{
3636
"require": {
37-
"phalcon/devtools": "dev-master"
37+
"phalcon/devtools": "~3.0.0"
3838
}
3939
}
4040
```
4141

42-
If you are still using Phalcon 1.3.x, create a composer.json with the following instead:
42+
If you are still using Phalcon 2.0.x, create a `composer.json` with the following instead:
4343

4444
```json
4545
{
4646
"require": {
47-
"phalcon/devtools": "1.3.*@dev"
47+
"phalcon/devtools": "^2.0"
4848
}
4949
}
5050
```
@@ -84,7 +84,7 @@ cd phalcon-devtools
8484
```
8585

8686
This method requires a little bit more of setup. Probably the best way would be to symlink
87-
the phalcon.php to a directory in your PATH, so you can issue phalcon commands in each directory
87+
the `phalcon.php` to a directory in your `PATH`, so you can issue phalcon commands in each directory
8888
where a phalcon project resides.
8989

9090
```bash
@@ -122,45 +122,25 @@ Available commands:
122122
webtools (alias of: create-webtools)
123123
```
124124

125-
## Update WebTools from old version
126-
127-
Please remove manually directories:
128-
129-
* `public/css/bootstrap`
130-
* `public/css/codemirror`
131-
* `public/js/bootstrap`
132-
* `public/img/bootstrap`
133-
* `public/js/codemirror`
134-
* `public/js/jquery`
135-
136-
and files:
137-
138-
* `public/webtools.config.php`
139-
* `public/webtools.php`
140-
141-
and just run form your project root:
142-
143-
```bash
144-
$ phalcon webtools --action=enable
145-
```
146-
147125
## Database adapter
148126

149-
Should add 'adapter' parameter in your db config file (if you use not Mysql database). For PostgreSql will be
127+
Should add `adapter` parameter in your `db` config file (if you use not Mysql database).
128+
129+
For PostgreSql it will be something like:
150130

151131
```php
152132
$config = [
153-
"host" => "localhost",
154-
"dbname" => "my_db_name",
155-
"username" => "my_db_user",
156-
"password" => "my_db_user_password",
157-
"adapter" => "Postgresql"
133+
'host' => 'localhost',
134+
'dbname' => 'my_db_name',
135+
'username' => 'my_db_user',
136+
'password' => 'my_db_user_password',
137+
'adapter' => 'Postgresql'
158138
];
159139
```
160140

161141
## License
162142

163-
Phalcon Developer Tools is open source software licensed under the [New BSD License][1].
143+
Phalcon Developer Tools is open source software licensed under the [New BSD License][1].<br>
164144
© Phalcon Framework Team and contributors
165145

166146
[1]: docs/LICENSE.md

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "library",
44
"description": "This tools provide you useful scripts to generate code helping to develop faster and easy applications that use with Phalcon framework.",
55
"keywords": ["framework", "phalcon", "devtools", "webtools", "phar"],
6-
"homepage": "http://phalconphp.com",
6+
"homepage": "https://phalconphp.com",
77
"license": "BSD-3-Clause",
88
"authors": [
99
{

ide/stubs/Phalcon/acl/Resource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Phalcon\Acl\Resource
77
* This class defines resource entity and its description
88
*/
9-
class Resource
9+
class Resource implements \Phalcon\Acl\ResourceInterface
1010
{
1111
/**
1212
* Resource name

ide/stubs/Phalcon/acl/adapter/Memory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,14 +285,14 @@ public function getNoArgumentsDefaultAction() {}
285285
/**
286286
* Return an array with every role registered in the list
287287
*
288-
* @return Role[]
288+
* @return RoleInterface[]
289289
*/
290290
public function getRoles() {}
291291

292292
/**
293293
* Return an array with every resource registered in the list
294294
*
295-
* @return Resource[]
295+
* @return ResourceInterface[]
296296
*/
297297
public function getResources() {}
298298

ide/stubs/Phalcon/assets/Collection.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function getSourcePath() {}
9090
public function add(\Phalcon\Assets\Resource $resource) {}
9191

9292
/**
93-
* Adds a inline code to the collection
93+
* Adds an inline code to the collection
9494
*
9595
* @param mixed $code
9696
* @return Collection
@@ -109,7 +109,7 @@ public function addInline(\Phalcon\Assets\Inline $code) {}
109109
public function addCss($path, $local = null, $filter = true, $attributes = null) {}
110110

111111
/**
112-
* Adds a inline CSS to the collection
112+
* Adds an inline CSS to the collection
113113
*
114114
* @param string $content
115115
* @param bool $filter
@@ -130,7 +130,7 @@ public function addInlineCss($content, $filter = true, $attributes = null) {}
130130
public function addJs($path, $local = null, $filter = true, $attributes = null) {}
131131

132132
/**
133-
* Adds a inline javascript to the collection
133+
* Adds an inline javascript to the collection
134134
*
135135
* @param string $content
136136
* @param bool $filter

ide/stubs/Phalcon/assets/Manager.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function useImplicitOutput($implicitOutput) {}
6868
public function addCss($path, $local = true, $filter = true, $attributes = null) {}
6969

7070
/**
71-
* Adds a inline Css to the 'css' collection
71+
* Adds an inline Css to the 'css' collection
7272
*
7373
* @param string $content
7474
* @param mixed $filter
@@ -93,7 +93,7 @@ public function addInlineCss($content, $filter = true, $attributes = null) {}
9393
public function addJs($path, $local = true, $filter = true, $attributes = null) {}
9494

9595
/**
96-
* Adds a inline javascript to the 'js' collection
96+
* Adds an inline javascript to the 'js' collection
9797
*
9898
* @param string $content
9999
* @param mixed $filter
@@ -115,7 +115,7 @@ public function addInlineJs($content, $filter = true, $attributes = null) {}
115115
public function addResourceByType($type, \Phalcon\Assets\Resource $resource) {}
116116

117117
/**
118-
* Adds a inline code by its type
118+
* Adds an inline code by its type
119119
*
120120
* @param string $type
121121
* @param mixed $code

ide/stubs/Phalcon/cache/backend/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* $frontendOptions = [
1313
* 'lifetime' => 172800
1414
* ];
15-
* // Create a output cache
15+
* // Create an output cache
1616
* $frontCache = FrontOutput($frontOptions);
1717
* // Set the cache directory
1818
* $backendOptions = [

ide/stubs/Phalcon/cache/frontend/Data.php

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,21 @@
66
* Phalcon\Cache\Frontend\Data
77
* Allows to cache native PHP data in a serialized form
88
* <code>
9-
* <?php
9+
* use Phalcon\Cache\Backend\File;
10+
* use Phalcon\Cache\Frontend\Data;
1011
* // Cache the files for 2 days using a Data frontend
11-
* $frontCache = new \Phalcon\Cache\Frontend\Data(array(
12-
* "lifetime" => 172800
13-
* ));
14-
* // Create the component that will cache "Data" to a "File" backend
15-
* // Set the cache file directory - important to keep the "/" at the end of
12+
* $frontCache = new Data(['lifetime' => 172800]);
13+
* // Create the component that will cache "Data" to a 'File' backend
14+
* // Set the cache file directory - important to keep the '/' at the end of
1615
* // of the value for the folder
17-
* $cache = new \Phalcon\Cache\Backend\File($frontCache, array(
18-
* "cacheDir" => "../app/cache/"
19-
* ));
16+
* $cache = new File($frontCache, ['cacheDir' => '../app/cache/']);
2017
* // Try to get cached records
2118
* $cacheKey = 'robots_order_id.cache';
22-
* $robots = $cache->get($cacheKey);
19+
* $robots = $cache->get($cacheKey);
2320
* if ($robots === null) {
2421
* // $robots is null due to cache expiration or data does not exist
2522
* // Make the database call and populate the variable
26-
* $robots = Robots::find(array("order" => "id"));
23+
* $robots = Robots::find(['order' => 'id']);
2724
* // Store it in the cache
2825
* $cache->save($cacheKey, $robots);
2926
* }

ide/stubs/Phalcon/cache/frontend/Output.php

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,28 @@
66
* Phalcon\Cache\Frontend\Output
77
* Allows to cache output fragments captured with ob_* functions
88
* <code>
9-
* <?php
10-
* //Create an Output frontend. Cache the files for 2 days
11-
* $frontCache = new \Phalcon\Cache\Frontend\Output(array(
12-
* "lifetime" => 172800
13-
* ));
9+
* use Phalcon\Tag;
10+
* use Phalcon\Cache\Backend\File;
11+
* use Phalcon\Cache\Frontend\Output;
12+
* // Create an Output frontend. Cache the files for 2 days
13+
* $frontCache = new Output(['lifetime' => 172800]));
1414
* // Create the component that will cache from the "Output" to a "File" backend
1515
* // Set the cache file directory - it's important to keep the "/" at the end of
1616
* // the value for the folder
17-
* $cache = new \Phalcon\Cache\Backend\File($frontCache, array(
18-
* "cacheDir" => "../app/cache/"
19-
* ));
17+
* $cache = new File($frontCache, ['cacheDir' => '../app/cache/']);
2018
* // Get/Set the cache file to ../app/cache/my-cache.html
21-
* $content = $cache->start("my-cache.html");
19+
* $content = $cache->start('my-cache.html');
2220
* // If $content is null then the content will be generated for the cache
23-
* if ($content === null) {
24-
* //Print date and time
25-
* echo date("r");
26-
* //Generate a link to the sign-up action
27-
* echo Phalcon\Tag::linkTo(
28-
* array(
29-
* "user/signup",
30-
* "Sign Up",
31-
* "class" => "signup-button"
32-
* )
21+
* if (null === $content) {
22+
* // Print date and time
23+
* echo date('r');
24+
* // Generate a link to the sign-up action
25+
* echo Tag::linkTo(
26+
* [
27+
* 'user/signup',
28+
* 'Sign Up',
29+
* 'class' => 'signup-button'
30+
* ]
3331
* );
3432
* // Store the output into the cache file
3533
* $cache->save();

ide/stubs/Phalcon/cli/Console.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,24 @@ class Console extends \Phalcon\Application
2626
* ));
2727
* </code>
2828
*
29-
* @param array $modules
29+
* @param array $modules
3030
*/
3131
public function addModules(array $modules) {}
3232

3333
/**
3434
* Handle the whole command-line tasks
3535
*
36-
* @param array $arguments
36+
* @param array $arguments
3737
*/
3838
public function handle(array $arguments = null) {}
3939

4040
/**
4141
* Set an specific argument
4242
*
43-
* @param array $arguments
44-
* @param bool $str
45-
* @param bool $shift
46-
* @return Console
43+
* @param array $arguments
44+
* @param bool $str
45+
* @param bool $shift
46+
* @return Console
4747
*/
4848
public function setArgument(array $arguments = null, $str = true, $shift = true) {}
4949

0 commit comments

Comments
 (0)