Skip to content

Commit

Permalink
Merge pull request #4 from Lansoweb/php-8
Browse files Browse the repository at this point in the history
remove php 7.4 and update dependencies
  • Loading branch information
Lansoweb authored Sep 19, 2023
2 parents 8cc1763 + 1a644b9 commit 9e22052
Show file tree
Hide file tree
Showing 30 changed files with 599 additions and 445 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: Lansoweb
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/Bug_Report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug Report
about: Create a bug report to help us improve
labels: bug
assignees:
---
<!--- Provide a general summary of the issue you're having in the title above. -->

## Description
<!-- Provide a short and clear description of the bug. -->

## Steps to reproduce
<!--
Provide steps to reproduce the behavior you are experiencing. Please try to keep
this as short as possible. If able, create a reproducible script outside of any
framework you are using. This will help us to quickly debug the issue.
-->
1. Step one...
2. Step two...
3. Step three...

## Expected behavior
<!-- Provide a short and clear description of what you expect to happen. -->

## Screenshots or output
<!-- If applicable, add screenshots or program output to help explain your problem. -->

## Environment details
<!-- Provide details about the system where you're using this package. -->
- version of this package: *e.g. 1.0.0, 1.0.1, 1.1.0*
- PHP version: *e.g. 7.3.16, 7.4.4*
- OS: *e.g. Windows 10, Linux (Ubuntu 18.04.1), macOS Catalina (10.15.3)*

## Additional context
<!-- Provide any additional context that may help us debug the problem. -->
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/Feature_Request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Feature Request
about: Suggest a feature for this project
labels: enhancement
assignees:
---
<!--- Provide a general summary of your feature request in the title above. -->

<!-- Give your feature a short title here. -->
## My feature title
<!-- Provide a short and clear description of the feature. -->

## Background/problem
<!--
Provide background details to show why this feature is necessary. Is your
feature request related to a problem? If so, please describe the problem.
Provide as much detail as possible.
-->

## Proposal/solution
<!--
Provide a short and clear description of the solution you'd like. Include code
examples, if possible. Feel free to use pseudo-code to show how you think the
feature should work.
-->

## Alternatives
<!-- Describe any alternative solutions or features you've considered. -->

## Additional context
<!-- Please provide any other context or code examples that may help. -->
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/Question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Question
about: Ask a question about how to use this library
labels: question
assignees:
---
<!--- Provide a general summary of your question in the title above. -->

<!-- Write your question here. -->
## How do I... ?
<!-- Provide any additional context that may help us answer your question. -->

## Example code
<!--
If your question is about code that you've written, provide a short and clear
example of what you're trying to accomplish. Try to keep this as short as
possible. If able, please provide an example outside of any framework you are
using. This will help us to quickly respond to your question.
-->
30 changes: 30 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/Pull_Request_Template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!--- Provide a general summary of your changes in the title above. -->

## Description
<!--- Describe your changes in detail. -->

## Motivation and context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

## How has this been tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## PR checklist
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
- [ ] I have run `composer test` locally, and there were no failures or errors.
45 changes: 45 additions & 0 deletions .github/workflows/coding-standard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "Check Coding Standards"

on:
pull_request:
push:
branches:
- "master"

jobs:
coding-standards:
name: "Check Coding Standards"

runs-on: ${{ matrix.operating-system }}

strategy:
matrix:
dependencies:
- "highest"
php-version:
- "8.2"
operating-system:
- "ubuntu-latest"

steps:
- name: "Checkout"
uses: "actions/checkout@v3"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "pcov"
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
tools: composer:v2

- uses: "ramsey/composer-install@v1"
with:
dependency-versions: "${{ matrix.dependencies }}"
composer-options: "${{ matrix.composer-options }}"

- name: "phpcs"
run: "vendor/bin/phpcs"

- name: "phpstan"
run: "vendor/bin/phpstan analyze"
65 changes: 65 additions & 0 deletions .github/workflows/release-on-milestone-closed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: "Automatic Releases"

on:
milestone:
types:
- "closed"

jobs:
release:
name: "GIT tag, release & create merge-up PR"
runs-on: ubuntu-latest

steps:
- name: "Checkout"
uses: "actions/checkout@v3"

- name: "Release"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:release"
env:
"GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

- name: "Create Merge-Up Pull Request"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:create-merge-up-pull-request"
env:
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

