Skip to content

Restricted Files #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 15, 2022
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
4 changes: 2 additions & 2 deletions .github/workflows/deptrac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:
- develop
paths:
- '**.php'
- 'composer.**'
- 'composer.*'
- 'depfile.yaml'
- '.github/workflows/deptrac.yml'
push:
branches:
- develop
paths:
- '**.php'
- 'composer.**'
- 'composer.*'
- 'depfile.yaml'
- '.github/workflows/deptrac.yml'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/infection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:
- develop
paths:
- '**.php'
- 'composer.**'
- 'composer.*'
- 'phpunit*'
- '.github/workflows/infection.yml'
push:
branches:
- develop
paths:
- '**.php'
- 'composer.**'
- 'composer.*'
- 'phpunit*'
- '.github/workflows/infection.yml'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:
- develop
paths:
- '**.php'
- 'composer.**'
- 'composer.*'
- 'phpstan*'
- '.github/workflows/phpstan.yml'
push:
branches:
- develop
paths:
- '**.php'
- 'composer.**'
- 'composer.*'
- 'phpstan*'
- '.github/workflows/phpstan.yml'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:
- develop
paths:
- '**.php'
- 'composer.**'
- 'composer.*'
- 'phpunit*'
- '.github/workflows/phpunit.yml'
push:
branches:
- develop
paths:
- '**.php'
- 'composer.**'
- 'composer.*'
- 'phpunit*'
- '.github/workflows/phpunit.yml'

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:
- develop
paths:
- '**.php'
- 'composer.**'
- 'composer.*'
- 'rector.php'
- '.github/workflows/rector.yml'
push:
branches:
- develop
paths:
- '**.php'
- 'composer.**'
- 'composer.*'
- 'rector.php'
- '.github/workflows/rector.yml'

Expand Down Expand Up @@ -64,5 +64,5 @@ jobs:

- name: Analyze for refactoring
run: |
composer global require --dev rector/rector:^0.12.10
composer global require --dev rector/rector:^0.12.16
rector process --dry-run --no-progress-bar
17 changes: 17 additions & 0 deletions composer-unused.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

declare(strict_types=1);

use ComposerUnused\ComposerUnused\Configuration\Configuration;
use ComposerUnused\ComposerUnused\Configuration\NamedFilter;
use ComposerUnused\ComposerUnused\Configuration\PatternFilter;
use Webmozart\Glob\Glob;

return static function (Configuration $config): Configuration {
return $config
// ->addNamedFilter(NamedFilter::fromString('symfony/config'))
// ->addPatternFilter(PatternFilter::fromString('/symfony-.*/'))
->setAdditionalFilesFor('codeigniter4/framework', [
...Glob::glob(__DIR__ . '/vendor/codeigniter4/framework/system/Helpers/*.php'),
]);
};
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
"twbs/bootstrap": "^4.0"
},
"require-dev": {
"codeigniter4/devkit": "^1.0",
"codeigniter4/framework": "^4.1"
"codeigniter4/framework": "^4.1",
"tatter/tools": "^2.0"
},
"config": {
"allow-plugins": {
Expand Down
5 changes: 5 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
use Rector\Php56\Rector\FunctionLike\AddDefaultValueForUndefinedVariableRector;
use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector;
use Rector\Php73\Rector\FuncCall\StringifyStrNeedlesRector;
use Rector\Php74\Rector\Property\TypedPropertyRector;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\PSR4\Rector\FileWithoutNamespace\NormalizeNamespaceByPSR4ComposerAutoloadRector;
use Rector\Set\ValueObject\LevelSetList;
Expand Down Expand Up @@ -122,4 +123,8 @@
$services->set(MakeInheritedMethodVisibilitySameAsParentRector::class);
$services->set(SimplifyEmptyArrayCheckRector::class);
$services->set(NormalizeNamespaceByPSR4ComposerAutoloadRector::class);
$services->set(TypedPropertyRector::class)
->configure([
TypedPropertyRector::INLINE_PUBLIC => true,
]);
};
3 changes: 3 additions & 0 deletions roave-bc-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
parameters:
ignoreErrors:
- '#\[BC\] SKIPPED: .+ could not be found in the located source#'
1 change: 1 addition & 0 deletions src/Publishers/DataTablesPublisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public function publish(): bool
return $this
->addPath('js')
->addPath('types')
->removePattern('*.ts')
->merge(true);
}
}
1 change: 1 addition & 0 deletions src/Publishers/DataTablesStylePublisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public function publish(): bool
->addPath('images')
->addPath('js')
->addPath('types')
->removePattern('*.ts')
->merge(true);
}
}
13 changes: 13 additions & 0 deletions src/Publishers/JQueryPublisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,17 @@ class JQueryPublisher extends FrontendPublisher
{
protected string $vendorPath = 'components/jquery';
protected string $publicPath = 'jquery';

/**
* Reads files from the sources and copies them out to their destinations.
* This method should be reimplemented by child classes intended for
* discovery.
*/
public function publish(): bool
{
return $this
->addPath('/')
->removePattern('*.md')
->merge(true);
}
}
1 change: 0 additions & 1 deletion tests/PublishersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public function publisherProvider(): array
DataTablesPublisher::class,
[
'datatables/js/jquery.dataTables.js',
'datatables/types/types.d.ts',
],
],
[
Expand Down