-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #179 from shlinkio/develop
Release 8.3.0
- Loading branch information
Showing
75 changed files
with
688 additions
and
848 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
source: { | ||
directories: [ | ||
'src' | ||
] | ||
}, | ||
timeout: 5, | ||
logs: { | ||
text: 'build/infection/infection-log.txt', | ||
html: 'build/infection/infection-log.html', | ||
summary: 'build/infection/summary-log.txt', | ||
debug: 'build/infection/debug-log.txt', | ||
stryker: { | ||
report: 'develop' | ||
} | ||
}, | ||
tmpDir: 'build/infection/temp', | ||
phpUnit: { | ||
configDir: '.' | ||
}, | ||
mutators: { | ||
'@default': true, | ||
IdenticalEqual: false, | ||
NotIdenticalNotEqual: false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
includes: | ||
- vendor/phpstan/phpstan-phpunit/extension.neon | ||
- vendor/phpstan/phpstan-phpunit/rules.neon | ||
parameters: | ||
checkMissingIterableValueType: false | ||
checkGenericClassInNonGenericObjectType: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
src/Config/Option/UrlShortener/ShortUrlModeConfigOption.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Shlinkio\Shlink\Installer\Config\Option\UrlShortener; | ||
|
||
use Shlinkio\Shlink\Installer\Config\Option\BaseConfigOption; | ||
use Symfony\Component\Console\Style\StyleInterface; | ||
|
||
use const PHP_EOL; | ||
|
||
class ShortUrlModeConfigOption extends BaseConfigOption | ||
{ | ||
private const MODES = [ | ||
'strict' => 'Short codes and custom slugs will be matched in a case-sensitive way ("foo" !== "FOO"). ' | ||
. 'Generated short codes will include lowercase letters, uppercase letters and numbers.', | ||
'loosely' => 'Short codes and custom slugs will be matched in a case-insensitive way ("foo" === "FOO"). ' | ||
. 'Generated short codes will include only lowercase letters and numbers.', | ||
]; | ||
|
||
public function getEnvVar(): string | ||
{ | ||
return 'SHORT_URL_MODE'; | ||
} | ||
|
||
public function ask(StyleInterface $io, array $currentOptions): string | ||
{ | ||
$options = self::MODES; | ||
return $io->choice( | ||
'How do you want short URLs to be matched?' | ||
. PHP_EOL | ||
. '<options=bold;fg=yellow> Warning!</> <comment>This feature is experimental. It only applies to public ' | ||
. 'routes (short URLs and QR codes). REST API routes always use strict match.</comment>' | ||
. PHP_EOL, | ||
$options, | ||
'strict', | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.