-
Notifications
You must be signed in to change notification settings - Fork 1
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 #1 from pdir/develop
Develop
- Loading branch information
Showing
14 changed files
with
364 additions
and
24 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 |
---|---|---|
@@ -1,10 +1,25 @@ | ||
# Changelog | ||
|
||
[//]: <> ( | ||
Types of changes | ||
Added for new features. | ||
Changed for changes in existing functionality. | ||
Deprecated for soon-to-be removed features. | ||
Removed for now removed features. | ||
Fixed for any bug fixes. | ||
Security in case of vulnerabilities. | ||
) | ||
|
||
## [1.2.2](https://github.com/pdir/contao-webtools/tree/1.2.2) - 2022-07-11 | ||
|
||
- [Removed] ⚠ contao-backup-manager. With the new backup command introduced in Contao 4.13, this bundle will not be maintained anymore. Please refer to <https://docs.contao.org/manual/en/cli/db-backups>. | ||
- [Added] use contao ^4.9 || ^5.0 | ||
|
||
## [1.2.1](https://github.com/pdir/contao-webtools/tree/1.2.1) – 2021-01-05 | ||
|
||
- [feature] Allow PHP 8 | ||
- [Changed] Allow PHP 8 | ||
|
||
## [1.2.0](https://github.com/pdir/contao-webtools/tree/1.2.0) – 2021-10-13 | ||
|
||
- [feature] use contao-backup-manager version 2 | ||
- [feature] set minimum required contao version to 4.9 | ||
- [Added] use contao-backup-manager version 2 | ||
- [Added] set minimum required contao version to 4.9 |
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,24 +1,74 @@ | ||
{ | ||
"name": "pdir/contao-webtools", | ||
"type": "metapackage", | ||
"description": "Install pdir webtools dependencies via Contao Manager or Composer", | ||
"keywords": [ | ||
"contao", | ||
"pdir", | ||
"tools", | ||
"development" | ||
], | ||
"license": "LGPL-3.0-or-later", | ||
"authors": [ | ||
"name": "pdir/contao-webtools", | ||
"description": "Install pdir webtools dependencies via Contao Manager or Composer", | ||
"license": "LGPL-3.0-or-later", | ||
"type": "contao-bundle", | ||
"authors": [ | ||
{ | ||
"name": "Contao Entwickler gesucht", | ||
"name": "pdir GmbH", | ||
"homepage": "https://pdir.de" | ||
}, | ||
{ | ||
"name": "Mathias Arzberger", | ||
"homepage": "https://pdir.de", | ||
"role": "Developer" | ||
} | ||
], | ||
"require": { | ||
"php": ">=7.4", | ||
"contao/core-bundle": "^4.9", | ||
"richardhj/contao-backup-manager": "^2.0", | ||
"pdir/contao-sticky-footer": "^1.0" | ||
} | ||
"homepage": "https://pdir.de", | ||
"support": { | ||
"issues": "https://github.com/pdir/contao-webtools/issues", | ||
"source": "https://github.com/pdir/contao-webtools" | ||
}, | ||
"require": { | ||
"php": "^7.4 || ^8.0", | ||
"contao/core-bundle": "^4.13 || 5.x-dev", | ||
"symfony/config": "^5.4", | ||
"symfony/dependency-injection": "^5.4", | ||
"symfony/http-kernel": "^5.4", | ||
"pdir/contao-sticky-footer": "^1.0" | ||
}, | ||
"require-dev": { | ||
"bamarni/composer-bin-plugin": "^1.5", | ||
"contao/manager-plugin": "^2.0", | ||
"phpunit/phpunit": "^9.5", | ||
"symfony/phpunit-bridge": "^6.1" | ||
}, | ||
"conflict": { | ||
"contao/manager-plugin": "<2.0 || >=3.0" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Pdir\\ContaoWebtools\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Pdir\\ContaoWebtools\\Tests\\": "tests/" | ||
} | ||
}, | ||
"config": { | ||
"allow-plugins": { | ||
"bamarni/composer-bin-plugin": true, | ||
"contao-components/installer": true, | ||
"contao/manager-plugin": true, | ||
"dealerdirect/phpcodesniffer-composer-installer": true | ||
} | ||
}, | ||
"extra": { | ||
"bamarni-bin": { | ||
"bin-links": false, | ||
"target-directory": "tools" | ||
}, | ||
"contao-manager-plugin": "Pdir\\ContaoWebtools\\ContaoManager\\Plugin" | ||
}, | ||
"scripts": { | ||
"all": [ | ||
"@unit-tests", | ||
"@ecs", | ||
"@phpstan" | ||
], | ||
"ecs": "@php tools/ecs/vendor/bin/ecs check src tests --config ecs.php --fix --ansi", | ||
"phpstan": "@php tools/phpstan/vendor/bin/phpstan analyze --ansi", | ||
"unit-tests": "@php vendor/bin/phpunit --colors=always" | ||
} | ||
} |
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,43 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use PhpCsFixer\Fixer\Comment\HeaderCommentFixer; | ||
use Symplify\EasyCodingStandard\Config\ECSConfig; | ||
|
||
return static function (ECSConfig $ecsConfig): void { | ||
|
||
$date = date('Y'); | ||
|
||
$header = <<<EOF | ||
Web-Tools Bundle for Contao Open Source CMS | ||
Copyright (c) $date pdir / digital agentur // pdir GmbH | ||
@package webtools-bundle | ||
@link https://pdir.de/contao-webtools/ | ||
@license LGPL-3.0-or-later | ||
@author Mathias Arzberger <[email protected]> | ||
@author Christian Mette <[email protected]> | ||
For the full copyright and license information, please view the LICENSE | ||
file that was distributed with this source code. | ||
EOF; | ||
|
||
|
||
$ecsConfig->sets([__DIR__.'/tools/ecs/vendor/contao/easy-coding-standard/config/contao.php']); | ||
|
||
$ecsConfig->ruleWithConfiguration(HeaderCommentFixer::class, [ | ||
'header' => $header | ||
]); | ||
|
||
if (PHP_VERSION_ID < 80000) { | ||
$ecsConfig->ruleWithConfiguration(\PhpCsFixer\Fixer\ControlStructure\TrailingCommaInMultilineFixer::class, ['elements' => ['arrays'], 'after_heredoc' => true]); | ||
$ecsConfig->skip([\PhpCsFixer\Fixer\PhpUnit\PhpUnitExpectationFixer::class]); // see https://github.com/symplify/symplify/issues/3130 | ||
} | ||
|
||
// Adjust the configuration according to your needs. | ||
$parameters = $ecsConfig->parameters(); | ||
|
||
//$ecsConfig->set(); | ||
}; |
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,19 @@ | ||
includes: | ||
- tools/phpstan/vendor/phpstan/phpstan-phpunit/extension.neon | ||
- tools/phpstan/vendor/phpstan/phpstan-phpunit/rules.neon | ||
- tools/phpstan/vendor/phpstan/phpstan-symfony/extension.neon | ||
- tools/phpstan/vendor/phpstan/phpstan-symfony/rules.neon | ||
|
||
parameters: | ||
level: 6 | ||
|
||
paths: | ||
- %currentWorkingDirectory%/src | ||
- %currentWorkingDirectory%/tests | ||
|
||
universalObjectCratesClasses: | ||
- Contao\Model | ||
- Contao\Template | ||
|
||
excludePaths: | ||
- %currentWorkingDirectory%/src/Resources/* |
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,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" colors="true"> | ||
<coverage> | ||
<include> | ||
<directory>./src</directory> | ||
</include> | ||
<exclude> | ||
<directory>./src/Resources</directory> | ||
</exclude> | ||
</coverage> | ||
<php> | ||
<ini name="error_reporting" value="-1"/> | ||
</php> | ||
<testsuites> | ||
<testsuite name="Pdir Web-Tools Bundle"> | ||
<directory>./tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |
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,37 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* Web-Tools Bundle for Contao Open Source CMS | ||
* | ||
* Copyright (c) 2022 pdir / digital agentur // pdir GmbH | ||
* | ||
* @package webtools-bundle | ||
* @link https://pdir.de/contao-webtools/ | ||
* @license LGPL-3.0-or-later | ||
* @author Mathias Arzberger <[email protected]> | ||
* @author Christian Mette <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Pdir\ContaoWebtools\ContaoManager; | ||
|
||
use Contao\CoreBundle\ContaoCoreBundle; | ||
use Contao\ManagerPlugin\Bundle\BundlePluginInterface; | ||
use Contao\ManagerPlugin\Bundle\Config\BundleConfig; | ||
use Contao\ManagerPlugin\Bundle\Parser\ParserInterface; | ||
use Pdir\ContaoWebtools\PdirContaoWebtoolsBundle; | ||
|
||
class Plugin implements BundlePluginInterface | ||
{ | ||
public function getBundles(ParserInterface $parser): array | ||
{ | ||
return [ | ||
BundleConfig::create(PdirContaoWebtoolsBundle::class) | ||
->setLoadAfter([ContaoCoreBundle::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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* Web-Tools Bundle for Contao Open Source CMS | ||
* | ||
* Copyright (c) 2022 pdir / digital agentur // pdir GmbH | ||
* | ||
* @package webtools-bundle | ||
* @link https://pdir.de/contao-webtools/ | ||
* @license LGPL-3.0-or-later | ||
* @author Mathias Arzberger <[email protected]> | ||
* @author Christian Mette <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Pdir\ContaoWebtools\DependencyInjection; | ||
|
||
use Symfony\Component\Config\FileLocator; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\DependencyInjection\Extension\Extension; | ||
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; | ||
|
||
class PdirContaoWebtoolsExtension extends Extension | ||
{ | ||
public function load(array $configs, ContainerBuilder $container): void | ||
{ | ||
$loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); | ||
|
||
$loader->load('services.yml'); | ||
} | ||
} |
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,29 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* Web-Tools Bundle for Contao Open Source CMS | ||
* | ||
* Copyright (c) 2022 pdir / digital agentur // pdir GmbH | ||
* | ||
* @package webtools-bundle | ||
* @link https://pdir.de/contao-webtools/ | ||
* @license LGPL-3.0-or-later | ||
* @author Mathias Arzberger <[email protected]> | ||
* @author Christian Mette <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Pdir\ContaoWebtools; | ||
|
||
use Symfony\Component\HttpKernel\Bundle\Bundle; | ||
|
||
// Load pdir global functions | ||
require_once __DIR__.'/Resources/functions/pdump.php'; | ||
|
||
class PdirContaoWebtoolsBundle extends Bundle | ||
{ | ||
} |
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,4 @@ | ||
services: | ||
_defaults: | ||
autowire: true | ||
autoconfigure: true |
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,40 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* Web-Tools Bundle for Contao Open Source CMS | ||
* | ||
* Copyright (c) 2022 pdir / digital agentur // pdir GmbH | ||
* | ||
* @package webtools-bundle | ||
* @link https://pdir.de/contao-webtools/ | ||
* @license LGPL-3.0-or-later | ||
* @author Mathias Arzberger <[email protected]> | ||
* @author Christian Mette <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
use Contao\System; | ||
use Symfony\Component\VarDumper\VarDumper; | ||
|
||
if (!function_exists('pdump')) { | ||
function pdump($var, ...$moreVars) | ||
{ | ||
if (System::getContainer()->get('kernel')->isDebug()) { | ||
VarDumper::dump($var); | ||
|
||
foreach ($moreVars as $v) { | ||
VarDumper::dump($v); | ||
} | ||
|
||
if (1 < func_num_args()) { | ||
return func_get_args(); | ||
} | ||
|
||
return $var; | ||
} | ||
} | ||
} |
Oops, something went wrong.