Skip to content

Commit db9649f

Browse files
committed
Remove Lumen support
1 parent ff99087 commit db9649f

File tree

7 files changed

+21
-180
lines changed

7 files changed

+21
-180
lines changed
Lines changed: 7 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
name: tests
1+
name: PHPUnit
22

33
on:
44
push:
55
pull_request:
66

77
jobs:
8-
laravel:
8+
phpunit:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
@@ -55,67 +55,14 @@ jobs:
5555
name: PHPUnit on Laravel ${{ matrix.laravel }} / PHP ${{ matrix.php }}
5656
steps:
5757
- name: Checkout code
58-
uses: actions/checkout@v2
59-
58+
uses: actions/checkout@v4
6059
- name: Setup PHP
6160
uses: shivammathur/setup-php@v2
6261
with:
6362
php-version: ${{ matrix.php }}
64-
tools: composer:v2
65-
6663
- name: Install dependencies
6764
run: |
68-
composer require laravel/laravel:"${{ matrix.laravel }}" --dev --no-update
69-
composer install --prefer-dist --no-interaction --no-progress
70-
71-
- name: Run tests
72-
run: composer test-laravel
73-
74-
lumen:
75-
runs-on: ubuntu-latest
76-
strategy:
77-
fail-fast: true
78-
matrix:
79-
lumen: [ 5.5.*, 5.6.*, 5.7.*, 5.8.*, 6.*, 7.* ]
80-
php: [ 7.2 ]
81-
include:
82-
- lumen: 6.*
83-
php: 7.3
84-
- lumen: 6.*
85-
php: 7.4
86-
- lumen: 7.*
87-
php: 7.3
88-
- lumen: 7.*
89-
php: 7.4
90-
- lumen: 8.*
91-
php: 7.3
92-
- lumen: 8.*
93-
php: 7.4
94-
- lumen: 8.*
95-
php: 8.0
96-
- lumen: 8.*
97-
php: 8.1
98-
- lumen: 9.*
99-
php: 8.0
100-
- lumen: 9.*
101-
php: 8.1
102-
- lumen: 9.*
103-
php: 8.2
104-
name: PHPUnit on Lumen ${{ matrix.lumen }} / PHP ${{ matrix.php }}
105-
steps:
106-
- name: Checkout code
107-
uses: actions/checkout@v2
108-
109-
- name: Setup PHP
110-
uses: shivammathur/setup-php@v2
111-
with:
112-
php-version: ${{ matrix.php }}
113-
tools: composer:v2
114-
115-
- name: Install dependencies
116-
run: |
117-
composer require laravel/lumen:"${{ matrix.lumen }}" --dev --no-update
118-
composer install --prefer-dist --no-interaction --no-progress
119-
120-
- name: Run tests
121-
run: composer test-lumen
65+
composer require laravel/laravel:"${{ matrix.laravel }}" --dev --no-interaction --no-update
66+
composer install --no-interaction --no-progress
67+
- name: Run PHPUnit
68+
run: ./vendor/bin/phpunit

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@
33
All notable changes to this project will be documented in this file.
44

55
## 4.0.0
6+
7+
### Removed
8+
9+
- Lumen is no longer supported

README.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ Worldwide postal code validation for Laravel, based on Google's Address Data Ser
1919

