Skip to content

Update namespace to SymfonyTools #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 23, 2021
Merged
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
4 changes: 2 additions & 2 deletions code-block-checker.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

require __DIR__.'/vendor/autoload.php';

use Symfony\CodeBlockChecker\Application;
use Symfony\CodeBlockChecker\Kernel;
use SymfonyTools\CodeBlockChecker\Application;
use SymfonyTools\CodeBlockChecker\Kernel;
use Symfony\Component\Console\Input\ArgvInput;

$input = new ArgvInput();
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
},
"autoload": {
"psr-4": {
"Symfony\\CodeBlockChecker\\": "src/"
"SymfonyTools\\CodeBlockChecker\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Symfony\\CodeBlockChecker\\Tests\\": "tests/"
"SymfonyTools\\CodeBlockChecker\\Tests\\": "tests/"
}
},
"repositories": [
Expand Down
6 changes: 3 additions & 3 deletions config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ services:
string $cacheDir: '%kernel.cache_dir%'

_instanceof:
Symfony\CodeBlockChecker\Service\CodeValidator\Validator:
SymfonyTools\CodeBlockChecker\Service\CodeValidator\Validator:
tags:
- 'app.code_validator'

Symfony\CodeBlockChecker\:
SymfonyTools\CodeBlockChecker\:
resource: '../src/'
exclude:
- '../src/Kernel.php'
- '../src/Application.php'

Symfony\CodeBlockChecker\Service\CodeValidator:
SymfonyTools\CodeBlockChecker\Service\CodeValidator:
arguments: [!tagged_iterator app.code_validator]
2 changes: 1 addition & 1 deletion phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ parameters:
path: src/Kernel.php

-
message: "#^Property Symfony\\\\CodeBlockChecker\\\\Kernel\\:\\:\\$container \\(Symfony\\\\Component\\\\DependencyInjection\\\\Container\\) does not accept CachedContainer\\.$#"
message: "#^Property SymfonyTools\\\\CodeBlockChecker\\\\Kernel\\:\\:\\$container \\(Symfony\\\\Component\\\\DependencyInjection\\\\Container\\) does not accept CachedContainer\\.$#"
count: 1
path: src/Kernel.php

2 changes: 1 addition & 1 deletion src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Symfony\CodeBlockChecker;
namespace SymfonyTools\CodeBlockChecker;

use Symfony\Component\Console\Application as BaseApplication;
use Symfony\Component\Console\Input\InputInterface;
Expand Down
2 changes: 1 addition & 1 deletion src/Command/CacheClearCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Symfony\CodeBlockChecker\Command;
namespace SymfonyTools\CodeBlockChecker\Command;

use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
Expand Down
12 changes: 6 additions & 6 deletions src/Command/CheckDocsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,14 @@

declare(strict_types=1);

namespace Symfony\CodeBlockChecker\Command;
namespace SymfonyTools\CodeBlockChecker\Command;

use Doctrine\RST\Builder\Documents;
use Doctrine\RST\Builder\ParseQueue;
use Doctrine\RST\Builder\ParseQueueProcessor;
use Doctrine\RST\ErrorManager;
use Doctrine\RST\Event\PostNodeCreateEvent;
use Doctrine\RST\Meta\Metas;
use Symfony\CodeBlockChecker\Issue\IssueCollection;
use Symfony\CodeBlockChecker\Listener\CodeNodeCollector;
use Symfony\CodeBlockChecker\Service\Baseline;
use Symfony\CodeBlockChecker\Service\CodeNodeRunner;
use Symfony\CodeBlockChecker\Service\CodeValidator;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
Expand All @@ -24,6 +19,11 @@
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Finder\Finder;
use SymfonyDocsBuilder\BuildConfig;
use SymfonyTools\CodeBlockChecker\Issue\IssueCollection;
use SymfonyTools\CodeBlockChecker\Listener\CodeNodeCollector;
use SymfonyTools\CodeBlockChecker\Service\Baseline;
use SymfonyTools\CodeBlockChecker\Service\CodeNodeRunner;
use SymfonyTools\CodeBlockChecker\Service\CodeValidator;

class CheckDocsCommand extends Command
{
Expand Down
4 changes: 2 additions & 2 deletions src/Issue/Issue.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Symfony\CodeBlockChecker\Issue;
namespace SymfonyTools\CodeBlockChecker\Issue;

use Doctrine\RST\Nodes\CodeNode;
use Symfony\CodeBlockChecker\Service\LineDetector;
use SymfonyTools\CodeBlockChecker\Service\LineDetector;

/**
* Represent an error with some code.
Expand Down
2 changes: 1 addition & 1 deletion src/Issue/IssueCollection.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Symfony\CodeBlockChecker\Issue;
namespace SymfonyTools\CodeBlockChecker\Issue;

class IssueCollection implements \Iterator, \Countable
{
Expand Down
2 changes: 1 addition & 1 deletion src/Kernel.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Symfony\CodeBlockChecker;
namespace SymfonyTools\CodeBlockChecker;

use Psr\Container\ContainerInterface;
use Symfony\Component\Config\FileLocator;
Expand Down
2 changes: 1 addition & 1 deletion src/Listener/CodeNodeCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Symfony\CodeBlockChecker\Listener;
namespace SymfonyTools\CodeBlockChecker\Listener;

use Doctrine\RST\Event\PostNodeCreateEvent;
use Doctrine\RST\Nodes\CodeNode;
Expand Down
6 changes: 3 additions & 3 deletions src/Service/Baseline.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Symfony\CodeBlockChecker\Service;
namespace SymfonyTools\CodeBlockChecker\Service;

use Symfony\CodeBlockChecker\Issue\Issue;
use Symfony\CodeBlockChecker\Issue\IssueCollection;
use SymfonyTools\CodeBlockChecker\Issue\Issue;
use SymfonyTools\CodeBlockChecker\Issue\IssueCollection;

/**
* @author Tobias Nyholm <[email protected]>
Expand Down
6 changes: 3 additions & 3 deletions src/Service/CodeNodeRunner.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

namespace Symfony\CodeBlockChecker\Service;
namespace SymfonyTools\CodeBlockChecker\Service;

use Doctrine\RST\Nodes\CodeNode;
use Symfony\CodeBlockChecker\Issue\Issue;
use Symfony\CodeBlockChecker\Issue\IssueCollection;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Process\Process;
use SymfonyTools\CodeBlockChecker\Issue\Issue;
use SymfonyTools\CodeBlockChecker\Issue\IssueCollection;

/**
* Runs code nodes in a real application.
Expand Down
6 changes: 3 additions & 3 deletions src/Service/CodeValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

declare(strict_types=1);

namespace Symfony\CodeBlockChecker\Service;
namespace SymfonyTools\CodeBlockChecker\Service;

use Symfony\CodeBlockChecker\Issue\IssueCollection;
use Symfony\CodeBlockChecker\Service\CodeValidator\Validator;
use SymfonyTools\CodeBlockChecker\Issue\IssueCollection;
use SymfonyTools\CodeBlockChecker\Service\CodeValidator\Validator;

/**
* Verify that all code nodes has the correct syntax.
Expand Down
6 changes: 3 additions & 3 deletions src/Service/CodeValidator/JsonValidator.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace Symfony\CodeBlockChecker\Service\CodeValidator;
namespace SymfonyTools\CodeBlockChecker\Service\CodeValidator;

use Doctrine\RST\Nodes\CodeNode;
use Symfony\CodeBlockChecker\Issue\Issue;
use Symfony\CodeBlockChecker\Issue\IssueCollection;
use SymfonyTools\CodeBlockChecker\Issue\Issue;
use SymfonyTools\CodeBlockChecker\Issue\IssueCollection;

class JsonValidator implements Validator
{
Expand Down
6 changes: 3 additions & 3 deletions src/Service/CodeValidator/PhpValidator.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace Symfony\CodeBlockChecker\Service\CodeValidator;
namespace SymfonyTools\CodeBlockChecker\Service\CodeValidator;

use Doctrine\RST\Nodes\CodeNode;
use Symfony\CodeBlockChecker\Issue\Issue;
use Symfony\CodeBlockChecker\Issue\IssueCollection;
use Symfony\Component\Process\Process;
use SymfonyTools\CodeBlockChecker\Issue\Issue;
use SymfonyTools\CodeBlockChecker\Issue\IssueCollection;

class PhpValidator implements Validator
{
Expand Down
8 changes: 4 additions & 4 deletions src/Service/CodeValidator/TwigValidator.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace Symfony\CodeBlockChecker\Service\CodeValidator;
namespace SymfonyTools\CodeBlockChecker\Service\CodeValidator;

use Doctrine\RST\Nodes\CodeNode;
use Symfony\CodeBlockChecker\Issue\Issue;
use Symfony\CodeBlockChecker\Issue\IssueCollection;
use Symfony\CodeBlockChecker\Twig\DummyExtension;
use SymfonyTools\CodeBlockChecker\Issue\Issue;
use SymfonyTools\CodeBlockChecker\Issue\IssueCollection;
use SymfonyTools\CodeBlockChecker\Twig\DummyExtension;
use Twig\Environment;
use Twig\Error\SyntaxError;
use Twig\Loader\ArrayLoader;
Expand Down
4 changes: 2 additions & 2 deletions src/Service/CodeValidator/Validator.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Symfony\CodeBlockChecker\Service\CodeValidator;
namespace SymfonyTools\CodeBlockChecker\Service\CodeValidator;

use Doctrine\RST\Nodes\CodeNode;
use Symfony\CodeBlockChecker\Issue\IssueCollection;
use SymfonyTools\CodeBlockChecker\Issue\IssueCollection;

interface Validator
{
Expand Down
6 changes: 3 additions & 3 deletions src/Service/CodeValidator/XmlValidator.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace Symfony\CodeBlockChecker\Service\CodeValidator;
namespace SymfonyTools\CodeBlockChecker\Service\CodeValidator;

use Doctrine\RST\Nodes\CodeNode;
use Symfony\CodeBlockChecker\Issue\Issue;
use Symfony\CodeBlockChecker\Issue\IssueCollection;
use SymfonyTools\CodeBlockChecker\Issue\Issue;
use SymfonyTools\CodeBlockChecker\Issue\IssueCollection;

class XmlValidator implements Validator
{
Expand Down
6 changes: 3 additions & 3 deletions src/Service/CodeValidator/YamlValidator.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

namespace Symfony\CodeBlockChecker\Service\CodeValidator;
namespace SymfonyTools\CodeBlockChecker\Service\CodeValidator;

use Doctrine\RST\Nodes\CodeNode;
use Symfony\CodeBlockChecker\Issue\Issue;
use Symfony\CodeBlockChecker\Issue\IssueCollection;
use Symfony\Component\Yaml\Exception\ParseException;
use Symfony\Component\Yaml\Yaml;
use SymfonyTools\CodeBlockChecker\Issue\Issue;
use SymfonyTools\CodeBlockChecker\Issue\IssueCollection;

class YamlValidator implements Validator
{
Expand Down
2 changes: 1 addition & 1 deletion src/Service/LineDetector.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Symfony\CodeBlockChecker\Service;
namespace SymfonyTools\CodeBlockChecker\Service;

use Doctrine\RST\Nodes\CodeNode;

Expand Down
2 changes: 1 addition & 1 deletion src/Twig/DummyExtension.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Symfony\CodeBlockChecker\Twig;
namespace SymfonyTools\CodeBlockChecker\Twig;

use Twig\Extension\AbstractExtension;
use Twig\TwigFilter;
Expand Down
8 changes: 4 additions & 4 deletions tests/Service/Validator/PhpValidatorTest.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

namespace Symfony\CodeBlockChecker\Tests\Service\Validator;
namespace SymfonyTools\CodeBlockChecker\Tests\Service\Validator;

use Doctrine\RST\Configuration;
use Doctrine\RST\Environment;
use Doctrine\RST\Nodes\CodeNode;
use PHPUnit\Framework\TestCase;
use Symfony\CodeBlockChecker\Issue\IssueCollection;
use Symfony\CodeBlockChecker\Service\CodeValidator\PhpValidator;
use Symfony\CodeBlockChecker\Service\CodeValidator\Validator;
use SymfonyTools\CodeBlockChecker\Issue\IssueCollection;
use SymfonyTools\CodeBlockChecker\Service\CodeValidator\PhpValidator;
use SymfonyTools\CodeBlockChecker\Service\CodeValidator\Validator;

class PhpValidatorTest extends TestCase
{
Expand Down
8 changes: 4 additions & 4 deletions tests/Service/Validator/TwigValidatorTest.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

namespace Symfony\CodeBlockChecker\Tests\Service\Validator;
namespace SymfonyTools\CodeBlockChecker\Tests\Service\Validator;

use Doctrine\RST\Configuration;
use Doctrine\RST\Environment;
use Doctrine\RST\Nodes\CodeNode;
use PHPUnit\Framework\TestCase;
use Symfony\CodeBlockChecker\Issue\IssueCollection;
use Symfony\CodeBlockChecker\Service\CodeValidator\TwigValidator;
use Symfony\CodeBlockChecker\Service\CodeValidator\Validator;
use SymfonyTools\CodeBlockChecker\Issue\IssueCollection;
use SymfonyTools\CodeBlockChecker\Service\CodeValidator\TwigValidator;
use SymfonyTools\CodeBlockChecker\Service\CodeValidator\Validator;

class TwigValidatorTest extends TestCase
{
Expand Down
8 changes: 4 additions & 4 deletions tests/Service/Validator/YamlValidatorTest.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

namespace Symfony\CodeBlockChecker\Tests\Service\Validator;
namespace SymfonyTools\CodeBlockChecker\Tests\Service\Validator;

use Doctrine\RST\Configuration;
use Doctrine\RST\Environment;
use Doctrine\RST\Nodes\CodeNode;
use PHPUnit\Framework\TestCase;
use Symfony\CodeBlockChecker\Issue\IssueCollection;
use Symfony\CodeBlockChecker\Service\CodeValidator\Validator;
use Symfony\CodeBlockChecker\Service\CodeValidator\YamlValidator;
use SymfonyTools\CodeBlockChecker\Issue\IssueCollection;
use SymfonyTools\CodeBlockChecker\Service\CodeValidator\Validator;
use SymfonyTools\CodeBlockChecker\Service\CodeValidator\YamlValidator;

class YamlValidatorTest extends TestCase
{
Expand Down