Skip to content

Commit

Permalink
Merge branch 'master' into gh-78
Browse files Browse the repository at this point in the history
  • Loading branch information
jbboehr committed Nov 6, 2020
2 parents 68663e1 + 99620d4 commit 8107b6a
Show file tree
Hide file tree
Showing 17 changed files with 750 additions and 483 deletions.
8 changes: 4 additions & 4 deletions .ci/deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
"PSX_CACHE_SHORTNAME": "psx-cache",
"PSX_CACHE_REPO": "https://github.com/apioo/psx-cache.git",
"PSX_CACHE_VERSION": "v1.0.2",
"GUZZLE_PSR7_SHORTNAME": "psr7",
"GUZZLE_PSR7_REPO": "https://github.com/guzzle/psr7.git",
"GUZZLE_PSR7_VERSION": "1.5.2",
"LEAGUE_CONTAINER_SHORTNAME": "league-container",
"LEAGUE_CONTAINER_REPO": "https://github.com/thephpleague/container.git",
"LEAGUE_CONTAINER_VERSION": "3.3.0",
Expand All @@ -32,5 +29,8 @@
"TUKIO_VERSION": "1.0.0",
"LAMINAS_CACHE_SHORTNAME": "laminas-cache",
"LAMINAS_CACHE_REPO": "https://github.com/laminas/laminas-cache.git",
"LAMINAS_CACHE_VERSION": "2.9.0"
"LAMINAS_CACHE_VERSION": "2.9.0",
"LAMINAS_DIACTOROS_SHORTNAME": "laminas-diactoros",
"LAMINAS_DIACTOROS_REPO": "https://github.com/laminas/laminas-diactoros.git",
"LAMINAS_DIACTOROS_VERSION": "2.4.1"
}
8 changes: 6 additions & 2 deletions .ci/travis_php.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ function init_repository() (
find vendor/psr/ -type f -not -iname "*test*" -delete
# remove some tests from laminas that are really slow
rm -f test/Storage/Adapter/FilesystemTest.php test/Storage/Adapter/MemoryTest.php
# remove a test suite from laminas-diactoros that breaks due to process isolation
rm -f test/ServerRequestFactoryTest.php
)

