Skip to content

Commit

Permalink
Bringing library into our Organization, bumping deps and dev/CI chang…
Browse files Browse the repository at this point in the history
…es (#1)

* Add branch alias for our compat version

* Fix branch alias

* dev deps, github actions, php versions, cleanup

* minimum laminas form 3

* phpunit minimum bump

* codecov v4

* removing v2 bc

* dropping php 8.0 and phpunit 9

* readme update

---------

Co-authored-by: Tom Ford <[email protected]>
  • Loading branch information
jaydiablo and exptom authored May 1, 2024
1 parent 858e751 commit e61df2b
Show file tree
Hide file tree
Showing 74 changed files with 5,607 additions and 5,404 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: composer
directory: '/'
schedule:
interval: daily
- package-ecosystem: github-actions
directory: '/'
schedule:
interval: daily
57 changes: 57 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: PHP ${{ matrix.php-versions }} ${{ matrix.composer-args }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest]
php-versions: ["8.1", "8.2", "8.3"]
composer-args: ["", "--prefer-lowest"]
runs-on: ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring
coverage: pcov
tools: cs2pr
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: php${{ matrix.php-versions }}-composer-${{ matrix.composer-args }}-${{ hashFiles('**/composer.json') }}
restore-keys: php${{ matrix.php-versions }}-composer-${{ matrix.composer-args }}-
- name: Install Dependencies
run: |
composer update --no-progress --no-suggest --prefer-stable --optimize-autoloader ${{ matrix.composer-args }}
- name: PHPStan
run: composer phpstan
- name: Code Style Check
env:
PHP_CS_FIXER_IGNORE_ENV: true
run: composer style-check -- --format=checkstyle | cs2pr
- name: Test
run: composer test-with-coverage
- name: Upload Coverage
uses: codecov/codecov-action@v4
with:
files: ./clover.xml
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ nb-configuration.xml
/build/
.idea/
composer.lock
.phpunit.result.cache
.phpunit.result.cache
.php-cs-fixer.cache
.phpunit.cache
22 changes: 22 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

$finder = PhpCsFixer\Finder::create()
->exclude('vendor')
->files()
->in(__DIR__)
;

$config = new PhpCsFixer\Config();
return $config->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'@PHPUnit60Migration:risky' => true,
'binary_operator_spaces' => ['operators' => ['=' => 'align', '=>' => 'align']],
'single_quote' => true,
'array_syntax' => ['syntax' => 'short'],
'concat_space' => ['spacing' => 'one'],
'no_unused_imports' => true,
])
->setUsingCache(true)
->setFinder($finder);
;
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions Module.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php

require_once __DIR__ . '/src/TwbBundle/Module.php';
<?php

require_once __DIR__ . '/src/TwbBundle/Module.php';
50 changes: 10 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,23 @@
# TwbBundle - Laminas module

