Skip to content

Commit

Permalink
Drop guzzle/psr7 support in favor of laminas-diactoros
Browse files Browse the repository at this point in the history
They are too incompetent to switch their default branch in the GitHub
UI, can't keep their master branch tests green, and their 1.x branch is like
100 commits behind master so I don't even know WTF is going on there.

We will go with a more sane project to test against.

See: guzzle/psr7#356
See: guzzle/psr7#357
  • Loading branch information
jbboehr committed Nov 5, 2020
1 parent 5be3030 commit d7e1247
Show file tree
Hide file tree
Showing 13 changed files with 720 additions and 404 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"
}
6 changes: 4 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 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
1 change: 1 addition & 0 deletions .github/workflows/linux.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
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
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ branches:
- master
- develop
- travis
- ci

cache:
directories:
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,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 @@ -169,7 +169,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
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;
}

0 comments on commit d7e1247

Please sign in to comment.