function test_repository() (
Expand All @@ -75,7 +77,6 @@ function checkout_third_party_repos() (

# install all libraries we test against
init_repository ${MONOLOG_SHORTNAME} ${MONOLOG_VERSION} ${MONOLOG_REPO}
init_repository ${GUZZLE_PSR7_SHORTNAME} ${GUZZLE_PSR7_VERSION} ${GUZZLE_PSR7_REPO}
init_repository ${LEAGUE_CONTAINER_SHORTNAME} ${LEAGUE_CONTAINER_VERSION} ${LEAGUE_CONTAINER_REPO}
init_repository ${LINK_UTIL_SHORTNAME} ${LINK_UTIL_VERSION} ${LINK_UTIL_REPO}
init_repository ${PSX_CACHE_SHORTNAME} ${PSX_CACHE_VERSION} ${PSX_CACHE_REPO}
Expand All @@ -88,6 +89,7 @@ function checkout_third_party_repos() (
# laminas-cache tests are failing on basically all non-x86 architectures and it's not my fault (I think)
init_repository ${LAMINAS_CACHE_SHORTNAME} ${LAMINAS_CACHE_VERSION} ${LAMINAS_CACHE_REPO}
fi
init_repository ${LAMINAS_DIACTOROS_SHORTNAME} ${LAMINAS_DIACTOROS_VERSION} ${LAMINAS_DIACTOROS_REPO}
)

function before_install() (
Expand Down Expand Up @@ -147,7 +149,6 @@ function script() (

# run tests for all libraries we test against
cifold "test ${MONOLOG_SHORTNAME}" test_repository ${MONOLOG_SHORTNAME}
cifold "test ${GUZZLE_PSR7_SHORTNAME}" test_repository ${GUZZLE_PSR7_SHORTNAME}
cifold "test ${LEAGUE_CONTAINER_SHORTNAME}" test_repository ${LEAGUE_CONTAINER_SHORTNAME}
cifold "test ${LINK_UTIL_SHORTNAME}" test_repository ${LINK_UTIL_SHORTNAME}
cifold "test ${PSX_CACHE_SHORTNAME}" test_repository ${PSX_CACHE_SHORTNAME}
Expand All @@ -160,6 +161,7 @@ function script() (
# laminas-cache tests are failing on basically all non-x86 architectures and it's not my fault (I think)
cifold "test ${LAMINAS_CACHE_SHORTNAME}" test_repository ${LAMINAS_CACHE_SHORTNAME}
fi
cifold "test ${LAMINAS_DIACTOROS_SHORTNAME}" test_repository ${LAMINAS_DIACTOROS_SHORTNAME}
)

function upload_coverage() (
Expand All @@ -173,7 +175,9 @@ function upload_coverage() (
--remove coverage.info "/home/travis/build/include/*" \
--compat-libtool \
--output-file coverage.info
fi

if [[ "${COVERAGE}" = "true" ]] && [[ "${TRAVIS}" = "true" ]]; then
echo "Uploading coverage"
coveralls-lcov coverage.info
fi
Expand Down
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ third-party/

# ci and docker
.github
.travis.*
**/*.nix
**/*Dockerfile
**/.dockerignore
Expand Down
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*.w32 linguist-language=JavaScript
.ci/** linguist-documentation=true
.github/** export-ignore linguist-documentation=true
.travis.yml export-ignore linguist-documentation=true
appveyor.yml export-ignore linguist-documentation=true
nix/** linguist-documentation=true
nix/deps/** linguist-generated=true
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- master
- dev-1.x
- github-actions
- ci
pull_request:
branches:
- master
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,19 @@ export SUDO=sudo
function install_apt_packages() (
${SUDO} add-apt-repository ppa:ondrej/php
${SUDO} apt-get update
${SUDO} apt-get install -y composer jq php${PHP_VERSION}-dev
${SUDO} apt-get install -y composer jq lcov \
php${PHP_VERSION}-dev \
php${PHP_VERSION}-bcmath \
php${PHP_VERSION}-curl \
php${PHP_VERSION}-gd \
php${PHP_VERSION}-mbstring \
php${PHP_VERSION}-xml \
php${PHP_VERSION}-zip
${SUDO} update-alternatives --set php /usr/bin/php${PHP_VERSION}
${SUDO} update-alternatives --set php-config /usr/bin/php-config${PHP_VERSION}
${SUDO} update-alternatives --set phpize /usr/bin/phpize${PHP_VERSION}
# ${SUDO} update-alternatives --set phpdbg /usr/bin/phpdbg${PHP_VERSION}
${SUDO} update-alternatives --config php
)

cifold "install apt packages" install_apt_packages
Expand Down
35 changes: 16 additions & 19 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,29 @@ on:
- master
- dev-1.x
- github-actions
- ci
pull_request:
branches:
- master

jobs:
php72:
runs-on: ubuntu-latest
linux:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
PHP_VERSION: ["7.2", "7.3", "7.4"]
COVERAGE: ["true", "false"]
steps:
- uses: actions/checkout@v2
- name: I am tired of writing this shit in YAML and learning a new DSL for every CI service so I'm putting everything in a FSCKING BASH SCRIPT
env:
PHP_VERSION: "7.2"
run: bash ./.github/workflows/linux.sh
php73:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: I am tired of writing this shit in YAML and learning a new DSL for every CI service so I'm putting everything in a FSCKING BASH SCRIPT
env:
PHP_VERSION: "7.3"
run: bash ./.github/workflows/linux.sh
php74:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: I am tired of writing this shit in YAML and learning a new DSL for every CI service so I'm putting everything in a FSCKING BASH SCRIPT
env:
PHP_VERSION: "7.4"
PHP_VERSION: ${{ matrix.PHP_VERSION }}
COVERAGE: ${{ matrix.COVERAGE }}
run: bash ./.github/workflows/linux.sh
- name: Coveralls
if: ${{ matrix.COVERAGE == 'true' }}
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./coverage.info
1 change: 1 addition & 0 deletions .github/workflows/osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- master
- dev-1.x
- github-actions
- ci
pull_request:
branches:
- master
Expand Down
53 changes: 0 additions & 53 deletions .travis.yml

This file was deleted.

6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

# php-psr

[![Travis Build Status][:badge-travis:]][:build-travis:]
[![Appveyor Build Status][:badge-appveyor:]][:build-appveyor:]
[![GitHub Linux Build Status](https://github.com/jbboehr/php-psr/workflows/linux/badge.svg)](https://github.com/jbboehr/php-psr/actions?query=workflow%3Alinux)
[![GitHub OSX Build Status](https://github.com/jbboehr/php-psr/workflows/osx/badge.svg)](https://github.com/jbboehr/php-psr/actions?query=workflow%3Aosx)
Expand All @@ -20,7 +19,7 @@ You can use interfaces provided by this extension in another extension easily -
| --- | --- | --- |
| [PSR-3][:psr-3:] | [psr/log][:psr-log:] [*](#psrlogunimpl) | [monolog][:monolog:] |
| [PSR-6][:psr-6:] | [psr/cache][:psr-cache:] | [psx-cache][:psx-cache:], [laminas-cache](https://github.com/laminas/laminas-cache) |
| [PSR-7][:psr-7:] | [psr/http-message][:psr-http-message:] | [guzzle/psr7][:guzzle:] |
| [PSR-7][:psr-7:] | [psr/http-message][:psr-http-message:] | [laminas-diactoros](https://github.com/laminas/laminas-diactoros) |
| [PSR-11][:psr-11:] | [psr/container][:psr-container:] | [league/container][:league-container:] |
| [PSR-13][:psr-13:] | [psr/link][:psr-link:] | [php-fig/link-util][:link-util:] |
| [PSR-14][:psr-14:] | [psr/event-dispatcher][:psr-event-dispatcher:] | [tukio][:tukio:] |
Expand Down Expand Up @@ -152,11 +151,9 @@ PSR Interfaces: Copyright (c) 2012-present [PHP Framework Interoperability Group
[:psr-fig:]: https://www.php-fig.org/psr
[:php-fig:]: https://www.php-fig.org
[:pecl-psr:]: https://pecl.php.net/package/psr
[:badge-travis:]: https://travis-ci.org/jbboehr/php-psr.svg?branch=master
[:badge-appveyor:]: https://ci.appveyor.com/api/projects/status/x1ymkqggy1mkl0ux/branch/master?svg=true
[:badge-coveralls:]: https://coveralls.io/repos/jbboehr/php-psr/badge.svg?branch=master&service=github
[:badge-license:]: https://img.shields.io/badge/license-BSD-brightgreen.svg
[:build-travis:]: https://travis-ci.org/jbboehr/php-psr
[:build-appveyor:]: https://ci.appveyor.com/project/jbboehr/php-psr/branch/master
[:build-coveralls:]: https://coveralls.io/github/jbboehr/php-psr?branch=master
[:ext-license:]: https://github.com/jbboehr/php-psr/blob/master/LICENSE.md
Expand All @@ -169,7 +166,6 @@ PSR Interfaces: Copyright (c) 2012-present [PHP Framework Interoperability Group
[:psx-cache:]: https://github.com/apioo/psx-cache
[:psr-7:]: https://www.php-fig.org/psr/psr-7
[:psr-http-message:]: https://github.com/php-fig/http-message
[:guzzle:]: https://github.com/guzzle/psr7
[:psr-11:]: https://www.php-fig.org/psr/psr-11
[:psr-container:]: https://github.com/php-fig/container
[:league-container:]: https://github.com/thephpleague/container
Expand Down
2 changes: 1 addition & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
phpPsrVersion ? null,
phpPsrSha256 ? null,
phpPsrSrc ? pkgs.lib.cleanSourceWith {
filter = (path: type: (builtins.all (x: x != baseNameOf path) [".idea" ".git" "ci.nix" ".travis.sh" ".travis.yml" ".ci" "nix" "default.nix"]));
filter = (path: type: (builtins.all (x: x != baseNameOf path) [".idea" ".git" ".github" "ci.nix" ".ci" "nix" "default.nix"]));
src = gitignoreSource ./.;
},

Expand Down
6 changes: 3 additions & 3 deletions nix/deps.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,22 @@ let
# remove their installed psr dependencies (except testing classes)
# monolog requires the test class, so don't delete everything
find vendor/psr/ -type f -not -iname "*test*" -delete
# remove some tests from laminas that are really slow
# remove some tests from laminas-cache that are really slow
rm -f test/Storage/Adapter/FilesystemTest.php test/Storage/Adapter/MemoryTest.php
chmod -R -w vendor
${phpWrapper}/bin/php ./vendor/bin/phpunit
${phpWrapper}/bin/php ./vendor/bin/phpunit --exclude-group internet
'';
});
in
{
monolog = commonImport ./deps/monolog.json ./deps/monolog-packages.nix ./deps/monolog-composer.lock;
psx-cache = commonImport ./deps/psx-cache.json ./deps/psx-cache-packages.nix ./deps/psx-cache-composer.lock;
psr7 = commonImport ./deps/psr7.json ./deps/psr7-packages.nix ./deps/psr7-composer.lock;
league-container = commonImport ./deps/league-container.json ./deps/league-container-packages.nix ./deps/league-container-composer.lock;
link-util = commonImport ./deps/link-util.json ./deps/link-util-packages.nix ./deps/link-util-composer.lock;
dispatch = commonImport ./deps/dispatch.json ./deps/dispatch-packages.nix ./deps/dispatch-composer.lock;
http-factory-guzzle = commonImport ./deps/http-factory-guzzle.json ./deps/http-factory-guzzle-packages.nix ./deps/http-factory-guzzle-composer.lock;
guzzle-psr18-adapter = commonImport ./deps/guzzle-psr18-adapter.json ./deps/guzzle-psr18-adapter-packages.nix ./deps/guzzle-psr18-adapter-composer.lock;
tukio = commonImport ./deps/tukio.json ./deps/tukio-packages.nix ./deps/tukio-composer.lock;
laminas-cache = commonImport ./deps/laminas-cache.json ./deps/laminas-cache-packages.nix ./deps/laminas-cache-composer.lock;
laminas-diactoros = commonImport ./deps/laminas-diactoros.json ./deps/laminas-diactoros-packages.nix ./deps/laminas-diactoros-composer.lock;
}
Loading

0 comments on commit 8107b6a

Please sign in to comment.