Skip to content

Commit

Permalink
Merge pull request #121 from sj-i/version_number
Browse files Browse the repository at this point in the history
display correct version number in the output of -v
  • Loading branch information
sj-i authored Nov 25, 2021
2 parents aa47acd + a1b9886 commit e71c1a4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions php-profiler
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ declare(strict_types=1);
use DI\ContainerBuilder;
use PhpProfiler\Command\CommandEnumerator;
use PhpProfiler\Lib\Log\Log;
use PhpProfiler\PhpProfiler;
use Psr\Log\LoggerInterface;
use PhpProfiler\Lib\Log\StateCollector\StateCollector;
use Symfony\Component\Console\Application;
Expand All @@ -25,6 +26,9 @@ require 'vendor/autoload.php';
$application = new Application();
$container = (new ContainerBuilder())->addDefinitions(__DIR__ . '/config/di.php')->build();

$application->setName(PhpProfiler::TOOL_NAME);
$application->setVersion(PhpProfiler::VERSION);

Log::initializeLogger(
$container->make(LoggerInterface::class),
$container->make(StateCollector::class),
Expand Down
20 changes: 20 additions & 0 deletions src/PhpProfiler.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

/**
* This file is part of the sj-i/ package.
*
* (c) sji <sji@sj-i.dev>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace PhpProfiler;

final class PhpProfiler
{
public const TOOL_NAME = 'php-profiler';
public const VERSION = '0.3.6';
}

0 comments on commit e71c1a4

Please sign in to comment.