Skip to content

Commit

Permalink
feat(dev): New package (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
LastDragon-ru authored Mar 24, 2024
2 parents d2c7592 + fc651eb commit 3eb52ac
Show file tree
Hide file tree
Showing 29 changed files with 1,641 additions and 1,126 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ This package contains useful utilities and classes.

[Read more](<packages/core/README.md>).

## Dev 🐝

Various tools and helpers to develop the package.

[Read more](<packages/dev/README.md>).

## Documentator

This package provides various utilities for documentation generation.
Expand Down
1 change: 1 addition & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Please also see [changelog](https://github.com/LastDragon-ru/lara-asp/releases)
[//]: # (warning: Generated automatically. Do not edit.)

* [Core](<packages/core/UPGRADE.md>)
* [Dev 🐝](<packages/dev/UPGRADE.md>)
* [Documentator](<packages/documentator/UPGRADE.md>)
* [Eloquent Helpers](<packages/eloquent/UPGRADE.md>)
* [Formatter](<packages/formatter/UPGRADE.md>)
Expand Down
10 changes: 9 additions & 1 deletion composer-require-checker.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
"Illuminate\\Foundation\\Testing\\RefreshDatabaseState",
"Illuminate\\Foundation\\Testing\\TestCase",
"LastDragon_ru\\LaraASP\\GraphQLPrinter\\Testing\\Package\\GraphQLAstNode",
"LastDragon_ru\\LaraASP\\GraphQLPrinter\\Testing\\Package\\GraphQLDefinition"
"LastDragon_ru\\LaraASP\\GraphQLPrinter\\Testing\\Package\\GraphQLDefinition",
"PHPStan\\Analyser\\Scope",
"PHPStan\\Node\\InClassNode",
"PHPStan\\Reflection\\ClassReflection",
"PHPStan\\Reflection\\MethodReflection",
"PHPStan\\Rules\\Rule",
"PHPStan\\Rules\\RuleErrorBuilder",
"PHPStan\\Type\\DynamicMethodReturnTypeExtension",
"PHPStan\\Type\\ObjectType"
]
}
4 changes: 1 addition & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@
},
"autoload": {
"exclude-from-classmap": [
"dev/**.php",
"packages/core/src/**Test.php",
"packages/core/src/Testing/**.php",
"packages/documentator/src/**Test.php",
Expand Down Expand Up @@ -151,10 +150,8 @@
"packages/testing/docs/"
],
"psr-4": {
"Larastan\\Larastan\\": "dev/Larastan",
"LastDragon_ru\\LaraASP\\Core\\Docs\\": "packages/core/docs",
"LastDragon_ru\\LaraASP\\Dev\\App\\": "dev/App",
"LastDragon_ru\\LaraASP\\Dev\\PhpStan\\": "dev/PhpStan",
"LastDragon_ru\\LaraASP\\Documentator\\Docs\\": "packages/documentator/docs",
"LastDragon_ru\\LaraASP\\Eloquent\\Docs\\": "packages/eloquent/docs",
"LastDragon_ru\\LaraASP\\Formatter\\Docs\\": "packages/formatter/docs",
Expand Down Expand Up @@ -261,6 +258,7 @@
"replace": {
"lastdragon-ru/lara-asp-core": "self.version",
"lastdragon-ru/lara-asp-documentator": "self.version",
"lastdragon-ru/lara-asp-dev": "self.version",
"lastdragon-ru/lara-asp-eloquent": "self.version",
"lastdragon-ru/lara-asp-formatter": "self.version",
"lastdragon-ru/lara-asp-graphql": "self.version",
Expand Down

This file was deleted.

This file was deleted.

1 change: 1 addition & 0 deletions monorepo-builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@

return static function (MBConfig $config): void {
$config->packageDirectories([__DIR__.'/packages']);
$config->packageDirectoriesExcludes(['dev']);
};
3 changes: 3 additions & 0 deletions packages/dev/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Changelog

Please see [Releases](https://github.com/LastDragon-ru/lara-asp/releases).
21 changes: 21 additions & 0 deletions packages/dev/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Aleksei Lebedev

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.
58 changes: 58 additions & 0 deletions packages/dev/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Dev 🐝

Various tools and helpers to develop the package.

[include:exec]: <../../dev/artisan lara-asp-documentator:requirements>
[//]: # (start: 876a9177c0e8e3722ac84e8f3888245fc9070a64a87dedfe7c9d9ba2a13b374b)
[//]: # (warning: Generated automatically. Do not edit.)

# Requirements

| Requirement | Constraint | Supported by |
|--------------|---------------------|------------------|
| PHP | `^8.3` | `HEAD` |
| | `^8.2` | `HEAD` |
| | `^8.1` | `HEAD` |
| PHPStan | `^1.10` | `HEAD` |

[//]: # (end: 876a9177c0e8e3722ac84e8f3888245fc9070a64a87dedfe7c9d9ba2a13b374b)

[include:template]: ../../docs/Shared/InstallationDev.md ({"data": {"package": "dev"}})
[//]: # (start: e7fd13bb6d43bcc48d9fe51411b607bee0e47ccbcb1b788889f59b733865e0f1)
[//]: # (warning: Generated automatically. Do not edit.)

# Installation

> [!NOTE]
>
> The package intended to use in dev.
```shell
composer require --dev lastdragon-ru/lara-asp-dev
```

[//]: # (end: e7fd13bb6d43bcc48d9fe51411b607bee0e47ccbcb1b788889f59b733865e0f1)

## Usage

_In progress_.

[include:file]: ../../docs/Shared/Upgrading.md
[//]: # (start: e9139abedb89f69284102c9112b548fd7add07cf196259916ea4f1c98977223b)
[//]: # (warning: Generated automatically. Do not edit.)

# Upgrading

Please follow [Upgrade Guide](UPGRADE.md).

[//]: # (end: e9139abedb89f69284102c9112b548fd7add07cf196259916ea4f1c98977223b)

[include:file]: ../../docs/Shared/Contributing.md
[//]: # (start: 057ec3a599c54447e95d6dd2e9f0f6a6621d9eb75446a5e5e471ba9b2f414b89)
[//]: # (warning: Generated automatically. Do not edit.)

# Contributing

This package is the part of Awesome Set of Packages for Laravel. Please use the [main repository](https://github.com/LastDragon-ru/lara-asp) to [report issues](https://github.com/LastDragon-ru/lara-asp/issues), send [pull requests](https://github.com/LastDragon-ru/lara-asp/pulls), or [ask questions](https://github.com/LastDragon-ru/lara-asp/discussions).

[//]: # (end: 057ec3a599c54447e95d6dd2e9f0f6a6621d9eb75446a5e5e471ba9b2f414b89)
28 changes: 28 additions & 0 deletions packages/dev/UPGRADE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Upgrade Guide

[include:file]: ../../docs/Shared/Upgrade.md
[//]: # (start: c70a9a43c0a80bd2e7fa6010a9b2c0fbcab4cb4d536d7a498216d9df7431f7e2)
[//]: # (warning: Generated automatically. Do not edit.)

## Instructions

1. Determine the current version (`composer info ...`)
2. Choose the wanted version
3. Follow the instructions
4. ??????
5. PROFIT

For example, if the current version is `2.x` and you want to migrate to `5.x`, you need to perform all steps in the following order:

* "Upgrade from v2"
* "Upgrade from v3"
* "Upgrade from v4"

Please also see [changelog](https://github.com/LastDragon-ru/lara-asp/releases) to find all changes.

## Legend

| 🤝 | Backward-compatible change. Please note that despite you can ignore it now, but it will be mandatory in the future. |
|:--:|:--------------------------------------------------------------------------------------------------------------------|

[//]: # (end: c70a9a43c0a80bd2e7fa6010a9b2c0fbcab4cb4d536d7a498216d9df7431f7e2)
51 changes: 51 additions & 0 deletions packages/dev/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"name": "lastdragon-ru/lara-asp-dev",
"homepage": "https://github.com/LastDragon-ru/lara-asp",
"description": "The Awesome Set of Packages for Laravel - Dev tools.",
"readme": "README.md",
"license": "MIT",
"type": "library",
"keywords": [
"php",
"dev",
"phpstan",
"phpstan-rule",
"phpstan-extension"
],
"support": {
"issues": "https://github.com/LastDragon-ru/lara-asp/issues",
"source": "https://github.com/LastDragon-ru/lara-asp",
"forum": "https://github.com/LastDragon-ru/lara-asp/discussions"
},
"require": {
"php": "^8.1|^8.2|^8.3",
"illuminate/container": "^10.34.0",
"illuminate/contracts": "^10.34.0",
"larastan/larastan": "^2.8.1",
"lastdragon-ru/lara-asp-core": "self.version",
"nikic/php-parser": "^4.18|^5.0",
"nette/neon": "^3.4",
"phpstan/phpstan": "^1.10"
},
"require-dev": {
"phpunit/phpunit": "^10.1.0"
},
"autoload": {
"psr-4": {
"LastDragon_ru\\LaraASP\\Dev\\": "src/"
},
"exclude-from-classmap": [
"src/**Test.php"
]
},
"config": {
"sort-packages": true,
"optimize-autoloader": true
},
"repositories": {
"core": {
"type": "path",
"url": "../core"
}
}
}
20 changes: 20 additions & 0 deletions packages/dev/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": "HEAD",
"require": {
"php": "PHP",
"phpstan/phpstan": "PHPStan"
},
"merge": null,
"requirements": {
"HEAD": {
"php": [
"^8.3",
"^8.2",
"^8.1"
],
"phpstan/phpstan": [
"^1.10"
]
}
}
}
21 changes: 21 additions & 0 deletions packages/dev/phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd"
cacheDirectory=".phpunit/result.cache"
executionOrder="random"
colors="true">
<testsuites>
<testsuite name="package">
<directory suffix="Test.php">./src</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
<exclude>
<directory suffix="Test.php">./src</directory>
</exclude>
</source>
<coverage cacheDirectory=".phpunit/coverage.cache"/>
</phpunit>
7 changes: 7 additions & 0 deletions packages/dev/src/Package.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php declare(strict_types = 1);

namespace LastDragon_ru\LaraASP\Dev;

final class Package {
public const Name = 'lara-asp-dev';
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 3eb52ac

Please sign in to comment.