21 Commits
0.0.1 ... 0.1.0

Author SHA1 Message Date
Ismo Vuorinen
0149b81b5e v0.1.0 2024-04-25 08:55:36 +03:00
Ismo Vuorinen
47314c8089 chore(deps)!: update to use v11 framework
updates illuminate/http and laravel-zero/framework to v11, and
nunomaduro/termwind to v2
2024-04-25 08:53:18 +03:00
Ismo Vuorinen
7701a55e91 chore(deps): update composer packages 2024-04-25 08:42:39 +03:00
renovate[bot]
f9515966e8 chore(deps): update softprops/action-gh-release action to v2 (#15) 2024-03-09 00:40:53 +02:00
renovate[bot]
8efdbc289f chore(deps): update actions/dependency-review-action action to v4 (#14) 2024-01-19 16:38:17 +02:00
ef136f6410 fix(deps): revert to working set of packages 2023-12-17 00:00:04 +02:00
2007436e22 feat(chore): update php to 8.2, update deps 2023-12-16 23:39:31 +02:00
852f850bc0 chore(deps): update dependencies 2023-12-16 23:20:17 +02:00
renovate[bot]
ebbf7371a8 chore(deps): update actions/download-artifact action to v4 (#12) 2023-12-15 13:12:17 +02:00
renovate[bot]
c9a87cce82 chore(deps): update actions/upload-artifact action to v4 (#13) 2023-12-15 13:11:49 +02:00
Ismo Vuorinen
b546e5bd77 chore(deps): composer update 2023-11-23 13:27:27 +02:00
ab9a8797bd Merge pull request #10 from ivuorinen/renovate/actions-checkout-4.x 2023-09-05 16:30:45 +03:00
renovate[bot]
445973b2ad chore(deps): update actions/checkout action to v4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-04 22:46:51 +00:00
b6e1252f61 chore(lint): Change readme to use markdown 2023-05-10 03:27:23 +03:00
45927b0171 chore(deps): Dependency update, codestyle fixes 2023-05-10 02:34:54 +03:00
557e906acf Update pest 2023-04-20 15:39:50 +03:00
2ee29e57fa Merge pull request #9 from ivuorinen/dependabot/composer/guzzlehttp/psr7-2.5.0 2023-04-20 01:52:31 +03:00
dependabot[bot]
53cf3abc04 Bump guzzlehttp/psr7 from 2.4.3 to 2.5.0
Bumps [guzzlehttp/psr7](https://github.com/guzzle/psr7) from 2.4.3 to 2.5.0.
- [Release notes](https://github.com/guzzle/psr7/releases)
- [Changelog](https://github.com/guzzle/psr7/blob/2.5/CHANGELOG.md)
- [Commits](https://github.com/guzzle/psr7/compare/2.4.3...2.5.0)

---
updated-dependencies:
- dependency-name: guzzlehttp/psr7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-19 20:42:11 +00:00
5e6e2246af Package updates, new build 2023-03-04 18:13:43 +02:00
6a6f342d19 Merge pull request #5 from ivuorinen/dependabot/composer/symfony/http-kernel-6.2.6 2023-02-02 09:00:09 +02:00
dependabot[bot]
8008d7d0e9 Bump symfony/http-kernel from 6.2.2 to 6.2.6
Bumps [symfony/http-kernel](https://github.com/symfony/http-kernel) from 6.2.2 to 6.2.6.
- [Release notes](https://github.com/symfony/http-kernel/releases)
- [Changelog](https://github.com/symfony/http-kernel/blob/6.2/CHANGELOG.md)
- [Commits](https://github.com/symfony/http-kernel/compare/v6.2.2...v6.2.6)

---
updated-dependencies:
- dependency-name: symfony/http-kernel
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-01 18:57:04 +00:00
16 changed files with 3243 additions and 1821 deletions

View File

@@ -11,6 +11,10 @@ trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
[*.json]
indent_size = 2
insert_final_newline = true
[*.yml]
indent_style = space
indent_size = 2

View File

@@ -7,8 +7,8 @@
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: 'Dependency Review'
on: [pull_request]
name: "Dependency Review"
on: [ pull_request ]
permissions:
contents: read
@@ -17,7 +17,7 @@ jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
- name: "Checkout Repository"
uses: actions/checkout@v4
- name: "Dependency Review"
uses: actions/dependency-review-action@v4

View File

@@ -2,10 +2,10 @@ name: Test & Build
on:
push:
branches: [ master ]
branches: [master]
pull_request:
release:
types: [ created ]
types: [created]
jobs:
build-phar:
@@ -14,10 +14,10 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ '8.1' ]
php: ["8.2"]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
@@ -51,7 +51,7 @@ jobs:
- name: Ensure the PHAR works
run: builds/branch-usage-checker --version
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
name: Upload the PHAR artifact
with:
name: branch-usage-checker
@@ -61,16 +61,16 @@ jobs:
runs-on: ubuntu-latest
name: Publish the PHAR
needs:
- 'build-phar'
- "build-phar"
if: github.event_name == 'release'
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: branch-usage-checker
path: builds/
- name: Upload box.phar
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: builds/branch-usage-checker

0
.yamlignore Normal file
View File

View File

@@ -1,23 +1,16 @@
<h1 style="text-align:center">
Branch usage checker
</h1>
# Branch usage checker
<p style="text-align:center">
<a href="https://packagist.org/packages/ivuorinen/branch-usage-checker"><img src="https://img.shields.io/packagist/v/ivuorinen/branch-usage-checker.svg?label=stable" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/ivuorinen/branch-usage-checker"><img src="https://img.shields.io/packagist/l/ivuorinen/branch-usage-checker.svg" alt="License"></a>
</p>
[![Packagist Version][pkg-shield]][packagist] [![License][license]][packagist]
<h2 style="text-align:center">
Check when your package branches have last been used.
</h2>
## Check when your package branches have last been used
<p style="text-align:center">
Use this command line tool to cross-check project
public GitHub Branches and Packagist branch
download statistics to determine are branches
safe to delete.
</p>
Use this command line tool to cross-check project public GitHub Branches and
Packagist branch download statistics to determine are branches safe to delete.
## License
Branch usage checker is an open-source software licensed under the MIT license.
[packagist]: https://packagist.org/packages/ivuorinen/branch-usage-checker
[pkg-shield]: https://img.shields.io/packagist/v/ivuorinen/branch-usage-checker
[license]: https://img.shields.io/packagist/l/ivuorinen/branch-usage-checker.svg

View File

@@ -46,7 +46,7 @@ class CheckCommand extends Command
$versions = collect($pkg->versions ?? [])
->keys()
// Filter actual versions out.
->filter(fn($version) => \str_starts_with($version, 'dev-'))
->filter(fn ($version) => \str_starts_with($version, 'dev-'))
->sort();
$this->totalBranches = $versions->count();
@@ -59,7 +59,7 @@ class CheckCommand extends Command
);
$statistics = collect($versions)
->mapWithKeys(fn($branch) => $this->getStatistics($branch))
->mapWithKeys(fn ($branch) => $this->getStatistics($branch))
->toArray();
$this->info('Downloaded statistics...');
@@ -73,7 +73,7 @@ class CheckCommand extends Command
return 0;
}
private function getStatistics($branch): array
private function getStatistics(string $branch): array
{
$payload = Http::get(
sprintf(

View File

@@ -34,9 +34,7 @@ class InspireCommand extends Command
<<<'HTML'
<div class="py-1 ml-2">
<div class="px-1 bg-blue-300 text-black">Laravel Zero</div>
<em class="ml-1">
Simplicity is the ultimate sophistication.
</em>
<em class="ml-1">Simplicity is the ultimate sophistication.</em>
</div>
HTML
);

View File

@@ -1,5 +1,9 @@
<?php
/**
* Application bootstrap
*/
/**
* Create The Application
*
@@ -8,7 +12,7 @@
* the IoC container for the system binding all of the various parts.
*/
$app = new LaravelZero\Framework\Application(
dirname( __DIR__ )
dirname(__DIR__)
);
/**

View File

@@ -1,19 +1,19 @@
{
"chmod": "0755",
"directories": [
"app",
"bootstrap",
"config",
"vendor"
],
"files": [
"composer.json"
],
"exclude-composer-files": false,
"exclude-dev-files": false,
"compression": "GZ",
"compactors": [
"KevinGH\\Box\\Compactor\\Php",
"KevinGH\\Box\\Compactor\\Json"
]
"chmod": "0755",
"directories": [
"app",
"bootstrap",
"config",
"vendor"
],
"files": [
"composer.json"
],
"exclude-composer-files": false,
"exclude-dev-files": false,
"compression": "GZ",
"compactors": [
"KevinGH\\Box\\Compactor\\Php",
"KevinGH\\Box\\Compactor\\Json"
]
}

Binary file not shown.

View File

@@ -1,79 +1,80 @@
{
"name": "ivuorinen/branch-usage-checker",
"description": "GitHub Project branch usage checker.",
"license": "MIT",
"type": "project",
"keywords": [
"branch",
"usage",
"github",
"console",
"cli"
],
"authors": [
{
"name": "Ismo Vuorinen",
"homepage": "https://github.com/ivuorinen"
}
],
"homepage": "https://github.com/ivuorinen/branch-usage-checker",
"support": {
"issues": "https://github.com/ivuorinen/branch-usage-checker/issues",
"source": "https://github.com/ivuorinen/branch-usage-checker"
},
"require": {
"php": ">=8.1",
"guzzlehttp/guzzle": "^7.4",
"illuminate/http": "^9.0",
"laravel-zero/phar-updater": "^1.2",
"nunomaduro/termwind": "^1.3",
"spatie/data-transfer-object": "^3.7"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.23",
"laravel-zero/framework": "^9.0",
"mockery/mockery": "^1.4.4",
"pestphp/pest": "^1.21.1",
"roave/security-advisories": "dev-latest"
},
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"bin": [
"builds/branch-usage-checker"
],
"config": {
"allow-plugins": {
"pestphp/pest-plugin": true,
"ergebnis/composer-normalize": true,
"dealerdirect/phpcodesniffer-composer-installer": true
},
"optimize-autoloader": true,
"platform": {
"php": "8.1"
},
"preferred-install": "dist",
"sort-packages": true
},
"scripts": {
"post-autoload-dump": [
"composer normalize"
],
"build": [
"cp application application.phar",
"@php application app:build branch-usage-checker"
],
"x": "@php builds/branch-usage-checker"
"name": "ivuorinen/branch-usage-checker",
"description": "GitHub Project branch usage checker.",
"license": "MIT",
"type": "project",
"keywords": [
"branch",
"usage",
"github",
"console",
"cli"
],
"authors": [
{
"name": "Ismo Vuorinen",
"homepage": "https://github.com/ivuorinen"
}
],
"homepage": "https://github.com/ivuorinen/branch-usage-checker",
"support": {
"issues": "https://github.com/ivuorinen/branch-usage-checker/issues",
"source": "https://github.com/ivuorinen/branch-usage-checker"
},
"require": {
"php": "^8.2",
"guzzlehttp/guzzle": "^7",
"illuminate/http": "^11",
"laravel-zero/phar-updater": "^1.2",
"nunomaduro/termwind": "^2",
"spatie/data-transfer-object": "^3.7"
},
"require-dev": {
"ergebnis/composer-normalize": "^2",
"laravel-zero/framework": "^11",
"mockery/mockery": "^1",
"pestphp/pest": "^2",
"roave/security-advisories": "dev-latest"
},
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"bin": [
"builds/branch-usage-checker"
],
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"ergebnis/composer-normalize": true,
"pestphp/pest-plugin": true
},
"optimize-autoloader": true,
"platform": {
"php": "8.2"
},
"preferred-install": "dist",
"sort-packages": true
},
"scripts": {
"post-autoload-dump": [
"composer normalize"
],
"build": [
"cp application application.phar",
"@php application app:build branch-usage-checker"
],
"test": "vendor/bin/pest",
"x": "@php builds/branch-usage-checker"
}
}

4769
composer.lock generated

File diff suppressed because it is too large Load Diff

8
phpcs.xml Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0"?>
<ruleset name="PHP_CodeSniffer">
<description>PHP_CodeSniffer configuration</description>
<rule ref="PSR12">
<exclude name="PSR12.Operators.OperatorSpacing"/>
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols"/>
</rule>
</ruleset>

View File

@@ -1,13 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupGlobals="false"
bootstrap="vendor/autoload.php"
colors="true"
processIsolation="false"
stopOnFailure="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false"
>
<testsuites>
<testsuite name="Feature">
<directory suffix="Test.php">./tests/Feature</directory>
@@ -16,9 +18,10 @@
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
</testsuites>
<coverage processUncoveredFiles="true">
<coverage/>
<source>
<include>
<directory suffix=".php">./app</directory>
</include>
</coverage>
</source>
</phpunit>

View File

@@ -13,7 +13,7 @@ trait CreatesApplication
*/
public function createApplication()
{
$app = require __DIR__.'/../bootstrap/app.php';
$app = require __DIR__ . '/../bootstrap/app.php';
$app->make(Kernel::class)->bootstrap();