-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from XetaIO/laravel9
Update project to Laravel9
- Loading branch information
Showing
72 changed files
with
550 additions
and
266 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
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
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
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
6 changes: 3 additions & 3 deletions
6
...tp/Middleware/CheckForMaintenanceMode.php → ...ware/PreventRequestsDuringMaintenance.php
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
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
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,20 @@ | ||
<?php | ||
|
||
namespace Xetaravel\Http\Middleware; | ||
|
||
use Illuminate\Http\Middleware\TrustHosts as Middleware; | ||
|
||
class TrustHosts extends Middleware | ||
{ | ||
/** | ||
* Get the host patterns that should be trusted. | ||
* | ||
* @return array<int, string|null> | ||
*/ | ||
public function hosts() | ||
{ | ||
return [ | ||
$this->allSubdomainsOfApplicationUrl(), | ||
]; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,25 +1,28 @@ | ||
<?php | ||
|
||
namespace Xetaravel\Http\Middleware; | ||
|
||
use Illuminate\Http\Middleware\TrustProxies as Middleware; | ||
use Illuminate\Http\Request; | ||
use Fideloper\Proxy\TrustProxies as Middleware; | ||
|
||
class TrustProxies extends Middleware | ||
{ | ||
/** | ||
* The trusted proxies for this application. | ||
* | ||
* @var array | ||
* @var array<int, string>|string|null | ||
*/ | ||
protected $proxies; | ||
|
||
/** | ||
* The headers that should be used to detect proxies. | ||
* | ||
* @var string | ||
* @var int | ||
*/ | ||
protected $headers = Request::HEADER_X_FORWARDED_FOR | | ||
Request::HEADER_X_FORWARDED_HOST | | ||
Request::HEADER_X_FORWARDED_PORT | | ||
Request::HEADER_X_FORWARDED_PROTO; | ||
protected $headers = | ||
Request::HEADER_X_FORWARDED_FOR | | ||
Request::HEADER_X_FORWARDED_HOST | | ||
Request::HEADER_X_FORWARDED_PORT | | ||
Request::HEADER_X_FORWARDED_PROTO | | ||
Request::HEADER_X_FORWARDED_AWS_ELB; | ||
} |
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
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
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 |
---|---|---|
@@ -1,92 +1,8 @@ | ||
<?php | ||
namespace Xetaravel\Markdown\Reply; | ||
|
||
use League\CommonMark\Block\Element\AbstractBlock; | ||
use League\CommonMark\ContextInterface; | ||
use League\CommonMark\Cursor; | ||
use League\CommonMark\Node\Inline\AbstractStringContainer; | ||
|
||
class Reply extends AbstractBlock | ||
class Reply extends AbstractStringContainer | ||
{ | ||
/** | ||
* The route used to display the post. | ||
* | ||
* @var string | ||
*/ | ||
protected $route; | ||
|
||
/** | ||
* The user of the reply. | ||
* | ||
* @var string | ||
*/ | ||
protected $user; | ||
|
||
/** | ||
* Constructor. | ||
* | ||
* @param string $route The route used to display the post. | ||
* @param string $user The user of the reply. | ||
*/ | ||
public function __construct(string $route, string $user) | ||
{ | ||
$this->route = $route; | ||
$this->user = $user; | ||
} | ||
|
||
/** | ||
* Get the route. | ||
* | ||
* @return string | ||
*/ | ||
public function getRoute() | ||
{ | ||
return $this->route; | ||
} | ||
|
||
/** | ||
* Get the user. | ||
* | ||
* @return string | ||
*/ | ||
public function getUser() | ||
{ | ||
return $this->user; | ||
} | ||
|
||
/** | ||
* Returns true if this block can contain the given block as a child node | ||
* | ||
* @param AbstractBlock $block | ||
* | ||
* @return bool | ||
*/ | ||
public function canContain(AbstractBlock $block): bool | ||
{ | ||
return false; | ||
} | ||
|
||
/** | ||
* Returns true if block type can accept lines of text | ||
* | ||
* @return bool | ||
*/ | ||
public function acceptsLines(): bool | ||
{ | ||
return true; | ||
} | ||
|
||
/** | ||
* Whether this is a code block | ||
* | ||
* @return bool | ||
*/ | ||
public function isCode(): bool | ||
{ | ||
return false; | ||
} | ||
|
||
public function matchesNextLine(Cursor $cursor): bool | ||
{ | ||
return false; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
<?php | ||
namespace Xetaravel\Markdown\Reply; | ||
|
||
use League\CommonMark\ConfigurableEnvironmentInterface; | ||
use League\CommonMark\Environment\EnvironmentBuilderInterface; | ||
use League\CommonMark\Extension\ExtensionInterface; | ||
|
||
final class ReplyExtension implements ExtensionInterface | ||
{ | ||
public function register(ConfigurableEnvironmentInterface $environment) | ||
public function register(EnvironmentBuilderInterface $environment): void | ||
{ | ||
$environment | ||
->addBlockParser(new ReplyParser) | ||
->addBlockRenderer(Reply::class, new ReplyRenderer); | ||
->addInlineParser(new ReplyParser()) | ||
->addRenderer(Reply::class, new ReplyRenderer()); | ||
} | ||
} |
Oops, something went wrong.