Skip to content

Commit

Permalink
Merge pull request #874 from phalcon/3.0.x
Browse files Browse the repository at this point in the history
3.0.2
  • Loading branch information
sergeyklay authored Nov 27, 2016
2 parents 58e6b65 + b3306b0 commit 1845b70
Show file tree
Hide file tree
Showing 389 changed files with 22,473 additions and 4,478 deletions.
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
> Questions should go to https://forum.phalconphp.com
> Documentation issues should go to https://github.com/phalcon/docs/issues
### Expected and Actual Behavior

> **Describe what you are trying to achieve and what goes wrong.**
> Provide output if related
```php
// paste output here
```
> Provide minimal script to reproduce the issue
```php
// paste code
```

### Details

* System info and versions (if possible): (`phalcon info`)
* Phalcon Framework version: (`php --ri phalcon`)
* PHP Version: (`php -v`)
* Operating System:
* Server: Nginx | Apache | Other
* Other related info (Database, table schema):

31 changes: 31 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Hello!

* Type: bug fix | new feature | code quality | documentation
* Link to issue:

This pull request affects the following components: **(please check boxes)**

* [ ] Core
* [ ] WebTools
* [ ] Migrations
* [ ] Models
* [ ] Scaffold
* [ ] Documentation
* [ ] IDE
* [ ] MySQL
* [ ] PostgreSQL
* [ ] Oracle
* [ ] SQLite
* [ ] Testing
* [ ] Code Quality
* [ ] Templating

**In raising this pull request, I confirm the following (please check boxes):**