- name: "Create and/or Switch to new Release Branch"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:switch-default-branch-to-next-minor"
env:
"GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

- name: "Bump Changelog Version On Originating Release Branch"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:bump-changelog"
env:
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

- name: "Create new milestones"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:create-milestones"
env:
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.~lock.*
vendor
/composer.lock
/build
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,28 @@ All notable changes to this project will be documented in this file, in reverse

- Nothing.

## 3.5.2 - TBD

### Added

- Nothing.

### Changed

- Nothing.

### Deprecated

- Nothing.

### Removed

- Nothing.

### Fixed

- Nothing.

## 3.4.1 - 2020-03-06

### Added
Expand Down
66 changes: 33 additions & 33 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
{
"name": "los/api-server",
"description": "PHP api server middleware",
"license": "MIT",
"type": "library",
"authors": [
{
"name": "Leandro Silva",
"homepage": "https://sillotec.com/"
}
],
"homepage": "https://github.com/lansoweb/api-server",
"require": {
"php": "^7.4 | ^8.0",
"php": "^8.0",
"ext-json": "*",
"psr/container": "^1.0 | ^2.0",
"psr/http-message": "^1.0",
"laminas/laminas-inputfilter": "^2.7",
"laminas/laminas-paginator": "^2.7",
"laminas/laminas-diactoros": "^3.2",
"laminas/laminas-eventmanager": "^3.0",
"psr/http-server-middleware": "^1.0",
"laminas/laminas-inputfilter": "^2.27",
"laminas/laminas-paginator": "^2.7",
"los/uql": "^1.1",
"mezzio/mezzio-hal": "^2.0",
"mezzio/mezzio-helpers": "^5.6",
"mezzio/mezzio-problem-details": "^1.0",
"laminas/laminas-diactoros": "^1.7 || ^2.2",
"los/uql": "^1.1",
"doctrine/coding-standard": "^9.0"
"psr/container": "^1.0 || ^2.0",
"psr/http-message": "^1.0 || ^2.0",
"psr/http-server-middleware": "^1.0"
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.6",
"phpstan/phpstan": "^0.12",
"doctrine/coding-standard": "^12.0",
"laminas/laminas-db": "^2.10",
"laminas/laminas-hydrator": "^4.0"
"laminas/laminas-hydrator": "^4.0",
"phpstan/phpstan": "^1.10",
"squizlabs/php_codesniffer": "^3.6"
},
"license": "MIT",
"autoload-dev": {
"autoload": {
"psr-4": {
"LosMiddleware\\ApiServerTest\\": "test/"
"Los\\ApiServer\\": "src/"
}
},
"autoload": {
"autoload-dev": {
"psr-4": {
"LosMiddleware\\ApiServer\\": "src/"
"Los\\ApiServerTest\\": "test/"
}
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"type": "library",
"scripts": {
"cs-check": "phpcs",
"cs-fix": "phpcbf",
"check": [
"@cs-check",
"@phpstan"
],
"phpstan": "phpstan analyse -l 4 -c phpstan.neon src"
},
"homepage": "https://github.com/lansoweb/api-server",
"authors": [
{
"name": "Leandro Silva",
"homepage": "http://leandrosilva.info/"
}
],
"extra": {
"zf": {
"config-provider": "LosMiddleware\\ApiServer\\ConfigProvider"
}
"cs-check": "phpcs",
"cs-fix": "phpcbf",
"phpstan": "phpstan analyse"
}
}
8 changes: 0 additions & 8 deletions phpcs.xml

This file was deleted.

23 changes: 23 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/3.5.0/phpcs.xsd"
name="Vendor">

<description>Project coding standards</description>

<arg name="extensions" value="php"/>
<arg name="colors"/>
<arg value="sp"/>

<file>./src</file>

<rule ref="Doctrine">
<exclude name="SlevomatCodingStandard.Classes.SuperfluousExceptionNaming.SuperfluousSuffix" />
<exclude name="SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming.SuperfluousSuffix" />
<exclude name="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming.SuperfluousPrefix" />
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification" />
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification" />
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification" />
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingAnyTypeHint" />
</rule>
</ruleset>
3 changes: 0 additions & 3 deletions phpstan.neon

This file was deleted.

Loading

0 comments on commit 9e22052

Please sign in to comment.