Skip to content

Commit

Permalink
Merge pull request #764 from phalcon/3.0.x
Browse files Browse the repository at this point in the history
3.0.1
  • Loading branch information
sergeyklay committed Aug 24, 2016
2 parents c10d185 + 4e211ca commit 58e6b65
Show file tree
Hide file tree
Showing 121 changed files with 1,444 additions and 11,151 deletions.
46 changes: 13 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ Create the composer.json file as follows:
```json
{
"require": {
"phalcon/devtools": "dev-master"
"phalcon/devtools": "~3.0.0"
}
}
```

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

```json
{
"require": {
"phalcon/devtools": "1.3.*@dev"
"phalcon/devtools": "^2.0"
}
}
```
Expand Down Expand Up @@ -84,7 +84,7 @@ cd phalcon-devtools
```

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

```bash
Expand Down Expand Up @@ -122,45 +122,25 @@ Available commands:
webtools (alias of: create-webtools)
```

## Update WebTools from old version

Please remove manually directories:

* `public/css/bootstrap`
* `public/css/codemirror`
* `public/js/bootstrap`
* `public/img/bootstrap`
* `public/js/codemirror`
* `public/js/jquery`

and files:

* `public/webtools.config.php`
* `public/webtools.php`

and just run form your project root:

```bash
$ phalcon webtools --action=enable
```

## Database adapter

Should add 'adapter' parameter in your db config file (if you use not Mysql database). For PostgreSql will be
Should add `adapter` parameter in your `db` config file (if you use not Mysql database).

For PostgreSql it will be something like:

```php
$config = [
"host" => "localhost",
"dbname" => "my_db_name",
"username" => "my_db_user",
"password" => "my_db_user_password",
"adapter" => "Postgresql"
'host' => 'localhost',
'dbname' => 'my_db_name',
'username' => 'my_db_user',
'password' => 'my_db_user_password',
'adapter' => 'Postgresql'
];
```

## License

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

[1]: docs/LICENSE.md
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "library",
"description": "This tools provide you useful scripts to generate code helping to develop faster and easy applications that use with Phalcon framework.",
"keywords": ["framework", "phalcon", "devtools", "webtools", "phar"],
"homepage": "http://phalconphp.com",
"homepage": "https://phalconphp.com",
"license": "BSD-3-Clause",
"authors": [
{
Expand Down
2 changes: 1 addition & 1 deletion ide/stubs/Phalcon/acl/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Phalcon\Acl\Resource
* This class defines resource entity and its description
*/
class Resource
class Resource implements \Phalcon\Acl\ResourceInterface
{
/**
* Resource name
Expand Down
4 changes: 2 additions & 2 deletions ide/stubs/Phalcon/acl/adapter/Memory.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,14 +285,14 @@ public function getNoArgumentsDefaultAction() {}
/**
* Return an array with every role registered in the list
*
* @return Role[]
* @return RoleInterface[]
*/
public function getRoles() {}

/**
* Return an array with every resource registered in the list
*
* @return Resource[]
* @return ResourceInterface[]
*/
public function getResources() {}

Expand Down
6 changes: 3 additions & 3 deletions ide/stubs/Phalcon/assets/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function getSourcePath() {}
public function add(\Phalcon\Assets\Resource $resource) {}

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

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

/**
* Adds a inline javascript to the collection
* Adds an inline javascript to the collection
*
* @param string $content
* @param bool $filter
Expand Down
6 changes: 3 additions & 3 deletions ide/stubs/Phalcon/assets/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function useImplicitOutput($implicitOutput) {}
public function addCss($path, $local = true, $filter = true, $attributes = null) {}

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

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

/**
* Adds a inline code by its type
* Adds an inline code by its type
*
* @param string $type
* @param mixed $code
Expand Down
2 changes: 1 addition & 1 deletion ide/stubs/Phalcon/cache/backend/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* $frontendOptions = [
* 'lifetime' => 172800
* ];
* // Create a output cache
* // Create an output cache
* $frontCache = FrontOutput($frontOptions);
* // Set the cache directory
* $backendOptions = [
Expand Down
19 changes: 8 additions & 11 deletions ide/stubs/Phalcon/cache/frontend/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,21 @@
* Phalcon\Cache\Frontend\Data
* Allows to cache native PHP data in a serialized form
* <code>
* <?php
* use Phalcon\Cache\Backend\File;
* use Phalcon\Cache\Frontend\Data;
* // Cache the files for 2 days using a Data frontend
* $frontCache = new \Phalcon\Cache\Frontend\Data(array(
* "lifetime" => 172800
* ));
* // Create the component that will cache "Data" to a "File" backend
* // Set the cache file directory - important to keep the "/" at the end of
* $frontCache = new Data(['lifetime' => 172800]);
* // Create the component that will cache "Data" to a 'File' backend
* // Set the cache file directory - important to keep the '/' at the end of
* // of the value for the folder
* $cache = new \Phalcon\Cache\Backend\File($frontCache, array(
* "cacheDir" => "../app/cache/"
* ));
* $cache = new File($frontCache, ['cacheDir' => '../app/cache/']);
* // Try to get cached records
* $cacheKey = 'robots_order_id.cache';
* $robots = $cache->get($cacheKey);
* $robots = $cache->get($cacheKey);
* if ($robots === null) {
* // $robots is null due to cache expiration or data does not exist
* // Make the database call and populate the variable
* $robots = Robots::find(array("order" => "id"));
* $robots = Robots::find(['order' => 'id']);
* // Store it in the cache
* $cache->save($cacheKey, $robots);
* }
Expand Down
36 changes: 17 additions & 19 deletions ide/stubs/Phalcon/cache/frontend/Output.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,28 @@
* Phalcon\Cache\Frontend\Output
* Allows to cache output fragments captured with ob_* functions
* <code>
* <?php
* //Create an Output frontend. Cache the files for 2 days
* $frontCache = new \Phalcon\Cache\Frontend\Output(array(
* "lifetime" => 172800
* ));
* use Phalcon\Tag;
* use Phalcon\Cache\Backend\File;
* use Phalcon\Cache\Frontend\Output;
* // Create an Output frontend. Cache the files for 2 days
* $frontCache = new Output(['lifetime' => 172800]));
* // Create the component that will cache from the "Output" to a "File" backend
* // Set the cache file directory - it's important to keep the "/" at the end of
* // the value for the folder
* $cache = new \Phalcon\Cache\Backend\File($frontCache, array(
* "cacheDir" => "../app/cache/"
* ));
* $cache = new File($frontCache, ['cacheDir' => '../app/cache/']);
* // Get/Set the cache file to ../app/cache/my-cache.html
* $content = $cache->start("my-cache.html");
* $content = $cache->start('my-cache.html');
* // If $content is null then the content will be generated for the cache
* if ($content === null) {
* //Print date and time
* echo date("r");
* //Generate a link to the sign-up action
* echo Phalcon\Tag::linkTo(
* array(
* "user/signup",
* "Sign Up",
* "class" => "signup-button"
* )
* if (null === $content) {
* // Print date and time
* echo date('r');
* // Generate a link to the sign-up action
* echo Tag::linkTo(
* [
* 'user/signup',
* 'Sign Up',
* 'class' => 'signup-button'
* ]
* );
* // Store the output into the cache file
* $cache->save();
Expand Down
12 changes: 6 additions & 6 deletions ide/stubs/Phalcon/cli/Console.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,24 @@ class Console extends \Phalcon\Application
* ));
* </code>
*
* @param array $modules
* @param array $modules
*/
public function addModules(array $modules) {}

/**
* Handle the whole command-line tasks
*
* @param array $arguments
* @param array $arguments
*/
public function handle(array $arguments = null) {}

/**
* Set an specific argument
*
* @param array $arguments
* @param bool $str
* @param bool $shift
* @return Console
* @param array $arguments
* @param bool $str
* @param bool $shift
* @return Console
*/
public function setArgument(array $arguments = null, $str = true, $shift = true) {}

Expand Down
10 changes: 9 additions & 1 deletion ide/stubs/Phalcon/config/adapter/Ini.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
* echo $config->phalcon->controllersDir;
* echo $config->database->username;
* </code>
* PHP constants may also be parsed in the ini file, so if you define a constant
* as an ini value before calling the constructor, the constant's value will be
* integrated into the results. To use it this way you must specify the optional
* second parameter as INI_SCANNER_NORMAL when calling the constructor:
* <code>
* $config = new Phalcon\Config\Adapter\Ini("path/config-with-constants.ini", INI_SCANNER_NORMAL);
* </code>
*/
class Ini extends \Phalcon\Config
{
Expand All @@ -32,8 +39,9 @@ class Ini extends \Phalcon\Config
* Phalcon\Config\Adapter\Ini constructor
*
* @param string $filePath
* @param mixed $mode
*/
public function __construct($filePath) {}
public function __construct($filePath, $mode = null) {}

/**
* Build multidimensional array from string
Expand Down
4 changes: 2 additions & 2 deletions ide/stubs/Phalcon/db/Dialect.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public final function getColumnList(array $columnList, $escapeChar = null, $bind
public final function getSqlColumn($column, $escapeChar = null, $bindCounts = null) {}

/**
* Transforms an intermediate representation for a expression into a database system valid expression
* Transforms an intermediate representation for an expression into a database system valid expression
*
* @param array $expression
* @param string $escapeChar
Expand Down Expand Up @@ -335,7 +335,7 @@ protected final function getSqlExpressionGroupBy($expression, $escapeChar = null
protected final function getSqlExpressionHaving(array $expression, $escapeChar = null, $bindCounts = null) {}

/**
* Resolve a ORDER BY clause
* Resolve an ORDER BY clause
*
* @param mixed $expression
* @param string $escapeChar
Expand Down
2 changes: 1 addition & 1 deletion ide/stubs/Phalcon/forms/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public function render($name, $attributes = null) {}
public function get($name) {}

/**
* Generate the label of a element added to the form including HTML
* Generate the label of an element added to the form including HTML
*
* @param string $name
* @param array $attributes
Expand Down
Loading

0 comments on commit 58e6b65

Please sign in to comment.