-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7c89800
Showing
136 changed files
with
6,891 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
coverage_clover: build/logs/clover.xml | ||
json_path: build/logs/coveralls-upload.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// Environment production、testing and development | ||
ENVIRONMENT = development | ||
|
||
// Debug | ||
DEBUG = true | ||
|
||
// Encryption key | ||
AUTH_KEY = 7becb888f518b20224a988906df51e05 | ||
|
||
// Resource `php leevel link:[public|storage]` | ||
TOP_DOMAIN = queryphp.cn | ||
URL_PUBLIC = http://queryphp.cn/public | ||
URL_STORAGE = http://queryphp.cn/storage | ||
|
||
// Lang | ||
I18N = zh-CN | ||
|
||
// Database | ||
DATABASE_DRIVER = mysql | ||
DATABASE_HOST = 127.0.0.1 | ||
DATABASE_PORT = 3306 | ||
DATABASE_NAME = queryphp_development_db | ||
DATABASE_USER = root | ||
DATABASE_PASSWORD = | ||
|
||
// Cache | ||
CACHE_DRIVER = file | ||
CACHE_REDIS_HOST = 127.0.0.1 | ||
CACHE_REDIS_PORT = 6379 | ||
CACHE_REDIS_PASSWORD = null | ||
|
||
// Session | ||
SESSION_DRIVER = file | ||
SESSION_REDIS_HOST = 127.0.0.1 | ||
SESSION_REDIS_PORT = 6379 | ||
SESSION_REDIS_PASSWORD = null | ||
|
||
// Log | ||
LOG_DRIVER = file | ||
|
||
// Throttler | ||
THROTTLER_DRIVER = file | ||
|
||
MAIL_DRIVER = smtp | ||
MAIL_HOST = smtp.qq.com | ||
MAIL_PORT = 465 | ||
MAIL_USERNAME = null | ||
MAIL_PASSWORD = null | ||
MAIL_ENCRYPTION = null | ||
|
||
// Filesystem | ||
FILESYSTEM_DRIVER = local | ||
FILESYSTEM_FTP_HOST = ftp.example.com | ||
FILESYSTEM_FTP_PORT = 21 | ||
FILESYSTEM_FTP_USERNAME = your-username | ||
FILESYSTEM_FTP_PASSWORD = your-password | ||
FILESYSTEM_SFTP_HOST = sftp.example.com | ||
FILESYSTEM_SFTP_PORT = 22 | ||
FILESYSTEM_SFTP_USERNAME = your-username | ||
FILESYSTEM_SFTP_PASSWORD = your-password | ||
|
||
// View | ||
VIEW_DRIVER = html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.buildpath | ||
.project | ||
.env | ||
.metadata | ||
.classpath | ||
.settings/ | ||
composer.lock | ||
node_modules/ | ||
.settings/ | ||
.DS_Store | ||
vendor/ | ||
frontend/node_modules/ | ||
*.log | ||
package-lock.json | ||
.php_cs.cache | ||
logs/ | ||
www/public | ||
www/storage | ||
www/apis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the forcodepoem package. | ||
* | ||
* The PHP Application Created By Code Poem. <Query Yet Simple> | ||
* (c) 2018-2099 http://forcodepoem.com All rights reserved. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
$header = <<<'EOF' | ||
This file is part of the forcodepoem package. | ||
The PHP Application Created By Code Poem. <Query Yet Simple> | ||
(c) 2018-2099 http://forcodepoem.com All rights reserved. | ||
For the full copyright and license information, please view the LICENSE | ||
file that was distributed with this source code. | ||
EOF; | ||
|
||
// https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/2.12/.php_cs.dist | ||
return PhpCsFixer\Config::create() | ||
->setRules([ | ||
// 'logical_operators' => true, | ||
// 'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'], | ||
// 'no_binary_string' => true, | ||
// 'php_unit_internal_class' => true, | ||
// 'no_unset_on_property' => true, | ||
// 'php_unit_test_case_static_method_calls' => ['call_type' => 'this'], | ||
// 'phpdoc_trim_consecutive_blank_line_separation' => true, | ||
// 'return_assignment' => true, | ||
'@PHP56Migration' => true, | ||
'@PHPUnit60Migration:risky' => true, | ||
'@Symfony' => true, | ||
'@Symfony:risky' => true, | ||
'align_multiline_comment' => true, | ||
'array_indentation' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'blank_line_before_statement' => true, | ||
'combine_consecutive_issets' => true, | ||
'combine_consecutive_unsets' => true, | ||
'comment_to_phpdoc' => true, | ||
'compact_nullable_typehint' => true, | ||
'escape_implicit_backslashes' => true, | ||
'explicit_indirect_variable' => true, | ||
'explicit_string_variable' => true, | ||
'final_internal_class' => true, | ||
'fully_qualified_strict_types' => true, | ||
'function_to_constant' => ['functions' => ['get_class', 'get_called_class', 'php_sapi_name', 'phpversion', 'pi']], | ||
'header_comment' => ['header' => $header], | ||
'heredoc_to_nowdoc' => true, | ||
'list_syntax' => ['syntax' => 'long'], | ||
'method_chaining_indentation' => true, | ||
'multiline_comment_opening_closing' => true, | ||
'no_alternative_syntax' => true, | ||
'no_extra_blank_lines' => ['tokens' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block']], | ||
'no_null_property_initialization' => true, | ||
'no_short_echo_tag' => true, | ||
'no_superfluous_elseif' => true, | ||
'no_unneeded_curly_braces' => true, | ||
'no_unneeded_final_method' => true, | ||
'no_unreachable_default_argument_value' => true, | ||
'no_useless_else' => true, | ||
'no_useless_return' => true, | ||
'ordered_class_elements' => true, | ||
'ordered_imports' => true, | ||
'php_unit_ordered_covers' => true, | ||
'php_unit_set_up_tear_down_visibility' => true, | ||
'php_unit_strict' => false, | ||
'php_unit_test_annotation' => true, | ||
'php_unit_test_class_requires_covers' => false, | ||
'phpdoc_add_missing_param_annotation' => true, | ||
'phpdoc_order' => true, | ||
'phpdoc_types_order' => true, | ||
'semicolon_after_instruction' => true, | ||
'single_line_comment_style' => true, | ||
'strict_comparison' => true, | ||
'strict_param' => true, | ||
'string_line_ending' => true, | ||
'yoda_style' => true, | ||
'binary_operator_spaces' => ['align_double_arrow' => true], // 自动对齐数组 | ||
'increment_style' => ['style' => 'post'], // 自增自减操作符位置 | ||
]) | ||
->setRiskyAllowed(true) | ||
->setFinder( | ||
PhpCsFixer\Finder::create() | ||
->in(__DIR__.'/application') | ||
->append([__FILE__]) | ||
->in(__DIR__.'/tests') | ||
->in(__DIR__.'/www') | ||
->in(__DIR__.'/option') | ||
->in(__DIR__.'/database') | ||
->in(__DIR__.'/common') | ||
) | ||
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
language: php | ||
|
||
env: | ||
global: | ||
- MIN_PHP=7.1.3 | ||
- setup=stable | ||
|
||
matrix: | ||
include: | ||
- php: 7.1.3 | ||
env: deps=high | ||
- php: 7.2 | ||
env: deps=low | ||
|
||
fast_finish: true | ||
|
||
sudo: false | ||
|
||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
|
||
services: | ||
- redis-server | ||
- mysql | ||
|
||
before_install: | ||
- mysql -e "create database IF NOT EXISTS test;" -uroot | ||
- phpenv config-add build/redis.ini | ||
- travis_retry composer self-update | ||
|
||
install: | ||
- if [[ $setup = 'stable' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-stable --no-suggest; fi | ||
- if [[ $setup = 'lowest' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-lowest --prefer-stable --no-suggest; fi | ||
# Some debug info is located here | ||
- ls -al `$(phpenv which php-config) --extension-dir` | ||
- $(phpenv which php) -v | ||
- $(phpenv which php) -m | ||
|
||
script: | ||
- mkdir -p logs | ||
- mkdir -p build/logs | ||
- php vendor/bin/phpunit -c phpunit.xml.dist --coverage-clover build/logs/clover.xml | ||
|
||
after_success: | ||
- travis_retry php vendor/bin/php-coveralls | ||
- travis_retry php vendor/bin/php-coveralls -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) <forcodepoem> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
 | ||
|
||
<p align="center"> | ||
<a href="https://github.styleci.io/repos/78216574"><img src="https://github.styleci.io/repos/78216574/shield?branch=master" alt="StyleCI"></a> | ||
<a href="https://travis-ci.org/hunzhiwange/queryphp"> | ||
<img alt="Build Status" src="https://img.shields.io/travis/hunzhiwange/queryphp.svg" /></a> | ||
<a href='https://coveralls.io/github/hunzhiwange/queryphp?branch=master'><img src='https://coveralls.io/repos/github/hunzhiwange/queryphp/badge.svg?branch=master' alt='Coverage Status' /></a> | ||
<a href="https://github.com/hunzhiwange/queryphp/releases"> | ||
<img alt="Latest Version" src="https://poser.pugx.org/hunzhiwange/queryphp/version" /></a> | ||
<a href="http://opensource.org/licenses/MIT"> | ||
<img alt="QueryPHP License" src="https://poser.pugx.org/hunzhiwange/queryphp/license.svg" /></a> | ||
</p> | ||
|
||
# The QueryPHP Application | ||
|
||
QueryPHP is a powerful PHP framework for code poem as free as wind. [Query Yet Simple] | ||
|
||
QueryPHP was founded in 2010 and released the first version on 2010.10.03. | ||
|
||
QueryPHP was based on the DoYouHaoBaby framework,we have a large code refactoring. | ||
|
||
* Site: <https://www.queryphp.com/> | ||
* API: <http://api.queryphp.com> | ||
* Document: <https://www.leevel.vip/> | ||
|
||
## The core packages | ||
|
||
* QueryPHP On Github: <https://github.com/hunzhiwange/queryphp/> | ||
* QueryPHP On Gitee: <https://gitee.com/dyhb/queryphp/> | ||
* Framework On Github: <https://github.com/hunzhiwange/framework/> | ||
* Framework On Gitee: <https://gitee.com/dyhb/framework/> | ||
* Leevel On Github: <https://github.com/hunzhiwange/leevel/> | ||
* Leevel On Gitee: <https://gitee.com/dyhb/queryyetsimple> | ||
* Test: <https://github.com/queryyetsimple/tests/> | ||
* Package: <https://github.com/queryyetsimple/> | ||
|
||
## How to install | ||
|
||
## Base use | ||
|
||
``` | ||
composer create-project hunzhiwange/queryphp myapp dev-master --repository=https://packagist.laravel-china.org/ | ||
``` | ||
|
||
## Visite it | ||
|
||
``` | ||
php leevel server <Visite http://127.0.0.1:9527/> | ||
``` | ||
|
||
* Api Test <http://127.0.0.1:9527/api/test> | ||
* php leevel link:public <http://127.0.0.1:9527/public/css/page.css> | ||
* php leevel link:storage <http://127.0.0.1:9527/storage/logo.png> | ||
* php leevel link:apis <http://127.0.0.1:9527/apis/> | ||
|
||
## Base optimization | ||
|
||
### Debug | ||
|
||
Modify .env or runtime/bootstrap/option.php. | ||
|
||
``` | ||
// Environment production、testing and development | ||
ENVIRONMENT = production | ||
// Debug | ||
DEBUG = false | ||
``` | ||
|
||
### Commands | ||
|
||
The commands below can make queryphp faster. | ||
|
||
``` | ||
php leevel router:cache | ||
php leevel option:cache | ||
php leevel i18n:cache | ||
php leevel view:cache | ||
php leevel autoload (contains `composer dump-autoload --optimize`) | ||
``` | ||
|
||
Or | ||
|
||
``` | ||
php leevel production | ||
``` | ||
|
||
## Unified Code Style | ||
|
||
``` | ||
$cd /data/codes/queryphp | ||
$php-cs-fixer fix --config=.php_cs.dist | ||
``` | ||
|
||
## License | ||
|
||
The QueryPHP framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT). |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.