Skip to content

Commit

Permalink
Merge pull request #39 from Ocramius/feature/ci-overhaul
Browse files Browse the repository at this point in the history
PHP 8.0 support, move to `laminas/` dependencies, upgrade CI and release automation setup, dependabot setup
  • Loading branch information
Ocramius authored Sep 19, 2021
2 parents 0eb6ec1 + 6af740f commit ea834dd
Show file tree
Hide file tree
Showing 32 changed files with 6,931 additions and 1,030 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [Ocramius]
25 changes: 25 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"version": 2,
"updates": [
{
"allow": [
{
"dependency-type": "all"
}
],
"directory": "/",
"package-ecosystem": "composer",
"schedule": {
"interval": "daily"
},
"versioning-strategy": "increase"
},
{
"directory": "/",
"package-ecosystem": "github-actions",
"schedule": {
"interval": "daily"
}
}
]
}
34 changes: 34 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# See https://github.com/laminas/laminas-continuous-integration-action
# Generates a job matrix based on current dependencies and supported version
# ranges, then runs all those jobs
name: "Continuous Integration"

on:
pull_request:
push:

jobs:
matrix:
name: Generate job matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- name: Gather CI configuration
id: matrix
uses: laminas/[email protected]

qa:
name: QA Checks
needs: [ matrix ]
runs-on: ${{ matrix.operatingSystem }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.matrix.outputs.matrix) }}
steps:
- name: ${{ matrix.name }}
uses: laminas/[email protected]
env:
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
with:
job: ${{ matrix.job }}
23 changes: 23 additions & 0 deletions .github/workflows/merge-dependabot-upgrades.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://github.com/ridedott/merge-me-action/
# This workflow automates merges from patches sent by Dependabot, and
# only by dependabot, once the other CI workflows pass
name: Auto-merge Dependabot PRs

on:
workflow_run:
types:
- completed
workflows:
- "Continuous Integration"

jobs:
merge-me:
name: Auto-merge Dependabot PRs
runs-on: ubuntu-latest
steps:
- name: Auto-Merge
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: ridedott/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MERGE_METHOD: MERGE
67 changes: 67 additions & 0 deletions .github/workflows/release-on-milestone-closed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

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@v2"

- name: "Release"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:release"
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 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: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
vendor
.idea
composer.phar
composer.lock
40 changes: 0 additions & 40 deletions .scrutinizer.yml

This file was deleted.

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

This file was deleted.

18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
# OcraCachedViewResolver

OcraCachedViewResolver is performance-oriented Zend Framework 2 Module that increases performance
OcraCachedViewResolver is performance-oriented Laminas MVC 2 Module that increases performance
in your application by caching the process of resolving template names to template paths.

In ZF3, the process of resolving template paths causes a lot of stat calls. This module adds
a cache layer to avoid that.
In [`laminas/laminas-mvc-skeleton`](https://github.com/laminas/laminas-mvc-skeleton), the process of resolving template
paths causes a lot of stat calls (disk access). This module adds a cache layer to avoid that.

| Tests | Releases | Downloads | Dependencies |
| ----- | -------- | ------- | ------------- |
|[![Build Status](https://travis-ci.org/Ocramius/OcraCachedViewResolver.png?branch=master)](https://travis-ci.org/Ocramius/OcraCachedViewResolver) [![Code Coverage](https://scrutinizer-ci.com/g/Ocramius/OcraCachedViewResolver/badges/coverage.png?s=2e8b79821b59bfccea8e4fcdec087df12d13be96)](https://scrutinizer-ci.com/g/Ocramius/OcraCachedViewResolver/) [![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/Ocramius/OcraCachedViewResolver/badges/quality-score.png?s=30f146bf14c64a11d4bc304c4e7786e4016786c0)](https://scrutinizer-ci.com/g/Ocramius/OcraCachedViewResolver/) | [![Latest Stable Version](https://poser.pugx.org/ocramius/ocra-cached-view-resolver/v/stable.png)](https://packagist.org/packages/ocramius/ocra-cached-view-resolver) [![Latest Unstable Version](https://poser.pugx.org/ocramius/ocra-cached-view-resolver/v/unstable.png)](https://packagist.org/packages/ocramius/ocra-cached-view-resolver) | [![Total Downloads](https://poser.pugx.org/ocramius/ocra-cached-view-resolver/downloads.png)](https://packagist.org/packages/ocramius/ocra-cached-view-resolver) | [![Dependency Status](https://www.versioneye.com/package/php--ocramius--ocra-cached-view-resolver/badge.png)](https://www.versioneye.com/package/php--ocramius--ocra-cached-view-resolver) |
| Releases | Downloads |
| -------- | ------- |
| [![Latest Stable Version](https://poser.pugx.org/ocramius/ocra-cached-view-resolver/v/stable.png)](https://packagist.org/packages/ocramius/ocra-cached-view-resolver) [![Latest Unstable Version](https://poser.pugx.org/ocramius/ocra-cached-view-resolver/v/unstable.png)](https://packagist.org/packages/ocramius/ocra-cached-view-resolver) | [![Total Downloads](https://poser.pugx.org/ocramius/ocra-cached-view-resolver/downloads.png)](https://packagist.org/packages/ocramius/ocra-cached-view-resolver) |

## Installation

The recommended way to install `ocramius/ocra-cached-view-resolver` is through
[composer](http://getcomposer.org/):

```sh
php composer.phar require ocramius/ocra-cached-view-resolver:3.0.*
php composer.phar require ocramius/ocra-cached-view-resolver
```

If you use legacy/outdated PHP versions, such as `5.5.x` and `5.6.x`, you can use any
[`3.x`](https://github.com/Ocramius/OcraCachedViewResolver/tree/3.0.0) version
of `ocramius/ocra-cached-view-resolver`.

You can then enable the module in your `config/application.config.php` by adding
`'OcraCachedViewResolver'` to the `'modules'` section.

Expand Down
17 changes: 9 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@
}
],
"require": {
"php": "~7.0",
"zendframework/zend-servicemanager": "^3.1.0",
"zendframework/zend-mvc": "^3.0",
"zendframework/zend-view": "^2.7",
"zendframework/zend-cache": "^2.7.1"
"php": "^7.4.7 || ~8.0.0",
"laminas/laminas-servicemanager": "^3.10.0",
"laminas/laminas-mvc": "^3.2.0",
"laminas/laminas-modulemanager": "^2.10.2",
"laminas/laminas-view": "^2.12.0",
"laminas/laminas-cache": "^2.13.0"
},
"require-dev": {
"phpunit/phpunit": "^6.4",
"squizlabs/php_codesniffer": "~2.6.1",
"zendframework/zend-config": "^2.6 || ^3.0"
"phpunit/phpunit": "^9.5.9",
"doctrine/coding-standard": "^9.0.0",
"vimeo/psalm": "^4.10.0"
},
"autoload": {
"psr-0": {
Expand Down
Loading

0 comments on commit ea834dd

Please sign in to comment.