Skip to content

Commit

Permalink
Merge pull request #33 from koriym/php8.2
Browse files Browse the repository at this point in the history
Enable PHP 8.2 compat
  • Loading branch information
harikt authored Sep 13, 2023
2 parents e3b4ae3 + 28f9c26 commit 92221bf
Show file tree
Hide file tree
Showing 37 changed files with 15,843 additions and 7,526 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Continuous Integration

on:
push:
pull_request:
workflow_dispatch:

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
operating-system:
- ubuntu-latest
php-version:
- '5.6'
- '7.0'
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Setup PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: xdebug
tools: composer:2.2
ini-values: assert.exception=1, zend.assertions=1

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --no-interaction --prefer-dist

- name: Run test suite
run: php -d xdebug.mode=coverage ./vendor/bin/phpunit --coverage-clover=coverage.xml

- name: Upload coverage report
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: false
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
tests/tmp
tests/tmp
vendor
.phpunit.result.cache
composer.lock
14 changes: 6 additions & 8 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
build:
nodes:
analysis:
tests:
override:
- php-scrutinizer-run
filter:
paths: ["src/*"]
tools:
external_code_coverage: true
php_code_coverage: true
php_sim: true
php_mess_detector: true
php_pdepend: true
php_analyzer: true
php_cpd: true
42 changes: 0 additions & 42 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2011-2013, Aura for PHP
Copyright (c) 2011-2023, Aura for PHP
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand All @@ -20,4 +20,4 @@ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16 changes: 3 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Aura.Uri
========

[![Build Status](https://travis-ci.org/auraphp/Aura.Uri.png?branch=develop)](https://travis-ci.org/auraphp/Aura.Uri)
[![Continuous Integration](https://github.com/auraphp/Aura.Uri/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/auraphp/Aura.Uri/actions/workflows/continuous-integration.yml)

The `Auri.Uri` package provides objects to help you create and manipulate URLs,
including query strings and path elements. It does so by splitting up the pieces
Expand All @@ -22,17 +22,7 @@ Getting Started
Instantiation
-------------

The easiest way to instantiate a URL object is to use the factory instance
script, like so:

```php
<?php
$url_factory = require '/path/to/Aura.Uri/scripts/instance.php';
$url = $url_factory->newCurrent();
```

Alternatively, you can add the `src/` directory to your autoloader and
instantiate a URL factory object:
The easiest way to get started is to use the _UrlFactory_ to create a _Url_ object.

```php
<?php
Expand All @@ -44,7 +34,7 @@ $url_factory = new UrlFactory($_SERVER, $psl);
$url = $url_factory->newCurrent();
```

When using the factory, you can populate the URL properties from a URL
You can populate the URL properties from a URL
string:

```php
Expand Down
21 changes: 6 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,25 @@
{
"name": "aura/uri",
"type": "aura-package",
"description": "The Aura Uri package provides objects to build and manipulate URL strings.",
"keywords": [ "uri", "url" ],
"homepage": "http://auraphp.github.com/Aura.Uri",
"license": "BSD-2-Clause",
"authors": [
{
"name": "Aura Contributors",
"name": "Aura.Uri Contributors",
"homepage": "https://github.com/auraphp/Aura.Uri/contributors"
}
],
"require": {
"php": ">=5.4.0",
"aura/installer-default": "1.0.0"
"php": "^5.4 || ^7.0 || ^8.0"
},
"require-dev": {
"phpunit/phpunit": "~5.7 || ~4.8"
"phpunit/phpunit": "^5.7 || ^4.8 || ^9.5",
"yoast/phpunit-polyfills": "^1.1"
},
"autoload": {
"psr-0": {
"Aura\\Uri": "src/"
}
},
"extra": {
"aura": {
"type": "library",
"config": {
"common": "Aura\\Uri\\_Config\\Common"
}
"psr-4": {
"Aura\\Uri\\": "src/"
}
}
}
28 changes: 0 additions & 28 deletions config/Common.php

This file was deleted.

18 changes: 0 additions & 18 deletions config/default.php

This file was deleted.

5 changes: 0 additions & 5 deletions config/test.php

This file was deleted.

Loading

0 comments on commit 92221bf

Please sign in to comment.