Skip to content

Commit 0f425a9

Browse files
committed
first
0 parents  commit 0f425a9

File tree

135 files changed

+6573
-0
lines changed

Some content is hidden

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

135 files changed

+6573
-0
lines changed

.editorconfig

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 4
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2

.gitattributes

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
* text=auto
2+
3+
*.blade.php diff=html
4+
*.css diff=css
5+
*.html diff=html
6+
*.md diff=markdown
7+
*.php diff=php
8+
9+
/.github export-ignore
10+
/tests export-ignore
11+
.editorconfig export-ignore
12+
.gitattributes export-ignore
13+
.gitignore export-ignore
14+
.styleci.yml export-ignore
15+
CHANGELOG.md export-ignore
16+
phpunit.xml.dist export-ignore
17+
UPGRADE.md export-ignore

.github/CODE_OF_CONDUCT.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Code of Conduct
2+
3+
The Laravel Code of Conduct can be found in the [Laravel documentation](https://laravel.com/docs/contributions#code-of-conduct).

.github/CONTRIBUTING.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Contribution Guide
2+
3+
The Laravel contributing guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: "Bug report"
3+
about: 'Report a general library issue. Please ensure your version is still supported: https://laravel.com/docs/releases#support-policy'
4+
---
5+
6+
- Octane Version: #.#.#
7+
- Laravel Version: #.#.#
8+
- PHP Version: #.#.#
9+
- Database Driver & Version:
10+
11+
### Description:
12+
13+
14+
### Steps To Reproduce:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
name: "Feature request"
3+
about: 'For ideas or feature requests: please make a pull request or open an issue'
4+
---

.github/ISSUE_TEMPLATE/config.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Support question
4+
url: https://laravel.com/docs/contributions#support-questions
5+
about: 'This repository is only for reporting bugs. If you need help using the library, click:'
6+
- name: Documentation issue
7+
url: https://github.com/laravel/docs
8+
about: For documentation issues, open a pull request at the laravel/docs repository

.github/PULL_REQUEST_TEMPLATE.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!--
2+
Please only send a pull request to branches which are currently supported: https://laravel.com/docs/releases#support-policy
3+
4+
If you are unsure which branch your pull request should be sent to, please read: https://laravel.com/docs/contributions#which-branch
5+
6+
Pull requests without a descriptive title, thorough description, or tests will be closed.
7+
8+
In addition, please describe the benefit to end users; the reasons it does not break any existing features; how it makes building web applications easier, etc.
9+
-->

.github/SECURITY.md

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Security Policy
2+
3+
**PLEASE DON'T DISCLOSE SECURITY-RELATED ISSUES PUBLICLY, [SEE BELOW](#reporting-a-vulnerability).**
4+
5+
## Supported Versions
6+
7+
Only the latest major version receives security fixes.
8+
9+
## Reporting a Vulnerability
10+
11+
If you discover a security vulnerability within Laravel, please send an email to Taylor Otwell at [email protected]. All security vulnerabilities will be promptly addressed.
12+
13+
### Public PGP Key
14+
15+
```
16+
-----BEGIN PGP PUBLIC KEY BLOCK-----
17+
Version: OpenPGP v2.0.8
18+
Comment: https://sela.io/pgp/
19+
20+
xsFNBFugFSQBEACxEKhIY9IoJzcouVTIYKJfWFGvwFgbRjQWBiH3QdHId5vCrbWo
21+
s2l+4Rv03gMG+yHLJ3rWElnNdRaNdQv59+lShrZF7Bvu7Zvc0mMNmFOM/mQ/K2Lt
22+
OK/8bh6iwNNbEuyOhNQlarEy/w8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VOHaKhiFZGxZIVbBpBOdvAKaMj4p/uln
86+
yklN3YFIfgmGPYbL0elvXVn7XfvwSV1mCQV5LtMbLHsFf0VsA16UsG8A/tLWtwgt
87+
0antzftRHXb+DI4qr+qEYKFkv9F3oCOXyH4QBhPA42EzKqhMXByEkEK9bu6skioL
88+
mHhDQ7yHjTWcxstqQjkUQ0T/IF9ls+Sm5u7rVXEifpyI7MCb+76kSCDawesvInKt
89+
WBGOG/qJGDlNiqBYYt2xNqzHCJoC
90+
=zXOv
91+
-----END PGP PUBLIC KEY BLOCK-----
92+
```

.github/SUPPORT.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Support Questions
2+
3+
The Laravel support guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions#support-questions).

.github/workflows/tests.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: '0 0 * * *'
8+
9+
jobs:
10+
tests:
11+
runs-on: ubuntu-20.04
12+
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
php: [8.0]
17+
laravel: [^8.0]
18+
19+
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v2
24+
25+
- name: Setup PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: ${{ matrix.php }}
29+
extensions: dom, curl, libxml, mbstring, zip
30+
tools: composer:v2
31+
coverage: none
32+
33+
- name: Install dependencies
34+
run: |
35+
composer config --unset repositories.0
36+
composer require laravel/framework:"dev-nitro-prep as 8.x-dev" --no-update
37+
composer update --prefer-dist --no-interaction --no-progress
38+
39+
- name: Execute tests
40+
run: vendor/bin/phpunit --verbose

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/vendor
2+
composer.lock
3+
/phpunit.xml
4+
.phpunit.result.cache

.styleci.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
php:
2+
preset: laravel
3+
js: true
4+
css: true

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Release Notes
2+
3+
## [Unreleased](https://github.com/laravel/octane/compare/v1.0.0...1.x)
4+
5+
## Version (2021-xx-xx)
6+
7+
Initial release.

LICENSE.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) Taylor Otwell
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<p align="center"><img src="https://laravel.com/assets/img/components/logo-octane.svg"></p>
2+
3+
<p align="center">
4+
<a href="https://github.com/laravel/octane/actions"><img src="https://github.com/laravel/octane/workflows/tests/badge.svg" alt="Build Status"></a>
5+
<a href="https://packagist.org/packages/laravel/octane"><img src="https://img.shields.io/packagist/dt/laravel/octane" alt="Total Downloads"></a>
6+
<a href="https://packagist.org/packages/laravel/octane"><img src="https://img.shields.io/packagist/v/laravel/octane" alt="Latest Stable Version"></a>
7+
<a href="https://packagist.org/packages/laravel/octane"><img src="https://img.shields.io/packagist/l/laravel/octane" alt="License"></a>
8+
</p>
9+
10+
## Introduction
11+
12+
Coming soon...
13+
14+
## Official Documentation
15+
16+
Documentation for Octane can be found on the [Laravel website](https://laravel.com/docs/octane).
17+
18+
## Contributing
19+
20+
Thank you for considering contributing to Octane! You can read the contribution guide [here](.github/CONTRIBUTING.md).
21+
22+
## Code of Conduct
23+
24+
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
25+
26+
## Security Vulnerabilities
27+
28+
Please review [our security policy](https://github.com/laravel/octane/security/policy) on how to report security vulnerabilities.
29+
30+
## License
31+
32+
Laravel Octane is open-sourced software licensed under the [MIT license](LICENSE.md).

bin/bootstrap.php

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?php
2+
3+
ini_set('display_errors', 'stderr');
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Register The Auto Loader
8+
|--------------------------------------------------------------------------
9+
|
10+
| Composer provides a convenient, automatically generated class loader
11+
| for our application. We just need to utilize it! We'll require it
12+
| into the script here so that we do not have to worry about the
13+
| loading of any our classes "manually". Feels great to relax.
14+
|
15+
*/
16+
17+
$loaded = false;
18+
19+
// TODO: Remove octane-app test directory...
20+
foreach (['../../..', '../..', '../../octane-app/vendor', '..', 'vendor', '../vendor', '../../vendor'] as $path) {
21+
if (is_file($autoload_file = __DIR__ . '/' . $path . '/autoload.php')) {
22+
require $autoload_file;
23+
24+
$loaded = true;
25+
26+
break;
27+
}
28+
}
29+
30+
if ($loaded !== true) {
31+
fwrite(STDERR, "Composer autoload file was not found. Did you install the project's dependencies?".PHP_EOL);
32+
33+
exit(10);
34+
}
35+
36+
/*
37+
|--------------------------------------------------------------------------
38+
| Find Application Base Path
39+
|--------------------------------------------------------------------------
40+
|
41+
| Next, we need to locate the path to the application bootstrapper, which
42+
| is able to create a fresh copy of the Laravel application for us and
43+
| we can use this to handle requests. For now we just need the path.
44+
|
45+
*/
46+
47+
$basePath = null;
48+
49+
// TODO: Remove octane-app test directory...
50+
foreach (['../../../..', '../../..', '../..', '..', '../../octane-app', '../vendor/laravel/laravel'] as $path) {
51+
if (is_file(__DIR__.'/'.$path.'/bootstrap/app.php')) {
52+
$basePath = realpath(__DIR__.'/'.$path);
53+
54+
break;
55+
}
56+
}
57+
58+
if (! is_string($basePath)) {
59+
fwrite(STDERR, 'Cannot find application base path.' . PHP_EOL);
60+
61+
exit(11);
62+
}
63+
64+
return $basePath;

bin/createSwooleServer.php

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
$config = $serverState['octaneConfig'];
4+
5+
$server = new Swoole\Http\Server(
6+
$serverState['host'] ?? '127.0.0.1',
7+
$serverState['port'] ?? '8080',
8+
SWOOLE_PROCESS,
9+
SWOOLE_SOCK_TCP,
10+
);
11+
12+
$server->set(array_merge(
13+
$serverState['defaultServerOptions'],
14+
$config['swoole']['options'] ?? []
15+
));
16+
17+
return $server;

bin/file-watcher.js

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
const chokidar = require('chokidar');
2+
3+
const basePath = process.argv[2];
4+
5+
const watcher = chokidar.watch([
6+
basePath + '/app',
7+
basePath + '/bootstrap',
8+
basePath + '/config',
9+
basePath + '/database',
10+
basePath + '/public',
11+
basePath + '/resources',
12+
basePath + '/routes',
13+
basePath + '/composer.lock',
14+
], {
15+
ignoreInitial: true
16+
});
17+
18+
watcher
19+
.on('add', () => console.log('File added...'))
20+
.on('change', () => console.log('File changed...'))
21+
.on('unlink', () => console.log('File deleted...'))
22+
.on('unlinkDir', () => console.log('Directory deleted...'));

0 commit comments

Comments
 (0)