Skip to content

Commit

Permalink
Release 6.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed Mar 7, 2023
1 parent b77a004 commit d4a71b5
Show file tree
Hide file tree
Showing 12 changed files with 838 additions and 561 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

strategy:
matrix:
php: ['7.2', '7.3', '7.4', '8.0', '8.1']
php: ['7.4', '8.0', '8.1', '8.2']

steps:
- name: Checkout Code
Expand All @@ -23,6 +23,8 @@ jobs:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: none
env:
update: true

- name: Setup Problem Matchers
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014-2022 Graham Campbell <hello@gjcampbell.co.uk>
Copyright (c) 2014-2023 Graham Campbell <hello@gjcampbell.co.uk>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ phpunit:
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpunit --rm registry.gitlab.com/grahamcampbell/php:7.4-base

box-compile:
@docker run -it -w /data -v ${PWD}:/data:delegated --rm registry.gitlab.com/grahamcampbell/box:3.16 compile
@docker run -it -w /data -v ${PWD}:/data:delegated --rm registry.gitlab.com/grahamcampbell/box:4.3 compile
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Packagist Stats was created by, and is maintained by [Graham Campbell](https://g
![Banner](https://user-images.githubusercontent.com/2829600/71477093-0f3c7780-27e0-11ea-9d3e-4fb0af34bb07.png)

<p align="center">
<a href="https://github.com/GrahamCampbell/Packagist-Stats/actions?query=workflow%3ATests"><img src="https://img.shields.io/github/workflow/status/GrahamCampbell/Packagist-Stats/Tests?label=Tests&style=flat-square" alt="Build Status"></img></a>
<a href="https://github.com/GrahamCampbell/Packagist-Stats/actions?query=workflow%3ATests"><img src="https://img.shields.io/github/actions/workflow/status/GrahamCampbell/Packagist-Stats/tests.yml?label=Tests&style=flat-square" alt="Build Status"></img></a>
<a href="https://github.styleci.io/repos/27651218"><img src="https://github.styleci.io/repos/27651218/shield" alt="StyleCI Status"></img></a>
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-brightgreen?style=flat-square" alt="Software License"></img></a>
<a href="https://github.com/GrahamCampbell/Packagist-Stats/releases"><img src="https://img.shields.io/github/release/GrahamCampbell/Packagist-Stats?style=flat-square" alt="Latest Version"></img></a>
Expand All @@ -15,12 +15,12 @@ Packagist Stats was created by, and is maintained by [Graham Campbell](https://g

## Usage

This project is relatively small, and it's usage is pretty simple. [PHP](https://www.php.net/) 7.2-8.1 is required.
This project is relatively small, and it's usage is pretty simple. [PHP](https://www.php.net/) 7.4-8.2 is required.

To get the latest version, simply require the project using [Composer](https://getcomposer.org/) or download the phar from the [releases](https://github.com/GrahamCampbell/Packagist-Stats/releases) page:

```bash
$ composer global require "graham-campbell/packagist-stats:^5.3"
$ composer global require "graham-campbell/packagist-stats:^6.0"
```

Show the stats for all packages under the `graham-campbell` vendor:
Expand Down
14 changes: 2 additions & 12 deletions app/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ final class Client
*
* @var \Packagist\Api\Client
*/
protected $packagist;
private Packagist $packagist;

/**
* Create a new client instance.
Expand All @@ -51,7 +51,7 @@ public function __construct(Packagist $packagist)
*
* @return array
*/
public function packages($vendors)
public function packages($vendors): array
{
$packages = [];

Expand All @@ -67,14 +67,4 @@ public function packages($vendors)

return $packages;
}

/**
* Get the packagist client instance.
*
* @return \Packagist\Api\Client
*/
public function getPackagistClient()
{
return $this->packagist;
}
}
2 changes: 1 addition & 1 deletion app/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ final class Application extends SymfonyApplication
*
* @var string
*/
const APP_VERSION = '5.4.1';
const APP_VERSION = '6.0.0';

/**
* Create a new StyleCI CLI application.
Expand Down
10 changes: 5 additions & 5 deletions app/Presenters/PackagesPresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ final class PackagesPresenter implements Countable, IteratorAggregate
*
* @var array
*/
protected $packages;
private array $packages;

/**
* Create a new packages presenter instance.
Expand All @@ -48,7 +48,7 @@ public function __construct(array $packages)
*
* @return int
*/
public function getAllTimeTotal()
public function getAllTimeTotal(): int
{
$downloads = 0;

Expand All @@ -64,7 +64,7 @@ public function getAllTimeTotal()
*
* @return int
*/
public function getMonthlyTotal()
public function getMonthlyTotal(): int
{
$downloads = 0;

Expand All @@ -80,7 +80,7 @@ public function getMonthlyTotal()
*
* @return int
*/
public function count()
public function count(): int
{
return count($this->packages);
}
Expand All @@ -90,7 +90,7 @@ public function count()
*
* @return \ArrayIterator
*/
public function getIterator()
public function getIterator(): ArrayIterator
{
return new ArrayIterator($this->packages);
}
Expand Down
18 changes: 10 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,23 @@
"symfony/polyfill-php56": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php72": "*"
"symfony/polyfill-php72": "*",
"symfony/polyfill-php73": "*",
"symfony/polyfill-php74": "*"
},
"require": {
"php": "^7.2.5 || ^8.0",
"php": "^7.4.15 || ^8.0.2",
"ext-json": "*",
"composer/xdebug-handler": "^1.4 || ^2.0 || ^3.0",
"guzzlehttp/guzzle": "^7.4.5",
"guzzlehttp/guzzle": "^7.4",
"guzzlehttp/psr7": "^2.4",
"symfony/console": "^4.3.8 || ^5.0 || ^6.0",
"symfony/console": "^4.4 || ^5.0 || ^6.0",
"symfony/error-handler": "^4.4 || ^5.0 || ^6.0",
"knplabs/packagist-api": "^1.7.2"
"knplabs/packagist-api": "^2.0"
},
"require-dev": {
"graham-campbell/analyzer": "^3.0.7",
"phpunit/phpunit": "^8.5.25"
"graham-campbell/analyzer": "^4.0",
"phpunit/phpunit": "^9.6"
},
"autoload": {
"psr-4": {
Expand All @@ -46,7 +48,7 @@
],
"config": {
"platform": {
"php": "7.2.5"
"php": "7.4.15"
},
"preferred-install": "dist"
},
Expand Down
Loading

0 comments on commit d4a71b5

Please sign in to comment.