Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master into 1.0.x #554

Open
wants to merge 38 commits into
base: 1.0.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
9225f51
Add @matt-allan's change to changelog
KorvinSzanto Jun 29, 2019
4317558
Merge pull request #484 from thephpleague/next-changelog
matthewtrask Jun 29, 2019
7fa113f
Add phpcs and circleci configurations
KorvinSzanto Jun 29, 2019
a38f0b7
Merge pull request #485 from thephpleague/feature/phpcs-circleci
matthewtrask Jun 30, 2019
1cb9cd7
Add maintainers to the readme (#488)
KorvinSzanto Jul 4, 2019
ecf884e
Implement \JsonSerializable for Scopes (#462)
Jul 4, 2019
e03925f
Fix phpDoc param typehint for setters in Cursor class (#463)
mdarc Jul 4, 2019
b323c88
Allow sub relations with modifier
Aug 1, 2019
d409754
Merge pull request #490 from onursimsek/feature/modifier-with-sub-rel…
matthewtrask Jan 24, 2020
c99aa52
update travis to allow failures on 54 and 55
matthewtrask Jan 24, 2020
141c97e
Merge pull request #500 from thephpleague/fix/update-travis
matthewtrask Jan 24, 2020
276f1f3
Fix tests for PHP 5.4 and 5.5
KorvinSzanto Jan 24, 2020
06dc15f
Merge pull request #502 from thephpleague/hotfix/tests-for-minimum-ve…
matthewtrask Jan 24, 2020
c1042fd
Update branch alias to reflect current status (#516)
KorvinSzanto Aug 22, 2020
9c9c493
Move to Github Actions (#517)
JustSteveKing Sep 25, 2020
ebc071a
Test against php 8.0 (#520)
sergiy-petrov Mar 7, 2022
9dcd831
clean up php code sniffer violations and update composer.json to 7.0 …
matthewtrask Mar 7, 2022
b42d735
jsonSerialize fix php8 interface compatibility (#527)
madagon Mar 7, 2022
fc67d13
Add support for PHP 8.1 (#528)
annuh Mar 7, 2022
aa9f127
Make sure CI is green (#535)
Nyholm Mar 7, 2022
267bb8f
Run tests on PHP 8.1 (#536)
Nyholm Mar 7, 2022
514478c
Clean up CI (#537)
Nyholm Mar 7, 2022
dbf32a8
Added .editorconfig (#538)
Nyholm Mar 7, 2022
a8813ba
Adding phpstan and psalm (#539)
Nyholm Mar 7, 2022
594f58b
Fix issues with PHPStan and Psalm (#540)
Nyholm Mar 7, 2022
b9e343c
Support for PHP 81 (#542)
Nyholm Mar 7, 2022
ef87034
Add ResourceInterface::getMeta() (#541)
Nyholm Mar 7, 2022
f560f36
Added baseline for static analyzers (#543)
Nyholm Mar 7, 2022
5bf32b5
Added PHP 7.4 types (#544)
Nyholm Mar 7, 2022
419b0cb
Add stale bot (#545)
Nyholm Mar 7, 2022
c3ae2a0
Update supported versions in the readme (#546)
jdreesen Mar 8, 2022
94fbef8
Fix markdown (#547)
jdreesen Mar 8, 2022
87ed891
Move stale config to the correct location (#548)
Nyholm Mar 9, 2022
71f9862
add psalm and phpstan to lib (#549)
matthewtrask Mar 9, 2022
94ce1fd
allow for null values to be passed to Scope (#553)
matthewtrask Apr 11, 2022
8b9d39b
add test case for accessing current scope before its value has been s…
Plastonick Apr 11, 2022
cf7a4ba
Merge master first pass
KorvinSzanto Apr 16, 2022
f1e8f32
Fix tests
KorvinSzanto Apr 16, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
13 changes: 13 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
daysUntilStale: 180
daysUntilClose: 28
exemptLabels:
- keep-open
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed after 4 weeks if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
2 changes: 2 additions & 0 deletions .github/workflows/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[*.yml]
indent_size = 2
31 changes: 31 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: The PHP League Tests

on: [push, pull_request]

jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-20.04]
php: [7.4, 8.0, 8.1]

name: League - PHP ${{ matrix.php }} on ${{ matrix.os }}

steps:

- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: phpcs, phpunit

- name: Download dependencies
uses: ramsey/composer-install@v2

- name: Run Tests
run: vendor/bin/phpunit
46 changes: 46 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
on: [ pull_request ]
name: Static analysis

jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-20.04

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: apcu, redis
coverage: none
tools: phpstan:1.4.6, cs2pr

- name: Download dependencies
uses: ramsey/composer-install@v1

- name: PHPStan
run: phpstan analyze --no-progress --error-format=checkstyle | cs2pr

psalm:
name: Psalm
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: apcu, redis
coverage: none
tools: vimeo/psalm:4.22.0

- name: Download dependencies
uses: ramsey/composer-install@v1

- name: Psalm
run: psalm --no-progress --output-format=github
32 changes: 32 additions & 0 deletions .github/workflows/style-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: The PHP League Style Checks

on: [push, pull_request]

jobs:
style:
runs-on: ubuntu-latest
name: The PHP League Style Checks
steps:

- name: Checkout Code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'

- name: Cache Dependencies
id: composer-cache-style
uses: actions/cache@v2
with:
path: vendor
key: ubuntu-composer-cache-style-${{ hashFiles('**/composer.lock') }}
restore-keys: ubuntu-php-style

- name: Install Dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest

- name: Check Coding Style
run: vendor/bin/phpcs src/
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
composer.lock
build
vendor
Gemfile.lock
coverage
.phpunit.result.cache
22 changes: 0 additions & 22 deletions .scrutinizer.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## Next

### Enhancements
- Add links for all available includes to `JsonApiSerializer` #331 - Thanks @matt-allan
- Implement interface `\JsonSerializable` in Scopes to allow for direct usage with `json_encode()`



## 0.18.0 - 2019-05-09

### Enhancements
Expand Down
21 changes: 9 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

[![Latest Version](https://img.shields.io/github/release/thephpleague/fractal.svg?style=flat-square)](https://github.com/thephpleague/fractal/releases)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
[![Build Status](https://img.shields.io/travis/thephpleague/fractal/1.0.x.svg?style=flat-square&label=tests)](https://travis-ci.org/thephpleague/fractal)
[![Build Status](https://img.shields.io/circleci/build/gh/thephpleague/fractal/1.0.x.svg?style=flat-square&label=code+style)](https://circleci.com/gh/thephpleague/fractal)
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/thephpleague/fractal/1.0.x.svg?style=flat-square)](https://scrutinizer-ci.com/g/thephpleague/fractal/code-structure)
[![Quality Score](https://img.shields.io/scrutinizer/g/thephpleague/fractal/1.0.x.svg?style=flat-square)](https://scrutinizer-ci.com/g/thephpleague/fractal)
![The PHP League Tests](https://github.com/thephpleague/fractal/workflows/The%20PHP%20League%20Tests/badge.svg)
[![Total Downloads](https://img.shields.io/packagist/dt/league/fractal.svg?style=flat-square)](https://packagist.org/packages/league/fractal)

Fractal provides a presentation and transformation layer for complex data output, the like found in
Expand Down Expand Up @@ -42,15 +39,9 @@ $ composer require league/fractal

## Requirements

The following versions of PHP are supported by this version.
The following versions of PHP are supported by this version:

* PHP 5.4
* PHP 5.5
* PHP 5.6
* PHP 7.0
* PHP 7.1
* PHP 7.2
* HHVM
>= PHP 7.4

## Documentation

Expand All @@ -72,6 +63,12 @@ $ phpunit

Please see [CONTRIBUTING](https://github.com/thephpleague/fractal/blob/master/CONTRIBUTING.md) and [CONDUCT](https://github.com/thephpleague/fractal/blob/master/CONDUCT.md) for details.


## Maintainers

- [Korvin Szanto](https://github.com/korvinszanto)
- [Matt Trask](https://github.com/matthewtrask)

## Credits

- [Graham Daniels](https://github.com/greydnls)
Expand Down
18 changes: 12 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@
"sort-packages": true
},
"require": {
"php": ">=7.2"
"php": ">=7.4"
},
"require-dev": {
"mockery/mockery": "~1.0",
"phpstan/phpstan": "^0.11.8",
"phpunit/phpunit": "~8.0",
"squizlabs/php_codesniffer": "~3.4"
"mockery/mockery": ">=1.5",
"phpstan/phpstan": ">=1.5",
"phpunit/phpunit": ">=8|>=9",
"squizlabs/php_codesniffer": "~3.6",
"vimeo/psalm": "^4.22"
},
"suggest": {
"league/fractal-serializer-jsonapi": "JSON:API Serialization Support",
Expand All @@ -47,9 +48,14 @@
"League\\Fractal\\Test\\": "test"
}
},
"scripts": {
"check": "vendor/bin/phpcs src/",
"test": "vendor/bin/phpunit --testdox --colors=always",
"test:coverage": "vendor/bin/phpunit --coverage-html build/coverage"
},
"extra": {
"branch-alias": {
"dev-master": "0.13-dev"
"dev-master": "0.20.x-dev"
}
}
}
7 changes: 0 additions & 7 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,4 @@

<!-- Use the PSR2 Standard-->
<rule ref="PSR12" />

<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="1000"/>
<property name="absoluteLineLimit" value="0"/>
</properties>
</rule>
</ruleset>
6 changes: 6 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
parameters:
ignoreErrors:
-
message: "#^Parameter \\#1 \\$separator of function explode expects non\\-empty\\-string, string given\\.$#"
count: 1
path: src/Manager.php
8 changes: 8 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
includes:
- ./phpstan-baseline.neon

parameters:
level: 5
reportUnmatchedIgnoredErrors: false
paths:
- src
11 changes: 11 additions & 0 deletions psalm.baseline.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="4.22.0@fc2c6ab4d5fa5d644d8617089f012f3bb84b8703">
<file src="src/Scope.php">
<UndefinedInterfaceMethod occurrences="1">
<code>getMeta</code>
</UndefinedInterfaceMethod>
<UndefinedMethod occurrences="1">
<code>transform</code>
</UndefinedMethod>
</file>
</files>
16 changes: 16 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<psalm
errorLevel="4"
resolveFromConfigFile="true"
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"
errorBaseline="psalm.baseline.xml"
>
<projectFiles>
<directory name="src" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
</psalm>
Loading