Skip to content

Commit 267220d

Browse files
authored
Merge pull request #27 from tattersoftware/deprecate
Deprecate
2 parents 0e8c206 + 0b83c39 commit 267220d

File tree

15 files changed

+266
-94
lines changed

15 files changed

+266
-94
lines changed

.github/workflows/analyze.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ jobs:
3939
with:
4040
php-version: ${{ matrix.php-versions }}
4141
tools: composer, pecl, phpunit
42-
extensions: intl, json, mbstring, mysqlnd, xdebug, xml, sqlite3
42+
extensions: intl, json, mbstring, gd, mysqlnd, xdebug, xml, sqlite3
43+
env:
44+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4345

4446
- name: Get composer cache directory
4547
id: composer-cache
@@ -65,7 +67,12 @@ jobs:
6567
key: ${{ runner.os }}-phpstan-${{ github.sha }}
6668
restore-keys: ${{ runner.os }}-phpstan-
6769

68-
- name: Install dependencies
70+
- name: Install dependencies (limited)
71+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }}
72+
run: composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader
73+
74+
- name: Install dependencies (authenticated)
75+
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
6976
run: composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader
7077
env:
7178
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}

.github/workflows/compare.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# When a PR is opened or a push is made, compare
2+
# code for backwards compatibility.
3+
name: RoaveBC
4+
5+
on:
6+
pull_request:
7+
branches:
8+
- develop
9+
paths:
10+
- 'src/**'
11+
12+
jobs:
13+
compare:
14+
name: Compare for Backwards Compatibility
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Run comparison (limited)
22+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }}
23+
uses: docker://nyholm/roave-bc-check-ga
24+
25+
- name: Run comparison (authenticated)
26+
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
27+
uses: docker://nyholm/roave-bc-check-ga
28+
env:
29+
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}

.github/workflows/test.yml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ jobs:
2929
with:
3030
php-version: ${{ matrix.php-versions }}
3131
tools: composer, pecl, phpunit
32-
extensions: intl, json, mbstring, mysqlnd, xdebug, xml, sqlite3
32+
extensions: intl, json, mbstring, gd, mysqlnd, xdebug, xml, sqlite3
3333
coverage: xdebug
34+
env:
35+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3436

3537
- name: Get composer cache directory
3638
id: composer-cache
@@ -43,29 +45,45 @@ jobs:
4345
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
4446
restore-keys: ${{ runner.os }}-composer-
4547

46-
- name: Install dependencies
48+
- name: Install dependencies (limited)
49+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }}
50+
run: composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader
51+
52+
- name: Install dependencies (authenticated)
53+
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
4754
run: composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader
4855
env:
4956
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
5057

58+
- name: Enable Tachycardia
59+
run: echo "TACHYCARDIA_MONITOR_GA=enabled" >> $GITHUB_ENV
60+
5161
- name: Test with PHPUnit
5262
run: vendor/bin/phpunit --verbose --coverage-text
63+
env:
64+
TERM: xterm-256color
5365

54-
- if: matrix.php-versions == '7.4'
55-
name: Run Coveralls
66+
- if: matrix.php-versions == '8.0'
67+
name: Mutate with Infection
5668
run: |
57-
composer global require php-coveralls/php-coveralls:^2.4
58-
php-coveralls --coverage_clover=build/logs/clover.xml -v
69+
composer global require infection/infection
70+
git fetch --depth=1 origin $GITHUB_BASE_REF
71+
infection --threads=2 --skip-initial-tests --coverage=build/phpunit --git-diff-base=origin/$GITHUB_BASE_REF --git-diff-filter=AM --logger-github --ignore-msi-with-no-mutations
72+
73+
- if: matrix.php-versions == '8.0'
74+
name: Run Coveralls
75+
run: vendor/bin/php-coveralls --verbose --coverage_clover=build/phpunit/clover.xml --json_path build/phpunit/coveralls-upload.json
5976
env:
6077
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6178
COVERALLS_PARALLEL: true
62-
COVERALLS_FLAG_NAME: PHP ${{ matrix.php-versions }} - ${{ matrix.db-platforms }}
79+
COVERALLS_FLAG_NAME: PHP ${{ matrix.php-versions }}
6380

6481
coveralls:
6582
needs: [main]
83+
name: Coveralls Finished
6684
runs-on: ubuntu-latest
6785
steps:
68-
- name: Coveralls Finished
86+
- name: Upload Coveralls results
6987
uses: coverallsapp/github-action@master
7088
with:
7189
github-token: ${{ secrets.GITHUB_TOKEN }}

.php-cs-fixer.dist.php

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
use Nexus\CsConfig\Factory;
4+
use PhpCsFixer\Finder;
5+
use Tatter\Tools\Standard;
6+
7+
$finder = Finder::create()
8+
->files()
9+
->in(__DIR__)
10+
->exclude('build')
11+
->append([__FILE__]);
12+
13+
// Remove overrides for incremental changes
14+
$overrides = [
15+
'array_indentation' => false,
16+
'braces' => false,
17+
'indentation_type' => false,
18+
];
19+
20+
$options = [
21+
'finder' => $finder,
22+
'cacheFile' => 'build/.php-cs-fixer.cache',
23+
];
24+
25+
/* Reenable after incremental changes are applied
26+
return Factory::create(new Standard(), $overrides, $options)->forLibrary(
27+
'Library',
28+
'Tatter Software',
29+
'',
30+
2021
31+
);
32+
*/
33+
return Factory::create(new Standard(), $overrides, $options)->forProjects();

