Skip to content

Commit

Permalink
Merge branch 'release/4.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
eliashaeussler committed Sep 29, 2023
2 parents 5f8ee54 + c99465b commit 76bd133
Show file tree
Hide file tree
Showing 36 changed files with 94 additions and 92 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,6 @@ jobs:
- name: Create release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.RELEASE_TOKEN }}
generateReleaseNotes: true
artifacts: .build/frontend-asset-handler.phar,.build/frontend-asset-handler.phar.asc
2 changes: 1 addition & 1 deletion .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
$config->setRiskyAllowed(true);

return $config->setRules([
'@PSR2' => true,
'@PER-CS' => true,
'@Symfony' => true,
'native_function_invocation' => true,
'global_namespace_import' => ['import_classes' => true, 'import_functions' => true],
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"require-dev": {
"armin/editorconfig-cli": "^1.5",
"ergebnis/composer-normalize": "^2.18",
"friendsofphp/php-cs-fixer": "^3.0",
"friendsofphp/php-cs-fixer": "^3.29",
"gmostafa/php-graphql-client": "^1.13",
"phpstan/extension-installer": "^1.2",
"phpstan/phpstan": "^1.2",
Expand All @@ -50,7 +50,7 @@
"phpstan/phpstan-symfony": "^1.1",
"phpstan/phpstan-webmozart-assert": "^1.2",
"phpunit/phpunit": "^10.1",
"rector/rector": "^0.15.0 || ^0.16.0 || ^0.17.0 || ^0.18.0"
"rector/rector": "^0.18.0"
},
"suggest": {
"gmostafa/php-graphql-client": "Used to perform GraphQL requests within GithubVcsProvider (^1.13)"
Expand Down
54 changes: 27 additions & 27 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions src/Asset/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ class Asset
public function __construct(
protected Definition\Source $source,
protected ?Definition\Target $target = null,
) {
}
) {}

public function getSource(): Definition\Source
{
Expand Down
3 changes: 1 addition & 2 deletions src/Asset/Definition/AssetDefinitionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ final class AssetDefinitionFactory
{
public function __construct(
private readonly Asset\Environment\Map\MapFactory $mapFactory,
) {
}
) {}

/**
* @param array{environments?: array<string, mixed>, source?: array<string, mixed>} $config
Expand Down
3 changes: 1 addition & 2 deletions src/Asset/Environment/EnvironmentResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ class EnvironmentResolver

public function __construct(
protected readonly Map $map,
) {
}
) {}

public function resolve(string $branch): string
{
Expand Down
3 changes: 1 addition & 2 deletions src/Asset/Environment/Map/MapFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ final class MapFactory
*/
public function __construct(
private readonly array $transformers,
) {
}
) {}

public static function createDefault(string $version = null): Map
{
Expand Down
3 changes: 1 addition & 2 deletions src/Asset/Environment/Map/Pair.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ final class Pair
public function __construct(
private readonly string $inputPattern,
private readonly TransformerInterface $transformer,
) {
}
) {}

public function transform(string $branch): ?string
{
Expand Down
3 changes: 1 addition & 2 deletions src/Asset/Environment/Transformer/StaticTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ final class StaticTransformer implements TransformerInterface
{
public function __construct(
private readonly string $value,
) {
}
) {}

/**
* @param array{value?: string} $config
Expand Down
3 changes: 1 addition & 2 deletions src/Asset/Environment/Transformer/VersionTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ final class VersionTransformer implements TransformerInterface
{
public function __construct(
private readonly string $version,
) {
}
) {}

/**
* @param array{version?: string} $config
Expand Down
3 changes: 1 addition & 2 deletions src/Asset/Revision/RevisionProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ class RevisionProvider
public function __construct(
protected readonly ClientInterface $client,
protected readonly Filesystem\Filesystem $filesystem,
) {
}
) {}

public function getRevision(Asset\Definition\AssetDefinition $definition): ?Revision
{
Expand Down
3 changes: 1 addition & 2 deletions src/Config/ConfigFacade.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ final class ConfigFacade
public function __construct(
private readonly iterable $loaders,
private readonly iterable $writers,
) {
}
) {}

public function load(string $file): Config
{
Expand Down
3 changes: 1 addition & 2 deletions src/Config/Initialization/InitializationRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ public function __construct(
private string $configFile,
private array $options = [],
private readonly ?Console\Input\InputInterface $input = null,
) {
}
) {}

/**
* @throws Exception\MissingConfigurationException
Expand Down
3 changes: 1 addition & 2 deletions src/Config/Parser/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ class Parser
public function __construct(
protected readonly Value\ValueProcessor $valueProcessor,
protected readonly Json\SchemaValidator $validator,
) {
}
) {}

/**
* @throws Exception\InvalidConfigurationException
Expand Down
3 changes: 1 addition & 2 deletions src/Config/Parser/ParserInstructions.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ class ParserInstructions

public function __construct(
protected Config\Config $config,
) {
}
) {}

public function getConfig(): Config\Config
{
Expand Down
3 changes: 1 addition & 2 deletions src/Config/Writer/AbstractJsonFileWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ abstract class AbstractJsonFileWriter implements ConfigWriterInterface
{
public function __construct(
protected readonly Normalizer\Format\Formatter $formatter,
) {
}
) {}

/**
* @return array{Json\Json, Normalizer\Format\Format}
Expand Down
3 changes: 1 addition & 2 deletions src/Console/Input/Validator/ChainedValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ final class ChainedValidator implements ValidatorInterface
*/
public function __construct(
private readonly array $validators,
) {
}
) {}

public function validate(mixed $value): mixed
{
Expand Down
3 changes: 1 addition & 2 deletions src/Console/Output/Progress/TrackableProgress.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ final class TrackableProgress
public function __construct(
private readonly Console\Output\ConsoleOutputInterface $output,
private readonly string $text,
) {
}
) {}

public function start(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@
*/
final class ContainerBuilderDebugDumpPass implements DependencyInjection\Compiler\CompilerPassInterface
{
public function __construct(private readonly string $cachePath)
{
}
public function __construct(private readonly string $cachePath) {}

public function process(DependencyInjection\ContainerBuilder $container): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ final class NonSharedServicePass implements DependencyInjection\Compiler\Compile
{
public function __construct(
private readonly string $tagName,
) {
}
) {}

public function process(DependencyInjection\ContainerBuilder $container): void
{
Expand Down
15 changes: 15 additions & 0 deletions src/Helper/FilesystemHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@

use function getcwd;
use function ltrim;
use function pathinfo;
use function register_shutdown_function;
use function str_ends_with;
use function strtolower;
use function substr;

/**
* FilesystemHelper.
Expand Down Expand Up @@ -133,6 +137,17 @@ public static function createTemporaryFile(string $extension = '', bool $filenam
return $tempFile;
}

public static function getFileExtension(string $path): string
{
$normalizedPath = strtolower($path);

if (str_ends_with($normalizedPath, '.gz')) {
return pathinfo(substr($normalizedPath, 0, -3), PATHINFO_EXTENSION).'.gz';
}

return pathinfo($normalizedPath, PATHINFO_EXTENSION);
}

private static function getFilesystem(): Filesystem\Filesystem
{
if (null === self::$filesystem) {
Expand Down
Loading

0 comments on commit 76bd133

Please sign in to comment.