- [ ] I have read and understood the [Contributing Guidelines](https://github.com/phalcon/phalcon-devtools/blob/master/CONTRIBUTING.md)?
- [ ] I have checked that another pull request for this purpose does not exist.
- [ ] I wrote some tests for this PR.

Small description of change:

Thanks
56 changes: 48 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,65 @@
# Contributing to Phalcon Developer Tools

Phalcon Developer Tools is an open source project and a volunteer effort.
Phalcon Developer Tools welcomes contribution from everyone.

## Contributions

Contributions to Phalcon Developer Tools should be made in the form of [GitHub pull requests][pr].
Each pull request will be reviewed by a core contributor (someone with permission to land patches) and either landed in
the main tree or given feedback for changes that would be required before it can be merged. All contributions should
follow this format, even those from core contributors.

## Questions & Support

We are welcome contribution from everyone. Contributions to Phalcon Developer Tools should be made in the form of GitHub [pull requests][0].
*We only accept bug reports, new feature requests and pull requests in GitHub*.
For questions regarding the usage of the Phalcon Developer Tools or support requests please visit the
[official forums][forum]. IDE stubs must not be modified manually, if you want to improve them please submit a PR
to [Phalcon Framework][cphalcon].

## Bug Report Checklist

- Make sure you are using the latest released version of Phalcon Framework and Phalcon Developer Tools
before submitting a bug report. Bugs in versions older than the latest released one will not be addressed by the
core team

- If you have found a bug it is important to add relevant reproducibility information to your issue to allow us
to reproduce the bug and fix it quicker. Add a script, small program or repository providing the necessary code to
make everyone reproduce the issue reported easily. If a bug cannot be reproduced by the development it would be
difficult provide corrections and solutions. [Submit Reproducible Test][srt] for more information.

- Be sure that information such as OS, Phalcon Framework and Phalcon Developer Tools versions and PHP version are
part of the bug report

- If you're submitting a Segmentation Fault error, we would require a backtrace, please see [Generating a Backtrace][gb]

## Pull Request Checklist

- Don't submit your pull requests to the `master` branch. Branch from the required branch and,
if needed, rebase to the proper branch before submitting your pull request.
If it doesn't merge cleanly with master you may be asked to rebase your changes

- Don't put submodule updates, composer.lock, etc in your pull request unless they are to landed commits

IDE stubs must not be modified manually, if you want to improve them please submit a PR to [cphalcon][1].
- Make sure that the code you write fits with the general style and coding standards of the [Accepted PHP Standards][psr]

## Getting Support

For questions regarding the usage of the Phalcon Developer Tools or support requests please visit the [official forums][2].
If you have a question about how to use Phalcon, please see the [support page][support].

## Requesting Features

If you have a change or new feature in mind, please fill an [NFR][3].
If you have a change or new feature in mind, please fill an [NFR][nfr].

Thanks! <br />
Phalcon Team


[0]: https://help.github.com/articles/using-pull-requests/
[1]: https://github.com/phalcon/cphalcon
[2]: http://forum.phalconphp.com/
[3]: https://github.com/phalcon/cphalcon/wiki/New-Feature-Request---NFR
[pr]: https://help.github.com/articles/using-pull-requests/
[forum]: https://forum.phalconphp.com/
[cphalcon]: https://github.com/phalcon/cphalcon
[srt]: https://github.com/phalcon/cphalcon/wiki/Submit-Reproducible-Test
[gb]: https://github.com/phalcon/cphalcon/wiki/Generating-a-backtrace
[support]: https://phalconphp.com/support
[nfr]: https://github.com/phalcon/cphalcon/wiki/New-Feature-Request---NFR
[psr]: http://www.php-fig.org/psr/
File renamed without changes.
27 changes: 15 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Phalcon Devtools

[![Latest Version](https://img.shields.io/packagist/v/phalcon/devtools.svg?style=flat-square)](https://github.com/phalcon/incubator/devtools)
[![Software License](https://img.shields.io/badge/license-BSD--3-brightgreen.svg?style=flat-square)][1]
[![Total Downloads](https://img.shields.io/packagist/dt/phalcon/devtools.svg?style=flat-square)](https://packagist.org/packages/phalcon/devtools)
[![Daily Downloads](https://img.shields.io/packagist/dd/phalcon/devtools.svg?style=flat-square)](https://packagist.org/packages/phalcon/devtools)
[![Latest Version](https://img.shields.io/packagist/v/phalcon/devtools.svg?style=flat-square)][:devtools:]
[![Software License](https://img.shields.io/badge/license-BSD--3-brightgreen.svg?style=flat-square)][:license:]
[![Total Downloads](https://img.shields.io/packagist/dt/phalcon/devtools.svg?style=flat-square)][:packagist:]
[![Daily Downloads](https://img.shields.io/packagist/dd/phalcon/devtools.svg?style=flat-square)][:packagist:]

![Phalcon WebTools](https://cloud.githubusercontent.com/assets/1256298/18617851/b7d31558-7de2-11e6-83e0-30e5902af714.png)

![Phalcon WebTools](http://i.imgur.com/v3MzIDn.png?1)

## What's Phalcon?

Expand Down Expand Up @@ -34,7 +35,7 @@ Create the composer.json file as follows:
```json
{
"require": {
"phalcon/devtools": "~3.0.0"
"phalcon/devtools": "~3.0.2"
}
}
```
Expand Down Expand Up @@ -103,9 +104,9 @@ phalcon commands help
This command should display something similar to:

```sh
$ phalcon list ?
$ phalcon --help

Phalcon DevTools (3.0.0)
Phalcon DevTools (3.0.2)

Help:
Lists the commands available in Phalcon devtools
Expand All @@ -124,9 +125,9 @@ Available commands:

## Database adapter

Should add `adapter` parameter in your `db` config file (if you use not Mysql database).
Should add `adapter` parameter in your `db` config file (if you use not MySQL database).

For PostgreSql it will be something like:
For PostgreSQL it will be something like:

```php
$config = [
Expand All @@ -140,7 +141,9 @@ $config = [

## License

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

[1]: docs/LICENSE.md
[:packagist:]: https://packagist.org/packages/phalcon/devtools
[:devtools:]: https://github.com/phalcon/phalcon-devtools
[:license:]: https://github.com/phalcon/phalcon-devtools/blob/master/LICENSE.txt
139 changes: 139 additions & 0 deletions bootstrap/autoload.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
<?php

/*
+------------------------------------------------------------------------+
| Phalcon Developer Tools |
+------------------------------------------------------------------------+
| Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) |
+------------------------------------------------------------------------+
| This source file is subject to the New BSD License that is bundled |
| with this package in the file LICENSE.txt. |
| |
| If you did not receive a copy of the license and are unable to |
| obtain it through the world-wide-web, please send an email |
| to [email protected] so we can send you a copy immediately. |
+------------------------------------------------------------------------+
| Authors: Andres Gutierrez <[email protected]> |
| Eduar Carvajal <[email protected]> |
| Serghei Iakovlev <[email protected]> |
+------------------------------------------------------------------------+
*/

use Phalcon\Loader;
use Phalcon\Version;

if (!extension_loaded('phalcon')) {
throw new Exception(
"Phalcon extension isn't installed, follow these instructions to install it: " .
'https://docs.phalconphp.com/en/latest/reference/install.html'
);
}

/**
* @const DEVTOOLS_START_TIME The start time of the Devtools. Used for profiling.
*/
defined('DEVTOOLS_START_TIME') || define('DEVTOOLS_START_TIME', microtime(true));

/**
* @const DEVTOOLS_START_MEMORY The memory usage at the start of the application. Used for profiling.
*/
defined('DEVTOOLS_START_TIME') || define('DEVTOOLS_START_MEMORY', memory_get_usage());

/**
* @const PTOOLSPATH The path to the Phalcon Developers Tools.
*/
defined('PTOOLSPATH') || define('PTOOLSPATH', rtrim(getenv('PTOOLSPATH') ?: dirname(dirname(__FILE__)), '\\/'));

/**
* Check for old versions
*/
if (rtrim(strtolower(realpath(PTOOLSPATH)), '\\/') !== rtrim(strtolower(realpath(dirname(dirname(__FILE__)))), '\\/')) {
throw new Exception(
sprintf(
'The environment variable PTOOLSPATH is outdated! Current value: %s. New value: %s',
PTOOLSPATH,
dirname(dirname(__FILE__))
)
);
}

/**
* @const DS The DIRECTORY_SEPARATOR shortcut.
*/
defined('DS') || define('DS', DIRECTORY_SEPARATOR);

/**
* @const TEMPLATE_PATH DevTools templates path.
*/
defined('TEMPLATE_PATH') || define('TEMPLATE_PATH', PTOOLSPATH . DS .'templates');

/**
* @const ENV_PRODUCTION Application production stage.
*/
defined('ENV_PRODUCTION') || define('ENV_PRODUCTION', 'production');

/**
* @const ENV_STAGING Application staging stage.
*/
defined('ENV_STAGING') || define('ENV_STAGING', 'staging');

/**
* @const ENV_DEVELOPMENT Application development stage.
*/
defined('ENV_DEVELOPMENT') || define('ENV_DEVELOPMENT', 'development');

/**
* @const ENV_TESTING Application test stage.
*/
defined('ENV_TESTING') || define('ENV_TESTING', 'testing');

/**
* @const APPLICATION_ENV Current application stage.
*/
defined('APPLICATION_ENV') || define('APPLICATION_ENV', getenv('APP_ENV') ?: ENV_DEVELOPMENT);

/**
* @const HOSTNAME The current hostname.
*/
defined('HOSTNAME') || define('HOSTNAME', explode('.', gethostname())[0]);

/**
* @const ADMIN_LTE_VERSION The AdminLTE version.
*/
define('ADMIN_LTE_VERSION', '2.3.6');

/** @const COMPATIBLE_VERSION The compatible Phalcon version. */
define('COMPATIBLE_VERSION', 3000040);

/**
* Register Devtools classes.
*/
(new Loader)->registerDirs([
PTOOLSPATH . DS . 'scripts' . DS
])
->registerNamespaces([
'Phalcon' => PTOOLSPATH . DS . 'scripts' . DS . 'Phalcon' . DS,
'WebTools\Controllers' => PTOOLSPATH . DS . str_replace('/', DS, 'scripts/Phalcon/Web/Tools/Controllers') . DS,
])
->register();

/**
* Register the Composer autoloader (if any)
*/
if (file_exists(PTOOLSPATH . DS .'vendor' . DS . 'autoload.php')) {
require_once PTOOLSPATH . DS .'vendor' . DS . 'autoload.php';
}

/**
* Register the custom loader (if any)
*/
if (file_exists(PTOOLSPATH . DS . '.phalcon' . DS . 'autoload.php')) {
require_once PTOOLSPATH . DS . '.phalcon' . DS . 'autoload.php';
}

if (Version::getId() < COMPATIBLE_VERSION) {
throw new Exception(
"Your Phalcon version isn't compatible with Developer Tools, " .
'download the latest at: https://phalconphp.com/download'
);
}
2 changes: 1 addition & 1 deletion box.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
],
"files": [
"webtools.php",
"docs/LICENSE.txt"
"LICENSE.txt"
],
"finder": [
{
Expand Down
7 changes: 1 addition & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,5 @@
"Phalcon\\" : "scripts/Phalcon/"
}
},
"extra": {
"branch-alias": {
"dev-master": "3.0.x-dev"
}
},
"bin": ["phalcon.php"]
"bin": ["phalcon.php", "phalcon"]
}
27 changes: 0 additions & 27 deletions docs/LICENSE.md

This file was deleted.

4 changes: 2 additions & 2 deletions ide/phpstorm/phalcon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
# +------------------------------------------------------------------------+
# | Phalcon Framework |
# +------------------------------------------------------------------------+
# | Copyright (c) 2011-2015 Phalcon Team (http://www.phalconphp.com) |
# | Copyright (c) 2011-2015 Phalcon Team (https://www.phalconphp.com) |
# +------------------------------------------------------------------------+
# | This source file is subject to the New BSD License that is bundled |
# | with this package in the file docs/LICENSE.txt. |
# | with this package in the file LICENSE.txt. |
# | |
# | If you did not receive a copy of the license and are unable to |
# | obtain it through the world-wide-web, please send an email |
Expand Down
Loading

0 comments on commit 1845b70

Please sign in to comment.