diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 2a172a0..8b04e81 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -34,6 +34,9 @@ 'error_suppression' => true, 'ereg_to_preg' => true, 'dir_constant' => true, + 'string_implicit_backslashes' => [ + 'single_quoted' => 'ignore', + ], ]) ->setFinder($finder) ->setCacheFile('.php-cs-fixer.cache') // forward compatibility with 3.x line diff --git a/src/Dockerfile.php b/src/Dockerfile.php index 6308ad4..59f85f8 100644 --- a/src/Dockerfile.php +++ b/src/Dockerfile.php @@ -12,7 +12,7 @@ final class Dockerfile implements \IteratorAggregate, \Countable, FileInterface, /** @var iterable|Dockerfile\LayerInterface[] */ private iterable $layers; - public function __construct(null|LayerInterface ...$layers) + public function __construct(?LayerInterface ...$layers) { $this->layers = $layers; } diff --git a/src/PHP/ComposerAuthenticationToken.php b/src/PHP/ComposerAuthenticationToken.php index 76a3df4..f5045fd 100644 --- a/src/PHP/ComposerAuthenticationToken.php +++ b/src/PHP/ComposerAuthenticationToken.php @@ -6,6 +6,7 @@ use Kiboko\Component\Dockerfile\Dockerfile; +/** @deprecated */ final readonly class ComposerAuthenticationToken implements Dockerfile\LayerInterface, \Stringable { public function __construct( diff --git a/src/PHP/ComposerGithubOauthAuthentication.php b/src/PHP/ComposerGithubOauthAuthentication.php new file mode 100644 index 0000000..1c34ce2 --- /dev/null +++ b/src/PHP/ComposerGithubOauthAuthentication.php @@ -0,0 +1,24 @@ +domain, $this->token)); + } +} diff --git a/src/PHP/ComposerGitlabOauthAuthentication.php b/src/PHP/ComposerGitlabOauthAuthentication.php new file mode 100644 index 0000000..03cdb61 --- /dev/null +++ b/src/PHP/ComposerGitlabOauthAuthentication.php @@ -0,0 +1,24 @@ +domain, $this->token)); + } +} diff --git a/src/PHP/ComposerGitlabTokenAuthentication.php b/src/PHP/ComposerGitlabTokenAuthentication.php new file mode 100644 index 0000000..bd8414e --- /dev/null +++ b/src/PHP/ComposerGitlabTokenAuthentication.php @@ -0,0 +1,24 @@ +domain, $this->token)); + } +} diff --git a/src/PHP/ComposerHttpBasicAuthentication.php b/src/PHP/ComposerHttpBasicAuthentication.php new file mode 100644 index 0000000..b670442 --- /dev/null +++ b/src/PHP/ComposerHttpBasicAuthentication.php @@ -0,0 +1,25 @@ +domain, $this->username, $this->password)); + } +} diff --git a/src/PHP/ComposerHttpBearerAuthentication.php b/src/PHP/ComposerHttpBearerAuthentication.php new file mode 100644 index 0000000..dd4f74d --- /dev/null +++ b/src/PHP/ComposerHttpBearerAuthentication.php @@ -0,0 +1,24 @@ +domain, $this->token)); + } +}