Skip to content

Commit

Permalink
[TASK] Extension creation
Browse files Browse the repository at this point in the history
  • Loading branch information
filoucrackeur committed May 8, 2019
1 parent 740800c commit 3db309a
Show file tree
Hide file tree
Showing 6 changed files with 172 additions and 127 deletions.
78 changes: 37 additions & 41 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,41 @@
filter:
excluded_paths:
- 'Documentation/*'
- 'Tests/*'
- 'Resources/*'
paths:
- 'Classes/*'
tools:

php_cpd:
enabled: true

php_code_sniffer:
enabled: true
config:
standard: TYPO3CMS

php_cs_fixer:
enabled: true
excluded_paths:
- 'Documentation/*'
- 'Tests/*'
- 'Resources/*'
paths:
- 'Classes/*'

php_hhvm:
enabled: true
config:
use_undeclared_constant: false

php_mess_detector:
enabled: true
config:
controversial_rules:
superglobals: false

php_pdepend:
enabled: true

php_analyzer:
enabled: true
tools:
php_cpd:
enabled: true
php_code_sniffer:
enabled: true
config:
standard: TYPO3CMS
php_cs_fixer:
enabled: true
php_hhvm:
enabled: true
config:
use_undeclared_constant: false
php_mess_detector:
enabled: true
config:
controversial_rules:
superglobals: false
php_pdepend:
enabled: true
php_analyzer:
enabled: true

build:
tests:
override:
-
command: '.Build/bin/phpunit --configuration phpunit.xml.dist --colors --coverage-text --coverage-clover build/logs/clover.xml Tests/Unit/'
coverage:
file: 'build/logs/clover.xml'
format: 'clover'
environment:
php:
version: '7.2'
tests:
override:
- command: '.Build/bin/phpunit --configuration phpunit.xml.dist --colors --coverage-text --coverage-clover build/logs/clover.xml Tests/Unit/'
coverage:
file: 'build/logs/clover.xml'
format: 'clover'
2 changes: 1 addition & 1 deletion Classes/Utility/TreeUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static function fromArray(array $array): string
}