Fork of (neilime/zf2-twb-bundle)[https://github.com/neilime/zf2-twb-bundle] updated for Laminas.
[![License](https://img.shields.io/github/license/diablomedia/laminas-twb-bundle)](https://github.com/diablomedia/laminas-twb-bundle/blob/master/LICENSE)
[![Build](https://github.com/diablomedia/laminas-twb-bundle/actions/workflows/build.yml/badge.svg)](https://github.com/diablomedia/laminas-twb-bundle/actions/workflows/build.yml)
[![codecov](https://codecov.io/gh/diablomedia/laminas-twb-bundle/graph/badge.svg?token=CS39OiPjNi)](https://codecov.io/gh/diablomedia/laminas-twb-bundle)
[![Latest Stable Version](https://poser.pugx.org/diablomedia/laminas-twb-bundle/v/stable.png)](https://packagist.org/packages/diablomedia/laminas-twb-bundle)
[![Total Downloads](https://poser.pugx.org/diablomedia/laminas-twb-bundle/downloads.png)](https://packagist.org/packages/diablomedia/laminas-twb-bundle)

__TwbBundle__ is a Laminas module for easy integration of the [Twitter Bootstrap v3](https://getbootstrap.com/docs/3.4/).
Fork of (neilime/zf2-twb-bundle)[https://github.com/neilime/zf2-twb-bundle] updated for Laminas and (thomasvargiu/laminas-twb-bundle)[https://github.com/thomasvargiu/laminas-twb-bundle] updated for newer versions of PHP and Laminas.

[![License](https://img.shields.io/github/license/thomasvargiu/laminas-twb-bundle)](https://github.com/thomasvargiu/laminas-twb-bundle/blob/master/LICENSE)
[![Build Status](https://travis-ci.org/thomasvargiu/laminas-twb-bundle.svg?branch=master)](https://travis-ci.org/thomasvargiu/laminas-twb-bundle)
[![Coverage Status](https://coveralls.io/repos/github/thomasvargiu/laminas-twb-bundle/badge.svg)](https://coveralls.io/github/thomasvargiu/laminas-twb-bundle)
[![Latest Stable Version](https://poser.pugx.org/thomasvargiu/laminas-twb-bundle/v/stable.png)](https://packagist.org/packages/thomasvargiu/laminas-twb-bundle)
[![Total Downloads](https://poser.pugx.org/thomasvargiu/laminas-twb-bundle/downloads.png)](https://packagist.org/packages/thomasvargiu/laminas-twb-bundle)

****

__⚠️ For Boostrap 4+, please use [zf-twbs-helper-module](https://github.com/neilime/zf-twbs-helper-module) ⚠️__

****

# Helping Project

❤️ If this project helps you reduce time to develop and/or you want to help the maintainer of this project. You can [sponsor](https://github.com/sponsors/neilime) him. Thank you !
**TwbBundle** is a Laminas module for easy integration of the [Twitter Bootstrap v3](https://getbootstrap.com/docs/3.4/).

# Contributing

👍 If you wish to contribute to TwbsHelper, PRs are welcome! Please read the [https://github.com/thomasvargiu/laminas-twb-bundle/blob/master/CONTRIBUTING.md](CONTRIBUTING.md) file.

# Demonstration / example

Render forms, buttons, alerts with TwbBundle : see it in action [on-line](http://neilime.github.io/zf2-twb-bundle/demo.html).

# Requirements

Name | Version
-----|--------
[php](https://secure.php.net/) | >=5.3.3
[laminas/laminas-config](https://github.com/laminas/laminas-config) | 2.3.9
[laminas/laminas-escaper](https://github.com/laminas/laminas-escaper) | 2.3.9
[laminas/laminas-form](https://github.com/laminas/laminas-form) | 2.3.9
[laminas/laminas-i18n](https://github.com/laminas/laminas-i18n) | 2.3.9
[laminas/laminas-loader](https://github.com/laminas/laminas-loader) | 2.3.9
[laminas/laminas-log](https://github.com/laminas/laminas-log) | 2.3.9
[laminas/laminas-modulemanager](https://github.com/laminas/laminas-modulemanager) | 2.3.9
[laminas/laminas-mvc](https://github.com/laminas/laminas-mvc) | 2.3.9
[laminas/laminas-serializer](https://github.com/laminas/laminas-serializer) | 2.3.9
[laminas/laminas-servicemanager](https://github.com/laminas/laminas-servicemanager) | 2.3.9
[laminas/laminas-stdlib](https://github.com/laminas/laminas-stdlib) | 2.3.9
[laminas/laminas-view](https://github.com/laminas/laminas-view) | 2.3.9
👍 If you wish to contribute to TwbsHelper, PRs are welcome! Please read the [https://github.com/diablomedia/laminas-twb-bundle/blob/master/CONTRIBUTING.md](CONTRIBUTING.md) file.

# Documentation

(These links go to the wiki of an upstream repo and may be out of date)

1. [Installation](https://github.com/thomasvargiu/laminas-twb-bundle/wiki/1.-Installation)
2. [View Helpers](https://github.com/thomasvargiu/laminas-twb-bundle/wiki/2.-View-Helpers)
3. [Elements](https://github.com/thomasvargiu/laminas-twb-bundle/wiki/3.-Elements)
Expand Down
33 changes: 22 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "totally-tech/laminas-twb-bundle",
"name": "diablomedia/laminas-twb-bundle",
"type": "library",
"description": "Laminas module for easy integration of Twitter Bootstrap",
"keywords": [
"Laminas",
"Twitter Bootstrap",
"module"
],
"homepage": "http://github.com/totally-tech/laminas-twb-bundle",
"homepage": "http://github.com/diablomedia/laminas-twb-bundle",
"license": "MIT",
"minimum-stability": "stable",
"authors": [
Expand All @@ -23,40 +23,46 @@
}
],
"support": {
"issues": "https://github.com/totally-tech/laminas-twb-bundle/issues"
"issues": "https://github.com/diablomedia/laminas-twb-bundle/issues"
},
"suggest": {
"neilime/zf2-assets-bundle": "Bundling & caching Twitter Bootstrap assets",
"twitter/bootstrap": "Twitter bootstrap assets"
},
"require": {
"php": "^7.2 || ^8.0",
"laminas/laminas-form": "^2.3 || ^3.0",
"php": "~8.1 || ~8.2 || ~8.3",
"laminas/laminas-form": "^3.0",
"laminas/laminas-i18n": "^2.3",
"laminas/laminas-modulemanager": "^2.3",
"laminas/laminas-mvc": "^2.3 || ^3.0",
"laminas/laminas-servicemanager": "^2.3 || ^3.1",
"laminas/laminas-stdlib": "^2.3 || ^3.1",
"laminas/laminas-view": "^2.3",
"laminas/laminas-navigation": "^2.9",
"laminas/laminas-dependency-plugin": "^1.0 || ^2.0"
"psr/container": "^1.0 || ^2.0"
},
"require-dev": {
"phpunit/phpunit": "^8.5.13 || ^9.4",
"laminas/laminas-router": "^3.3"
"friendsofphp/php-cs-fixer": "3.54.0",
"laminas/laminas-router": "^3.3",
"maglnet/composer-require-checker": "^3.0.0",
"phpro/grumphp-shim": "^2.0.0",
"phpstan/phpstan": "1.10.67",
"phpunit/phpunit": "^10.5.18"
},
"autoload": {
"psr-4": {
"TwbBundle\\": "src/TwbBundle"
}
},
"scripts": {
"test": "cd tests && phpunit --colors & cd ..",
"test:ci": "cd tests && phpunit && cd .."
"test": "phpunit",
"test-with-coverage": "phpunit --coverage-clover=clover.xml",
"phpstan": "phpstan analyze -c phpstan.neon --no-progress --ansi",
"style-check": "php-cs-fixer fix --dry-run -vv"
},
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
"dev-php81": "4.1.x-dev"
},
"laminas": {
"module": "TwbBundle",
Expand All @@ -65,5 +71,10 @@
},
"replace": {
"neilime/zf2-twb-bundle": "^3.0"
},
"config": {
"allow-plugins": {
"phpro/grumphp-shim": true
}
}
}
Loading

0 comments on commit e61df2b

Please sign in to comment.