-
-
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 #1 from PHP-Open-Source-Saver/chore/initial-changes
Initial changes
- Loading branch information
Showing
65 changed files
with
405 additions
and
392 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 @@ | ||
github: [specialtactics] |
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
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,5 @@ | ||
composer.lock | ||
build | ||
vendor | ||
.phpunit.result.cache | ||
.phpunit.result.cache | ||
./phpunit.xml |
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
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,6 +1,7 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2013 Phil Sturgeon <[email protected]> | ||
Copyright (c) 2013-2024 Phil Sturgeon <[email protected]> | ||
Copyright (c) 2024 PHP Open Source Saver | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
|
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 |
---|---|---|
|
@@ -2,8 +2,24 @@ | |
|
||
[](https://github.com/thephpleague/fractal/releases) | ||
[](LICENSE) | ||
 | ||
[](https://packagist.org/packages/league/fractal) | ||
[](https://github.com/PHP-Open-Source-Saver/fractal/actions) | ||
[](https://packagist.org/packages/PHP-Open-Source-Saver/fractal) | ||
|
||
|
||
## Credits | ||
[This repository is a fork from original thephpleague/fractal](https://fractal.thephpleague.com/), we decided to make an independent fork due to the lack of updates to the original package, and lack of a process for volunteers to become maintainers within the php league ecosystem of packages. | ||
|
||
## Migrating from [`thephpleague/fractal`](https://github.com/thephpleague/fractal) | ||
|
||
This uses different namespace to `thephpleague/fractal`, but overall, provides the same API, that makes migration to this repository pretty easy: | ||
|
||
1) Run `composer remove thephpleague/fractal` | ||
> **Info** An error will appear because the package is still in use, ignore it. | ||
2) Replace all the occurrences of `League\Fractal` with `PHPOpenSourceSaver\Fractal`. | ||
> **Tip**: You can use *Find and Replace* feature of your IDE. Try it with <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>R</kbd> | ||
3) Run `composer require php-open-source-saver/fractal` | ||
|
||
## Notes | ||
|
||
Fractal provides a presentation and transformation layer for complex data output, the like found in | ||
RESTful APIs, and works really well with JSON. Think of this as a view layer for your JSON/YAML/etc. | ||
|
@@ -34,25 +50,21 @@ please send a patch via pull request. | |
Via Composer | ||
|
||
``` bash | ||
$ composer require league/fractal | ||
$ composer require php-open-source-saver | ||
``` | ||
|
||
## Requirements | ||
|
||
The following versions of PHP are supported by this version: | ||
|
||
>= PHP 7.4 | ||
>= PHP 8.1 | ||
|
||
## Documentation | ||
|
||
Fractal has [full documentation](http://fractal.thephpleague.com), powered by [Jekyll](http://jekyllrb.com/). | ||
|
||
Contribute to this documentation in the [gh-pages branch](https://github.com/thephpleague/fractal/tree/gh-pages/). | ||
|
||
## Todo | ||
|
||
- add HAL serializers | ||
|
||
## Testing | ||
|
||
``` bash | ||
|
@@ -66,16 +78,21 @@ Please see [CONTRIBUTING](https://github.com/thephpleague/fractal/blob/master/CO | |
|
||
## Maintainers | ||
|
||
- [Korvin Szanto](https://github.com/korvinszanto) | ||
- [Matt Trask](https://github.com/matthewtrask) | ||
- [Max Snow](https://github.com/specialtactics) | ||
|
||
|
||
## Credits | ||
|
||
- [Graham Daniels](https://github.com/greydnls) | ||
- [Andrew Willis](https://github.com/willishq) | ||
- [Phil Sturgeon](https://github.com/philsturgeon) | ||
- [Korvin Szanto](https://github.com/korvinszanto) | ||
- [Matt Trask](https://github.com/matthewtrask) | ||
- [All Contributors](https://github.com/thephpleague/fractal/contributors) | ||
|
||
## Reporting a Vulnerability | ||
|
||
If you discover any security related issues, please email [email protected] instead of using the issue tracker. | ||
|
||
## License | ||
|
||
|
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,37 +1,48 @@ | ||
{ | ||
"name": "league/fractal", | ||
"name": "php-open-source-saver/fractal", | ||
"description": "Handle the output of complex data structures ready for API output.", | ||
"keywords": [ | ||
"league", | ||
"api", | ||
"json", | ||
"rest" | ||
"rest", | ||
"laravel" | ||
], | ||
"homepage": "http://fractal.thephpleague.com/", | ||
"homepage": "https://github.com/PHP-Open-Source-Saver/fractal", | ||
"support": { | ||
"issues": "https://github.com/PHP-Open-Source-Saver/fractal/issues", | ||
"source": "https://github.com/PHP-Open-Source-Saver/fractal" | ||
}, | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Phil Sturgeon", | ||
"email": "[email protected]", | ||
"homepage": "http://philsturgeon.uk/", | ||
"role": "Developer" | ||
}, | ||
{ | ||
"name": "Max Snow", | ||
"email": "[email protected]", | ||
"homepage": "https://maxsnow.me", | ||
"role": "Developer" | ||
} | ||
], | ||
"config": { | ||
"sort-packages": true | ||
}, | ||
"require": { | ||
"php": ">=7.4" | ||
"php": ">=8.1" | ||
}, | ||
"require-dev": { | ||
"doctrine/orm": "^2.5", | ||
"illuminate/contracts": "~5.0", | ||
"illuminate/contracts": "~10.0", | ||
"mockery/mockery": "^1.3", | ||
"pagerfanta/pagerfanta": "~1.0.0", | ||
"phpstan/phpstan": "^1.4", | ||
"phpunit/phpunit": "^9.5", | ||
"squizlabs/php_codesniffer": "~3.4", | ||
"vimeo/psalm": "^4.22", | ||
"vimeo/psalm": "^4.22|^5.20", | ||
"zendframework/zend-paginator": "~2.3" | ||
}, | ||
"suggest": { | ||
|
@@ -41,12 +52,12 @@ | |
}, | ||
"autoload": { | ||
"psr-4": { | ||
"League\\Fractal\\": "src" | ||
"PHPOpenSourceSaver\\Fractal\\": "src" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"League\\Fractal\\Test\\": "test" | ||
"PHPOpenSourceSaver\\Fractal\\Test\\": "test" | ||
} | ||
}, | ||
"scripts": { | ||
|
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,19 +1,19 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the League\Fractal package. | ||
* This file is part of the PHPOpenSourceSaver\Fractal package. | ||
* | ||
* (c) Phil Sturgeon <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace League\Fractal; | ||
namespace PHPOpenSourceSaver\Fractal; | ||
|
||
use League\Fractal\Resource\ResourceInterface; | ||
use League\Fractal\Serializer\DataArraySerializer; | ||
use League\Fractal\Serializer\Serializer; | ||
use PHPOpenSourceSaver\Fractal\Resource\ResourceInterface; | ||
use PHPOpenSourceSaver\Fractal\Serializer\DataArraySerializer; | ||
use PHPOpenSourceSaver\Fractal\Serializer\Serializer; | ||
|
||
/** | ||
* Manager | ||
|
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 | ||
|
||
/* | ||
* This file is part of the League\Fractal package. | ||
* This file is part of the PHPOpenSourceSaver\Fractal package. | ||
* | ||
* (c) Phil Sturgeon <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace League\Fractal\Pagination; | ||
namespace PHPOpenSourceSaver\Fractal\Pagination; | ||
|
||
/** | ||
* A generic cursor adapter. | ||
|
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 | ||
|
||
/* | ||
* This file is part of the League\Fractal package. | ||
* This file is part of the PHPOpenSourceSaver\Fractal package. | ||
* | ||
* (c) Phil Sturgeon <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace League\Fractal\Pagination; | ||
namespace PHPOpenSourceSaver\Fractal\Pagination; | ||
|
||
/** | ||
* A common interface for cursors to use. | ||
|
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,14 +1,14 @@ | ||
<?php | ||
/* | ||
* This file is part of the League\Fractal package. | ||
* This file is part of the PHPOpenSourceSaver\Fractal package. | ||
* | ||
* (c) Phil Sturgeon <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace League\Fractal\Pagination; | ||
namespace PHPOpenSourceSaver\Fractal\Pagination; | ||
|
||
use Doctrine\ORM\Tools\Pagination\Paginator; | ||
|
||
|
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 | ||
|
||
/* | ||
* This file is part of the League\Fractal package. | ||
* This file is part of the PHPOpenSourceSaver\Fractal package. | ||
* | ||
* (c) Phil Sturgeon <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace League\Fractal\Pagination; | ||
namespace PHPOpenSourceSaver\Fractal\Pagination; | ||
|
||
use Illuminate\Contracts\Pagination\LengthAwarePaginator; | ||
|
||
|
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 | ||
|
||
/* | ||
* This file is part of the League\Fractal package. | ||
* This file is part of the PHPOpenSourceSaver\Fractal package. | ||
* | ||
* (c) Phil Sturgeon <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace League\Fractal\Pagination; | ||
namespace PHPOpenSourceSaver\Fractal\Pagination; | ||
|
||
use Pagerfanta\Pagerfanta; | ||
|
||
|
Oops, something went wrong.