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 #789 from spiral/hotfix/composer
Updates components
- Loading branch information
Showing
264 changed files
with
2,772 additions
and
1,302 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 was deleted.
Oops, something went wrong.
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,15 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
name: phpunit | ||
|
||
jobs: | ||
phpunit: | ||
uses: spiral/gh-actions/.github/workflows/phpunit.yml@master | ||
with: | ||
os: >- | ||
['ubuntu-latest'] | ||
php: >- | ||
['8.1'] |
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,15 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
name: static analysis | ||
|
||
jobs: | ||
psalm: | ||
uses: spiral/gh-actions/.github/workflows/psalm.yml@master | ||
with: | ||
os: >- | ||
['ubuntu-latest'] | ||
php: >- | ||
['8.1'] |
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,89 +1,14 @@ | ||
Annotated Routes | ||
======== | ||
[![Latest Stable Version](https://poser.pugx.org/spiral/annotated-routes/v/stable)](https://packagist.org/packages/spiral/annotated-routes) | ||
[![Build Status](https://github.com/spiral/annotated-routes/workflows/build/badge.svg)](https://github.com/spiral/annotated-routes/actions) | ||
[![Codecov](https://codecov.io/gh/spiral/annotated-routes/branch/master/graph/badge.svg)](https://codecov.io/gh/spiral/annotated-routes/) | ||
|
||
Provides the ability to use annotated routes and route groups. | ||
|
||
Installation: | ||
-------- | ||
To install the component: | ||
|
||
```bash | ||
$ composer require spiral/annotated-routes | ||
``` | ||
|
||
Activate the bootloader in your application (instead of `RouteBootloader`): | ||
|
||
```php | ||
use Spiral\Router\Bootloader as Router; | ||
|
||
// ... | ||
|
||
protected const LOAD = [ | ||
// ... | ||
Router\AnnotatedRoutesBootloader::class, | ||
// ... | ||
]; | ||
``` | ||
|
||
Configuration: | ||
------- | ||
Define one or multiple route groups (optional) or configure `default` group in your bootloader: | ||
# Annotated Routes | ||
|
||
```php | ||
namespace App\Bootloader; | ||
|
||
use Psr\Http\Message\ResponseInterface; | ||
use Psr\Http\Message\ServerRequestInterface; | ||
use Psr\Http\Server\MiddlewareInterface; | ||
use Psr\Http\Server\RequestHandlerInterface; | ||
use Spiral\Boot\Bootloader\Bootloader; | ||
use Spiral\Router\GroupRegistry; | ||
|
||
class MiddlewareBootloader extends Bootloader | ||
{ | ||
public function boot(GroupRegistry $registry) | ||
{ | ||
$registry | ||
->getGroup('api') | ||
->setPrefix('api/v1') | ||
->addMiddleware(App\Security\ApiAuthMiddleware::class); | ||
} | ||
} | ||
``` | ||
|
||
Use environment variable `ROUTE_CACHE` to enable or disable route caching (by default enabled in non `DEBUG` mode). To | ||
reset route cache: | ||
|
||
```bash | ||
$ php app.php route:reset | ||
``` | ||
|
||
Usage: | ||
-------- | ||
Use the annotation in your controller methods: | ||
|
||
```php | ||
namespace App\Controller; | ||
|
||
use Spiral\Router\Annotation\Route; | ||
[![PHP Version Require](https://poser.pugx.org/spiral/annotated-routes/require/php)](https://packagist.org/packages/spiral/annotated-routes) | ||
[![Latest Stable Version](https://poser.pugx.org/spiral/annotated-routes/v/stable)](https://packagist.org/packages/spiral/annotated-routes) | ||
[![phpunit](https://github.com/spiral/annotated-routes/workflows/phpunit/badge.svg)](https://github.com/spiral/annotated-routes/actions) | ||
[![psalm](https://github.com/spiral/annotated-routes/workflows/psalm/badge.svg)](https://github.com/spiral/annotated-routes/actions) | ||
[![Codecov](https://codecov.io/gh/spiral/annotated-routes/branch/master/graph/badge.svg)](https://codecov.io/gh/spiral/annotated-routes/) | ||
[![Total Downloads](https://poser.pugx.org/spiral/annotated-routes/downloads)](https://packagist.org/packages/spiral/annotated-routes) | ||
|
||
class HomeController | ||
{ | ||
/** | ||
* @Route(route="/", name="home", methods="GET", group="api") | ||
*/ | ||
public function index() | ||
{ | ||
return 'Hello World'; | ||
} | ||
} | ||
``` | ||
<b>[Documentation](https://spiral.dev/docs/http-annotated-routes)</b> | [Framework Bundle](https://github.com/spiral/framework) | ||
|
||
> Use `group` attribute to configure middleware and domain core in bulk. | ||
## License: | ||
|
||
License: | ||
-------- | ||
MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maintained by [Spiral Scout](https://spiralscout.com). |
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,18 @@ | ||
<?xml version="1.0"?> | ||
<psalm | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="https://getpsalm.org/schema/config" | ||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" | ||
|
||
errorLevel="4" | ||
hoistConstants="true" | ||
resolveFromConfigFile="true" | ||
findUnusedPsalmSuppress="true" | ||
findUnusedVariablesAndParams="true" | ||
ensureArrayStringOffsetsExist="true" | ||
addParamDefaultToDocblockType="true" | ||
> | ||
<projectFiles> | ||
<directory name="src" /> | ||
</projectFiles> | ||
</psalm> |
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,15 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
name: phpunit | ||
|
||
jobs: | ||
phpunit: | ||
uses: spiral/gh-actions/.github/workflows/phpunit.yml@master | ||
with: | ||
os: >- | ||
['ubuntu-latest'] | ||
php: >- | ||
['8.1'] |
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,15 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
name: static analysis | ||
|
||
jobs: | ||
psalm: | ||
uses: spiral/gh-actions/.github/workflows/psalm.yml@master | ||
with: | ||
os: >- | ||
['ubuntu-latest'] | ||
php: >- | ||
['8.1'] |
This file was deleted.
Oops, something went wrong.
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,4 +1,14 @@ | ||
# Spiral: Common Authentication Interfaces | ||
[![Latest Stable Version](https://poser.pugx.org/spiral/auth/v/stable)](https://packagist.org/packages/spiral/auth) | ||
[![Build Status](https://travis-ci.org/spiral/auth.svg?branch=master)](https://travis-ci.org/spiral/auth) | ||
[![Codecov](https://codecov.io/gh/spiral/auth/graph/badge.svg)](https://codecov.io/gh/spiral/auth) | ||
|
||
[![PHP Version Require](https://poser.pugx.org/spiral/auth/require/php)](https://packagist.org/packages/spiral/auth) | ||
[![Latest Stable Version](https://poser.pugx.org/spiral/auth/v/stable)](https://packagist.org/packages/spiral/auth) | ||
[![phpunit](https://github.com/spiral/auth/workflows/phpunit/badge.svg)](https://github.com/spiral/auth/actions) | ||
[![psalm](https://github.com/spiral/auth/workflows/psalm/badge.svg)](https://github.com/spiral/auth/actions) | ||
[![Codecov](https://codecov.io/gh/spiral/auth/branch/master/graph/badge.svg)](https://codecov.io/gh/spiral/auth/) | ||
[![Total Downloads](https://poser.pugx.org/spiral/auth/downloads)](https://packagist.org/spiral/auth/phpunit) | ||
|
||
<b>[Documentation](https://spiral.dev/docs/security-authentication)</b> | [Framework Bundle](https://github.com/spiral/framework) | ||
|
||
## License: | ||
|
||
MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maintained by [Spiral Scout](https://spiralscout.com). |
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,18 @@ | ||
<?xml version="1.0"?> | ||
<psalm | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="https://getpsalm.org/schema/config" | ||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" | ||
|
||
errorLevel="1" | ||
hoistConstants="true" | ||
resolveFromConfigFile="true" | ||
findUnusedPsalmSuppress="true" | ||
findUnusedVariablesAndParams="true" | ||
ensureArrayStringOffsetsExist="true" | ||
addParamDefaultToDocblockType="true" | ||
> | ||
<projectFiles> | ||
<directory name="src" /> | ||
</projectFiles> | ||
</psalm> |
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,15 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
name: phpunit | ||
|
||
jobs: | ||
phpunit: | ||
uses: spiral/gh-actions/.github/workflows/phpunit.yml@master | ||
with: | ||
os: >- | ||
['ubuntu-latest'] | ||
php: >- | ||
['8.1'] |
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,15 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
name: static analysis | ||
|
||
jobs: | ||
psalm: | ||
uses: spiral/gh-actions/.github/workflows/psalm.yml@master | ||
with: | ||
os: >- | ||
['ubuntu-latest'] | ||
php: >- | ||
['8.1'] |
Oops, something went wrong.