2020
- [Requirements](#requirements)
2121
- [Installation](#installation)
22-
- [Lumen](#lumen)
2322
- [Usage](#usage)
2423
- [Available rules](#available-rules)
2524
- [Fluent API](#fluent-api)
@@ -35,8 +34,8 @@ Worldwide postal code validation for Laravel, based on Google's Address Data Ser
3534

3635
This package has the following requirements:
3736

38-
- PHP 7.2 or higher
39-
- Laravel (or Lumen) 5.5 or higher
37+
- PHP 7.2 or greater
38+
- Laravel 5.5 or greater
4039

4140
## Installation
4241

@@ -57,14 +56,6 @@ package manually, you can do this by adding the following line to your `config/a
5756
],
5857
```
5958

60-
### Lumen
61-
62-
If you are using Lumen, register the package by adding the following line to your `bootstrap/app.php` file:
63-
64-
```php
65-
$app->register(Axlon\PostalCodeValidation\ValidationServiceProvider::class);
66-
```
67-
6859
## Usage
6960

7061
Postal code validation perfectly integrates into your Laravel application, you can use it just like you would any

composer.json

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
{
22
"name": "axlon/laravel-postal-code-validation",
3-
"description": "Worldwide postal code validation for Laravel and Lumen",
3+
"description": "Worldwide postal code validation for Laravel",
44
"keywords": [
55
"laravel",
6-
"lumen",
76
"post code",
87
"postal code",
98
"zip code",
@@ -25,7 +24,8 @@
2524
},
2625
"require-dev": {
2726
"guzzlehttp/guzzle": "^7.8",
28-
"phpunit/phpunit": "^8.5 || ^9.6 || ^10.5",
27+
"orchestra/testbench": "^3.5 || ^4.18 || ^5.20 || ^6.47 || ^7.53 || ^8.34 || ^9.12 || ^10.1",
28+
"phpunit/phpunit": "^6.5 || ^7.5 || ^8.5 || ^9.6 || ^10.5 || ^11.5",
2929
"symfony/var-exporter": "^4.0 || ^5.0 || ^6.0 || ^7.0"
3030
},
3131
"autoload": {
@@ -44,14 +44,6 @@
4444
"kylekatarnls/update-helper": false
4545
}
4646
},
47-
"scripts": {
48-
"test-laravel": "./vendor/bin/phpunit --colors=always --bootstrap=tests/bootstrap/laravel.php",
49-
"test-lumen": "./vendor/bin/phpunit --colors=always --bootstrap=tests/bootstrap/lumen.php"
50-
},
51-
"scripts-descriptions": {
52-
"test-laravel": "Run PHPUnit with Laravel",
53-
"test-lumen": "Run PHPUnit with Lumen"
54-
},
5547
"extra": {
5648
"laravel": {
5749
"aliases": {

tests/Integration/TestCase.php

Lines changed: 5 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,54 +2,13 @@
22

33
namespace Axlon\PostalCodeValidation\Tests\Integration;
44

5-
use Closure;
5+
use Axlon\PostalCodeValidation\ValidationServiceProvider;
6+
use Orchestra\Testbench\TestCase as BaseTestCase;
67

7-
abstract class TestCase extends \PHPUnit\Framework\TestCase
8+
abstract class TestCase extends BaseTestCase
89
{
9-
/**
10-
* The application.
11-
*
12-
* @var \Illuminate\Foundation\Application|\Laravel\Lumen\Application
13-
*/
14-
protected $app;
15-
16-
/**
17-
* The application resolver.
18-
*
19-
* @var \Closure
20-
*/
21-
protected static $resolver;
22-
23-
/**
24-
* @inheritDoc
25-
*/
26-
protected function setUp(): void
27-
{
28-
$this->setUpApplication();
29-
}
30-
31-
/**
32-
* Set up a new application instance.
33-
*
34-
* @return void
35-
*/
36-
protected function setUpApplication(): void
37-
{
38-
if (!isset(self::$resolver)) {
39-
$this->markTestSkipped('Application cannot be bootstrapped');
40-
}
41-
42-
$this->app = self::$resolver->call($this);
43-
}
44-
45-
/**
46-
* Set the application resolver.
47-
*
48-
* @param \Closure $resolver
49-
* @return void
50-
*/
51-
public static function resolveUsing(Closure $resolver): void
10+
protected function getPackageProviders($app): array
5211
{
53-
self::$resolver = $resolver;
12+
return [ValidationServiceProvider::class];
5413
}
5514
}

tests/bootstrap/laravel.php

Lines changed: 0 additions & 23 deletions
This file was deleted.

tests/bootstrap/lumen.php

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)