Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 2 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#
# JBZoo Toolbox - Mock-Server
# JBZoo Toolbox - Mock-Server.
#
# This file is part of the JBZoo Toolbox project.
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#
# @package Mock-Server
# @license MIT
# @copyright Copyright (C) JBZoo.com, All rights reserved.
# @link https://github.com/JBZoo/Mock-Server
# @see https://github.com/JBZoo/Mock-Server
#

.idea
Expand Down
5 changes: 2 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#
# JBZoo Toolbox - Mock-Server
# JBZoo Toolbox - Mock-Server.
#
# This file is part of the JBZoo Toolbox project.
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#
# @package Mock-Server
# @license MIT
# @copyright Copyright (C) JBZoo.com, All rights reserved.
# @link https://github.com/JBZoo/Mock-Server
# @see https://github.com/JBZoo/Mock-Server
#

# EditorConfig is awesome: http://EditorConfig.org
Expand Down
5 changes: 2 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#
# JBZoo Toolbox - Mock-Server
# JBZoo Toolbox - Mock-Server.
#
# This file is part of the JBZoo Toolbox project.
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#
# @package Mock-Server
# @license MIT
# @copyright Copyright (C) JBZoo.com, All rights reserved.
# @link https://github.com/JBZoo/Mock-Server
# @see https://github.com/JBZoo/Mock-Server
#

/build export-ignore
Expand Down
48 changes: 26 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#
# JBZoo Toolbox - Mock-Server
# JBZoo Toolbox - Mock-Server.
#
# This file is part of the JBZoo Toolbox project.
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#
# @package Mock-Server
# @license MIT
# @copyright Copyright (C) JBZoo.com, All rights reserved.
# @link https://github.com/JBZoo/Mock-Server
# @see https://github.com/JBZoo/Mock-Server
#

name: CI
Expand All @@ -21,7 +20,7 @@ on:
branches:
- 'master'
schedule:
- cron: '20 */8 * * *'
- cron: '51 */8 * * *'

env:
COLUMNS: 120
Expand All @@ -35,32 +34,39 @@ jobs:
JBZOO_COMPOSER_UPDATE_FLAGS: ${{ matrix.composer_flags }}
strategy:
matrix:
php-version: [ 7.2, 7.3, 7.4 ]
php-version: [ 8.1, 8.2 ]
coverage: [ xdebug, none ]
composer_flags: [ "--prefer-lowest", "" ]
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: xdebug
coverage: ${{ matrix.coverage }}
tools: composer
extensions: ast

- name: Build the Project
continue-on-error: true
run: make build --no-print-directory
run: make update --no-print-directory

- name: 🧪 PHPUnit Tests
continue-on-error: true
run: make test --no-print-directory

- name: Uploading coverage to coveralls
if: ${{ matrix.coverage == 'xdebug' }}
continue-on-error: true
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: make report-coveralls --no-print-directory || true

- name: Upload Artifacts
uses: actions/upload-artifact@v3
continue-on-error: true
uses: actions/upload-artifact@v2
with:
name: PHPUnit - ${{ matrix.php-version }} - ${{ matrix.coverage }}
path: build/
Expand All @@ -71,31 +77,30 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [ 7.2, 7.3, 7.4, 8.0 ]
php-version: [ 8.1, 8.2 ]
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: ast
coverage: none
tools: composer
extensions: ast

- name: Build the Project
continue-on-error: true
run: make update --no-print-directory

- name: 👍 Code Quality
continue-on-error: true
run: make codestyle --no-print-directory

- name: Upload Artifacts
uses: actions/upload-artifact@v3
continue-on-error: true
uses: actions/upload-artifact@v2
with:
name: Linters - ${{ matrix.php-version }}
path: build/
Expand All @@ -106,10 +111,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [ 7.2, 7.3, 7.4, 8.0 ]
php-version: [ 8.1, 8.2 ]
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand All @@ -119,18 +124,17 @@ jobs:
php-version: ${{ matrix.php-version }}
coverage: xdebug
tools: composer
extensions: ast

- name: Build the Project
continue-on-error: true
run: make update --no-print-directory