if (is_array($value)) {
$output .= '<li>' . $key . ' ' . self::fromArray($value) . '</code></li>';
$output .= '<ul><li>' . $key . ' ' . self::fromArray($value) . '</code></li></ul>';
} else {
$output .= '<li>' . $key . ' = <code>' . $value . '</code></li>';
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Coverage Status](https://coveralls.io/repos/github/filoucrackeur/storage-framework-manager/badge.svg?branch=master)](https://coveralls.io/github/filoucrackeur/storage-framework-manager?branch=master)
[![Total Downloads](https://poser.pugx.org/filoucrackeur/storage-framework-manager/downloads)](https://packagist.org/packages/filoucrackeur/storage-framework-manager)

> Join the discussion on Slack in channel [**#ext-cf-manager**](https://typo3.slack.com/messages/ext-cf-manager)! – You don't have access to TYPO3 Slack? Get your Slack invitation [by clicking here](https://forger.typo3.org/slack)!
> Join the discussion on Slack in channel [**#ext-sf-manager**](https://typo3.slack.com/messages/ext-sf-manager)! – You don't have access to TYPO3 Slack? Get your Slack invitation [by clicking here](https://forger.typo3.org/slack)!
##### Installation by composer

Expand Down
51 changes: 51 additions & 0 deletions Tests/Unit/Utility/TreeUtilityTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php
declare(strict_types=1);

namespace Filoucrackeur\StorageFrameworkManager\Tests\Utility;

use Filoucrackeur\StorageFrameworkManager\Utility\TreeUtility;
use Nimut\TestingFramework\TestCase\UnitTestCase;

class TreeUtilityTest extends UnitTestCase
{
/**
* @var array
*/
protected $array;

/**
* @test
*/
public function array_is_convert_to_ul_li(): void
{
$convert = TreeUtility::fromArray($this->array);
$this->assertContains('<ul', $convert);
$this->assertContains('<li>sub_key = <code>value</code></li>', $convert);
$this->assertContains('</ul>', $convert);
}

/**
* @test
*/
public function value_password_is_replace_by_stars(): void
{
$convert = TreeUtility::fromArray($this->array);
$this->assertContains('********', $convert);
}

protected function setUp()
{

$this->array = [
'key' => [
'sub_key' => 'value',
'password' => '********'
]
];
}

protected function tearDown()
{
unset($this->array);
}
}
163 changes: 81 additions & 82 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,83 +1,82 @@
{
"name": "filoucrackeur/storage-framework-manager",
"description": "TYPO3 caching framework manager extension",
"type": "typo3-cms-extension",
"license": "GPL-3.0+",
"version": "0.0.1",
"homepage": "https://github.com/filoucrackeur/storage-framework-manager",
"support": {
"issues": "https://github.com/filoucrackeur/storage-framework-manager/issues"
},
"keywords": [
"storage",
"session",
"caching",
"framework",
"manager",
"redis",
"memcached",
"apc",
"pdo",
"transient memory",
"apcu",
"cache"
],
"authors": [
{
"name": "Philippe Court",
"email": "contact@webstationservice.fr",
"role": "Developer",
"homepage": "https://github.com/filoucrackeur/"
}
],
"require": {
"php": ">=7.0",
"typo3/cms-core": ">=9.5,<10",
"predis/predis": "^1.1"
},
"require-dev": {
"phpunit/phpunit": "^6.5",
"satooshi/php-coveralls": "^2.1",
"nimut/testing-framework": "^4.1",
"namelesscoder/typo3-repository-client": "2.*",
"helmich/typo3-typoscript-lint": "^2.0",
"typo3/fluid-schema-generator": "^2.1"
},
"replace": {
"filoucrackeur/storage-framework-manager": "self.version",
"typo3-ter/storage-framework-manager": "self.version"
},
"autoload": {
"psr-4": {
"Filoucrackeur\\StorageFrameworkManager\\": "Classes/"
}
},
"autoload-dev": {
"psr-4": {
"Filoucrackeur\\StorageFrameworkManager\\Tests\\": "Tests",
"TYPO3\\Components\\TestingFramework\\": ".Build/vendor/typo3/cms/components/testing_framework/Classes/",
"TYPO3\\CMS\\Core\\Tests\\": ".Build/vendor/typo3/cms/typo3/sysext/core/Tests/",
"TYPO3\\CMS\\Fluid\\Tests\\": ".Build/vendor/typo3/cms/typo3/sysext/fluid/Tests/"
}
},
"config": {
"vendor-dir": ".Build/vendor",
"bin-dir": ".Build/bin",
"version": "0.0.1"
},
"scripts": {
"post-autoload-dump": [
"TYPO3\\TestingFramework\\Composer\\ExtensionTestEnvironment::prepare"
]
},
"extra": {
"branch-alias": {
"dev-master": "0.x-dev"
},
"typo3/cms": {
"cms-package-dir": "{$vendor-dir}/typo3/cms",
"web-dir": ".Build/Web",
"extension-key": "storage_framework_manager"
}
}
}
"name": "filoucrackeur/storage-framework-manager",
"description": "TYPO3 caching framework manager extension",
"type": "typo3-cms-extension",
"license": "GPL-3.0+",
"version": "1.0.0",
"homepage": "https://github.com/filoucrackeur/storage-framework-manager",
"support": {
"issues": "https://github.com/filoucrackeur/storage-framework-manager/issues"
},
"keywords": [
"storage",
"session",
"caching",
"framework",
"manager",
"redis",
"memcached",
"apc",
"pdo",
"transient memory",
"apcu",
"cache"
],
"authors": [
{
"name": "Philippe Court",
"email": "contact@webstationservice.fr",
"role": "Developer",
"homepage": "https://github.com/filoucrackeur/"
}
],
"require": {
"php": ">=7.0",
"typo3/cms-core": ">=9.5,<10",
"predis/predis": "^1.1"
},
"require-dev": {
"phpunit/phpunit": "^6.5",
"satooshi/php-coveralls": "^2.1",
"nimut/testing-framework": "^4.1",
"namelesscoder/typo3-repository-client": "2.*",
"helmich/typo3-typoscript-lint": "^2.0",
"typo3/fluid-schema-generator": "^2.1"
},
"replace": {
"filoucrackeur/storage-framework-manager": "self.version",
"typo3-ter/storage-framework-manager": "self.version"
},
"autoload": {
"psr-4": {
"Filoucrackeur\\StorageFrameworkManager\\": "Classes/"
}
},
"autoload-dev": {
"psr-4": {
"Filoucrackeur\\StorageFrameworkManager\\Tests\\": "Tests",
"TYPO3\\Components\\TestingFramework\\": ".Build/vendor/typo3/cms/components/testing_framework/Classes/",
"TYPO3\\CMS\\Core\\Tests\\": ".Build/vendor/typo3/cms/typo3/sysext/core/Tests/",
"TYPO3\\CMS\\Fluid\\Tests\\": ".Build/vendor/typo3/cms/typo3/sysext/fluid/Tests/"
}
},
"config": {
"vendor-dir": ".Build/vendor",
"bin-dir": ".Build/bin"
},
"scripts": {
"post-autoload-dump": [
"TYPO3\\TestingFramework\\Composer\\ExtensionTestEnvironment::prepare"
]
},
"extra": {
"branch-alias": {
"dev-master": "0.x-dev"
},
"typo3/cms": {
"cms-package-dir": "{$vendor-dir}/typo3/cms",
"web-dir": ".Build/Web",
"extension-key": "storage_framework_manager"
}
}
}
3 changes: 1 addition & 2 deletions ext_emconf.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

$EM_CONF[$_EXTKEY] = [
'title' => 'Storage framework manager',
'description' => 'Storage framework manager extension for TYPO3',
Expand All @@ -21,7 +20,7 @@
'author_company' => 'Web Station Service',
'CGLcompliance' => '',
'CGLcompliance_note' => '',
'version' => '0.0.1',
'version' => '1.0.0',
'_md5_values_when_last_written' => '',
'constraints' => [
'depends' => [
Expand Down

0 comments on commit 3db309a

Please sign in to comment.