composer.json

Lines changed: 55 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,57 @@
11
{
2-
"name": "tatter/assets",
3-
"type": "library",
4-
"description": "Asset publishing and loading for CodeIgniter 4",
5-
"keywords": [
6-
"codeigniter",
7-
"codeigniter4",
8-
"assets",
9-
"loader",
10-
"css",
11-
"javascript"
12-
],
13-
"homepage": "https://github.com/tattersoftware/codeigniter4-assets",
14-
"license": "MIT",
15-
"authors": [
16-
{
17-
"name": "Matthew Gatner",
18-
"email": "[email protected]",
19-
"homepage": "https://tattersoftware.com",
20-
"role": "Developer"
21-
}
22-
],
23-
"require": {
24-
"php": "^7.3||^8.0"
25-
},
26-
"require-dev": {
27-
"codeigniter4/codeigniter4": "dev-develop",
28-
"tatter/tools": "^1.4"
29-
},
30-
"autoload": {
31-
"psr-4": {
32-
"Tatter\\Assets\\": "src"
33-
},
34-
"exclude-from-classmap": [
35-
"**/Database/Migrations/**"
36-
]
37-
},
38-
"autoload-dev": {
39-
"psr-4": {
40-
"Tests\\Support\\": "tests/_support"
41-
}
42-
},
43-
"repositories": [
44-
{
45-
"type": "vcs",
46-
"url": "https://github.com/codeigniter4/CodeIgniter4"
47-
}
48-
],
49-
"minimum-stability": "dev",
50-
"prefer-stable": true,
51-
"scripts": {
52-
"analyze": "phpstan analyze",
53-
"style": "phpcbf --standard=./vendor/codeigniter4/codeigniter4-standard/CodeIgniter4 tests/ src/",
54-
"test": "phpunit"
55-
}
2+
"name": "tatter/assets",
3+
"type": "library",
4+
"description": "Asset publishing and loading for CodeIgniter 4",
5+
"keywords": [
6+
"codeigniter",
7+
"codeigniter4",
8+
"assets",
9+
"loader",
10+
"css",
11+
"javascript"
12+
],
13+
"homepage": "https://github.com/tattersoftware/codeigniter4-assets",
14+
"license": "MIT",
15+
"authors": [
16+
{
17+
"name": "Matthew Gatner",
18+
"email": "[email protected]",
19+
"homepage": "https://tattersoftware.com",
20+
"role": "Developer"
21+
}
22+
],
23+
"require": {
24+
"php": "^7.3 || ^8.0"
25+
},
26+
"require-dev": {
27+
"codeigniter4/codeigniter4": "dev-develop",
28+
"tatter/tools": "^1.10"
29+
},
30+
"autoload": {
31+
"psr-4": {
32+
"Tatter\\Assets\\": "src"
33+
},
34+
"exclude-from-classmap": [
35+
"**/Database/Migrations/**"
36+
]
37+
},
38+
"autoload-dev": {
39+
"psr-4": {
40+
"Tests\\Support\\": "tests/_support"
41+
}
42+
},
43+
"repositories": [
44+
{
45+
"type": "vcs",
46+
"url": "https://github.com/codeigniter4/CodeIgniter4"
47+
}
48+
],
49+
"minimum-stability": "dev",
50+
"prefer-stable": true,
51+
"scripts": {
52+
"analyze": "phpstan analyze",
53+
"mutate": "infection --threads=2 --skip-initial-tests --coverage=build/phpunit",
54+
"style": "php-cs-fixer fix --verbose --ansi",
55+
"test": "phpunit"
56+
}
5657
}

infection.json.dist

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"source": {
3+
"directories": [
4+
"src"
5+
],
6+
"excludes": [
7+
"Config",
8+
"Database/Migrations",
9+
"Views"
10+
]
11+
},
12+
"logs": {
13+
"text": "build/infection.log"
14+
},
15+
"mutators": {
16+
"@default": true
17+
},
18+
"bootstrap": "vendor/codeigniter4/codeigniter4/system/Test/bootstrap.php"
19+
}

phpstan.neon.dist

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ parameters:
1010
- src/Config/Routes.php
1111
- src/Views/*
1212
ignoreErrors:
13-
- '#Call to an undefined static method Config\\Services::manifests\(\)#'
14-
- '#Unsafe usage of new static\(\)*#'
13+
- '#Call to an undefined static method Config\\Services::[A-Za-z]+\(\)#'
14+
universalObjectCratesClasses:
15+
- CodeIgniter\Entity
16+
- CodeIgniter\Entity\Entity
17+
- Faker\Generator
1518
scanDirectories:
1619
- vendor/codeigniter4/codeigniter4/system/Helpers
1720
dynamicConstantNames:

0 commit comments

Comments
 (0)