Skip to content

Commit 3c85f7c

Browse files
committed
Renamed namespace
1 parent 0bb622a commit 3c85f7c

6 files changed

+18
-9
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

77
## [Unreleased]
88

9+
### Changed
10+
11+
- BC-Break: The top-level namespace for all classes has changed from `JakubOnderka` to `PHP_Parallel_Lint`. [#10](https://github.com/php-parallel-lint/PHP-Console-Color/pull/10) from [@grogy](https://github.com/grogy).
12+
913
### Added
1014

1115
- Added downloading per month badge from [@grogy](https://github.com/grogy).

composer.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
}
99
],
1010
"autoload": {
11-
"psr-4": {"JakubOnderka\\PhpConsoleColor\\": "src/"}
11+
"psr-4": {"PHP_Parallel_Lint\\PhpConsoleColor\\": "src/"}
12+
},
13+
"autoload-dev": {
14+
"psr-4": {"PHP_Parallel_Lint\\PhpConsoleColor\\Test\\": "tests/"}
1215
},
1316
"require": {
1417
"php": ">=5.4.0"

example.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
$loader = require_once __DIR__ . '/vendor/autoload.php';
33

4-
$consoleColor = new JakubOnderka\PhpConsoleColor\ConsoleColor();
4+
$consoleColor = new PHP_Parallel_Lint\PhpConsoleColor\ConsoleColor();
55

66
echo "Colors are supported: " . ($consoleColor->isSupported() ? 'Yes' : 'No') . "\n";
77
echo "256 colors are supported: " . ($consoleColor->are256ColorsSupported() ? 'Yes' : 'No') . "\n\n";

src/ConsoleColor.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
namespace JakubOnderka\PhpConsoleColor;
2+
namespace PHP_Parallel_Lint\PhpConsoleColor;
33

44
class ConsoleColor
55
{

src/InvalidStyleException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
namespace JakubOnderka\PhpConsoleColor;
2+
namespace PHP_Parallel_Lint\PhpConsoleColor;
33

44
class InvalidStyleException extends \Exception
55
{

tests/ConsoleColorTest.php

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
2-
use JakubOnderka\PhpConsoleColor\ConsoleColor;
2+
namespace PHP_Parallel_Lint\PhpConsoleColor\Test;
3+
4+
use PHP_Parallel_Lint\PhpConsoleColor\ConsoleColor;
35
use PHPUnit\Framework\TestCase;
46

57
class ConsoleColorWithForceSupport extends ConsoleColor
@@ -148,24 +150,24 @@ public function testHasAndRemoveTheme()
148150
public function testApplyInvalidArgument()
149151
{
150152
$this->exceptionHelper('\InvalidArgumentException');
151-
$this->uut->apply(new stdClass(), 'text');
153+
$this->uut->apply(new \stdClass(), 'text');
152154
}
153155

154156
public function testApplyInvalidStyleName()
155157
{
156-
$this->exceptionHelper('\JakubOnderka\PhpConsoleColor\InvalidStyleException');
158+
$this->exceptionHelper('\PHP_Parallel_Lint\PhpConsoleColor\InvalidStyleException');
157159
$this->uut->apply('invalid', 'text');
158160
}
159161

160162
public function testApplyInvalid256Color()
161163
{
162-
$this->exceptionHelper('\JakubOnderka\PhpConsoleColor\InvalidStyleException');
164+
$this->exceptionHelper('\PHP_Parallel_Lint\PhpConsoleColor\InvalidStyleException');
163165
$this->uut->apply('color_2134', 'text');
164166
}
165167

166168
public function testThemeInvalidStyle()
167169
{
168-
$this->exceptionHelper('\JakubOnderka\PhpConsoleColor\InvalidStyleException');
170+
$this->exceptionHelper('\PHP_Parallel_Lint\PhpConsoleColor\InvalidStyleException');
169171
$this->uut->addTheme('invalid', array('invalid'));
170172
}
171173

0 commit comments

Comments
 (0)