Skip to content

Commit 1845b70

Browse files
authored
Merge pull request #874 from phalcon/3.0.x
3.0.2
2 parents 58e6b65 + b3306b0 commit 1845b70

File tree

389 files changed

+22473
-4478
lines changed

Some content is hidden

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

389 files changed

+22473
-4478
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
> Questions should go to https://forum.phalconphp.com
2+
> Documentation issues should go to https://github.com/phalcon/docs/issues
3+
4+
### Expected and Actual Behavior
5+
6+
> **Describe what you are trying to achieve and what goes wrong.**
7+
8+
> Provide output if related
9+
10+
```php
11+
// paste output here
12+
```
13+
> Provide minimal script to reproduce the issue
14+
15+
```php
16+
// paste code
17+
```
18+
19+
### Details
20+
21+
* System info and versions (if possible): (`phalcon info`)
22+
* Phalcon Framework version: (`php --ri phalcon`)
23+
* PHP Version: (`php -v`)
24+
* Operating System:
25+
* Server: Nginx | Apache | Other
26+
* Other related info (Database, table schema):
27+

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Hello!
2+
3+
* Type: bug fix | new feature | code quality | documentation
4+
* Link to issue:
5+
6+
This pull request affects the following components: **(please check boxes)**
7+
8+
* [ ] Core
9+
* [ ] WebTools
10+
* [ ] Migrations
11+
* [ ] Models
12+
* [ ] Scaffold
13+
* [ ] Documentation
14+
* [ ] IDE
15+
* [ ] MySQL
16+
* [ ] PostgreSQL
17+
* [ ] Oracle
18+
* [ ] SQLite
19+
* [ ] Testing
20+
* [ ] Code Quality
21+
* [ ] Templating
22+
23+
**In raising this pull request, I confirm the following (please check boxes):**
24+
25+
- [ ] I have read and understood the [Contributing Guidelines](https://github.com/phalcon/phalcon-devtools/blob/master/CONTRIBUTING.md)?
26+
- [ ] I have checked that another pull request for this purpose does not exist.
27+
- [ ] I wrote some tests for this PR.
28+
29+
Small description of change:
30+
31+
Thanks

CONTRIBUTING.md

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,65 @@
11
# Contributing to Phalcon Developer Tools
22

33
Phalcon Developer Tools is an open source project and a volunteer effort.
4+
Phalcon Developer Tools welcomes contribution from everyone.
5+
6+
## Contributions
7+
8+
Contributions to Phalcon Developer Tools should be made in the form of [GitHub pull requests][pr].
9+
Each pull request will be reviewed by a core contributor (someone with permission to land patches) and either landed in
10+
the main tree or given feedback for changes that would be required before it can be merged. All contributions should
11+
follow this format, even those from core contributors.
12+
13+
## Questions & Support
414

5-
We are welcome contribution from everyone. Contributions to Phalcon Developer Tools should be made in the form of GitHub [pull requests][0].
615
*We only accept bug reports, new feature requests and pull requests in GitHub*.
16+
For questions regarding the usage of the Phalcon Developer Tools or support requests please visit the
17+
[official forums][forum]. IDE stubs must not be modified manually, if you want to improve them please submit a PR
18+
to [Phalcon Framework][cphalcon].
19+
20+
## Bug Report Checklist
21+
22+
- Make sure you are using the latest released version of Phalcon Framework and Phalcon Developer Tools
23+
before submitting a bug report. Bugs in versions older than the latest released one will not be addressed by the
24+
core team
25+
26+
- If you have found a bug it is important to add relevant reproducibility information to your issue to allow us
27+
to reproduce the bug and fix it quicker. Add a script, small program or repository providing the necessary code to
28+
make everyone reproduce the issue reported easily. If a bug cannot be reproduced by the development it would be
29+
difficult provide corrections and solutions. [Submit Reproducible Test][srt] for more information.
30+
31+
- Be sure that information such as OS, Phalcon Framework and Phalcon Developer Tools versions and PHP version are
32+
part of the bug report
33+
34+
- If you're submitting a Segmentation Fault error, we would require a backtrace, please see [Generating a Backtrace][gb]
35+
36+
## Pull Request Checklist
37+
38+
- Don't submit your pull requests to the `master` branch. Branch from the required branch and,
39+
if needed, rebase to the proper branch before submitting your pull request.
40+
If it doesn't merge cleanly with master you may be asked to rebase your changes
41+
42+
- Don't put submodule updates, composer.lock, etc in your pull request unless they are to landed commits
743

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

1046
## Getting Support
1147

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

1450
## Requesting Features
1551

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

1854
Thanks! <br />
1955
Phalcon Team
2056

2157

22-
[0]: https://help.github.com/articles/using-pull-requests/
23-
[1]: https://github.com/phalcon/cphalcon
24-
[2]: http://forum.phalconphp.com/
25-
[3]: https://github.com/phalcon/cphalcon/wiki/New-Feature-Request---NFR
58+
[pr]: https://help.github.com/articles/using-pull-requests/
59+
[forum]: https://forum.phalconphp.com/
60+
[cphalcon]: https://github.com/phalcon/cphalcon
61+
[srt]: https://github.com/phalcon/cphalcon/wiki/Submit-Reproducible-Test
62+
[gb]: https://github.com/phalcon/cphalcon/wiki/Generating-a-backtrace
63+
[support]: https://phalconphp.com/support
64+
[nfr]: https://github.com/phalcon/cphalcon/wiki/New-Feature-Request---NFR
65+
[psr]: http://www.php-fig.org/psr/
File renamed without changes.

README.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# Phalcon Devtools
22

3-
[![Latest Version](https://img.shields.io/packagist/v/phalcon/devtools.svg?style=flat-square)](https://github.com/phalcon/incubator/devtools)
4-
[![Software License](https://img.shields.io/badge/license-BSD--3-brightgreen.svg?style=flat-square)][1]
5-
[![Total Downloads](https://img.shields.io/packagist/dt/phalcon/devtools.svg?style=flat-square)](https://packagist.org/packages/phalcon/devtools)
6-
[![Daily Downloads](https://img.shields.io/packagist/dd/phalcon/devtools.svg?style=flat-square)](https://packagist.org/packages/phalcon/devtools)
3+
[![Latest Version](https://img.shields.io/packagist/v/phalcon/devtools.svg?style=flat-square)][:devtools:]
4+
[![Software License](https://img.shields.io/badge/license-BSD--3-brightgreen.svg?style=flat-square)][:license:]
5+
[![Total Downloads](https://img.shields.io/packagist/dt/phalcon/devtools.svg?style=flat-square)][:packagist:]
6+
[![Daily Downloads](https://img.shields.io/packagist/dd/phalcon/devtools.svg?style=flat-square)][:packagist:]
7+
8+
![Phalcon WebTools](https://cloud.githubusercontent.com/assets/1256298/18617851/b7d31558-7de2-11e6-83e0-30e5902af714.png)
79

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

1011
## What's Phalcon?
1112

@@ -34,7 +35,7 @@ Create the composer.json file as follows:
3435
```json
3536
{
3637
"require": {
37-
"phalcon/devtools": "~3.0.0"
38+
"phalcon/devtools": "~3.0.2"
3839
}
3940
}
4041
```
@@ -103,9 +104,9 @@ phalcon commands help
103104
This command should display something similar to:
104105

105106
```sh
106-
$ phalcon list ?
107+
$ phalcon --help
107108

108-
Phalcon DevTools (3.0.0)
109+
Phalcon DevTools (3.0.2)
109110

110111
Help:
111112
Lists the commands available in Phalcon devtools
@@ -124,9 +125,9 @@ Available commands:
124125

125126
## Database adapter
126127

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

129-
For PostgreSql it will be something like:
130+
For PostgreSQL it will be something like:
130131

131132
```php
132133
$config = [
@@ -140,7 +141,9 @@ $config = [
140141

141142
## License
142143

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

146-
[1]: docs/LICENSE.md
147+
[:packagist:]: https://packagist.org/packages/phalcon/devtools
148+
[:devtools:]: https://github.com/phalcon/phalcon-devtools
149+
[:license:]: https://github.com/phalcon/phalcon-devtools/blob/master/LICENSE.txt

bootstrap/autoload.php

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
<?php
2+
3+
/*
4+
+------------------------------------------------------------------------+
5+
| Phalcon Developer Tools |
6+
+------------------------------------------------------------------------+
7+
| Copyright (c) 2011-2016 Phalcon Team (https://www.phalconphp.com) |
8+
+------------------------------------------------------------------------+
9+
| This source file is subject to the New BSD License that is bundled |
10+
| with this package in the file LICENSE.txt. |
11+
| |
12+
| If you did not receive a copy of the license and are unable to |
13+
| obtain it through the world-wide-web, please send an email |
14+
| to [email protected] so we can send you a copy immediately. |
15+
+------------------------------------------------------------------------+
16+
| Authors: Andres Gutierrez <[email protected]> |
17+
| Eduar Carvajal <[email protected]> |
18+
| Serghei Iakovlev <[email protected]> |
19+
+------------------------------------------------------------------------+
20+
*/
21+
22+
use Phalcon\Loader;
23+
use Phalcon\Version;
24+
25+
if (!extension_loaded('phalcon')) {
26+
throw new Exception(
27+
"Phalcon extension isn't installed, follow these instructions to install it: " .
28+
'https://docs.phalconphp.com/en/latest/reference/install.html'
29+
);
30+
}
31+
32+
/**
33+
* @const DEVTOOLS_START_TIME The start time of the Devtools. Used for profiling.
34+
*/
35+
defined('DEVTOOLS_START_TIME') || define('DEVTOOLS_START_TIME', microtime(true));
36+
37+
/**
38+
* @const DEVTOOLS_START_MEMORY The memory usage at the start of the application. Used for profiling.
39+
*/
40+
defined('DEVTOOLS_START_TIME') || define('DEVTOOLS_START_MEMORY', memory_get_usage());
41+
42+
/**
43+
* @const PTOOLSPATH The path to the Phalcon Developers Tools.
44+
*/
45+
defined('PTOOLSPATH') || define('PTOOLSPATH', rtrim(getenv('PTOOLSPATH') ?: dirname(dirname(__FILE__)), '\\/'));
46+
47+
/**
48+
* Check for old versions
49+
*/
50+
if (rtrim(strtolower(realpath(PTOOLSPATH)), '\\/') !== rtrim(strtolower(realpath(dirname(dirname(__FILE__)))), '\\/')) {
51+
throw new Exception(
52+
sprintf(
53+
'The environment variable PTOOLSPATH is outdated! Current value: %s. New value: %s',
54+
PTOOLSPATH,
55+
dirname(dirname(__FILE__))
56+
)
57+
);
58+
}
59+
60+
/**
61+
* @const DS The DIRECTORY_SEPARATOR shortcut.
62+
*/
63+
defined('DS') || define('DS', DIRECTORY_SEPARATOR);
64+
65+
/**
66+
* @const TEMPLATE_PATH DevTools templates path.
67+
*/
68+
defined('TEMPLATE_PATH') || define('TEMPLATE_PATH', PTOOLSPATH . DS .'templates');
69+
70+
/**
71+
* @const ENV_PRODUCTION Application production stage.
72+
*/
73+
defined('ENV_PRODUCTION') || define('ENV_PRODUCTION', 'production');
74+
75+
/**
76+
* @const ENV_STAGING Application staging stage.
77+
*/
78+
defined('ENV_STAGING') || define('ENV_STAGING', 'staging');
79+
80+
/**
81+
* @const ENV_DEVELOPMENT Application development stage.
82+
*/
83+
defined('ENV_DEVELOPMENT') || define('ENV_DEVELOPMENT', 'development');
84+
85+
/**
86+
* @const ENV_TESTING Application test stage.
87+
*/
88+
defined('ENV_TESTING') || define('ENV_TESTING', 'testing');
89+
90+
/**
91+
* @const APPLICATION_ENV Current application stage.
92+
*/
93+
defined('APPLICATION_ENV') || define('APPLICATION_ENV', getenv('APP_ENV') ?: ENV_DEVELOPMENT);
94+
95+
/**
96+
* @const HOSTNAME The current hostname.
97+
*/
98+
defined('HOSTNAME') || define('HOSTNAME', explode('.', gethostname())[0]);
99+
100+
/**
101+
* @const ADMIN_LTE_VERSION The AdminLTE version.
102+
*/
103+
define('ADMIN_LTE_VERSION', '2.3.6');
104+
105+
/** @const COMPATIBLE_VERSION The compatible Phalcon version. */
106+
define('COMPATIBLE_VERSION', 3000040);
107+
108+
/**
109+
* Register Devtools classes.
110+
*/
111+
(new Loader)->registerDirs([
112+
PTOOLSPATH . DS . 'scripts' . DS
113+
])
114+
->registerNamespaces([
115+
'Phalcon' => PTOOLSPATH . DS . 'scripts' . DS . 'Phalcon' . DS,
116+
'WebTools\Controllers' => PTOOLSPATH . DS . str_replace('/', DS, 'scripts/Phalcon/Web/Tools/Controllers') . DS,
117+
])
118+
->register();
119+
120+
/**
121+
* Register the Composer autoloader (if any)
122+
*/
123+
if (file_exists(PTOOLSPATH . DS .'vendor' . DS . 'autoload.php')) {
124+
require_once PTOOLSPATH . DS .'vendor' . DS . 'autoload.php';
125+
}
126+
127+
/**
128+
* Register the custom loader (if any)
129+
*/
130+
if (file_exists(PTOOLSPATH . DS . '.phalcon' . DS . 'autoload.php')) {
131+
require_once PTOOLSPATH . DS . '.phalcon' . DS . 'autoload.php';
132+
}
133+
134+
if (Version::getId() < COMPATIBLE_VERSION) {
135+
throw new Exception(
136+
"Your Phalcon version isn't compatible with Developer Tools, " .
137+
'download the latest at: https://phalconphp.com/download'
138+
);
139+
}

box.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
],
1010
"files": [
1111
"webtools.php",
12-
"docs/LICENSE.txt"
12+
"LICENSE.txt"
1313
],
1414
"finder": [
1515
{

composer.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,5 @@
3333
"Phalcon\\" : "scripts/Phalcon/"
3434
}
3535
},
36-
"extra": {
37-
"branch-alias": {
38-
"dev-master": "3.0.x-dev"
39-
}
40-
},
41-
"bin": ["phalcon.php"]
36+
"bin": ["phalcon.php", "phalcon"]
4237
}

docs/LICENSE.md

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

ide/phpstorm/phalcon.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
# +------------------------------------------------------------------------+
55
# | Phalcon Framework |
66
# +------------------------------------------------------------------------+
7-
# | Copyright (c) 2011-2015 Phalcon Team (http://www.phalconphp.com) |
7+
# | Copyright (c) 2011-2015 Phalcon Team (https://www.phalconphp.com) |
88
# +------------------------------------------------------------------------+
99
# | This source file is subject to the New BSD License that is bundled |
10-
# | with this package in the file docs/LICENSE.txt. |
10+
# | with this package in the file LICENSE.txt. |
1111
# | |
1212
# | If you did not receive a copy of the license and are unable to |
1313
# | obtain it through the world-wide-web, please send an email |

0 commit comments

Comments
 (0)