-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from softonic/compatible-with-psr/cache-2-and-3
Added compatibility with psr/cache v2 and v3
- Loading branch information
Showing
19 changed files
with
198 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate --strict | ||
|
||
- name: Cache Composer packages | ||
id: composer-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: vendor | ||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-php- | ||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-progress | ||
|
||
- name: Run test suite | ||
run: composer run-script test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Init Project | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Git Commit/Push Changes | ||
uses: actions/checkout@v3 | ||
|
||
- name: Substitute placeholders | ||
run: | | ||
name=$(echo ${{ github.event.repository.name }} | sed -e "s/[-_]/ /g" -e "s/\b\(.\)/\u\1/g") | ||
namespace=$(echo ${{ github.event.repository.name }} | sed -e "s/[-_]/ /g" -e "s/\b\(.\)/\u\1/g" -e "s/ //g") | ||
description=$(echo ${{ github.event.repository.description }} | sed -e 's@/@\\/@g') | ||
sed -i -e "s/<PACKAGE-ID>/${{ github.event.repository.name }}/g" -e "s/<DESCRIPTION>/$description/g" -e "s/<NAMESPACE>/$namespace/g" composer.json | ||
sed -i -e "s/<PACKAGE-ID>/${{ github.event.repository.name }}/g" -e "s/<DESCRIPTION>/$description/g" -e "s/<PACKAGE-NAME>/$name/g" README.md | ||
sed -i "s/<PACKAGE-NAME>/$name/g" phpunit.xml | ||
sed -i "s/<AUTHOR>/${{ github.actor }}/g" CODEOWNERS | ||
git rm .github/workflows/init.yml | ||
- name: Git Commit/Push Changes | ||
uses: actions-x/commit@v6 | ||
with: | ||
message: Applied template for basic configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/vendor | ||
/build | ||
composer.lock | ||
.php_cs.cache | ||
*.cache | ||
*.lock | ||
vendor | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.PHONY: phpunit | ||
phpunit: | ||
docker-compose run composer run phpunit | ||
|
||
.PHONY: tests | ||
tests: | ||
docker-compose run composer run test | ||
|
||
.PHONY: debug | ||
debug: | ||
docker-compose run --entrypoint=bash composer | ||
|
||
.PHONY: update-dependencies | ||
update-dependencies: | ||
docker-compose run composer update | ||
|
||
.PHONY: checkstyle | ||
checkstyle: | ||
docker-compose run composer run checkstyle | ||
|
||
.PHONY: fix-checkstyle | ||
fix-checkstyle: | ||
docker-compose run composer run fix-checkstyle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,7 @@ | ||
version: '3.2' | ||
version: '3.8' | ||
|
||
services: | ||
test: | ||
composer: | ||
volumes: | ||
- ./:/app | ||
image: ricc/composer-prestissimo:latest | ||
command: composer run test | ||
|
||
fixcs: | ||
volumes: | ||
- ./:/app | ||
image: ricc/composer-prestissimo:latest | ||
command: composer run fix-cs | ||
|
||
psysh: | ||
volumes: | ||
- ./:/app | ||
image: ricc/psysh:latest | ||
- ./:/app | ||
image: softonic/composer-rector:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Rector\Set\ValueObject\SetList; | ||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; | ||
|
||
return static function (ContainerConfigurator $containerConfigurator): void { | ||
// get parameters | ||
$parameters = $containerConfigurator->parameters(); | ||
|
||
// Define what rule sets will be applied | ||
$containerConfigurator->import(SetList::DEAD_CODE); | ||
$containerConfigurator->import(SetList::PHP_80); | ||
$containerConfigurator->import(SetList::TYPE_DECLARATION_STRICT); | ||
$containerConfigurator->import(SetList::TYPE_DECLARATION); | ||
$containerConfigurator->import(SetList::EARLY_RETURN); | ||
$containerConfigurator->import(SetList::PRIVATIZATION); | ||
|
||
// get services (needed for register a single rule) | ||
// $services = $containerConfigurator->services(); | ||
|
||
// register a single rule | ||
// $services->set(TypedPropertyRector::class); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.