Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Tests

on:
push:
branches:
- main
pull_request:

jobs:
phpcs:
name: Coding Standards (PHPCS)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: PHPCS
run: composer phpcs

phpstan:
name: Static Analysis (PHPStan)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: PHPStan
run: composer phpstan

phpunit:
name: Unit Tests (PHPUnit)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: PHPUnit
run: composer phpunit
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> A collection class for working with arrays

[![Build Status](https://travis-ci.org/jjgrainger/Collection.svg?branch=master)](https://travis-ci.org/jjgrainger/Collection) [![Total Downloads](https://poser.pugx.org/jjgrainger/collection/downloads)](https://packagist.org/packages/jjgrainger/collection) [![Latest Stable Version](https://poser.pugx.org/jjgrainger/collection/v/stable)](https://packagist.org/packages/jjgrainger/collection) [![License](https://poser.pugx.org/jjgrainger/collection/license)](https://packagist.org/packages/jjgrainger/collection)
[![tests](https://github.com/jjgrainger/Collection/actions/workflows/tests.yml/badge.svg)](https://github.com/jjgrainger/Collection/actions/workflows/tests.yml) [![Latest Stable Version](https://badgen.net/github/release/jjgrainger/Collection/stable)](https://packagist.org/packages/jjgrainger/collection) [![Total Downloads](https://badgen.net/packagist/dt/jjgrainger/Collection)](https://packagist.org/packages/jjgrainger/collection) [![License](https://badgen.net/github/license/jjgrainger/Collection)](https://packagist.org/packages/jjgrainger/collection)

## Principles

Expand Down
16 changes: 7 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "jjgrainger/collection",
"version": "1.1",
"description": "Simple collections in PHP",
"homepage": "https://github.com/jjgrainger/collection",
"license": "MIT",
Expand All @@ -11,23 +10,22 @@
"homepage": "http://jjgrainger.co.uk"
}
],
"minimum-stability": "dev",
"require": {
"php": ">=7.2"
"php": "^8.2"
},
"autoload": {
"psr-4": {
"Collection\\": "src"
}
},
"require-dev": {
"phpunit/phpunit": "8.*",
"squizlabs/php_codesniffer": "3.*"
"phpunit/phpunit": "^12.5",
"squizlabs/php_codesniffer": "^4.0",
"phpstan/phpstan": "^2.1"
},
"scripts": {
"test": [
"./vendor/bin/phpcs --standard=psr2 src",
"./vendor/bin/phpunit"
]
"phpcs": "./vendor/bin/phpcs --standard=psr2 src",
"phpunit": "./vendor/bin/phpunit",
"phpstan": "phpstan analyse src"
}
}
Loading