Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
on:
workflow_dispatch: ~
push:
branches: ['main', '*.*.x']
pull_request: ~

jobs:
check:
uses: thesisphp/.github/.github/workflows/check.yml@main
uses: thesis-php/.github/.github/workflows/check.yml@main
secrets: inherit
4 changes: 3 additions & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
->setParallelConfig(ParallelConfigFactory::detect())
->setCacheFile(__DIR__ . '/var/' . basename(__FILE__) . '.cache');

(new PhpCsFixerCodingStandard())->applyTo($config);
(new PhpCsFixerCodingStandard())->applyTo($config, [
'numeric_literal_separator' => false,
]);

return $config;
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
UID := $(shell id -u)
GID := $(shell id -g)

build:
docker compose build --build-arg UID=$(UID) --build-arg GID=$(GID)

up: build
docker compose up -d

down:
docker compose down --remove-orphans

php:
docker compose exec php bash
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ declare(strict_types=1);

require_once __DIR__.'/vendor/autoload.php';

use Thesis\Endian\endian;
use Thesis\Endian;

echo endian::network->unpackInt32(
endian::network->packInt32(-200),
echo Endian\Order::network->unpackInt32(
Endian\Order::network->packInt32(-200),
); // -200
```

Expand All @@ -37,10 +37,10 @@ declare(strict_types=1);

require_once __DIR__.'/vendor/autoload.php';

use Thesis\Endian\endian;
use Thesis\Endian;

echo endian::big->unpackInt8(
endian::big->packInt8(17),
echo Endian\Order::big->unpackInt8(
Endian\Order::big->packInt8(17),
); // 17
```

Expand All @@ -53,10 +53,10 @@ declare(strict_types=1);

require_once __DIR__.'/vendor/autoload.php';

use Thesis\Endian\endian;
use Thesis\Endian;

echo endian::little->unpackFloat(
endian::little->packFloat(2.2),
echo Endian\Order::little->unpackFloat(
Endian\Order::little->packFloat(2.2),
); // 2.2
```

Expand All @@ -69,10 +69,10 @@ declare(strict_types=1);

require_once __DIR__.'/vendor/autoload.php';

use Thesis\Endian\endian;
use Thesis\Endian;

echo endian::native->unpackInt64(
endian::native->packInt64(\PHP_INT_MAX),
echo Endian\Order::native->unpackInt64(
Endian\Order::native->packInt64(\PHP_INT_MAX),
); // 9223372036854775807
```

Expand Down
16 changes: 9 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2",
"ergebnis/composer-normalize": "^2.45.0",
"phpunit/phpunit": "^10.5.40"
"ergebnis/composer-normalize": "^2.48.2",
"phpunit/phpunit": "^10.5.58"
},
"minimum-stability": "stable",
"autoload": {
Expand Down Expand Up @@ -58,21 +58,23 @@
}
},
"scripts": {
"analyse-deps": "tools/composer-dependency-analyser/vendor/bin/composer-dependency-analyser",
"check": [
"@composer fixcs -- --dry-run",
"@composer rector -- --dry-run",
"@phpstan",
"@test",
"@composer validate",
"@composer normalize --dry-run",
"@check-require",
"@check-unused"
"@analyse-deps",
"@test"
],
"check-require": "tools/composer-require-checker/vendor/bin/composer-require-checker",
"check-unused": "tools/composer-unused/vendor/bin/composer-unused",
"fixcs": "tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --diff --verbose",
"infection": "tools/infection/vendor/bin/infection --show-mutations",
"normalize": "@composer bin composer-normalize normalize --diff ../../composer.json",
"phpstan": "tools/phpstan/vendor/bin/phpstan analyze",
"pre-command-run": "mkdir -p var",
"psalm": "tools/psalm/vendor/bin/psalm --show-info --no-diff --no-cache",
"rector": "tools/rector/vendor/bin/rector process",
"test": "phpunit"
}
}
Loading
Loading