aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-01-03 02:00:02 +0900
committernsfisis <nsfisis@gmail.com>2024-01-03 02:04:22 +0900
commit5b4652d080c7eae26f8aac482468a6777ad9defe (patch)
treed871440fa20cd531f72f52ed1a0d9d95b4db49a7
parent168104e90dd45e8de71ab209a646a6a642cce471 (diff)
downloadphp-waddiwasi-5b4652d080c7eae26f8aac482468a6777ad9defe.tar.gz
php-waddiwasi-5b4652d080c7eae26f8aac482468a6777ad9defe.tar.zst
php-waddiwasi-5b4652d080c7eae26f8aac482468a6777ad9defe.zip
chore: set up basic Composer packages
-rw-r--r--.gitignore1
-rw-r--r--LICENSE9
-rw-r--r--composer.json31
-rw-r--r--composer.lock236
-rw-r--r--ecs.php16
-rw-r--r--phpstan.neon10
6 files changed, 303 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..57872d0
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/vendor/
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..f5f41ab
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright 2024 nsfisis
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..455d17b
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,31 @@
+{
+ "name": "nsfisis/waddiwasi",
+ "type": "project",
+ "description": "WebAssembly interpreter written in pure PHP",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "nsfisis"
+ }
+ ],
+ "autoload": {
+ "psr-4": {
+ "Nsfisis\\Waddiwasi\\": "src/"
+ }
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^1.10.50",
+ "phpstan/phpstan-deprecation-rules": "^1.1.4",
+ "phpstan/phpstan-strict-rules": "^1.5.2",
+ "symplify/easy-coding-standard": "^12.0.13"
+ },
+ "config": {
+ "preferred-install": "dist",
+ "sort-packages": true
+ },
+ "scripts": {
+ "ecs": "ecs check",
+ "ecsfix": "ecs check --fix",
+ "phpstan": "phpstan analyse"
+ }
+}
diff --git a/composer.lock b/composer.lock
new file mode 100644
index 0000000..487fcd1
--- /dev/null
+++ b/composer.lock
@@ -0,0 +1,236 @@
+{
+ "_readme": [
+ "This file locks the dependencies of your project to a known state",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
+ "This file is @generated automatically"
+ ],
+ "content-hash": "1f1c3e607fbdbb101d376d23cec463f5",
+ "packages": [],
+ "packages-dev": [
+ {
+ "name": "phpstan/phpstan",
+ "version": "1.10.50",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpstan/phpstan.git",
+ "reference": "06a98513ac72c03e8366b5a0cb00750b487032e4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/06a98513ac72c03e8366b5a0cb00750b487032e4",
+ "reference": "06a98513ac72c03e8366b5a0cb00750b487032e4",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2|^8.0"
+ },
+ "conflict": {
+ "phpstan/phpstan-shim": "*"
+ },
+ "bin": [
+ "phpstan",
+ "phpstan.phar"
+ ],
+ "type": "library",
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "PHPStan - PHP Static Analysis Tool",
+ "keywords": [
+ "dev",
+ "static analysis"
+ ],
+ "support": {
+ "docs": "https://phpstan.org/user-guide/getting-started",
+ "forum": "https://github.com/phpstan/phpstan/discussions",
+ "issues": "https://github.com/phpstan/phpstan/issues",
+ "security": "https://github.com/phpstan/phpstan/security/policy",
+ "source": "https://github.com/phpstan/phpstan-src"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/ondrejmirtes",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/phpstan",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2023-12-13T10:59:42+00:00"
+ },
+ {
+ "name": "phpstan/phpstan-deprecation-rules",
+ "version": "1.1.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpstan/phpstan-deprecation-rules.git",
+ "reference": "089d8a8258ed0aeefdc7b68b6c3d25572ebfdbaa"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/089d8a8258ed0aeefdc7b68b6c3d25572ebfdbaa",
+ "reference": "089d8a8258ed0aeefdc7b68b6c3d25572ebfdbaa",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2 || ^8.0",
+ "phpstan/phpstan": "^1.10.3"
+ },
+ "require-dev": {
+ "php-parallel-lint/php-parallel-lint": "^1.2",
+ "phpstan/phpstan-php-parser": "^1.1",
+ "phpstan/phpstan-phpunit": "^1.0",
+ "phpunit/phpunit": "^9.5"
+ },
+ "type": "phpstan-extension",
+ "extra": {
+ "phpstan": {
+ "includes": [
+ "rules.neon"
+ ]
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PHPStan\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.",
+ "support": {
+ "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues",
+ "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/1.1.4"
+ },
+ "time": "2023-08-05T09:02:04+00:00"
+ },
+ {
+ "name": "phpstan/phpstan-strict-rules",
+ "version": "1.5.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpstan/phpstan-strict-rules.git",
+ "reference": "7a50e9662ee9f3942e4aaaf3d603653f60282542"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/7a50e9662ee9f3942e4aaaf3d603653f60282542",
+ "reference": "7a50e9662ee9f3942e4aaaf3d603653f60282542",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2 || ^8.0",
+ "phpstan/phpstan": "^1.10.34"
+ },
+ "require-dev": {
+ "nikic/php-parser": "^4.13.0",
+ "php-parallel-lint/php-parallel-lint": "^1.2",
+ "phpstan/phpstan-deprecation-rules": "^1.1",
+ "phpstan/phpstan-phpunit": "^1.0",
+ "phpunit/phpunit": "^9.5"
+ },
+ "type": "phpstan-extension",
+ "extra": {
+ "phpstan": {
+ "includes": [
+ "rules.neon"
+ ]
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PHPStan\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Extra strict and opinionated rules for PHPStan",
+ "support": {
+ "issues": "https://github.com/phpstan/phpstan-strict-rules/issues",
+ "source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.5.2"
+ },
+ "time": "2023-10-30T14:35:06+00:00"
+ },
+ {
+ "name": "symplify/easy-coding-standard",
+ "version": "12.0.13",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/easy-coding-standard/easy-coding-standard.git",
+ "reference": "d15707b14d50b7cb6d656f7a7a5e5b9a17099b3c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/easy-coding-standard/easy-coding-standard/zipball/d15707b14d50b7cb6d656f7a7a5e5b9a17099b3c",
+ "reference": "d15707b14d50b7cb6d656f7a7a5e5b9a17099b3c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2"
+ },
+ "conflict": {
+ "friendsofphp/php-cs-fixer": "<3.0",
+ "phpcsstandards/php_codesniffer": "<3.6",
+ "symplify/coding-standard": "<11.3"
+ },
+ "bin": [
+ "bin/ecs"
+ ],
+ "type": "library",
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Use Coding Standard with 0-knowledge of PHP-CS-Fixer and PHP_CodeSniffer",
+ "keywords": [
+ "Code style",
+ "automation",
+ "fixer",
+ "static analysis"
+ ],
+ "support": {
+ "issues": "https://github.com/easy-coding-standard/easy-coding-standard/issues",
+ "source": "https://github.com/easy-coding-standard/easy-coding-standard/tree/12.0.13"
+ },
+ "funding": [
+ {
+ "url": "https://www.paypal.me/rectorphp",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/tomasvotruba",
+ "type": "github"
+ }
+ ],
+ "time": "2023-12-07T09:18:07+00:00"
+ }
+ ],
+ "aliases": [],
+ "minimum-stability": "stable",
+ "stability-flags": [],
+ "prefer-stable": false,
+ "prefer-lowest": false,
+ "platform": [],
+ "platform-dev": [],
+ "plugin-api-version": "2.6.0"
+}
diff --git a/ecs.php b/ecs.php
new file mode 100644
index 0000000..086f569
--- /dev/null
+++ b/ecs.php
@@ -0,0 +1,16 @@
+<?php
+
+declare(strict_types=1);
+
+use Symplify\EasyCodingStandard\Config\ECSConfig;
+use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
+
+return function (ECSConfig $ecsConfig): void {
+ $ecsConfig->paths([
+ __DIR__ . '/src',
+ ]);
+ $ecsConfig->sets([
+ SetList::CLEAN_CODE,
+ SetList::PSR_12,
+ ]);
+};
diff --git a/phpstan.neon b/phpstan.neon
new file mode 100644
index 0000000..01f5da6
--- /dev/null
+++ b/phpstan.neon
@@ -0,0 +1,10 @@
+includes:
+ - phar://phpstan.phar/conf/bleedingEdge.neon
+ - vendor/phpstan/phpstan-deprecation-rules/rules.neon
+ - vendor/phpstan/phpstan-strict-rules/rules.neon
+
+parameters:
+ level: max
+ tipsOfTheDay: false
+ paths:
+ - src