Skip to content
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

Removed the try/catch that used to handle the AnnotationException(s) #176

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
61db250
initial commit migrating annotations to attributes
May 28, 2024
1a77d6f
minor tweak in Translate attribute, so you dont have to pass a defaul…
May 28, 2024
696f314
minor refactor entities so they use property promotion
May 28, 2024
8b59bb9
remove some comments that werent supposed to be there
May 28, 2024
65ba8cc
removed dependency on lower symfony versions + switched to deprecatio…
May 29, 2024
7fa167e
replaced AnnotationLoader with AttributeLoader in some tests
May 29, 2024
c962988
changed php requirement, added ^7.2 back since the STAN and CSFixer t…
May 29, 2024
ef7807d
bumped to 8.1
May 29, 2024
2bc1c75
reverted custom attribute changes, except the SymfonyValidation Annot…
antiftw Jun 4, 2024
654921f
Merge branch 'annotationsBack'
antiftw Jun 4, 2024
6e8b590
some more use statements that apparently did not influence the tests
antiftw Jun 4, 2024
a141bda
all but one PHPSTAN tests passing
antiftw Jun 7, 2024
0a593c0
fixed last phpstan test?
antiftw Jun 8, 2024
17934de
weird issue
antiftw Jun 9, 2024
7cc1b2a
fixed errors that originated in bumping nikic/php-parser to 5.0
antiftw Jun 9, 2024
00da055
Merge branch 'parserBump' -> bumped "nikic/php-parser": "^3.0 || ^4.0…
antiftw Jun 9, 2024
16455ae
removed support for 3.0 nikic/php-parser
antiftw Jun 9, 2024
dfd83ed
removed superfluous test
antiftw Jun 11, 2024
9ec4a8f
removed a superfluous try catch, since no more exception is thrown
antiftw Jun 14, 2024
4833d58
Merge branch 'php-translation:master' into master
antiftw Jun 14, 2024
d6918d5
other exception can be thrown apparently
antiftw Jun 14, 2024
c1c53ca
Merge branch 'master' of github.com:antiftw/php-translation-extractor
antiftw Jun 14, 2024
9cbd99c
more specific exception catch
antiftw Jun 14, 2024
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 src/Visitor/Php/Symfony/ValidationAnnotation.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

namespace Translation\Extractor\Visitor\Php\Symfony;

use Doctrine\Common\Annotations\AnnotationException;
use PhpParser\Node;
use PhpParser\NodeVisitor;
use Symfony\Component\Validator\Exception\NoSuchMetadataException;
use Symfony\Component\Validator\Mapping\ClassMetadata;
use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface;
use Translation\Extractor\Visitor\Php\BasePHPVisitor;
Expand Down Expand Up @@ -63,7 +63,7 @@ public function enterNode(Node $node): ?Node
try {
/** @var ClassMetadata $metadata */
$metadata = $this->metadataFactory->getMetadataFor($name);
} catch (AnnotationException $e) {
} catch (NoSuchMetadataException $e) {
$this->addError($node, sprintf('Could not parse class "%s" for annotations. %s', $this->namespace, $e->getMessage()));

return null;
Expand Down
Loading