- name: 📝 Build Reports
continue-on-error: true
run: make report-all --no-print-directory

- name: Upload Artifacts
uses: actions/upload-artifact@v3
continue-on-error: true
uses: actions/upload-artifact@v2
with:
name: Reports - ${{ matrix.php-version }}
path: build/
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#
# JBZoo Toolbox - Mock-Server
# JBZoo Toolbox - Mock-Server.
#
# This file is part of the JBZoo Toolbox project.
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#
# @package Mock-Server
# @license MIT
# @copyright Copyright (C) JBZoo.com, All rights reserved.
# @link https://github.com/JBZoo/Mock-Server
# @see https://github.com/JBZoo/Mock-Server
#

.idea
Expand Down
11 changes: 5 additions & 6 deletions .phan/config.php → .phan.php
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
<?php

/**
* JBZoo Toolbox - Mock-Server
* JBZoo Toolbox - Mock-Server.
*
* This file is part of the JBZoo Toolbox project.
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @package Mock-Server
* @license MIT
* @copyright Copyright (C) JBZoo.com, All rights reserved.
* @link https://github.com/JBZoo/Mock-Server
* @see https://github.com/JBZoo/Mock-Server
*/

declare(strict_types=1);

$default = include __DIR__ . '/../vendor/jbzoo/codestyle/src/phan/default.php';
$default = include __DIR__ . '/vendor/jbzoo/codestyle/src/phan.php';

