Skip to content
Closed
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
11 changes: 6 additions & 5 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ jobs:
- ubuntu-latest

php:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
- "8.5"
- "8.6"

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v7

- name: Install PHP
uses: shivammathur/setup-php@v2
Expand All @@ -35,7 +36,7 @@ jobs:
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV

- name: Cache dependencies installed with composer
uses: actions/cache@v3
uses: actions/cache@v6
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
Expand All @@ -49,6 +50,6 @@ jobs:
run: vendor/bin/phpunit --colors=always --coverage-clover clover.xml

- name: Send code coverage report to Codecov.io
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
9 changes: 5 additions & 4 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ jobs:
- ubuntu-latest

php:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
- "8.5"
- "8.6"

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Install PHP
uses: shivammathur/setup-php@v2
Expand All @@ -35,7 +36,7 @@ jobs:
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV

- name: Cache dependencies installed with composer
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ Documentation is available at: https://docs.dotkernel.org/dot-debugbar/.
[![GitHub stars](https://img.shields.io/github/stars/dotkernel/dot-debugbar)](https://github.com/dotkernel/dot-debugbar/stargazers)
[![GitHub license](https://img.shields.io/github/license/dotkernel/dot-debugbar)](https://github.com/dotkernel/dot-debugbar/blob/1.0/LICENSE.md)

[![Build Static](https://github.com/dotkernel/dot-debugbar/actions/workflows/continuous-integration.yml/badge.svg?branch=1.0)](https://github.com/dotkernel/dot-debugbar/actions/workflows/continuous-integration.yml)
[![Build Static](https://github.com/dotkernel/dot-debugbar/actions/workflows/continuous-integration.yml/badge.svg?branch=1.x)](https://github.com/dotkernel/dot-debugbar/actions/workflows/continuous-integration.yml)
[![codecov](https://codecov.io/gh/dotkernel/dot-debugbar/graph/badge.svg?token=F0N8VWKTDW)](https://codecov.io/gh/dotkernel/dot-debugbar)
[![docs-build](https://github.com/dotkernel/dot-debugbar/actions/workflows/docs-build.yml/badge.svg)](https://github.com/dotkernel/dot-debugbar/actions/workflows/docs-build.yml)
[![PHPStan](https://github.com/dotkernel/dot-debugbar/actions/workflows/static-analysis.yml/badge.svg?branch=1.0)](https://github.com/dotkernel/dot-debugbar/actions/workflows/static-analysis.yml)
[![PHPStan](https://github.com/dotkernel/dot-debugbar/actions/workflows/static-analysis.yml/badge.svg?branch=1.x)](https://github.com/dotkernel/dot-debugbar/actions/workflows/static-analysis.yml)

## Install

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
}
},
"require": {
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"php": "~8.3.0 || ~8.4.0 || ~8.5.0 || ~8.6.0",
"doctrine/dbal": "^2.13.9",
"doctrine/orm": "^2.17.3",
"dotkernel/dot-twigrenderer": "^3.4.2",
Expand All @@ -47,7 +47,7 @@
"laminas/laminas-coding-standard": "^3.0",
"phpstan/phpstan": "^2.1",
"phpstan/phpstan-phpunit": "^2.0",
"phpunit/phpunit": "^10.5.7"
"phpunit/phpunit": "^12.5.22"
},
"scripts": {
"check": [
Expand Down
4 changes: 2 additions & 2 deletions docs/book/v1/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Dotkernel's debug bar component
[![GitHub stars](https://img.shields.io/github/stars/dotkernel/dot-debugbar)](https://github.com/dotkernel/dot-debugbar/stargazers)
[![GitHub license](https://img.shields.io/github/license/dotkernel/dot-debugbar)](https://github.com/dotkernel/dot-debugbar/blob/1.0/LICENSE.md)

[![Build Static](https://github.com/dotkernel/dot-debugbar/actions/workflows/continuous-integration.yml/badge.svg?branch=1.0)](https://github.com/dotkernel/dot-debugbar/actions/workflows/continuous-integration.yml)
[![Build Static](https://github.com/dotkernel/dot-debugbar/actions/workflows/continuous-integration.yml/badge.svg?branch=1.x)](https://github.com/dotkernel/dot-debugbar/actions/workflows/continuous-integration.yml)
[![codecov](https://codecov.io/gh/dotkernel/dot-debugbar/graph/badge.svg?token=F0N8VWKTDW)](https://codecov.io/gh/dotkernel/dot-debugbar)
[![docs-build](https://github.com/dotkernel/dot-debugbar/actions/workflows/docs-build.yml/badge.svg)](https://github.com/dotkernel/dot-debugbar/actions/workflows/docs-build.yml)
[![PHPStan](https://github.com/dotkernel/dot-debugbar/actions/workflows/static-analysis.yml/badge.svg?branch=1.0)](https://github.com/dotkernel/dot-debugbar/actions/workflows/static-analysis.yml)
[![PHPStan](https://github.com/dotkernel/dot-debugbar/actions/workflows/static-analysis.yml/badge.svg?branch=1.x)](https://github.com/dotkernel/dot-debugbar/actions/workflows/static-analysis.yml)
2 changes: 1 addition & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.2/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/12.5/phpunit.xsd"
bootstrap="./vendor/autoload.php"
colors="true">
<testsuites>
Expand Down
26 changes: 13 additions & 13 deletions test/DebugBarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class DebugBarTest extends TestCase
*/
public function testCanCreate(): void
{
$configuration = $this->createMock(Configuration::class);
$configuration = $this->createStub(Configuration::class);
$dotDebugBar = new DebugBar($configuration, $this->config);
$this->assertSame(DebugBar::class, $dotDebugBar::class);
}
Expand All @@ -33,7 +33,7 @@ public function testWillNotEnableIfConfigDisabled(): void
{
$config = $this->config;
$config[DebugBar::class]['enabled'] = false;
$configuration = $this->createMock(Configuration::class);
$configuration = $this->createStub(Configuration::class);
$dotDebugBar = new DebugBar($configuration, $config);
$this->assertFalse($dotDebugBar->shouldEnable(''));
}
Expand All @@ -44,7 +44,7 @@ public function testWillNotEnableIfConfigDisabled(): void
*/
public function testWillNotEnableIfConfigEnabledButIpAddressIsInvalid(): void
{
$configuration = $this->createMock(Configuration::class);
$configuration = $this->createStub(Configuration::class);
$dotDebugBar = new DebugBar($configuration, $this->config);
$this->assertFalse($dotDebugBar->shouldEnable('test'));
}
Expand All @@ -55,7 +55,7 @@ public function testWillNotEnableIfConfigEnabledButIpAddressIsInvalid(): void
*/
public function testWillNotEnableIfConfigEnabledAndValidIpv4AddressNotWhitelisted(): void
{
$configuration = $this->createMock(Configuration::class);
$configuration = $this->createStub(Configuration::class);
$dotDebugBar = new DebugBar($configuration, $this->config);
$this->assertFalse($dotDebugBar->shouldEnable('127.0.0.1'));
}
Expand All @@ -66,7 +66,7 @@ public function testWillNotEnableIfConfigEnabledAndValidIpv4AddressNotWhiteliste
*/
public function testWillNotEnableIfConfigEnabledAndValidIpv6AddressNotWhitelisted(): void
{
$configuration = $this->createMock(Configuration::class);
$configuration = $this->createStub(Configuration::class);
$dotDebugBar = new DebugBar($configuration, $this->config);
$this->assertFalse(
$dotDebugBar->shouldEnable('::1')
Expand All @@ -81,7 +81,7 @@ public function testWillEnableIfConfigEnabledAndValidWhitelistedIpv4Address(): v
{
$config = $this->config;
$config[DebugBar::class]['ipv4Whitelist'][] = '127.0.0.1';
$configuration = $this->createMock(Configuration::class);
$configuration = $this->createStub(Configuration::class);
$dotDebugBar = new DebugBar($configuration, $config);
$this->assertTrue($dotDebugBar->shouldEnable('127.0.0.1'));
}
Expand All @@ -94,7 +94,7 @@ public function testWillEnableIfConfigEnabledAndValidWhitelistedIpv6Address(): v
{
$config = $this->config;
$config[DebugBar::class]['ipv6Whitelist'][] = '::1';
$configuration = $this->createMock(Configuration::class);
$configuration = $this->createStub(Configuration::class);
$dotDebugBar = new DebugBar($configuration, $config);
$this->assertTrue($dotDebugBar->shouldEnable('::1'));
}
Expand All @@ -107,7 +107,7 @@ public function testWillEnableIfConfigEnabledAndAllowAnyValidIpv4Address(): void
{
$config = $this->config;
$config[DebugBar::class]['ipv4Whitelist'][] = '*';
$configuration = $this->createMock(Configuration::class);
$configuration = $this->createStub(Configuration::class);
$dotDebugBar = new DebugBar($configuration, $config);
$this->assertTrue($dotDebugBar->shouldEnable('127.0.0.1'));
}
Expand All @@ -120,7 +120,7 @@ public function testWillEnableIfConfigEnabledAndAllowAnyValidIpv6Address(): void
{
$config = $this->config;
$config[DebugBar::class]['ipv6Whitelist'][] = '*';
$configuration = $this->createMock(Configuration::class);
$configuration = $this->createStub(Configuration::class);
$dotDebugBar = new DebugBar($configuration, $config);
$this->assertTrue($dotDebugBar->shouldEnable('::1'));
}
Expand All @@ -131,7 +131,7 @@ public function testWillEnableIfConfigEnabledAndAllowAnyValidIpv6Address(): void
*/
public function testWillToggle(): void
{
$configuration = $this->createMock(Configuration::class);
$configuration = $this->createStub(Configuration::class);
$dotDebugBar = new DebugBar($configuration, $this->config);
$this->assertFalse($dotDebugBar->isEnabled());
$dotDebugBar->enable();
Expand All @@ -148,7 +148,7 @@ public function testWillToggle(): void
*/
public function testWillAddMessage(): void
{
$configuration = $this->createMock(Configuration::class);
$configuration = $this->createStub(Configuration::class);
$dotDebugBar = new DebugBar($configuration, $this->config);
$this->assertCount(0, $dotDebugBar->getMessagesCollector()->getMessages());
$dotDebugBar->addMessage('test');
Expand All @@ -162,7 +162,7 @@ public function testWillAddMessage(): void
*/
public function testWillStartStopMeasureTimer(): void
{
$configuration = $this->createMock(Configuration::class);
$configuration = $this->createStub(Configuration::class);
$dotDebugBar = new DebugBar($configuration, $this->config);
$this->assertFalse($dotDebugBar->getTimeDataCollector()->hasStartedMeasure('test'));
$dotDebugBar->startTimer('test');
Expand All @@ -179,7 +179,7 @@ public function testWillStartStopMeasureTimer(): void
*/
public function testWillAddThrowable(): void
{
$configuration = $this->createMock(Configuration::class);
$configuration = $this->createStub(Configuration::class);
$dotDebugBar = new DebugBar($configuration, $this->config);
$this->assertCount(0, $dotDebugBar->getExceptionsCollector()->getExceptions());
$dotDebugBar->addThrowable(new \Exception('test'));
Expand Down
14 changes: 7 additions & 7 deletions test/Extension/DebugBarExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class DebugBarExtensionTest extends TestCase
*/
public function testGetFunctions(): void
{
$dotDebugBar = $this->createMock(DebugBar::class);
$dotDebugBar = $this->createStub(DebugBar::class);
$extension = new DebugBarExtension($dotDebugBar, $this->config['application']['url']);
$functions = $extension->getFunctions();
$this->assertIsArray($functions);
Expand All @@ -41,7 +41,7 @@ public function testGetFunctions(): void
*/
public function testRenderDebugBarEnabledReturnsTrueWhenEnabled(): void
{
$configuration = $this->createMock(Configuration::class);
$configuration = $this->createStub(Configuration::class);
$dotDebugBar = new DebugBar($configuration, [
DebugBar::class => [],
]);
Expand All @@ -57,7 +57,7 @@ public function testRenderDebugBarEnabledReturnsTrueWhenEnabled(): void
*/
public function testRenderDebugBarEnabledReturnsFalseWhenDisabled(): void
{
$configuration = $this->createMock(Configuration::class);
$configuration = $this->createStub(Configuration::class);
$dotDebugBar = new DebugBar($configuration, [
DebugBar::class => [],
]);
Expand All @@ -73,7 +73,7 @@ public function testRenderDebugBarEnabledReturnsFalseWhenDisabled(): void
*/
public function testWillNotRenderDebugBarCssWhenDisabled(): void
{
$configuration = $this->createMock(Configuration::class);
$configuration = $this->createStub(Configuration::class);
$dotDebugBar = new DebugBar($configuration, [
DebugBar::class => [],
]);
Expand All @@ -89,7 +89,7 @@ public function testWillNotRenderDebugBarCssWhenDisabled(): void
*/
public function testWillRenderDebugBarCssWhenEnabled(): void
{
$configuration = $this->createMock(Configuration::class);
$configuration = $this->createStub(Configuration::class);
$dotDebugBar = new DebugBar($configuration, [
DebugBar::class => [],
]);
Expand All @@ -107,7 +107,7 @@ public function testWillRenderDebugBarCssWhenEnabled(): void
*/
public function testWillNotRenderDebugBarJsWhenDisabled(): void
{
$configuration = $this->createMock(Configuration::class);
$configuration = $this->createStub(Configuration::class);
$dotDebugBar = new DebugBar($configuration, [
DebugBar::class => [],
]);
Expand All @@ -123,7 +123,7 @@ public function testWillNotRenderDebugBarJsWhenDisabled(): void
*/
public function testWillRenderDebugBarJsWhenEnabled(): void
{
$configuration = $this->createMock(Configuration::class);
$configuration = $this->createStub(Configuration::class);
$dotDebugBar = new DebugBar($configuration, [
DebugBar::class => [],
]);
Expand Down
10 changes: 5 additions & 5 deletions test/Factory/DebugBarExtensionFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class DebugBarExtensionFactoryTest extends TestCase
*/
public function testWillNotCreateExtensionWithoutConfig(): void
{
$container = $this->createMock(ContainerInterface::class);
$container = $this->createStub(ContainerInterface::class);

$container->method('has')->willReturnMap([
[DebugBarInterface::class, true],
Expand All @@ -44,7 +44,7 @@ public function testWillNotCreateExtensionWithoutConfig(): void
*/
public function testWillNotCreateExtensionWithoutPackageConfig(): void
{
$container = $this->createMock(ContainerInterface::class);
$container = $this->createStub(ContainerInterface::class);

$container->method('has')->willReturnMap([
[DebugBarInterface::class, true],
Expand All @@ -66,7 +66,7 @@ public function testWillNotCreateExtensionWithoutPackageConfig(): void
*/
public function testWillNotCreateExtensionWithoutDebugBar(): void
{
$container = $this->createMock(ContainerInterface::class);
$container = $this->createStub(ContainerInterface::class);

$container->method('has')->willReturnMap([
['config', true],
Expand All @@ -84,8 +84,8 @@ public function testWillNotCreateExtensionWithoutDebugBar(): void
*/
public function testWillCreateExtension(): void
{
$container = $this->createMock(ContainerInterface::class);
$debugBar = $this->createMock(DebugBarInterface::class);
$container = $this->createStub(ContainerInterface::class);
$debugBar = $this->createStub(DebugBarInterface::class);

$container->method('has')->willReturnMap([
['config', true],
Expand Down
14 changes: 7 additions & 7 deletions test/Factory/DebugBarFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function testWillNotCreateServiceWithoutEntityManager(): void
*/
public function testWillNotCreateServiceWithoutConfig(): void
{
$container = $this->createMock(ContainerInterface::class);
$container = $this->createStub(ContainerInterface::class);

$container->method('has')->willReturnMap([
[EntityManager::class, true],
Expand All @@ -68,7 +68,7 @@ public function testWillNotCreateServiceWithoutConfig(): void
*/
public function testWillNotCreateServiceWithoutMissingConfigEnabled(): void
{
$container = $this->createMock(ContainerInterface::class);
$container = $this->createStub(ContainerInterface::class);

$container->method('has')->willReturnMap([
[EntityManager::class, true],
Expand Down Expand Up @@ -99,7 +99,7 @@ public function testWillNotCreateServiceWithoutMissingConfigEnabled(): void
*/
public function testWillNotCreateServiceWithoutMissingConfigIPv4Whitelist(): void
{
$container = $this->createMock(ContainerInterface::class);
$container = $this->createStub(ContainerInterface::class);

$container->method('has')->willReturnMap([
[EntityManager::class, true],
Expand Down Expand Up @@ -130,7 +130,7 @@ public function testWillNotCreateServiceWithoutMissingConfigIPv4Whitelist(): voi
*/
public function testWillNotCreateServiceWithoutMissingConfigIPv6Whitelist(): void
{
$container = $this->createMock(ContainerInterface::class);
$container = $this->createStub(ContainerInterface::class);

$container->method('has')->willReturnMap([
[EntityManager::class, true],
Expand Down Expand Up @@ -162,7 +162,7 @@ public function testWillNotCreateServiceWithoutMissingConfigIPv6Whitelist(): voi
*/
public function testWillNotCreateServiceWithoutMissingConfigJavaScriptRenderer(): void
{
$container = $this->createMock(ContainerInterface::class);
$container = $this->createStub(ContainerInterface::class);

$container->method('has')->willReturnMap([
[EntityManager::class, true],
Expand Down Expand Up @@ -195,9 +195,9 @@ public function testWillNotCreateServiceWithoutMissingConfigJavaScriptRenderer()
*/
public function testWillCreateService(): void
{
$configuration = $this->createMock(Configuration::class);
$configuration = $this->createStub(Configuration::class);
$connection = $this->createMock(Connection::class);
$container = $this->createMock(ContainerInterface::class);
$container = $this->createStub(ContainerInterface::class);
$em = $this->createMock(EntityManager::class);

$container->method('has')->willReturnMap([
Expand Down
Loading
Loading