Skip to content

Commit

Permalink
kw_pager - bump versions, dependency analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-kalanis committed Mar 30, 2024
1 parent d7d3f5e commit 4d8d84d
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 46 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/code_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '7.4', '8.0', '8.1' ]
php: [ '7.4', '8.0', '8.1', '8.2', '8.3' ]
name: PHP ${{ matrix.php }} tests
steps:
- uses: actions/checkout@v2
Expand All @@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '7.4', '8.1' ]
php: [ '8.1' ]
name: PHP ${{ matrix.php }} code style
steps:
- uses: actions/checkout@v2
Expand All @@ -43,7 +43,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '7.4', '8.1' ]
php: [ '8.1' ]
name: PHP ${{ matrix.php }} phpstan
steps:
- uses: actions/checkout@v2
Expand All @@ -53,3 +53,18 @@ jobs:
coverage: none
- run: composer install --no-progress
- run: vendor/bin/phpstan analyse -c phpstan.neon

composer_dependencies:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '8.1' ]
name: PHP ${{ matrix.php }} problematic dependencies
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
- run: composer install --no-progress
- run: vendor/bin/composer-dependency-analyser
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

20 changes: 8 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Pager Interfaces
================

[![Build Status](https://app.travis-ci.com/alex-kalanis/pager.svg?branch=master)](https://app.travis-ci.com/github/alex-kalanis/pager)
![Build Status](https://github.com/alex-kalanis/pager/actions/workflows/code_checks.yml/badge.svg)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/alex-kalanis/pager/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/alex-kalanis/pager/?branch=master)
[![Latest Stable Version](https://poser.pugx.org/alex-kalanis/pager/v/stable.svg?v=1)](https://packagist.org/packages/alex-kalanis/pager)
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.3-8892BF.svg)](https://php.net/)
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.4-8892BF.svg)](https://php.net/)
[![Downloads](https://img.shields.io/packagist/dt/alex-kalanis/pager.svg?v1)](https://packagist.org/packages/alex-kalanis/pager)
[![License](https://poser.pugx.org/alex-kalanis/pager/license.svg?v=1)](https://packagist.org/packages/alex-kalanis/pager)
[![Code Coverage](https://scrutinizer-ci.com/g/alex-kalanis/pager/badges/coverage.png?b=master&v=1)](https://scrutinizer-ci.com/g/alex-kalanis/pager/?branch=master)
Expand All @@ -15,28 +15,24 @@ libraries.

This is the mixed package - contains sever-side implementation in Python and PHP.

# PHP Installation
## PHP Installation

```
{
"require": {
"alex-kalanis/pager": "1.0"
}
}
```bash
composer.phar require alex-kalanis/pager
```

(Refer to [Composer Documentation](https://github.com/composer/composer/blob/master/doc/00-intro.md#introduction) if you are not
familiar with composer)


# PHP Usage
## PHP Usage

1.) Use your autoloader (if not already done via Composer autoloader)

2.) Connect the "kalanis\kw_pager" into your app. When it came necessary
you can extends every library to comply your use-case; mainly your processing.

# Python Installation
## Python Installation

into your "setup.py":

Expand All @@ -46,7 +42,7 @@ into your "setup.py":
]
```

# Python Usage
## Python Usage

1.) Connect the "kw_pager\pager" into your app. When it came necessary
you can extends every library to comply your use-case; mainly your processing.
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@
"license": "BSD-3-Clause",
"type": "library",
"require": {
"php": ">=7.2.0"
"php": ">=7.4.0"
},
"require-dev": {
"shipmonk/composer-dependency-analyser": "^1.4",
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"friendsofphp/php-cs-fixer": "^3.0",
"phpunit/phpunit": ">=7.2 <=9"
},
"suggest": {
},
"autoload": {
"psr-4": {
"kalanis\\kw_pager\\": "php-src/"
Expand Down
2 changes: 1 addition & 1 deletion kwcms.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"source": "https://github.com/alex-kalanis/pager",
"license": "BSD-3-Clause",
"require": {
"php": ">=7.2.0"
"php": ">=7.4.0"
},
"require-dev": {
},
Expand Down
9 changes: 3 additions & 6 deletions php-src/BasicPager.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@

class BasicPager implements Interfaces\IPager
{
/** @var int */
protected $maxResults = 0;
/** @var int */
protected $actualPage = 0;
/** @var int */
protected $limitPerPage = 0;
protected int $maxResults = 0;
protected int $actualPage = 0;
protected int $limitPerPage = 0;

public function setMaxResults(int $maxResults): Interfaces\IPager
{
Expand Down
6 changes: 2 additions & 4 deletions php-src/DefaultSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@

class DefaultSettings implements Interfaces\ISettings
{
/** @var int */
protected $maxResults = 0;
/** @var int */
protected $limitPerPage = 0;
protected int $maxResults = 0;
protected int $limitPerPage = 0;

public function __construct(int $limitPerPage, int $maxResults)
{
Expand Down

0 comments on commit 4d8d84d

Please sign in to comment.