Skip to content

Commit

Permalink
Fix exception (#986)
Browse files Browse the repository at this point in the history
* Update changelog

* Fix exception location

"CouldNotloadMetadata" exception was in the tests namespace instead of
the src namespace

* Update CL
  • Loading branch information
dantleech committed Mar 6, 2022
1 parent 414f462 commit a38af13
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 7 deletions.
13 changes: 11 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
CHANGELOG
=========

master
------
1.2.5
-----

Bug fixes:

- New "CouldNotLoadMetadata" exception was located in the `tests` folder and
was not available when phpbench was used as a dependency.

1.2.4
-----

Improvements

- Show [solidarity](https://github.com/vshymanskyy/StandWithUkraine) with Ukrainians
- Show more concise error messages including script exit code #969
- Configuration (`expression.strip_tailing_zeros`) to strip meaningless zeros after the decimal place #958

Expand Down
2 changes: 1 addition & 1 deletion lib/Benchmark/Metadata/AnnotationReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use Doctrine\Common\Annotations\TokenParser;
use PhpBench\Reflection\ReflectionClass;
use PhpBench\Reflection\ReflectionMethod;
use PhpBench\Tests\Unit\Benchmark\Metadata\Exception\CouldNotLoadMetadataException;
use PhpBench\Benchmark\Metadata\Exception\CouldNotLoadMetadataException;

/**
* Annotation reader.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace PhpBench\Tests\Unit\Benchmark\Metadata\Exception;
namespace PhpBench\Benchmark\Metadata\Exception;

use InvalidArgumentException;

Expand Down
2 changes: 1 addition & 1 deletion lib/Benchmark/Metadata/MetadataFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use PhpBench\Model\Subject;
use PhpBench\Reflection\ReflectionHierarchy;
use PhpBench\Reflection\ReflectorInterface;
use PhpBench\Tests\Unit\Benchmark\Metadata\Exception\CouldNotLoadMetadataException;
use PhpBench\Benchmark\Metadata\Exception\CouldNotLoadMetadataException;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
use PhpBench\Reflection\ReflectionMethod;
use PhpBench\Reflection\ReflectorInterface;
use PhpBench\Tests\TestCase;
use PhpBench\Tests\Unit\Benchmark\Metadata\Exception\CouldNotLoadMetadataException;
use PhpBench\Benchmark\Metadata\Exception\CouldNotLoadMetadataException;

class AnnotationDriverTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Benchmark/Metadata/MetadataFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
use PhpBench\Reflection\ReflectionHierarchy;
use PhpBench\Reflection\ReflectorInterface;
use PhpBench\Tests\TestCase;
use PhpBench\Tests\Unit\Benchmark\Metadata\Exception\CouldNotLoadMetadataException;
use PhpBench\Benchmark\Metadata\Exception\CouldNotLoadMetadataException;
use PhpBench\Tests\Util\TestLogger;
use PhpBench\Tests\Util\TestUtil;
use Prophecy\Prophecy\ObjectProphecy;
Expand Down

0 comments on commit a38af13

Please sign in to comment.