return array_merge($default, [
return \array_merge($default, [
'directory_list' => [
'src',

Expand All @@ -31,5 +30,5 @@
'vendor/nikic/fast-route/src',
'vendor/symfony/console',
'vendor/guzzlehttp/guzzle/src',
]
],
]);
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#
# JBZoo Toolbox - Mock-Server
# JBZoo Toolbox - Mock-Server.
#
# This file is part of the JBZoo Toolbox project.
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#
# @package Mock-Server
# @license MIT
# @copyright Copyright (C) JBZoo.com, All rights reserved.
# @link https://github.com/JBZoo/Mock-Server
# @see https://github.com/JBZoo/Mock-Server
#

language: php
Expand Down
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#
# JBZoo Toolbox - Mock-Server
# JBZoo Toolbox - Mock-Server.
#
# This file is part of the JBZoo Toolbox project.
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#
# @package Mock-Server
# @license MIT
# @copyright Copyright (C) JBZoo.com, All rights reserved.
# @link https://github.com/JBZoo/Mock-Server
# @see https://github.com/JBZoo/Mock-Server
#

FROM php:7.4-cli-alpine
Expand Down
24 changes: 2 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#
# JBZoo Toolbox - Mock-Server
# JBZoo Toolbox - Mock-Server.
#
# This file is part of the JBZoo Toolbox project.
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#
# @package Mock-Server
# @license MIT
# @copyright Copyright (C) JBZoo.com, All rights reserved.
# @link https://github.com/JBZoo/Mock-Server
# @see https://github.com/JBZoo/Mock-Server
#

.PHONY: build
Expand All @@ -30,34 +29,15 @@ MOCK_SERVER_DOCKER ?= docker run --rm \
-p $(MOCK_SERVER_PORT_TLS):8090 \
jbzoo-mock-server

PHAR_BOX ?= $(PHP_BIN) `pwd`/vendor/bin/box.phar
PHAR_FILE ?= `pwd`/build/mock-server.phar
PHAR_FILE_BIN ?= $(PHP_BIN) $(PHAR_FILE)

BOX_PHAR = https://github.com/box-project/box/releases/download/3.9.1/box.phar

ifeq ($(strip $(PHP_VERSION_ALIAS)),72)
PHAR_BOX_SOURCE ?= https://github.com/box-project/box/releases/download/3.9.1/box.phar
else
PHAR_BOX_SOURCE ?= https://github.com/box-project/box/releases/download/3.11.1/box.phar
endif


build: ##@Project Install all 3rd party dependencies
$(call title,"Install/Update all 3rd party dependencies")
@composer install --optimize-autoloader --no-progress
@make build-phar


build-phar: ##@Project Compile phar file
$(call download_phar,$(BOX_PHAR),"box")
@$(PHP_BIN) `pwd`/vendor/bin/box.phar --version
@$(PHP_BIN) `pwd`/vendor/bin/box.phar validate -vvv
@composer config autoloader-suffix JBZooPhar -v
@$(PHAR_BOX) compile --working-dir="`pwd`" -v
@composer config autoloader-suffix --unset -v


build-docker:
$(call title,"Building Docker Image")
@docker build -t jbzoo-mock-server .
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# JBZoo / Mock-Server

[![Build Status](https://travis-ci.org/JBZoo/Mock-Server.svg)](https://travis-ci.org/JBZoo/Mock-Server) [![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/jbzoo/mock-server.svg)](https://hub.docker.com/r/jbzoo/mock-server) [![Coverage Status](https://coveralls.io/repos/JBZoo/Mock-Server/badge.svg)](https://coveralls.io/github/JBZoo/Mock-Server) [![Psalm Coverage](https://shepherd.dev/github/JBZoo/Mock-Server/coverage.svg)](https://shepherd.dev/github/JBZoo/Mock-Server) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/jbzoo/mock-server/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/jbzoo/mock-server/?branch=master) [![CodeFactor](https://www.codefactor.io/repository/github/jbzoo/mock-server/badge)](https://www.codefactor.io/repository/github/jbzoo/mock-server/issues) [![PHP Strict Types](https://img.shields.io/badge/strict__types-%3D1-brightgreen)](https://www.php.net/manual/en/language.types.declarations.php#language.types.declarations.strict)
[![Stable Version](https://poser.pugx.org/jbzoo/mock-server/version)](https://packagist.org/packages/jbzoo/mock-server) [![Dependents](https://poser.pugx.org/jbzoo/mock-server/dependents)](https://packagist.org/packages/jbzoo/mock-server/dependents?order_by=downloads) [![GitHub Issues](https://img.shields.io/github/issues/jbzoo/mock-server)](https://github.com/JBZoo/Mock-Server/issues) [![Total Downloads](https://poser.pugx.org/jbzoo/mock-server/downloads)](https://packagist.org/packages/jbzoo/mock-server/stats) [![Docker Pulls](https://img.shields.io/docker/pulls/jbzoo/mock-server.svg)](https://hub.docker.com/r/jbzoo/mock-server) [![GitHub License](https://img.shields.io/github/license/jbzoo/mock-server)](https://github.com/JBZoo/Mock-Server/blob/master/LICENSE)
[![CI](https://github.com/JBZoo/Mock-Server/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/JBZoo/Mock-Server/actions/workflows/main.yml?query=branch%3Amaster) [![Coverage Status](https://coveralls.io/repos/github/JBZoo/Mock-Server/badge.svg?branch=master)](https://coveralls.io/github/JBZoo/Mock-Server?branch=master) [![Psalm Coverage](https://shepherd.dev/github/JBZoo/Mock-Server/coverage.svg)](https://shepherd.dev/github/JBZoo/Mock-Server) [![Psalm Level](https://shepherd.dev/github/JBZoo/Mock-Server/level.svg)](https://shepherd.dev/github/JBZoo/Mock-Server) [![CodeFactor](https://www.codefactor.io/repository/github/jbzoo/mock-server/badge)](https://www.codefactor.io/repository/github/jbzoo/mock-server/issues)
[![Stable Version](https://poser.pugx.org/jbzoo/mock-server/version)](https://packagist.org/packages/jbzoo/mock-server/) [![Total Downloads](https://poser.pugx.org/jbzoo/mock-server/downloads)](https://packagist.org/packages/jbzoo/mock-server/stats) [![Dependents](https://poser.pugx.org/jbzoo/mock-server/dependents)](https://packagist.org/packages/jbzoo/mock-server/dependents?order_by=downloads) [![Visitors](https://visitor-badge.glitch.me/badge?page_id=jbzoo.mock-server)]() [![GitHub License](https://img.shields.io/github/license/jbzoo/mock-server)](https://github.com/JBZoo/Mock-Server/blob/master/LICENSE)



Expand Down
Loading