pull/766/head
Kei 3 years ago committed by GitHub
parent a534ca1a0f
commit 34c1bcbfca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -5,10 +5,7 @@ on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php: [7.4, 8.0]
name: PHP ${{ matrix.php }}
name: PHP 8.0
steps:
- name: Checkout
uses: actions/checkout@v2
@ -16,7 +13,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
php-version: '8.0'
coverage: xdebug
# https://github.com/marketplace/actions/setup-php-action#cache-composer-dependencies

@ -12,19 +12,14 @@ use Illuminate\Support\Facades\Validator;
class UrlController extends Controller
{
/**
* @var \App\Services\UrlService
*/
protected $urlSrvc;
/**
* UrlController constructor.
*
* @param UrlService $urlSrvc \App\Services\UrlService
*/
public function __construct(UrlService $urlSrvc)
public function __construct(protected UrlService $urlSrvc)
{
$this->middleware('urlhublinkchecker')->only('create');
$this->urlSrvc = $urlSrvc;
}
/**

@ -9,18 +9,14 @@ use Illuminate\Support\Str;
class AllUrlController extends Controller
{
/**
* @var \App\Services\UrlService
*/
protected $urlSrvc;
/**
* AllUrlController constructor.
*
* @param UrlService $urlSrvc \App\Services\UrlService
*/
public function __construct(UrlService $urlSrvc)
public function __construct(protected UrlService $urlSrvc)
{
$this->middleware('role:admin');
$this->urlSrvc = $urlSrvc;
}
/**

@ -13,19 +13,14 @@ use Illuminate\Support\Str;
class DashboardController extends Controller
{
/**
* @var \App\Services\UrlService
*/
protected $urlSrvc;
/**
* DashboardController constructor.
*
* @param UrlService $urlSrvc
* @param UrlService $urlSrvc \App\Services\UrlService
*/
public function __construct(UrlService $urlSrvc)
public function __construct(protected UrlService $urlSrvc)
{
$this->urlSrvc = $urlSrvc;
//
}
/**

@ -9,17 +9,14 @@ use App\Services\UserService;
class ChangePasswordController extends Controller
{
/**
* @var \App\Services\UserService
*/
protected $userSrvc;
/**
* ChangePasswordController constructor.
*
* @param UrlService $urlSrvc \App\Services\UrlService
*/
public function __construct(UserService $userSrvc)
public function __construct(protected UserService $userSrvc)
{
$this->userSrvc = $userSrvc;
//
}
/**

@ -9,18 +9,14 @@ use App\Services\UserService;
class UserController extends Controller
{
/**
* @var \App\Services\UserService
*/
protected $userSrvc;
/**
* UserController constructor.
*
* @param UrlService $urlSrvc \App\Services\UrlService
*/
public function __construct(UserService $userSrvc)
public function __construct(protected UserService $userSrvc)
{
$this->middleware('role:admin')->only('view');
$this->userSrvc = $userSrvc;
}
/**

@ -14,18 +14,14 @@ use Illuminate\Support\Facades\Validator;
class UrlController extends Controller
{
/**
* @var \App\Services\UrlService
*/
protected $urlSrvc;
/**
* UrlController constructor.
*
* @param UrlService $urlSrvc \App\Services\UrlService
*/
public function __construct(UrlService $urlSrvc)
public function __construct(protected UrlService $urlSrvc)
{
$this->middleware('urlhublinkchecker')->only('create');
$this->urlSrvc = $urlSrvc;
}
/**

@ -14,21 +14,15 @@ class UrlRedirectionService
*/
private $agent;
/**
* @var \App\Services\UrlService
*/
protected $urlSrvc;
/**
* UrlRedirectionService constructor.
*
* @param Agent|null $agent
* @param Agent|null $agent \Jenssegers\Agent\Agent
* @param UrlService $urlSrvc \App\Services\UrlService
*/
public function __construct(Agent $agent = null, UrlService $urlSrvc)
public function __construct(Agent $agent = null, protected UrlService $urlSrvc)
{
$this->agent = $agent ?? new Agent();
$this->urlSrvc = $urlSrvc;
}
/**

@ -5,17 +5,17 @@
"keywords": [ "laravel", "url-shortener", "shorten-urls", "shorturl"],
"license": "MIT",
"require": {
"php": "^7.4|^8.0",
"php": "^8.0",
"codeitnowin/barcode": "^3.0",
"creativeorange/gravatar": "~1.0",
"doctrine/dbal": "^2.10",
"doctrine/dbal": "^3.1",
"embed/embed": "^4.3",
"fideloper/proxy": "^4.2",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"geoip2/geoip2": "~2.0",
"guzzlehttp/guzzle": "^7.0.1",
"guzzlehttp/guzzle": "^7.3",
"jenssegers/agent": "^2.6",
"laravel/framework": "^8.12",
"laravel/framework": "^8.40",
"laravel/tinker": "^2.0",
"laravel/ui": "^3.0",
"laravolt/avatar": "^4.0",
@ -24,19 +24,19 @@
"paragonie/random_compat": "^2.0",
"realodix/php-utility": "dev-main",
"spatie/laravel-permission": "^4.0",
"spatie/url": "^1.3",
"tabuna/breadcrumbs": "^2.0",
"spatie/url": "^2.0",
"tabuna/breadcrumbs": "^2.3",
"vinkla/hashids": "^9.0",
"yajra/laravel-datatables-oracle": "~9.0"
},
"require-dev": {
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"facade/ignition": "^2.8",
"fakerphp/faker": "^1.14",
"friendsofphp/php-cs-fixer": "2.18.*",
"laravel/dusk": "^6.6",
"laravel/dusk": "^6.15",
"mockery/mockery": "^1.4",
"nunomaduro/collision": "^5.0",
"nunomaduro/larastan": "^0.6.4",
"nunomaduro/collision": "^5.4",
"nunomaduro/larastan": "^0.7.5",
"phpunit/phpunit": "^9"
},
"autoload": {
@ -68,6 +68,18 @@
"dont-discover": []
}
},
"suggest": {
"doctrine/dbal": "Required to rename columns and drop SQLite columns.",
"fakerphp/faker": "Required to use the eloquent factory builder.",
"friendsofphp/php-cs-fixer": "Required to fixes code to follow standards (PSR-1, PSR-2, etc).",
"guzzlehttp/guzzle": "Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules.",
"laravel/dusk": "Required to use browser automation and testing API.",
"laravel/tinker": "Required to use the tinker console command.",
"mockery/mockery": "Required to use mocking.",
"nunomaduro/larastan": "Required to finding errors in code without actually running it.",
"nyholm/psr7": "Required to use PSR-7 bridging features.",
"phpunit/phpunit": "Required to use assertions and run tests."
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",

266
composer.lock generated

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "1fce34a5e3a3a0205360f34a44b41606",
"content-hash": "c9cc77cfb8492078a9977770c829fbe3",
"packages": [
{
"name": "asm89/stack-cors",
@ -247,6 +247,79 @@
],
"time": "2021-01-12T12:10:35+00:00"
},
{
"name": "composer/package-versions-deprecated",
"version": "1.11.99.1",
"source": {
"type": "git",
"url": "https://github.com/composer/package-versions-deprecated.git",
"reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/7413f0b55a051e89485c5cb9f765fe24bb02a7b6",
"reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6",
"shasum": ""
},
"require": {
"composer-plugin-api": "^1.1.0 || ^2.0",
"php": "^7 || ^8"
},
"replace": {
"ocramius/package-versions": "1.11.99"
},
"require-dev": {
"composer/composer": "^1.9.3 || ^2.0@dev",
"ext-zip": "^1.13",
"phpunit/phpunit": "^6.5 || ^7"
},
"type": "composer-plugin",
"extra": {
"class": "PackageVersions\\Installer",
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"PackageVersions\\": "src/PackageVersions"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Marco Pivetta",
"email": "ocramius@gmail.com"
},
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be"
}
],
"description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)",
"support": {
"issues": "https://github.com/composer/package-versions-deprecated/issues",
"source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.1"
},
"funding": [
{
"url": "https://packagist.com",
"type": "custom"
},
{
"url": "https://github.com/composer",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
"type": "tidelift"
}
],
"time": "2020-11-11T10:22:58+00:00"
},
{
"name": "creativeorange/gravatar",
"version": "v1.0.20",
@ -411,30 +484,32 @@
},
{
"name": "doctrine/dbal",
"version": "2.13.1",
"version": "3.1.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal.git",
"reference": "c800380457948e65bbd30ba92cc17cda108bf8c9"
"reference": "5ba62e7e40df119424866064faf2cef66cb5232a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/dbal/zipball/c800380457948e65bbd30ba92cc17cda108bf8c9",
"reference": "c800380457948e65bbd30ba92cc17cda108bf8c9",
"url": "https://api.github.com/repos/doctrine/dbal/zipball/5ba62e7e40df119424866064faf2cef66cb5232a",
"reference": "5ba62e7e40df119424866064faf2cef66cb5232a",
"shasum": ""
},
"require": {
"composer/package-versions-deprecated": "^1.11.99",
"doctrine/cache": "^1.0",
"doctrine/deprecations": "^0.5.3",
"doctrine/event-manager": "^1.0",
"ext-pdo": "*",
"php": "^7.1 || ^8"
"php": "^7.3 || ^8.0"
},
"require-dev": {
"doctrine/coding-standard": "8.2.0",
"jetbrains/phpstorm-stubs": "2020.2",
"phpstan/phpstan": "0.12.81",
"phpunit/phpunit": "^7.5.20|^8.5|9.5.0",
"phpstan/phpstan-strict-rules": "^0.12.2",
"phpunit/phpunit": "9.5.0",
"psalm/plugin-phpunit": "0.13.0",
"squizlabs/php_codesniffer": "3.6.0",
"symfony/console": "^2.0.5|^3.0|^4.0|^5.0",
"vimeo/psalm": "4.6.4"
@ -448,7 +523,7 @@
"type": "library",
"autoload": {
"psr-4": {
"Doctrine\\DBAL\\": "lib/Doctrine/DBAL"
"Doctrine\\DBAL\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@ -491,14 +566,13 @@
"queryobject",
"sasql",
"sql",
"sqlanywhere",
"sqlite",
"sqlserver",
"sqlsrv"
],
"support": {
"issues": "https://github.com/doctrine/dbal/issues",
"source": "https://github.com/doctrine/dbal/tree/2.13.1"
"source": "https://github.com/doctrine/dbal/tree/3.1.0"
},
"funding": [
{
@ -514,7 +588,7 @@
"type": "tidelift"
}
],
"time": "2021-04-17T17:30:19+00:00"
"time": "2021-04-19T17:51:23+00:00"
},
{
"name": "doctrine/deprecations",
@ -4286,28 +4360,28 @@
"source": {
"type": "git",
"url": "https://github.com/realodix/php-utility.git",
"reference": "ff12dcf29e19edeb46b78345f48c4e9bc53df0eb"
"reference": "b904fce2dc6fd06c345155f996737d79845c8b23"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/realodix/php-utility/zipball/ff12dcf29e19edeb46b78345f48c4e9bc53df0eb",
"reference": "ff12dcf29e19edeb46b78345f48c4e9bc53df0eb",
"url": "https://api.github.com/repos/realodix/php-utility/zipball/b904fce2dc6fd06c345155f996737d79845c8b23",
"reference": "b904fce2dc6fd06c345155f996737d79845c8b23",
"shasum": ""
},
"require": {
"egulias/email-validator": "^2.1",
"nicebooks/isbn": "^0.2.67",
"nicebooks/isbn": "^0.2.85",
"php": "^8.0",
"ramsey/uuid": "^4.1",
"spatie/url": "^1.3",
"symfony/polyfill-php74": "^1.18",
"spatie/url": "^2.0",
"voku/portable-utf8": "^5.4"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.16",
"kubawerlos/php-cs-fixer-custom-fixers": "^2.3",
"friendsofphp/php-cs-fixer": "^2.18",
"kubawerlos/php-cs-fixer-custom-fixers": "^2.4",
"nunomaduro/phpinsights": "dev-master",
"phpstan/phpstan": "^0.12.42",
"phpunit/phpunit": "^8.4|^9"
"phpunit/phpunit": "^9"
},
"default-branch": true,
"type": "library",
@ -4345,7 +4419,7 @@
"issues": "https://github.com/realodix/php-utility/issues",
"source": "https://github.com/realodix/php-utility/tree/main"
},
"time": "2021-04-25T13:15:11+00:00"
"time": "2021-05-01T12:27:37+00:00"
},
{
"name": "spatie/laravel-permission",
@ -4427,20 +4501,20 @@
},
{
"name": "spatie/macroable",
"version": "1.0.1",
"version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/spatie/macroable.git",
"reference": "7a99549fc001c925714b329220dea680c04bfa48"
"reference": "ec2c320f932e730607aff8052c44183cf3ecb072"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/macroable/zipball/7a99549fc001c925714b329220dea680c04bfa48",
"reference": "7a99549fc001c925714b329220dea680c04bfa48",
"url": "https://api.github.com/repos/spatie/macroable/zipball/ec2c320f932e730607aff8052c44183cf3ecb072",
"reference": "ec2c320f932e730607aff8052c44183cf3ecb072",
"shasum": ""
},
"require": {
"php": "^7.2|^8.0"
"php": "^8.0"
},
"require-dev": {
"phpunit/phpunit": "^8.0|^9.3"
@ -4471,31 +4545,31 @@
],
"support": {
"issues": "https://github.com/spatie/macroable/issues",
"source": "https://github.com/spatie/macroable/tree/1.0.1"
"source": "https://github.com/spatie/macroable/tree/2.0.0"
},
"time": "2020-11-03T10:15:05+00:00"
"time": "2021-03-26T22:39:02+00:00"
},
{
"name": "spatie/url",
"version": "1.3.5",
"version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/spatie/url.git",
"reference": "3633de58e0709ea98cecceff61ee51caf1fde7e3"
"reference": "8d996c2e69a02683908d12b439b96c60268ed085"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/url/zipball/3633de58e0709ea98cecceff61ee51caf1fde7e3",
"reference": "3633de58e0709ea98cecceff61ee51caf1fde7e3",
"url": "https://api.github.com/repos/spatie/url/zipball/8d996c2e69a02683908d12b439b96c60268ed085",
"reference": "8d996c2e69a02683908d12b439b96c60268ed085",
"shasum": ""
},
"require": {
"php": "^7.2|^8.0",
"php": "^8.0",
"psr/http-message": "^1.0",
"spatie/macroable": "^1.0.1"
"spatie/macroable": "^2.0"
},
"require-dev": {
"phpunit/phpunit": "^8.0|^9.3"
"phpunit/phpunit": "^9.5"
},
"type": "library",
"autoload": {
@ -4523,9 +4597,19 @@
],
"support": {
"issues": "https://github.com/spatie/url/issues",
"source": "https://github.com/spatie/url/tree/1.3.5"
"source": "https://github.com/spatie/url/tree/2.0.0"
},
"time": "2020-11-03T10:36:20+00:00"
"funding": [
{
"url": "https://spatie.be/open-source/support-us",
"type": "custom"
},
{
"url": "https://github.com/spatie",
"type": "github"
}
],
"time": "2021-03-31T10:15:44+00:00"
},
{
"name": "swiftmailer/swiftmailer",
@ -6117,86 +6201,6 @@
],
"time": "2021-01-07T16:49:33+00:00"
},
{
"name": "symfony/polyfill-php74",
"version": "v1.22.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php74.git",
"reference": "577e147350331efeb816897e004d85e6e765daaf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php74/zipball/577e147350331efeb816897e004d85e6e765daaf",
"reference": "577e147350331efeb816897e004d85e6e765daaf",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.22-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Php74\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Ion Bazan",
"email": "ion.bazan@gmail.com"
},
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 7.4+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php74/tree/v1.22.1"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-01-07T16:49:33+00:00"
},
{
"name": "symfony/polyfill-php80",
"version": "v1.22.1",
@ -7980,16 +7984,16 @@
},
{
"name": "facade/flare-client-php",
"version": "1.7.0",
"version": "1.8.0",
"source": {
"type": "git",
"url": "https://github.com/facade/flare-client-php.git",
"reference": "6bf380035890cb0a09b9628c491ae3866b858522"
"reference": "69742118c037f34ee1ef86dc605be4a105d9e984"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/facade/flare-client-php/zipball/6bf380035890cb0a09b9628c491ae3866b858522",
"reference": "6bf380035890cb0a09b9628c491ae3866b858522",
"url": "https://api.github.com/repos/facade/flare-client-php/zipball/69742118c037f34ee1ef86dc605be4a105d9e984",
"reference": "69742118c037f34ee1ef86dc605be4a105d9e984",
"shasum": ""
},
"require": {
@ -8033,7 +8037,7 @@
],
"support": {
"issues": "https://github.com/facade/flare-client-php/issues",
"source": "https://github.com/facade/flare-client-php/tree/1.7.0"
"source": "https://github.com/facade/flare-client-php/tree/1.8.0"
},
"funding": [
{
@ -8041,7 +8045,7 @@
"type": "github"
}
],
"time": "2021-04-12T09:30:36+00:00"
"time": "2021-04-30T11:11:50+00:00"
},
{
"name": "facade/ignition",
@ -8827,16 +8831,16 @@
},
{
"name": "nunomaduro/larastan",
"version": "v0.6.13",
"version": "v0.7.5",
"source": {
"type": "git",
"url": "https://github.com/nunomaduro/larastan.git",
"reference": "7a047f7974e6e16d04ee038d86e2c5e6c59e9dfe"
"reference": "ba865c6683552608bc2360a459925abeda45a4cc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nunomaduro/larastan/zipball/7a047f7974e6e16d04ee038d86e2c5e6c59e9dfe",
"reference": "7a047f7974e6e16d04ee038d86e2c5e6c59e9dfe",
"url": "https://api.github.com/repos/nunomaduro/larastan/zipball/ba865c6683552608bc2360a459925abeda45a4cc",
"reference": "ba865c6683552608bc2360a459925abeda45a4cc",
"shasum": ""
},
"require": {
@ -8851,7 +8855,7 @@
"illuminate/support": "^6.0 || ^7.0 || ^8.0 || ^9.0",
"mockery/mockery": "^0.9 || ^1.0",
"php": "^7.2 || ^8.0",
"phpstan/phpstan": "^0.12.65",
"phpstan/phpstan": "^0.12.83",
"symfony/process": "^4.3 || ^5.0"
},
"require-dev": {
@ -8900,7 +8904,7 @@
],
"support": {
"issues": "https://github.com/nunomaduro/larastan/issues",
"source": "https://github.com/nunomaduro/larastan/tree/v0.6.13"
"source": "https://github.com/nunomaduro/larastan/tree/v0.7.5"
},
"funding": [
{
@ -8920,7 +8924,7 @@
"type": "patreon"
}
],
"time": "2021-01-22T12:51:26+00:00"
"time": "2021-04-29T14:43:35+00:00"
},
{
"name": "phar-io/manifest",

@ -2,7 +2,7 @@
[![MadeWithLaravel.com shield](https://madewithlaravel.com/storage/repo-shields/1049-shield.svg)](https://madewithlaravel.com/p/plur/shield-link)
[![LaravelVersion](https://img.shields.io/badge/Laravel-8-f56857.svg?style=flat-square)](https://laravel.com/docs/8.x)
![PHPVersion](https://img.shields.io/badge/PHP-7.4%20|%208-777BB4.svg?style=flat-square)
![PHPVersion](https://img.shields.io/badge/PHP-8-777BB4.svg?style=flat-square)
[![GitHub license](https://img.shields.io/github/license/realodix/newt.svg?style=flat-square)](https://github.com/realodix/newt/blob/master/LICENSE) <br>
[![StyleCI shield](https://github.styleci.io/repos/146186200/shield)](https://github.styleci.io/repos/146186200)
[![Build Status](https://travis-ci.org/realodix/urlhub.svg?branch=master)](https://travis-ci.org/realodix/urlhub)
@ -37,7 +37,7 @@ UrlHub was created, and is maintained by [Budi Hermawan](https://github.com/real
## Requirements
* All requirements by [Laravel](https://laravel.com/docs/installation#server-requirements) & dependencies - PHP >= 7.3, [Composer](https://getcomposer.org/) and such.
* All requirements by [Laravel](https://laravel.com/docs/installation#server-requirements) & dependencies - PHP >= 8.0, [Composer](https://getcomposer.org/) and such.
* MySQL or MariaDB.

Loading…
Cancel
Save